deepseek-cordis 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.
Files changed (101) hide show
  1. deepseek_cordis-0.1.0/.gitignore +227 -0
  2. deepseek_cordis-0.1.0/CHANGELOG.md +110 -0
  3. deepseek_cordis-0.1.0/CONTRIBUTING.md +80 -0
  4. deepseek_cordis-0.1.0/LICENSE +21 -0
  5. deepseek_cordis-0.1.0/PKG-INFO +90 -0
  6. deepseek_cordis-0.1.0/README.md +429 -0
  7. deepseek_cordis-0.1.0/README.pypi.md +67 -0
  8. deepseek_cordis-0.1.0/THIRD_PARTY_NOTICES.md +56 -0
  9. deepseek_cordis-0.1.0/docs/adr/0001-phase-0-foundation.md +36 -0
  10. deepseek_cordis-0.1.0/docs/adr/0002-context-foundation.md +57 -0
  11. deepseek_cordis-0.1.0/docs/adr/0003-fiber-lifecycle.md +66 -0
  12. deepseek_cordis-0.1.0/docs/adr/0004-reversible-effects.md +66 -0
  13. deepseek_cordis-0.1.0/docs/adr/0005-plugin-registry.md +50 -0
  14. deepseek_cordis-0.1.0/docs/adr/0006-reactive-services.md +70 -0
  15. deepseek_cordis-0.1.0/docs/adr/0007-service-abstraction.md +62 -0
  16. deepseek_cordis-0.1.0/docs/adr/0008-owned-events.md +65 -0
  17. deepseek_cordis-0.1.0/docs/adr/0009-scoped-services.md +62 -0
  18. deepseek_cordis-0.1.0/docs/adr/0010-plugin-metadata.md +44 -0
  19. deepseek_cordis-0.1.0/docs/adr/0011-config-validation.md +42 -0
  20. deepseek_cordis-0.1.0/docs/adr/0012-deterministic-loader.md +44 -0
  21. deepseek_cordis-0.1.0/docs/adr/0013-source-indexed-compatibility.md +49 -0
  22. deepseek_cordis-0.1.0/docs/adr/0014-documentation-learning-path.md +36 -0
  23. deepseek_cordis-0.1.0/docs/adr/0015-package-readiness.md +34 -0
  24. deepseek_cordis-0.1.0/docs/adr/0016-github-readiness.md +33 -0
  25. deepseek_cordis-0.1.0/docs/adr/0017-tagged-pypi-publishing.md +29 -0
  26. deepseek_cordis-0.1.0/docs/adr/0018-distribution-name.md +27 -0
  27. deepseek_cordis-0.1.0/docs/adr/0019-full-project-rebrand.md +25 -0
  28. deepseek_cordis-0.1.0/docs/architecture.md +306 -0
  29. deepseek_cordis-0.1.0/docs/compatibility-cases.json +1079 -0
  30. deepseek_cordis-0.1.0/docs/compatibility-cases.md +80 -0
  31. deepseek_cordis-0.1.0/docs/compatibility-history.md +369 -0
  32. deepseek_cordis-0.1.0/docs/compatibility.md +104 -0
  33. deepseek_cordis-0.1.0/docs/config.md +85 -0
  34. deepseek_cordis-0.1.0/docs/context.md +106 -0
  35. deepseek_cordis-0.1.0/docs/effects.md +131 -0
  36. deepseek_cordis-0.1.0/docs/events.md +110 -0
  37. deepseek_cordis-0.1.0/docs/github-readiness.md +79 -0
  38. deepseek_cordis-0.1.0/docs/lifecycle.md +166 -0
  39. deepseek_cordis-0.1.0/docs/loader.md +87 -0
  40. deepseek_cordis-0.1.0/docs/mental-model.md +157 -0
  41. deepseek_cordis-0.1.0/docs/metadata.md +68 -0
  42. deepseek_cordis-0.1.0/docs/packaging.md +92 -0
  43. deepseek_cordis-0.1.0/docs/phase-0.md +123 -0
  44. deepseek_cordis-0.1.0/docs/plugins.md +79 -0
  45. deepseek_cordis-0.1.0/docs/publishing.md +100 -0
  46. deepseek_cordis-0.1.0/docs/scope.md +119 -0
  47. deepseek_cordis-0.1.0/docs/service.md +89 -0
  48. deepseek_cordis-0.1.0/docs/services.md +89 -0
  49. deepseek_cordis-0.1.0/examples/README.md +34 -0
  50. deepseek_cordis-0.1.0/examples/basic_context.py +23 -0
  51. deepseek_cordis-0.1.0/examples/basic_fiber.py +24 -0
  52. deepseek_cordis-0.1.0/examples/basic_plugin.py +28 -0
  53. deepseek_cordis-0.1.0/examples/config_validation.py +53 -0
  54. deepseek_cordis-0.1.0/examples/dependency_injection.py +23 -0
  55. deepseek_cordis-0.1.0/examples/effects.py +33 -0
  56. deepseek_cordis-0.1.0/examples/events.py +39 -0
  57. deepseek_cordis-0.1.0/examples/first_plugin.py +23 -0
  58. deepseek_cordis-0.1.0/examples/first_service.py +30 -0
  59. deepseek_cordis-0.1.0/examples/loader_plugins.py +34 -0
  60. deepseek_cordis-0.1.0/examples/owned_events.py +30 -0
  61. deepseek_cordis-0.1.0/examples/plugin_loader.py +26 -0
  62. deepseek_cordis-0.1.0/examples/plugin_metadata.py +39 -0
  63. deepseek_cordis-0.1.0/examples/reactive_services.py +33 -0
  64. deepseek_cordis-0.1.0/examples/scoped_services.py +37 -0
  65. deepseek_cordis-0.1.0/examples/service_plugin.py +40 -0
  66. deepseek_cordis-0.1.0/examples/waterfall.py +27 -0
  67. deepseek_cordis-0.1.0/pyproject.toml +87 -0
  68. deepseek_cordis-0.1.0/scripts/check_distribution.py +161 -0
  69. deepseek_cordis-0.1.0/scripts/check_installation.py +87 -0
  70. deepseek_cordis-0.1.0/scripts/check_release_tag.py +25 -0
  71. deepseek_cordis-0.1.0/src/deepseek_cordis/__init__.py +37 -0
  72. deepseek_cordis-0.1.0/src/deepseek_cordis/config.py +33 -0
  73. deepseek_cordis-0.1.0/src/deepseek_cordis/context.py +294 -0
  74. deepseek_cordis-0.1.0/src/deepseek_cordis/effects.py +357 -0
  75. deepseek_cordis-0.1.0/src/deepseek_cordis/errors.py +52 -0
  76. deepseek_cordis-0.1.0/src/deepseek_cordis/events.py +215 -0
  77. deepseek_cordis-0.1.0/src/deepseek_cordis/fiber.py +386 -0
  78. deepseek_cordis-0.1.0/src/deepseek_cordis/loader.py +173 -0
  79. deepseek_cordis-0.1.0/src/deepseek_cordis/metadata.py +154 -0
  80. deepseek_cordis-0.1.0/src/deepseek_cordis/py.typed +1 -0
  81. deepseek_cordis-0.1.0/src/deepseek_cordis/registry.py +181 -0
  82. deepseek_cordis-0.1.0/src/deepseek_cordis/scope.py +31 -0
  83. deepseek_cordis-0.1.0/src/deepseek_cordis/service.py +98 -0
  84. deepseek_cordis-0.1.0/src/deepseek_cordis/services.py +199 -0
  85. deepseek_cordis-0.1.0/tests/compatibility/test_catalog.py +105 -0
  86. deepseek_cordis-0.1.0/tests/compatibility/test_harness.py +101 -0
  87. deepseek_cordis-0.1.0/tests/compatibility/test_upstream.py +409 -0
  88. deepseek_cordis-0.1.0/tests/test_config.py +396 -0
  89. deepseek_cordis-0.1.0/tests/test_context.py +177 -0
  90. deepseek_cordis-0.1.0/tests/test_effects.py +496 -0
  91. deepseek_cordis-0.1.0/tests/test_events.py +656 -0
  92. deepseek_cordis-0.1.0/tests/test_fiber.py +556 -0
  93. deepseek_cordis-0.1.0/tests/test_import.py +9 -0
  94. deepseek_cordis-0.1.0/tests/test_loader.py +416 -0
  95. deepseek_cordis-0.1.0/tests/test_metadata.py +405 -0
  96. deepseek_cordis-0.1.0/tests/test_registry.py +400 -0
  97. deepseek_cordis-0.1.0/tests/test_release_tag.py +36 -0
  98. deepseek_cordis-0.1.0/tests/test_scope.py +542 -0
  99. deepseek_cordis-0.1.0/tests/test_service.py +475 -0
  100. deepseek_cordis-0.1.0/tests/test_services.py +699 -0
  101. deepseek_cordis-0.1.0/uv.lock +966 -0
@@ -0,0 +1,227 @@
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
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # uv
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs/Zensical documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ # .idea/
192
+
193
+ # Abstra
194
+ # Abstra is an AI-powered process automation framework.
195
+ # Ignore directories containing user credentials, local state, and settings.
196
+ # Learn more at https://abstra.io/docs
197
+ .abstra/
198
+
199
+ # Visual Studio Code
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
201
+ # can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer, you
203
+ # could uncomment the following to ignore the entire vscode folder
204
+ # .vscode/
205
+ # Temporary file for partial code execution
206
+ tempCodeRunnerFile.py
207
+
208
+ # Ruff stuff:
209
+ .ruff_cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Marimo
215
+ marimo/_static/
216
+ marimo/_lsp/
217
+ __marimo__/
218
+
219
+ # Streamlit
220
+ .streamlit/secrets.toml
221
+
222
+ # deepseek-cordis development tools
223
+ .ruff_cache/
224
+ .mypy_cache/
225
+ .uv-cache/
226
+
227
+ .vscode/
@@ -0,0 +1,110 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 — Unreleased
4
+
5
+ - Completed the deepseek-cordis rebrand: Python imports and source package are
6
+ deepseek_cordis, repository/documentation links target akkefa/deepseek-cordis,
7
+ and logger/context metadata identifiers use the new namespace.
8
+
9
+ - Selected deepseek-cordis as the PyPI distribution name after pending publisher
10
+ registration; the later full rebrand changed imports to deepseek_cordis.
11
+ - Updated archive and installed-distribution checks for the distinct distribution
12
+ and import names, normalized artifact names, and release/documentation links.
13
+
14
+ - Added matching-version GitHub tag releases to PyPI through Trusted Publishing,
15
+ gated by reusable CI and isolated build artifacts; documented one-time setup.
16
+ - Added release-tag guard tests and made clean-wheel version checks read package
17
+ metadata so future releases do not require a hardcoded checker edit.
18
+
19
+ - Phase 15: GitHub Actions checks for Python 3.11, 3.12 and 3.13; locked tools,
20
+ warnings-as-errors tests, lint/format/type checks, builds, distribution audits,
21
+ strict metadata validation and isolated wheel installation.
22
+ - Expanded contribution guidance and GitHub readiness checklist. Source archives
23
+ now include CONTRIBUTING.md; runtime behavior and dependencies are unchanged.
24
+
25
+ - Added opt-in packaging tools, strict metadata validation, and reproducible
26
+ archive and clean-wheel installation checkers.
27
+
28
+ - Phase 14: alpha package metadata/version, project URLs, package-index README,
29
+ explicit source archive contents, distribution integrity checks and clean wheel
30
+ installation verification. Zero runtime dependencies and no implemented extras.
31
+ - Package artifacts are prepared locally; nothing is uploaded or published.
32
+
33
+ - Phase 13: README ownership-first walkthrough, checkout installation, services,
34
+ dependency/reactive lifecycle, effects, events, waterfall and lifecycle diagram.
35
+ - Mental-model guide, ordered index for 16 runnable examples, five beginner examples,
36
+ current guide wording and attribution; no runtime behavior changes.
37
+
38
+ - Phase 12: 23 pinned-source behavioral compatibility cases and a catalog integrity
39
+ check; 72 classified source tests with commits, lines, fingerprints and Python
40
+ evidence. Current compatibility matrix replaces stale status with explicit gaps.
41
+ - Historical phase evidence moved to compatibility-history.md; pinned decorator
42
+ source wording corrected. No runtime behavior changed and no full parity claim made.
43
+
44
+ - Phase 11: separate deterministic Loader, PluginEntry records/config rows, explicit
45
+ Python imports, batch ownership and actual Fiber inspection, preflight/rollback,
46
+ dependency settlement and cancellation cleanup; 34 new cases, guide, ADR and example.
47
+ - Discovery, file formats, nested configuration groups, expressions/update hooks
48
+ and HMR remain deferred. No runtime dependencies added.
49
+
50
+ - Phase 10: synchronous ConfigValidator protocol, structured ValidationIssue /
51
+ ValidationError, raw and resolved Fiber config, validation before each valid
52
+ activation, failure cleanup/restart recovery, 27 new cases, guide, ADR and example.
53
+ - No schema runtime dependencies; async validation, loader expression/update hooks
54
+ and schema-aware operation config merging remain future work.
55
+
56
+ - Phase 9: immutable PluginMeta, PluginSpec, identity-preserving plugin_meta
57
+ decorator, inspect_plugin, per-runtime/per-mount snapshots, Service provide-name
58
+ fallback, 30 metadata cases, guide, ADR and runnable example.
59
+ - Explicit declarations replace conventional attributes; provide/intercept remain
60
+ descriptive for generic plugins. Validator execution and automatic method
61
+ injection remain deferred.
62
+
63
+ - Phase 8: identity ScopeLabel isolation, slot-specific reactive notifications,
64
+ owned bindings separated from dependency snapshots, inherited/copied intercept
65
+ mappings and inject config, Service config merge/filter helpers, task-local
66
+ caller scopes across setup/cleanup/events, 31 scope test cases, docs and example.
67
+ - Deliberate scope strengthening: slots key by service name plus label; require
68
+ verifies snapshot labels to prevent crossing changed isolation boundaries.
69
+
70
+
71
+ - Phase 7: scoped Events facade, owned on/once, prepend/global/filter options,
72
+ emit/parallel/serial/bail/waterfall, dispatch diagnostics, 57 event test cases,
73
+ guide, ADR and runnable example.
74
+ - Python event policy: emit/bail reject awaitable results; async waterfall bridges
75
+ synchronous tails; once guards recursive stale snapshots. Async dispatch is
76
+ caller-owned and cancellable, distinct from shielded Fiber lifecycle waits.
77
+
78
+
79
+ - Phase 6: exported Service base class with declared/overridden name, defining
80
+ context, original config, owned registration, start/check hooks and native
81
+ callable subclasses; 25 service-class cases, guide, ADR and runnable example.
82
+
83
+
84
+ - Phase 5: owned service bindings, get/set/require, reactive inject declarations,
85
+ activation/cleanup snapshots, provider availability notifications, joined
86
+ dependent teardown, 41 service cases, guide, ADR and runnable example.
87
+ - Intentional compatibility strengthening: binding generation epochs detect
88
+ same-provider replacement during loading; structural ancestors are excluded
89
+ from service-removal joins to prevent awaiting their own cleanup.
90
+
91
+
92
+ - Phase 4: root-local Registry, Context.plugin mounting, shared PluginRuntime
93
+ inspection, function/object/class forms, synchronous unregister with joined
94
+ teardown, 26 registry test cases, guide, ADR and runnable example.
95
+
96
+ - Phase 3: Context/Fiber effects, nested sync/async collection, rollback and
97
+ joined in-flight cleanup, immutable diagnostics, 29 effect test cases and docs.
98
+ - Deliberate compatibility deviation: drain remaining nested cleanup callbacks
99
+ after errors, then report single/aggregated failures.
100
+
101
+ - Phase 2: root and mounted Fiber ownership, serialized lifecycle epochs,
102
+ setup/cleanup rollback, await/restart/disposal, reentrancy/cancellation policy,
103
+ 30 Fiber tests, guide, ADR and example.
104
+
105
+ - Phase 1: public Context with root/parent/owner identity, read-only inherited
106
+ metadata, shallow-copy extend, Context tests, guide, example and design ADR.
107
+
108
+ - Phase 0: source audit, compatibility plan, uv-managed typed package scaffold,
109
+ development checks, and import smoke test.
110
+ - Kernel event publication hooks, advanced method reflection and tracing remain future work; no release published.
@@ -0,0 +1,80 @@
1
+ # Contributing to deepseek-cordis
2
+
3
+ deepseek-cordis is an independent Python implementation of the Cordis runtime model
4
+ used by DeepSeek Harness. Its `0.1.0` API is alpha and compatibility is partial.
5
+ Start with [the mental model](docs/mental-model.md),
6
+ [the compatibility matrix](docs/compatibility.md), and
7
+ [the architecture decisions](docs/adr/0001-phase-0-foundation.md).
8
+
9
+ ## Set up a checkout
10
+
11
+ Use Python 3.11, 3.12 or 3.13 and uv. From a local clone:
12
+
13
+ ```sh
14
+ uv sync --locked --python 3.11 --group packaging
15
+ uv run --locked --group packaging python examples/first_plugin.py
16
+ ```
17
+
18
+ The lockfile is committed. `dev` supplies test, lint and type tools; the opt-in
19
+ `packaging` group supplies Twine. Neither group adds runtime dependencies.
20
+ Do not update dependency versions as a side effect of unrelated changes. For an
21
+ intentional dependency change, update `pyproject.toml` and regenerate `uv.lock`.
22
+
23
+ ## Make a focused change
24
+
25
+ Work one reviewed phase or issue at a time. Before changing runtime behavior,
26
+ inspect the pinned vendored Harness source and corresponding Cordis tests.
27
+ Describe the observed contract and how Python will express it, then add a
28
+ behavior test that exercises public APIs. Cover failure and cleanup paths when
29
+ resource ownership, cancellation or dependency activation changes.
30
+
31
+ Keep upstream fixes distinct from the primary compatibility target. Record
32
+ deliberate deviations in `docs/adr/`, and update the compatibility matrix and
33
+ source-indexed catalog when changing compatibility claims. Preserve source
34
+ attribution and third-party notices. Avoid framework and agent dependencies in
35
+ the kernel. Do not claim full Cordis parity or live Harness support from Python
36
+ unit tests alone.
37
+
38
+ Keep API guides and runnable examples aligned with behavior. Update the changelog
39
+ for user-facing changes. For design background, use the relevant existing ADR
40
+ rather than documenting a second conflicting contract.
41
+
42
+ ## Check before proposing a change
43
+
44
+ Run the same checks as CI:
45
+
46
+ ```sh
47
+ uv run --locked --group packaging pytest -W error
48
+ uv run --locked --group packaging ruff check .
49
+ uv run --locked --group packaging ruff format --check .
50
+ uv run --locked --group packaging mypy --python-version 3.11 src tests examples scripts
51
+ uv build
52
+ uv run --locked --group packaging python scripts/check_distribution.py \
53
+ dist/deepseek_cordis-0.1.0-py3-none-any.whl dist/deepseek_cordis-0.1.0.tar.gz
54
+ uv run --locked --group packaging twine check --strict \
55
+ dist/deepseek_cordis-0.1.0-py3-none-any.whl dist/deepseek_cordis-0.1.0.tar.gz
56
+ ```
57
+
58
+ For a full local version matrix, set `export UV_PYTHON=3.12`, run
59
+ `uv sync --locked --group packaging`, then repeat the checks with mypy
60
+ `--python-version 3.12`. Repeat with `UV_PYTHON=3.13` and the matching mypy flag.
61
+ Keep `UV_PYTHON` set for every check so `uv run` uses the selected interpreter.
62
+ Use `unset UV_PYTHON` afterward to restore uv's normal selection. Synchronization
63
+ replaces the project environment when its Python version changes.
64
+ For wheel installation checks, follow [packaging.md](docs/packaging.md): use a
65
+ fresh environment containing only the built distribution, then run
66
+ `scripts/check_installation.py` outside the checkout with isolated Python imports.
67
+
68
+ CI runs on pushes to `main`, pull requests, and manual dispatch. It checks all
69
+ three Python versions on Linux, including a fresh wheel installation. Local
70
+ macOS results and GitHub-hosted results are reported separately. See
71
+ [GitHub readiness](docs/github-readiness.md) for the checklist and workflow scope.
72
+
73
+ ## Propose a pull request
74
+
75
+ Describe the concrete problem, changed behavior, relevant source evidence and
76
+ Python-specific decisions. Include checks run, their Python versions, and any
77
+ remaining gaps. Keep changes conceptually focused and avoid unrelated refactors.
78
+ The maintainer reviews release decisions; preparing artifacts does not authorize
79
+ publishing them. In agent-assisted work, suggest a commit message and do not
80
+ commit or publish without the maintainer's explicit request.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ikram Ali
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,90 @@
1
+ Metadata-Version: 2.4
2
+ Name: deepseek-cordis
3
+ Version: 0.1.0
4
+ Summary: Python plugin runtime targeting DeepSeek Harness vendored Cordis semantics
5
+ Project-URL: Homepage, https://github.com/akkefa/deepseek-cordis
6
+ Project-URL: Repository, https://github.com/akkefa/deepseek-cordis
7
+ Project-URL: Issues, https://github.com/akkefa/deepseek-cordis/issues
8
+ Project-URL: Documentation, https://github.com/akkefa/deepseek-cordis/tree/main/docs
9
+ Project-URL: Changelog, https://github.com/akkefa/deepseek-cordis/blob/main/CHANGELOG.md
10
+ Author: Ikram Ali
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ License-File: THIRD_PARTY_NOTICES.md
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Typing :: Typed
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+
24
+ # deepseek-cordis
25
+
26
+ A lightweight Python plugin runtime for services, reactive dependencies, owned
27
+ effects and events. Python 3.11+; no runtime dependencies.
28
+
29
+ PyPI distribution: `deepseek-cordis`. Python import: `deepseek_cordis`.
30
+
31
+ Version 0.1.0 is an alpha API. deepseek-cordis adapts the ownership model of the vendored
32
+ Cordis 4.0.4 runtime used by DeepSeek Harness at commit
33
+ `639ed015397290b3745d163aafe02ffee4aa3f84`. It is an independent implementation,
34
+ not the Harness application or an affiliated Cordis/DeepSeek product.
35
+
36
+ ## First plugin
37
+
38
+ ```python
39
+ import asyncio
40
+ from deepseek_cordis import Context
41
+
42
+
43
+ def greeter(ctx: Context, config: object) -> object:
44
+ ctx.on("hello", lambda name: print("Hello,", name))
45
+ return lambda: print("Greeter stopped")
46
+
47
+
48
+ async def main() -> None:
49
+ root = Context()
50
+ fiber = await root.plugin(greeter)
51
+ root.emit("hello", "Cordis")
52
+ await fiber.dispose()
53
+
54
+
55
+ asyncio.run(main())
56
+ ```
57
+
58
+ The Fiber owns the listener and returned cleanup. Disposal removes the listener
59
+ and joins teardown. Named services can gate consumers through declared dependencies;
60
+ provider loss unloads them and restoration starts a new activation. Context views
61
+ share an owner unless a new plugin is mounted.
62
+
63
+ ## Features and boundaries
64
+
65
+ - Sync/async setup, owned cleanup, generator effects and nested plugin lifetimes.
66
+ - Scoped service bindings, reactive injection, caller intercept options and Service classes.
67
+ - Owned events with emit, parallel, serial, bail and waterfall dispatch.
68
+ - Explicit plugin metadata, synchronous config validation and deterministic loader batches.
69
+ - Typed package with a py.typed marker.
70
+
71
+ Compatibility is partial. Transparent method/property proxies, method injection,
72
+ LoggerService exporters, kernel publication hooks, Fiber.update and advanced loader
73
+ configuration/HMR remain unimplemented. Passing Python tests does not establish full
74
+ Cordis or live DeepSeek Harness compatibility. There are no schema adapter extras.
75
+
76
+ ## Documentation
77
+
78
+ - [Source and full walkthrough](https://github.com/akkefa/deepseek-cordis)
79
+ - [Runtime mental model](https://github.com/akkefa/deepseek-cordis/blob/main/docs/mental-model.md)
80
+ - [Runnable examples](https://github.com/akkefa/deepseek-cordis/blob/main/examples/README.md)
81
+ - [Compatibility matrix](https://github.com/akkefa/deepseek-cordis/blob/main/docs/compatibility.md)
82
+ - [Packaging and local installation](https://github.com/akkefa/deepseek-cordis/blob/main/docs/packaging.md)
83
+ - [Issues](https://github.com/akkefa/deepseek-cordis/issues)
84
+ - [Changelog](https://github.com/akkefa/deepseek-cordis/blob/main/CHANGELOG.md)
85
+
86
+ MIT licensed, copyright 2026 Ikram Ali. Cordis (Shigma) and DeepSeek Harness
87
+ (DeepSeek) are MIT-licensed behavioral references. The distribution includes the
88
+ project license and retained third-party notices; the full
89
+ [attribution](https://github.com/akkefa/deepseek-cordis/blob/main/THIRD_PARTY_NOTICES.md)
90
+ is also available in the source repository.