Skip to content

Use production cortext package instead of vendored natives - #1

Merged
gabewillen merged 5 commits into
mainfrom
feat/production-cortext-package
Jul 31, 2026
Merged

gabewillen merged 5 commits into
mainfrom
feat/production-cortext-package

Conversation

@gabewillen

Copy link
Copy Markdown
Contributor

Summary

  • Depend on production cortext==1.2.4 (same standard as openclaw @augmem/cortext and CPA cortext.go v1.2.4)
  • Remove in-repo vendor/ natives and local cortext_native ctypes bridge
  • Add requirements.txt, pyproject.toml, and CI that installs the published wheel
  • Unwrap Hermes {role, content} message dicts so turn ingestion actually works
  • Bump plugin to 0.2.0 and update install docs/LAUNCH

Install

pip install 'cortext==1.2.4' \
  --find-links https://github.com/augmem/cortext.py/releases/download/v1.2.4/index.html

hermes plugins install augmem/cortext-hermes-plugin --enable
hermes config set memory.provider cortext

Test plan

  • python -m unittest discover -s tests -v against installed cortext==1.2.4 wheel (21 tests OK)
  • Live provider path: turn ingest + prefetch returns durable facts
  • Confirm no vendor/ or cortext_native remains
  • CI green on PR (ci.yml installs production wheel)

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.
Copilot AI review requested due to automatic review settings July 30, 2026 23:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_native usage with the production cortext package 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 in media.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.

Comment thread provider.py Outdated
Comment thread provider.py Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread provider.py Outdated
Comment thread .github/workflows/ci.yml Outdated
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md Outdated
Comment thread README.md
- 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/ci.yml Outdated
Comment thread provider.py
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md
Comment thread provider.py Outdated
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.
@gabewillen
gabewillen merged commit ef7be7d into main Jul 31, 2026
6 checks passed
@gabewillen
gabewillen deleted the feat/production-cortext-package branch July 31, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants