Skip to content

adapter: OpenAI x.klickd context bridge (#107)#112

Merged
Davincc77 merged 2 commits into
mainfrom
adapter/openai-x-klickd-context-bridge
Jun 1, 2026
Merged

adapter: OpenAI x.klickd context bridge (#107)#112
Davincc77 merged 2 commits into
mainfrom
adapter/openai-x-klickd-context-bridge

Conversation

@Davincc77
Copy link
Copy Markdown
Owner

Summary

Implements #107 — a minimal, tested OpenAI context bridge for .klickd portable memory/context. It loads .klickd profiles and bundled starter skills through the public klickd SDK only and converts the validated context into OpenAI-compatible chat messages and chat.completions.create(...) kwargs.

  • KlickdOpenAI bridge (examples/v4/integrations/openai/klickd_openai.py): SDK-only loading (plain + encrypted envelopes), system/developer instruction-role selection, opt-in compressed memory, JSON Injection Guard when injection_target is user_message/both, _-prefixed field stripping (SPEC §29), and human-authority/veto pass-through. The openai package is lazy-imported (only inside create()), so the bridge imports and unit-tests with no openai install.
  • Runnable example with a --check dry-run (default; no network, no openai) and an optional --live mode (needs openai + OPENAI_API_KEY, skipped gracefully if absent).
  • Hermetic tests (23) covering load / bridge / error paths, plus a stub-client create() test that makes no network call and an end-to-end example smoke test.
  • Docs: new adapter README, rewritten docs/integrations/openai.md (v4), and updated rows in the main README integration table and the docs/integrations/README.md comparison table.

Boundaries / guardrails

  • Bridge-mediated compatibility only — no claim of native OpenAI .klickd support. No OpenAI service decrypts or auto-loads the file.
  • No GDPR / EU AI Act / universal-standard compliance claims.
  • Compressed memory is opt-in (compressed=True).
  • Documents system/developer/user message boundaries, encrypted-file handling, prompt-injection risk, the trust boundary (the local runtime decrypts, not the model), and human-governed final authority.

Testing

  • PYTHONPATH=packages/pypi/klickd/src pytest examples/v4/integrations/openai/tests -q -> 23 passed
  • PYTHONPATH=packages/pypi/klickd/src python examples/v4/integrations/openai/example_resume_session.py -> dry-run end-to-end, no network
  • --live mode (requires OPENAI_API_KEY; not run in CI)

Closes #107

🤖 Generated with Claude Code

claude added 2 commits June 1, 2026 07:38
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>
@Davincc77 Davincc77 merged commit 94bbb96 into main Jun 1, 2026
3 checks passed
@Davincc77 Davincc77 deleted the adapter/openai-x-klickd-context-bridge branch June 1, 2026 07:45
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.

adapter: OpenAI x.klickd context bridge

2 participants