adapter: OpenAI x.klickd context bridge (#107)#112
Merged
Conversation
Add a minimal, tested OpenAI context bridge that loads .klickd profiles and starter skills through the public klickd SDK only and converts the validated context into OpenAI-compatible chat messages and create(...) kwargs. - KlickdOpenAI bridge: SDK-only loading (plain + encrypted), system/ developer instruction roles, opt-in compressed memory, JSON injection guard, _-prefixed field stripping, human-authority pass-through. - Runnable cross-session example with --check dry-run (no network, no openai install) and optional --live mode. - Hermetic tests covering load / bridge / error paths (23 tests). - Adapter README + rewritten docs/integrations/openai.md (v4); README and comparison table rows updated. No native-OpenAI, GDPR/EU AI Act, or universal-standard claims. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #107 — a minimal, tested OpenAI context bridge for
.klickdportable memory/context. It loads.klickdprofiles and bundled starter skills through the publicklickdSDK only and converts the validated context into OpenAI-compatible chat messages andchat.completions.create(...)kwargs.KlickdOpenAIbridge (examples/v4/integrations/openai/klickd_openai.py): SDK-only loading (plain + encrypted envelopes),system/developerinstruction-role selection, opt-in compressed memory, JSON Injection Guard wheninjection_targetisuser_message/both,_-prefixed field stripping (SPEC §29), and human-authority/veto pass-through. Theopenaipackage is lazy-imported (only insidecreate()), so the bridge imports and unit-tests with noopenaiinstall.--checkdry-run (default; no network, noopenai) and an optional--livemode (needsopenai+OPENAI_API_KEY, skipped gracefully if absent).create()test that makes no network call and an end-to-end example smoke test.docs/integrations/openai.md(v4), and updated rows in the main README integration table and thedocs/integrations/README.mdcomparison table.Boundaries / guardrails
.klickdsupport. No OpenAI service decrypts or auto-loads the file.compressed=True).Testing
PYTHONPATH=packages/pypi/klickd/src pytest examples/v4/integrations/openai/tests -q-> 23 passedPYTHONPATH=packages/pypi/klickd/src python examples/v4/integrations/openai/example_resume_session.py-> dry-run end-to-end, no network--livemode (requiresOPENAI_API_KEY; not run in CI)Closes #107
🤖 Generated with Claude Code