Repository navigation
Use production cortext package instead of vendored natives - #1
Conversation
Align Hermes with openclaw (@augmem/cortext) and CPA (cortext.go) by depending on cortext==1.2.4. Drop the in-repo vendor runtime and local ctypes bridge, add package install/CI, and unwrap Hermes message dicts so turn ingestion works.
There was a problem hiding this comment.
Pull request overview
This PR migrates the Hermes Cortext memory plugin from an in-repo vendored native runtime (vendor/ + cortext_native ctypes bridge) to the published production cortext==1.2.4 Python package, and updates docs/tests/CI accordingly so the plugin uses the same packaging standard as other Cortext hosts.
Changes:
- Replace
cortext_nativeusage with the productioncortextpackage APIs (including media ingestion helpers) and remove vendored artifacts + vendor build workflow. - Add Python project metadata (
pyproject.toml),requirements.txt, and a new CI workflow that installs the published wheel and runs unit tests. - Fix ingestion by unwrapping Hermes
{role, content}message dicts inmedia.signals, with added/updated tests and documentation.
Reviewed changes
Copilot reviewed 16 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vendor/PROVENANCE.md | Removed provenance doc for vendored artifacts (vendor runtime removed). |
| vendor/manifest.json | Removed vendored artifact/model manifest (vendor runtime removed). |
| vendor/.gitkeep | Removed empty vendor directory placeholder. |
| tools/generate_manifest.py | Removed script used to generate vendored manifest. |
| cortext_native/init.py | Removed local ctypes bridge and artifact/model verification logic. |
| provider.py | Switched provider implementation to import/use production cortext package and new media APIs. |
| media.py | Unwrap Hermes message dicts to ingest actual content; keeps multimodal normalization. |
| tests/test_provider.py | Updated tests to use cortext.Retention and added fake engine media-with-media methods. |
| tests/test_native.py | Replaced vendor/bridge tests with production package readiness + basic process roundtrip tests. |
| tests/test_media.py | Added coverage for message-dict unwrapping and content parts handling. |
| bench/harness.py | Updated benchmark harness imports to use production cortext.Retention. |
| requirements.txt | Added pinned dependency on cortext==1.2.4. |
| pyproject.toml | Added project metadata and dependency declaration for cortext==1.2.4. |
| README.md | Updated install, shipping model, and verification instructions for production package flow. |
| after-install.md | Updated post-install steps to include installing production cortext into the Hermes Python env. |
| plugin.yaml | Bumped plugin version to 0.2.0 and updated description. |
| LAUNCH.md | Updated launch copy/checklist for the production package approach and version 0.2.0. |
| .gitignore | Expanded ignores for common Python build/venv artifacts. |
| .github/workflows/release-vendor.yml | Removed vendor build/verification workflow. |
| .github/workflows/ci.yml | Added new CI workflow installing production wheel and running unit tests. |
| init.py | Updated module exports/docs to reflect production-package dependency. |
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:53
- Similarly, the "Import plugin surface" step hard-codes the expected version values. Reusing the CORTEXT_VERSION env var here will keep the workflow consistent when updating versions.
import provider
assert provider.CORTEXT_PACKAGE_VERSION == "1.2.4"
assert provider.CortextMemoryProvider is not None
p = provider.CortextMemoryProvider()
assert p.is_available() is True
assert p.package_version() == "1.2.4"
print("plugin surface ok")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GitHub serves release assets as application/octet-stream, so remote --find-links is rejected by pip. Download index.html first and install via file:// find-links in CI and docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fa968284b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Centralize CORTEXT_PACKAGE_VERSION and derived install URLs - Honor caller retention for audio/image ingest; log exceptions with traceback - Expand CI to windows-latest and use CORTEXT_VERSION env consistently - Fix Verify install path; add Windows PowerShell install instructions
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f584057250
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Use Path.as_uri() for pip --find-links so Windows gets file:///D:/... instead of file://D:/..., and include PowerShell steps in the missing cortext ImportError message.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbc1864f93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reject mismatched cortext installs so Hermes cannot activate against an unsupported package, and align the README quick start and offline claims with the mandatory production package prerequisite.
Summary
cortext==1.2.4(same standard as openclaw@augmem/cortextand CPAcortext.gov1.2.4)vendor/natives and localcortext_nativectypes bridgerequirements.txt,pyproject.toml, and CI that installs the published wheel{role, content}message dicts so turn ingestion actually works0.2.0and update install docs/LAUNCHInstall
Test plan
python -m unittest discover -s tests -vagainst installedcortext==1.2.4wheel (21 tests OK)vendor/orcortext_nativeremainsci.ymlinstalls production wheel)