dreamer-server 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.
- dreamer_server-0.1.0/.github/workflows/publish.yml +42 -0
- dreamer_server-0.1.0/.gitignore +218 -0
- dreamer_server-0.1.0/LICENSE +21 -0
- dreamer_server-0.1.0/PKG-INFO +199 -0
- dreamer_server-0.1.0/README.md +169 -0
- dreamer_server-0.1.0/dreamer/__init__.py +1 -0
- dreamer_server-0.1.0/dreamer/api/__init__.py +152 -0
- dreamer_server-0.1.0/dreamer/api/audit.py +22 -0
- dreamer_server-0.1.0/dreamer/api/auth.py +37 -0
- dreamer_server-0.1.0/dreamer/api/capabilities.py +78 -0
- dreamer_server-0.1.0/dreamer/api/compat.py +139 -0
- dreamer_server-0.1.0/dreamer/api/config.py +451 -0
- dreamer_server-0.1.0/dreamer/api/contexts.py +744 -0
- dreamer_server-0.1.0/dreamer/api/dream.py +61 -0
- dreamer_server-0.1.0/dreamer/api/errors.py +62 -0
- dreamer_server-0.1.0/dreamer/api/hooks.py +131 -0
- dreamer_server-0.1.0/dreamer/api/jobs.py +34 -0
- dreamer_server-0.1.0/dreamer/api/rate_limit.py +29 -0
- dreamer_server-0.1.0/dreamer/api/runtime_state.py +60 -0
- dreamer_server-0.1.0/dreamer/api/secrets.py +40 -0
- dreamer_server-0.1.0/dreamer/api/stores.py +168 -0
- dreamer_server-0.1.0/dreamer/api/tenants.py +160 -0
- dreamer_server-0.1.0/dreamer/api/triggers.py +34 -0
- dreamer_server-0.1.0/dreamer/api/types.py +199 -0
- dreamer_server-0.1.0/dreamer/api/usage.py +22 -0
- dreamer_server-0.1.0/dreamer/cli/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/cli/main.py +723 -0
- dreamer_server-0.1.0/dreamer/contrib/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/audit/__init__.py +5 -0
- dreamer_server-0.1.0/dreamer/contrib/audit/log.py +33 -0
- dreamer_server-0.1.0/dreamer/contrib/auth/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/auth/simple_token/__init__.py +3 -0
- dreamer_server-0.1.0/dreamer/contrib/auth/simple_token/backend.py +207 -0
- dreamer_server-0.1.0/dreamer/contrib/auth/simple_token/cli.py +87 -0
- dreamer_server-0.1.0/dreamer/contrib/context/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/context/fanout.py +296 -0
- dreamer_server-0.1.0/dreamer/contrib/context/markdown.py +240 -0
- dreamer_server-0.1.0/dreamer/contrib/dream/__init__.py +17 -0
- dreamer_server-0.1.0/dreamer/contrib/dream/_docker.py +52 -0
- dreamer_server-0.1.0/dreamer/contrib/dream/_local.py +251 -0
- dreamer_server-0.1.0/dreamer/contrib/dream/claude_agent.py +380 -0
- dreamer_server-0.1.0/dreamer/contrib/dream/serializers.py +191 -0
- dreamer_server-0.1.0/dreamer/contrib/gates/__init__.py +6 -0
- dreamer_server-0.1.0/dreamer/contrib/gates/budget.py +68 -0
- dreamer_server-0.1.0/dreamer/contrib/gates/empty.py +38 -0
- dreamer_server-0.1.0/dreamer/contrib/hooks/__init__.py +6 -0
- dreamer_server-0.1.0/dreamer/contrib/hooks/git.py +574 -0
- dreamer_server-0.1.0/dreamer/contrib/hooks/log.py +102 -0
- dreamer_server-0.1.0/dreamer/contrib/jobs/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/jobs/inproc.py +85 -0
- dreamer_server-0.1.0/dreamer/contrib/ltm/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/ltm/markdown.py +431 -0
- dreamer_server-0.1.0/dreamer/contrib/mcp_tools/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/rate_limit/__init__.py +5 -0
- dreamer_server-0.1.0/dreamer/contrib/rate_limit/noop.py +38 -0
- dreamer_server-0.1.0/dreamer/contrib/secrets/__init__.py +5 -0
- dreamer_server-0.1.0/dreamer/contrib/secrets/env.py +65 -0
- dreamer_server-0.1.0/dreamer/contrib/stm/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/stm/sqlite.py +634 -0
- dreamer_server-0.1.0/dreamer/contrib/tenancy/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/tenancy/single.py +29 -0
- dreamer_server-0.1.0/dreamer/contrib/tenants/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/tenants/static.py +323 -0
- dreamer_server-0.1.0/dreamer/contrib/triggers/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/contrib/triggers/cron.py +136 -0
- dreamer_server-0.1.0/dreamer/contrib/triggers/external.py +51 -0
- dreamer_server-0.1.0/dreamer/contrib/triggers/multitenant.py +351 -0
- dreamer_server-0.1.0/dreamer/contrib/triggers/threshold.py +141 -0
- dreamer_server-0.1.0/dreamer/contrib/usage/__init__.py +5 -0
- dreamer_server-0.1.0/dreamer/contrib/usage/log.py +40 -0
- dreamer_server-0.1.0/dreamer/server/__init__.py +0 -0
- dreamer_server-0.1.0/dreamer/server/app.py +567 -0
- dreamer_server-0.1.0/dreamer/server/bootstrap.py +270 -0
- dreamer_server-0.1.0/dreamer/server/compliance.py +376 -0
- dreamer_server-0.1.0/dreamer/server/control.py +144 -0
- dreamer_server-0.1.0/dreamer/server/mcp_app.py +579 -0
- dreamer_server-0.1.0/dreamer/server/orchestrator.py +1879 -0
- dreamer_server-0.1.0/dreamer/server/runtime.py +429 -0
- dreamer_server-0.1.0/dreamer/server/secret_watcher.py +155 -0
- dreamer_server-0.1.0/dreamer/server/sinks.py +70 -0
- dreamer_server-0.1.0/dreamer/testing/__init__.py +5 -0
- dreamer_server-0.1.0/dreamer/testing/conformance/__init__.py +21 -0
- dreamer_server-0.1.0/dreamer/testing/conformance/context_store.py +106 -0
- dreamer_server-0.1.0/dreamer/testing/conformance/dream_lease.py +148 -0
- dreamer_server-0.1.0/dreamer/testing/conformance/ltm_store.py +137 -0
- dreamer_server-0.1.0/dreamer/testing/conformance/stm_serializer.py +102 -0
- dreamer_server-0.1.0/dreamer/testing/conformance/stm_store.py +322 -0
- dreamer_server-0.1.0/dreamer/testing/fakes.py +656 -0
- dreamer_server-0.1.0/pyproject.toml +100 -0
- dreamer_server-0.1.0/tests/__init__.py +0 -0
- dreamer_server-0.1.0/tests/conformance/__init__.py +0 -0
- dreamer_server-0.1.0/tests/conformance/test_fakes.py +70 -0
- dreamer_server-0.1.0/tests/conformance/test_markdown.py +42 -0
- dreamer_server-0.1.0/tests/conformance/test_sqlite.py +62 -0
- dreamer_server-0.1.0/tests/integration/__init__.py +0 -0
- dreamer_server-0.1.0/tests/integration/test_cli.py +321 -0
- dreamer_server-0.1.0/tests/integration/test_end_to_end.py +637 -0
- dreamer_server-0.1.0/tests/integration/test_orchestrator.py +1256 -0
- dreamer_server-0.1.0/tests/integration/test_server.py +921 -0
- dreamer_server-0.1.0/tests/integration/test_tenant_lifecycle.py +342 -0
- dreamer_server-0.1.0/tests/integration/test_triggers.py +607 -0
- dreamer_server-0.1.0/tests/unit/__init__.py +0 -0
- dreamer_server-0.1.0/tests/unit/test_claude_agent_engine.py +562 -0
- dreamer_server-0.1.0/tests/unit/test_cli.py +417 -0
- dreamer_server-0.1.0/tests/unit/test_compat.py +138 -0
- dreamer_server-0.1.0/tests/unit/test_compliance.py +232 -0
- dreamer_server-0.1.0/tests/unit/test_config.py +327 -0
- dreamer_server-0.1.0/tests/unit/test_contexts.py +281 -0
- dreamer_server-0.1.0/tests/unit/test_control.py +150 -0
- dreamer_server-0.1.0/tests/unit/test_default_gates.py +131 -0
- dreamer_server-0.1.0/tests/unit/test_default_sinks.py +114 -0
- dreamer_server-0.1.0/tests/unit/test_dream_serializers.py +252 -0
- dreamer_server-0.1.0/tests/unit/test_fanout_context.py +187 -0
- dreamer_server-0.1.0/tests/unit/test_git_commit_hook.py +270 -0
- dreamer_server-0.1.0/tests/unit/test_github_pr_hook.py +344 -0
- dreamer_server-0.1.0/tests/unit/test_log_hook.py +121 -0
- dreamer_server-0.1.0/tests/unit/test_markdown_context.py +128 -0
- dreamer_server-0.1.0/tests/unit/test_markdown_ltm.py +251 -0
- dreamer_server-0.1.0/tests/unit/test_runtime.py +167 -0
- dreamer_server-0.1.0/tests/unit/test_simple_token_auth.py +187 -0
- dreamer_server-0.1.0/tests/unit/test_single_tenant.py +25 -0
- dreamer_server-0.1.0/tests/unit/test_smoke.py +7 -0
- dreamer_server-0.1.0/tests/unit/test_static_tenants.py +302 -0
- dreamer_server-0.1.0/tests/unit/test_tenants.py +57 -0
- dreamer_server-0.1.0/tests/unit/test_types.py +206 -0
- dreamer_server-0.1.0/uv.lock +1345 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
|
|
13
|
+
- name: Install uv
|
|
14
|
+
uses: astral-sh/setup-uv@v5
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
run: uv python install 3.12
|
|
18
|
+
|
|
19
|
+
- name: Build distributions
|
|
20
|
+
run: uv build
|
|
21
|
+
|
|
22
|
+
- uses: actions/upload-artifact@v4
|
|
23
|
+
with:
|
|
24
|
+
name: dist
|
|
25
|
+
path: dist/
|
|
26
|
+
|
|
27
|
+
publish:
|
|
28
|
+
needs: build
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
environment:
|
|
31
|
+
name: pypi
|
|
32
|
+
url: https://pypi.org/p/dreamer-server
|
|
33
|
+
permissions:
|
|
34
|
+
id-token: write
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/download-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
- name: Publish to PyPI
|
|
42
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 luml-ai
|
|
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.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dreamer-server
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Self-hostable framework for developing coding-agent context from lived experience
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.12
|
|
8
|
+
Requires-Dist: click<9,>=8.1
|
|
9
|
+
Requires-Dist: mcp>=1.27.0
|
|
10
|
+
Requires-Dist: pydantic<3,>=2.0
|
|
11
|
+
Requires-Dist: pyyaml<7,>=6.0
|
|
12
|
+
Requires-Dist: starlette<1,>=0.36
|
|
13
|
+
Requires-Dist: uvicorn<1,>=0.27
|
|
14
|
+
Provides-Extra: apscheduler
|
|
15
|
+
Requires-Dist: apscheduler<4,>=3.10; extra == 'apscheduler'
|
|
16
|
+
Provides-Extra: claude-agent
|
|
17
|
+
Requires-Dist: anthropic<1,>=0.39; extra == 'claude-agent'
|
|
18
|
+
Provides-Extra: defaults
|
|
19
|
+
Requires-Dist: aiosqlite<1,>=0.19; extra == 'defaults'
|
|
20
|
+
Requires-Dist: anthropic<1,>=0.39; extra == 'defaults'
|
|
21
|
+
Requires-Dist: apscheduler<4,>=3.10; extra == 'defaults'
|
|
22
|
+
Requires-Dist: gitpython<4,>=3.1; extra == 'defaults'
|
|
23
|
+
Requires-Dist: sqlalchemy[asyncio]<3,>=2.0; extra == 'defaults'
|
|
24
|
+
Provides-Extra: git
|
|
25
|
+
Requires-Dist: gitpython<4,>=3.1; extra == 'git'
|
|
26
|
+
Provides-Extra: sqlite
|
|
27
|
+
Requires-Dist: aiosqlite<1,>=0.19; extra == 'sqlite'
|
|
28
|
+
Requires-Dist: sqlalchemy[asyncio]<3,>=2.0; extra == 'sqlite'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
<h1 align="center">Dreamer - self-evolving context for your coding agents</h1>
|
|
32
|
+
<!--<p align="center"><em>Self-evolving context for your coding agents.</em></p>-->
|
|
33
|
+
|
|
34
|
+
<picture>
|
|
35
|
+
<source media="(prefers-color-scheme: light)" srcset="https://gist.githubusercontent.com/OKUA1/18d426c57df26e5b1e99727a3aca643d/raw/b2a312ad81c6b3fa05d1793a571b71e2de1feb5a/dreamer-light.svg" >
|
|
36
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://gist.githubusercontent.com/OKUA1/18d426c57df26e5b1e99727a3aca643d/raw/b2a312ad81c6b3fa05d1793a571b71e2de1feb5a/dreamer-dark.svg">
|
|
37
|
+
<img alt="Image" src="https://gist.githubusercontent.com/OKUA1/18d426c57df26e5b1e99727a3aca643d/raw/b2a312ad81c6b3fa05d1793a571b71e2de1feb5a/dreamer-light.svg">
|
|
38
|
+
</picture>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="#get-started">Get started</a> ·
|
|
42
|
+
<a href="#extensions">Extensions</a> ·
|
|
43
|
+
<a href="https://luml.ai/blog/2026/dreamer-self-evolving-agents">Blogpost</a>
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
Dreamer keeps your team's `AGENTS.md` and skills up to date with what your
|
|
47
|
+
coding agents learn while they work. It runs as a self-hostable MCP server
|
|
48
|
+
that collects memories from every agent on the team and, on a schedule,
|
|
49
|
+
regenerates the context bundle the next session reads.
|
|
50
|
+
|
|
51
|
+
**Team-wide memory.** Memories from every agent on the team pool into a
|
|
52
|
+
single store and feed a single context bundle, instead of staying on one
|
|
53
|
+
workstation.
|
|
54
|
+
|
|
55
|
+
**Any coding CLI.** Anything that speaks MCP submits memories through the
|
|
56
|
+
same `submit_memory` tool, including Claude Code, Cursor, Codex, and custom
|
|
57
|
+
agents.
|
|
58
|
+
|
|
59
|
+
**Extendible by config.** STM store, LTM store, context store, dream engine,
|
|
60
|
+
auth, triggers, and hooks are Python `Protocol`s wired up from YAML. Swap
|
|
61
|
+
any default by pointing at a different class.
|
|
62
|
+
|
|
63
|
+
## Get started
|
|
64
|
+
|
|
65
|
+
Dreamer requires Python 3.12 or later. The `defaults` extra pulls in SQLite
|
|
66
|
+
for STM, the Claude Agent SDK for dreaming, APScheduler for cron triggers,
|
|
67
|
+
and gitpython for the post-dream commit hook.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install 'dreamer-server[defaults]'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Scaffold a project.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
dreamer init
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This writes a `dreamer.yaml`, a `workspace/` with `memory/` and `context/`
|
|
80
|
+
subdirectories, and a `.gitignore` that keeps the SQLite database out of
|
|
81
|
+
git.
|
|
82
|
+
|
|
83
|
+
Issue a token for your agents to send in the `Authorization` header.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
dreamer-simple-auth token create --db ./dreamer.db --name my-token
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Sanity-check the config. The loader resolves every component, runs the
|
|
90
|
+
protocol-conformance check, and prints the wired graph and per-slot
|
|
91
|
+
multi-tenancy table.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
dreamer config check
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Run the server.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
dreamer serve
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Point Claude Code or any MCP client over streamable-http at
|
|
104
|
+
`http://localhost:8080/mcp/` with `Authorization: Bearer <token>`. The
|
|
105
|
+
server advertises a `submit_memory` tool whose accepted types come from your
|
|
106
|
+
config. Out of the box, those are `observation`, `failure`, and
|
|
107
|
+
`code_snippet`.
|
|
108
|
+
|
|
109
|
+
Cron is the default trigger. To fire a one-shot dream from the command
|
|
110
|
+
line:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
dreamer dream --trigger external
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Extensions
|
|
117
|
+
|
|
118
|
+
Dreamer is config-assembled. `dreamer.yaml` wires `module.path.ClassName`
|
|
119
|
+
references into a component graph. Every slot sits behind a Python
|
|
120
|
+
`Protocol` defined in `dreamer.api`, including the STM store, the LTM
|
|
121
|
+
store, the context store, the dream engine, auth, triggers, and hooks. The
|
|
122
|
+
shipped defaults are chosen to get a team running in a few minutes, and
|
|
123
|
+
every one of them can be swapped.
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
stm_store:
|
|
127
|
+
class: dreamer.contrib.stm.sqlite.SQLiteSTMStore
|
|
128
|
+
params:
|
|
129
|
+
path: ./data/stm.db
|
|
130
|
+
|
|
131
|
+
ltm_store:
|
|
132
|
+
class: dreamer.contrib.ltm.markdown.MarkdownLTMStore
|
|
133
|
+
params:
|
|
134
|
+
root: ./workspace/memory
|
|
135
|
+
|
|
136
|
+
context_store:
|
|
137
|
+
class: dreamer.contrib.context.markdown.MarkdownContextStore
|
|
138
|
+
params:
|
|
139
|
+
root: ./workspace/context
|
|
140
|
+
|
|
141
|
+
dream_engine:
|
|
142
|
+
class: dreamer.contrib.dream.claude_agent.ClaudeAgentDreamEngine
|
|
143
|
+
|
|
144
|
+
triggers:
|
|
145
|
+
- class: dreamer.contrib.triggers.cron.CronTrigger
|
|
146
|
+
params:
|
|
147
|
+
schedule: "0 */6 * * *"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
To plug in your own component, write a class that satisfies the protocol.
|
|
151
|
+
For example, a Postgres-backed STM store:
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
from typing import ClassVar
|
|
155
|
+
from dreamer.api.compat import implements
|
|
156
|
+
from dreamer.api.stores import STMStore
|
|
157
|
+
|
|
158
|
+
@implements(STMStore, version=1)
|
|
159
|
+
class PostgresSTMStore:
|
|
160
|
+
multi_tenant: ClassVar[bool] = True
|
|
161
|
+
|
|
162
|
+
def __init__(self, *, dsn: str) -> None:
|
|
163
|
+
...
|
|
164
|
+
|
|
165
|
+
async def submit(self, memory, *, ctx): ...
|
|
166
|
+
async def claim_batch(self, *, ctx): ...
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Then reference it from `dreamer.yaml`:
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
stm_store:
|
|
173
|
+
class: my_pkg.stores.PostgresSTMStore
|
|
174
|
+
params:
|
|
175
|
+
dsn: ${env:POSTGRES_DSN}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`dreamer config check` validates the protocol version, signatures,
|
|
179
|
+
parameter kinds, and capability requirements before the server boots. The
|
|
180
|
+
same shape of change covers a graph-backed long-term memory store, an OIDC
|
|
181
|
+
auth backend, or a Slack notification hook in place of the git commit.
|
|
182
|
+
|
|
183
|
+
`dreamer.testing.conformance` ships abstract `pytest` classes for each
|
|
184
|
+
protocol. The cases cover idempotency, lease isolation, expired-lease
|
|
185
|
+
reclamation, tenant-scope leakage, and the `purge_consumed` contract. Any
|
|
186
|
+
compliant implementation should pass them.
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
from dreamer.testing.conformance.stm_store import STMStoreConformance
|
|
190
|
+
|
|
191
|
+
class TestPostgresSTMStore(STMStoreConformance):
|
|
192
|
+
@pytest.fixture
|
|
193
|
+
async def store(self):
|
|
194
|
+
return PostgresSTMStore(dsn="postgresql://...")
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<h1 align="center">Dreamer - self-evolving context for your coding agents</h1>
|
|
2
|
+
<!--<p align="center"><em>Self-evolving context for your coding agents.</em></p>-->
|
|
3
|
+
|
|
4
|
+
<picture>
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="https://gist.githubusercontent.com/OKUA1/18d426c57df26e5b1e99727a3aca643d/raw/b2a312ad81c6b3fa05d1793a571b71e2de1feb5a/dreamer-light.svg" >
|
|
6
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://gist.githubusercontent.com/OKUA1/18d426c57df26e5b1e99727a3aca643d/raw/b2a312ad81c6b3fa05d1793a571b71e2de1feb5a/dreamer-dark.svg">
|
|
7
|
+
<img alt="Image" src="https://gist.githubusercontent.com/OKUA1/18d426c57df26e5b1e99727a3aca643d/raw/b2a312ad81c6b3fa05d1793a571b71e2de1feb5a/dreamer-light.svg">
|
|
8
|
+
</picture>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="#get-started">Get started</a> ·
|
|
12
|
+
<a href="#extensions">Extensions</a> ·
|
|
13
|
+
<a href="https://luml.ai/blog/2026/dreamer-self-evolving-agents">Blogpost</a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
Dreamer keeps your team's `AGENTS.md` and skills up to date with what your
|
|
17
|
+
coding agents learn while they work. It runs as a self-hostable MCP server
|
|
18
|
+
that collects memories from every agent on the team and, on a schedule,
|
|
19
|
+
regenerates the context bundle the next session reads.
|
|
20
|
+
|
|
21
|
+
**Team-wide memory.** Memories from every agent on the team pool into a
|
|
22
|
+
single store and feed a single context bundle, instead of staying on one
|
|
23
|
+
workstation.
|
|
24
|
+
|
|
25
|
+
**Any coding CLI.** Anything that speaks MCP submits memories through the
|
|
26
|
+
same `submit_memory` tool, including Claude Code, Cursor, Codex, and custom
|
|
27
|
+
agents.
|
|
28
|
+
|
|
29
|
+
**Extendible by config.** STM store, LTM store, context store, dream engine,
|
|
30
|
+
auth, triggers, and hooks are Python `Protocol`s wired up from YAML. Swap
|
|
31
|
+
any default by pointing at a different class.
|
|
32
|
+
|
|
33
|
+
## Get started
|
|
34
|
+
|
|
35
|
+
Dreamer requires Python 3.12 or later. The `defaults` extra pulls in SQLite
|
|
36
|
+
for STM, the Claude Agent SDK for dreaming, APScheduler for cron triggers,
|
|
37
|
+
and gitpython for the post-dream commit hook.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install 'dreamer-server[defaults]'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Scaffold a project.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
dreamer init
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This writes a `dreamer.yaml`, a `workspace/` with `memory/` and `context/`
|
|
50
|
+
subdirectories, and a `.gitignore` that keeps the SQLite database out of
|
|
51
|
+
git.
|
|
52
|
+
|
|
53
|
+
Issue a token for your agents to send in the `Authorization` header.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
dreamer-simple-auth token create --db ./dreamer.db --name my-token
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Sanity-check the config. The loader resolves every component, runs the
|
|
60
|
+
protocol-conformance check, and prints the wired graph and per-slot
|
|
61
|
+
multi-tenancy table.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
dreamer config check
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Run the server.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
dreamer serve
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Point Claude Code or any MCP client over streamable-http at
|
|
74
|
+
`http://localhost:8080/mcp/` with `Authorization: Bearer <token>`. The
|
|
75
|
+
server advertises a `submit_memory` tool whose accepted types come from your
|
|
76
|
+
config. Out of the box, those are `observation`, `failure`, and
|
|
77
|
+
`code_snippet`.
|
|
78
|
+
|
|
79
|
+
Cron is the default trigger. To fire a one-shot dream from the command
|
|
80
|
+
line:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
dreamer dream --trigger external
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Extensions
|
|
87
|
+
|
|
88
|
+
Dreamer is config-assembled. `dreamer.yaml` wires `module.path.ClassName`
|
|
89
|
+
references into a component graph. Every slot sits behind a Python
|
|
90
|
+
`Protocol` defined in `dreamer.api`, including the STM store, the LTM
|
|
91
|
+
store, the context store, the dream engine, auth, triggers, and hooks. The
|
|
92
|
+
shipped defaults are chosen to get a team running in a few minutes, and
|
|
93
|
+
every one of them can be swapped.
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
stm_store:
|
|
97
|
+
class: dreamer.contrib.stm.sqlite.SQLiteSTMStore
|
|
98
|
+
params:
|
|
99
|
+
path: ./data/stm.db
|
|
100
|
+
|
|
101
|
+
ltm_store:
|
|
102
|
+
class: dreamer.contrib.ltm.markdown.MarkdownLTMStore
|
|
103
|
+
params:
|
|
104
|
+
root: ./workspace/memory
|
|
105
|
+
|
|
106
|
+
context_store:
|
|
107
|
+
class: dreamer.contrib.context.markdown.MarkdownContextStore
|
|
108
|
+
params:
|
|
109
|
+
root: ./workspace/context
|
|
110
|
+
|
|
111
|
+
dream_engine:
|
|
112
|
+
class: dreamer.contrib.dream.claude_agent.ClaudeAgentDreamEngine
|
|
113
|
+
|
|
114
|
+
triggers:
|
|
115
|
+
- class: dreamer.contrib.triggers.cron.CronTrigger
|
|
116
|
+
params:
|
|
117
|
+
schedule: "0 */6 * * *"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
To plug in your own component, write a class that satisfies the protocol.
|
|
121
|
+
For example, a Postgres-backed STM store:
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
from typing import ClassVar
|
|
125
|
+
from dreamer.api.compat import implements
|
|
126
|
+
from dreamer.api.stores import STMStore
|
|
127
|
+
|
|
128
|
+
@implements(STMStore, version=1)
|
|
129
|
+
class PostgresSTMStore:
|
|
130
|
+
multi_tenant: ClassVar[bool] = True
|
|
131
|
+
|
|
132
|
+
def __init__(self, *, dsn: str) -> None:
|
|
133
|
+
...
|
|
134
|
+
|
|
135
|
+
async def submit(self, memory, *, ctx): ...
|
|
136
|
+
async def claim_batch(self, *, ctx): ...
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Then reference it from `dreamer.yaml`:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
stm_store:
|
|
143
|
+
class: my_pkg.stores.PostgresSTMStore
|
|
144
|
+
params:
|
|
145
|
+
dsn: ${env:POSTGRES_DSN}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`dreamer config check` validates the protocol version, signatures,
|
|
149
|
+
parameter kinds, and capability requirements before the server boots. The
|
|
150
|
+
same shape of change covers a graph-backed long-term memory store, an OIDC
|
|
151
|
+
auth backend, or a Slack notification hook in place of the git commit.
|
|
152
|
+
|
|
153
|
+
`dreamer.testing.conformance` ships abstract `pytest` classes for each
|
|
154
|
+
protocol. The cases cover idempotency, lease isolation, expired-lease
|
|
155
|
+
reclamation, tenant-scope leakage, and the `purge_consumed` contract. Any
|
|
156
|
+
compliant implementation should pass them.
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
from dreamer.testing.conformance.stm_store import STMStoreConformance
|
|
160
|
+
|
|
161
|
+
class TestPostgresSTMStore(STMStoreConformance):
|
|
162
|
+
@pytest.fixture
|
|
163
|
+
async def store(self):
|
|
164
|
+
return PostgresSTMStore(dsn="postgresql://...")
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## License
|
|
168
|
+
|
|
169
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|