feat: zero-config guard, from_env(), callback null-safety, README alignment#3
Merged
Conversation
…gnment - CapiscioGuard reads CAPISCIO_API_KEY, CAPISCIO_SERVER_URL, CAPISCIO_AGENT_NAME, CAPISCIO_DEV_MODE from env for zero-config usage - Add from_env() classmethod matching SDK/MCP pattern - Pass connect_kwargs (dev_mode, keys_dir, agent_card) to CapiscIO.connect() - Fix CapiscioCallbackHandler crash when serialized param is None (langchain-core 1.2.x compatibility) - Align README to sibling package style (badges, Trust Levels, API Reference, Development section) - Fix pyproject.toml: license format, remove langchain-core upper bound, add keywords
The test_no_api_key_raises_on_lazy_init test triggers from capiscio_sdk import CapiscIO which fails on Python 3.10 in CI because the SDK's protobuf stubs are not packaged (capiscio_sdk._rpc.gen.capiscio). Mock sys.modules so the test validates our API key check logic without depending on SDK installation health.
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
This was an orphaned commit from the merged PR #2 (
chore/publish-workflow) — the branch was pushed after the PR was already squash-merged, so these changes never landed inmain.Changes
guard.py— Zero-configCapiscioGuard()that readsCAPISCIO_API_KEY,CAPISCIO_SERVER_URL,CAPISCIO_AGENT_NAME,CAPISCIO_DEV_MODEfrom env vars. Addedfrom_env()classmethod for cross-package alignment with SDK/MCP.connect_kwargsdict for extra args toCapiscIO.connect().callbacks.py— Null guard forserializedparam inon_chain_start(langchain-core 1.2.x compat).pyproject.toml— License format fix ({text = "Apache-2.0"}), keywords, removed langchain-core upper bound.README.md— Full rewrite aligned to sibling package style (capiscio-sdk-python, capiscio-mcp-python, capiscio-python).Testing
Related PRs