Skip to content

feat: zero-config guard, from_env(), callback null-safety, README alignment#3

Merged
beonde merged 2 commits into
mainfrom
feat/zero-config-guard
Mar 12, 2026
Merged

feat: zero-config guard, from_env(), callback null-safety, README alignment#3
beonde merged 2 commits into
mainfrom
feat/zero-config-guard

Conversation

@beonde

@beonde beonde commented Mar 12, 2026

Copy link
Copy Markdown
Member

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 in main.

Changes

  • guard.py — Zero-config CapiscioGuard() that reads CAPISCIO_API_KEY, CAPISCIO_SERVER_URL, CAPISCIO_AGENT_NAME, CAPISCIO_DEV_MODE from env vars. Added from_env() classmethod for cross-package alignment with SDK/MCP. connect_kwargs dict for extra args to CapiscIO.connect().
  • callbacks.py — Null guard for serialized param in on_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

  • 42/42 unit tests pass
  • E2E validated against live registry

Related PRs

beonde added 2 commits March 12, 2026 15:53
…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.
@beonde beonde merged commit a247241 into main Mar 12, 2026
5 checks passed
@beonde beonde deleted the feat/zero-config-guard branch March 12, 2026 20:13
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.

1 participant