cognitia 0.3.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cognitia-0.3.0b1/.git +1 -0
- cognitia-0.3.0b1/.github/workflows/docs.yml +32 -0
- cognitia-0.3.0b1/.gitignore +16 -0
- cognitia-0.3.0b1/CHANGELOG.md +65 -0
- cognitia-0.3.0b1/CONTRIBUTING.md +108 -0
- cognitia-0.3.0b1/LICENSE +21 -0
- cognitia-0.3.0b1/PKG-INFO +479 -0
- cognitia-0.3.0b1/README.md +401 -0
- cognitia-0.3.0b1/docs/advanced.md +254 -0
- cognitia-0.3.0b1/docs/agent-facade.md +259 -0
- cognitia-0.3.0b1/docs/api-reference.md +673 -0
- cognitia-0.3.0b1/docs/architecture.md +130 -0
- cognitia-0.3.0b1/docs/assets/extra.css +223 -0
- cognitia-0.3.0b1/docs/capabilities.md +251 -0
- cognitia-0.3.0b1/docs/configuration.md +196 -0
- cognitia-0.3.0b1/docs/examples.md +224 -0
- cognitia-0.3.0b1/docs/getting-started.md +385 -0
- cognitia-0.3.0b1/docs/index.md +371 -0
- cognitia-0.3.0b1/docs/memory.md +133 -0
- cognitia-0.3.0b1/docs/orchestration.md +178 -0
- cognitia-0.3.0b1/docs/overrides/main.html +8 -0
- cognitia-0.3.0b1/docs/runtimes.md +140 -0
- cognitia-0.3.0b1/docs/tools-and-skills.md +163 -0
- cognitia-0.3.0b1/docs/web-tools.md +333 -0
- cognitia-0.3.0b1/docs/why-cognitia.md +112 -0
- cognitia-0.3.0b1/mkdocs.yml +136 -0
- cognitia-0.3.0b1/pyproject.toml +147 -0
- cognitia-0.3.0b1/src/cognitia/__init__.py +73 -0
- cognitia-0.3.0b1/src/cognitia/agent/__init__.py +26 -0
- cognitia-0.3.0b1/src/cognitia/agent/agent.py +415 -0
- cognitia-0.3.0b1/src/cognitia/agent/config.py +103 -0
- cognitia-0.3.0b1/src/cognitia/agent/conversation.py +220 -0
- cognitia-0.3.0b1/src/cognitia/agent/middleware.py +83 -0
- cognitia-0.3.0b1/src/cognitia/agent/result.py +27 -0
- cognitia-0.3.0b1/src/cognitia/agent/tool.py +146 -0
- cognitia-0.3.0b1/src/cognitia/bootstrap/__init__.py +5 -0
- cognitia-0.3.0b1/src/cognitia/bootstrap/capabilities.py +134 -0
- cognitia-0.3.0b1/src/cognitia/bootstrap/stack.py +180 -0
- cognitia-0.3.0b1/src/cognitia/commands/__init__.py +5 -0
- cognitia-0.3.0b1/src/cognitia/commands/registry.py +124 -0
- cognitia-0.3.0b1/src/cognitia/config/__init__.py +15 -0
- cognitia-0.3.0b1/src/cognitia/config/role_router.py +46 -0
- cognitia-0.3.0b1/src/cognitia/config/role_skills.py +49 -0
- cognitia-0.3.0b1/src/cognitia/context/__init__.py +19 -0
- cognitia-0.3.0b1/src/cognitia/context/budget.py +41 -0
- cognitia-0.3.0b1/src/cognitia/context/builder.py +328 -0
- cognitia-0.3.0b1/src/cognitia/hooks/__init__.py +12 -0
- cognitia-0.3.0b1/src/cognitia/hooks/registry.py +58 -0
- cognitia-0.3.0b1/src/cognitia/hooks/sdk_bridge.py +66 -0
- cognitia-0.3.0b1/src/cognitia/memory/__init__.py +36 -0
- cognitia-0.3.0b1/src/cognitia/memory/inmemory.py +220 -0
- cognitia-0.3.0b1/src/cognitia/memory/llm_summarizer.py +91 -0
- cognitia-0.3.0b1/src/cognitia/memory/postgres.py +476 -0
- cognitia-0.3.0b1/src/cognitia/memory/provider.py +36 -0
- cognitia-0.3.0b1/src/cognitia/memory/sqlite.py +510 -0
- cognitia-0.3.0b1/src/cognitia/memory/summarizer.py +52 -0
- cognitia-0.3.0b1/src/cognitia/memory/types.py +57 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/__init__.py +1 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/db_provider.py +93 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/default_prompt.md +49 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/fs_provider.py +89 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/protocols.py +37 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/schema.py +42 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/tools.py +129 -0
- cognitia-0.3.0b1/src/cognitia/memory_bank/types.py +81 -0
- cognitia-0.3.0b1/src/cognitia/observability/__init__.py +5 -0
- cognitia-0.3.0b1/src/cognitia/observability/logger.py +312 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/__init__.py +1 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/claude_subagent.py +67 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/claude_team.py +145 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/deepagents_planner.py +105 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/deepagents_subagent.py +65 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/deepagents_team.py +121 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/default_plan_prompt.md +29 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/manager.py +83 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/message_bus.py +49 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/plan_store.py +60 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/plan_tools.py +159 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/protocols.py +62 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/subagent_protocol.py +35 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/subagent_types.py +50 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/team_manager.py +56 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/team_protocol.py +44 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/team_types.py +44 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/thin_planner.py +130 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/thin_subagent.py +127 -0
- cognitia-0.3.0b1/src/cognitia/orchestration/types.py +151 -0
- cognitia-0.3.0b1/src/cognitia/policy/__init__.py +19 -0
- cognitia-0.3.0b1/src/cognitia/policy/tool_budget.py +61 -0
- cognitia-0.3.0b1/src/cognitia/policy/tool_id_codec.py +50 -0
- cognitia-0.3.0b1/src/cognitia/policy/tool_policy.py +155 -0
- cognitia-0.3.0b1/src/cognitia/policy/tool_selector.py +97 -0
- cognitia-0.3.0b1/src/cognitia/protocols.py +345 -0
- cognitia-0.3.0b1/src/cognitia/py.typed +0 -0
- cognitia-0.3.0b1/src/cognitia/resilience/__init__.py +13 -0
- cognitia-0.3.0b1/src/cognitia/resilience/circuit_breaker.py +98 -0
- cognitia-0.3.0b1/src/cognitia/routing/__init__.py +5 -0
- cognitia-0.3.0b1/src/cognitia/routing/role_router.py +60 -0
- cognitia-0.3.0b1/src/cognitia/runtime/__init__.py +119 -0
- cognitia-0.3.0b1/src/cognitia/runtime/adapter.py +390 -0
- cognitia-0.3.0b1/src/cognitia/runtime/base.py +71 -0
- cognitia-0.3.0b1/src/cognitia/runtime/capabilities.py +152 -0
- cognitia-0.3.0b1/src/cognitia/runtime/claude_code.py +232 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents.py +302 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents_builtins.py +124 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents_hitl.py +109 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents_langchain.py +90 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents_memory.py +78 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents_models.py +169 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents_native.py +150 -0
- cognitia-0.3.0b1/src/cognitia/runtime/deepagents_tools.py +47 -0
- cognitia-0.3.0b1/src/cognitia/runtime/factory.py +223 -0
- cognitia-0.3.0b1/src/cognitia/runtime/model_policy.py +86 -0
- cognitia-0.3.0b1/src/cognitia/runtime/model_registry.py +174 -0
- cognitia-0.3.0b1/src/cognitia/runtime/models.yaml +66 -0
- cognitia-0.3.0b1/src/cognitia/runtime/options_builder.py +201 -0
- cognitia-0.3.0b1/src/cognitia/runtime/ports/__init__.py +33 -0
- cognitia-0.3.0b1/src/cognitia/runtime/ports/base.py +228 -0
- cognitia-0.3.0b1/src/cognitia/runtime/ports/deepagents.py +88 -0
- cognitia-0.3.0b1/src/cognitia/runtime/ports/thin.py +84 -0
- cognitia-0.3.0b1/src/cognitia/runtime/sdk_query.py +267 -0
- cognitia-0.3.0b1/src/cognitia/runtime/sdk_tools.py +48 -0
- cognitia-0.3.0b1/src/cognitia/runtime/thin/__init__.py +13 -0
- cognitia-0.3.0b1/src/cognitia/runtime/thin/executor.py +170 -0
- cognitia-0.3.0b1/src/cognitia/runtime/thin/mcp_client.py +164 -0
- cognitia-0.3.0b1/src/cognitia/runtime/thin/modes.py +68 -0
- cognitia-0.3.0b1/src/cognitia/runtime/thin/prompts.py +163 -0
- cognitia-0.3.0b1/src/cognitia/runtime/thin/runtime.py +746 -0
- cognitia-0.3.0b1/src/cognitia/runtime/thin/schemas.py +119 -0
- cognitia-0.3.0b1/src/cognitia/runtime/types.py +448 -0
- cognitia-0.3.0b1/src/cognitia/session/__init__.py +12 -0
- cognitia-0.3.0b1/src/cognitia/session/manager.py +221 -0
- cognitia-0.3.0b1/src/cognitia/session/rehydrator.py +97 -0
- cognitia-0.3.0b1/src/cognitia/session/types.py +56 -0
- cognitia-0.3.0b1/src/cognitia/skills/__init__.py +21 -0
- cognitia-0.3.0b1/src/cognitia/skills/loader.py +157 -0
- cognitia-0.3.0b1/src/cognitia/skills/registry.py +104 -0
- cognitia-0.3.0b1/src/cognitia/skills/types.py +41 -0
- cognitia-0.3.0b1/src/cognitia/todo/__init__.py +1 -0
- cognitia-0.3.0b1/src/cognitia/todo/db_provider.py +76 -0
- cognitia-0.3.0b1/src/cognitia/todo/fs_provider.py +62 -0
- cognitia-0.3.0b1/src/cognitia/todo/inmemory_provider.py +38 -0
- cognitia-0.3.0b1/src/cognitia/todo/protocols.py +38 -0
- cognitia-0.3.0b1/src/cognitia/todo/schema.py +21 -0
- cognitia-0.3.0b1/src/cognitia/todo/tools.py +118 -0
- cognitia-0.3.0b1/src/cognitia/todo/types.py +50 -0
- cognitia-0.3.0b1/src/cognitia/tools/__init__.py +1 -0
- cognitia-0.3.0b1/src/cognitia/tools/builtin.py +383 -0
- cognitia-0.3.0b1/src/cognitia/tools/protocols.py +90 -0
- cognitia-0.3.0b1/src/cognitia/tools/sandbox_docker.py +181 -0
- cognitia-0.3.0b1/src/cognitia/tools/sandbox_e2b.py +156 -0
- cognitia-0.3.0b1/src/cognitia/tools/sandbox_local.py +163 -0
- cognitia-0.3.0b1/src/cognitia/tools/thinking.py +70 -0
- cognitia-0.3.0b1/src/cognitia/tools/types.py +59 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_httpx.py +93 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_protocols.py +92 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/__init__.py +20 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/brave.py +76 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/crawl4ai.py +63 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/duckduckgo.py +66 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/factory.py +86 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/jina.py +59 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/searxng.py +68 -0
- cognitia-0.3.0b1/src/cognitia/tools/web_providers/tavily.py +68 -0
- cognitia-0.3.0b1/src/cognitia/types.py +56 -0
- cognitia-0.3.0b1/tests/conftest.py +24 -0
- cognitia-0.3.0b1/tests/e2e/__init__.py +0 -0
- cognitia-0.3.0b1/tests/e2e/test_agent_facade_e2e.py +281 -0
- cognitia-0.3.0b1/tests/e2e/test_sdk_features_e2e.py +546 -0
- cognitia-0.3.0b1/tests/integration/test_agent_facade_wiring.py +233 -0
- cognitia-0.3.0b1/tests/integration/test_capabilities_wiring.py +161 -0
- cognitia-0.3.0b1/tests/integration/test_context_assembly.py +447 -0
- cognitia-0.3.0b1/tests/integration/test_deepagents_stage4_surface.py +211 -0
- cognitia-0.3.0b1/tests/integration/test_policy_chain.py +158 -0
- cognitia-0.3.0b1/tests/integration/test_resilience_flow.py +99 -0
- cognitia-0.3.0b1/tests/integration/test_runtime_capability_wiring.py +48 -0
- cognitia-0.3.0b1/tests/integration/test_runtime_portable_matrix.py +199 -0
- cognitia-0.3.0b1/tests/integration/test_sdk_features_wiring.py +448 -0
- cognitia-0.3.0b1/tests/integration/test_security_regression.py +132 -0
- cognitia-0.3.0b1/tests/integration/test_session_lifecycle.py +179 -0
- cognitia-0.3.0b1/tests/integration/test_skills_workflow.py +115 -0
- cognitia-0.3.0b1/tests/integration/test_web_search_live.py +100 -0
- cognitia-0.3.0b1/tests/security/test_security_provider_parity.py +106 -0
- cognitia-0.3.0b1/tests/unit/test_agent_config.py +151 -0
- cognitia-0.3.0b1/tests/unit/test_agent_conversation.py +342 -0
- cognitia-0.3.0b1/tests/unit/test_agent_facade.py +732 -0
- cognitia-0.3.0b1/tests/unit/test_agent_middleware.py +228 -0
- cognitia-0.3.0b1/tests/unit/test_agent_result.py +103 -0
- cognitia-0.3.0b1/tests/unit/test_agent_tool.py +242 -0
- cognitia-0.3.0b1/tests/unit/test_bootstrap_stack.py +268 -0
- cognitia-0.3.0b1/tests/unit/test_builtin_tools.py +273 -0
- cognitia-0.3.0b1/tests/unit/test_claude_code_runtime.py +257 -0
- cognitia-0.3.0b1/tests/unit/test_commands.py +107 -0
- cognitia-0.3.0b1/tests/unit/test_config_loaders.py +155 -0
- cognitia-0.3.0b1/tests/unit/test_context.py +426 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_builtins.py +71 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_hitl.py +65 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_memory.py +100 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_models.py +117 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_native.py +217 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_planner.py +95 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_runtime.py +1083 -0
- cognitia-0.3.0b1/tests/unit/test_deepagents_subagent_orch.py +145 -0
- cognitia-0.3.0b1/tests/unit/test_hooks_registry.py +93 -0
- cognitia-0.3.0b1/tests/unit/test_hooks_sdk_bridge.py +157 -0
- cognitia-0.3.0b1/tests/unit/test_import_isolation.py +141 -0
- cognitia-0.3.0b1/tests/unit/test_inmemory_provider.py +216 -0
- cognitia-0.3.0b1/tests/unit/test_llm_summarizer.py +89 -0
- cognitia-0.3.0b1/tests/unit/test_logger.py +176 -0
- cognitia-0.3.0b1/tests/unit/test_mcp_client.py +156 -0
- cognitia-0.3.0b1/tests/unit/test_memory_bank_fs.py +121 -0
- cognitia-0.3.0b1/tests/unit/test_memory_bank_tools.py +105 -0
- cognitia-0.3.0b1/tests/unit/test_memory_bank_types.py +127 -0
- cognitia-0.3.0b1/tests/unit/test_model_policy.py +29 -0
- cognitia-0.3.0b1/tests/unit/test_model_policy_v2.py +75 -0
- cognitia-0.3.0b1/tests/unit/test_model_registry.py +301 -0
- cognitia-0.3.0b1/tests/unit/test_options_builder.py +377 -0
- cognitia-0.3.0b1/tests/unit/test_phase_types.py +35 -0
- cognitia-0.3.0b1/tests/unit/test_plan_manager.py +139 -0
- cognitia-0.3.0b1/tests/unit/test_plan_store.py +106 -0
- cognitia-0.3.0b1/tests/unit/test_plan_tools.py +132 -0
- cognitia-0.3.0b1/tests/unit/test_plan_types.py +226 -0
- cognitia-0.3.0b1/tests/unit/test_postgres_memory.py +396 -0
- cognitia-0.3.0b1/tests/unit/test_protocol_contracts.py +401 -0
- cognitia-0.3.0b1/tests/unit/test_rehydrator.py +231 -0
- cognitia-0.3.0b1/tests/unit/test_resilience.py +105 -0
- cognitia-0.3.0b1/tests/unit/test_role_router.py +112 -0
- cognitia-0.3.0b1/tests/unit/test_runtime_adapter.py +955 -0
- cognitia-0.3.0b1/tests/unit/test_runtime_capabilities.py +71 -0
- cognitia-0.3.0b1/tests/unit/test_runtime_factory.py +177 -0
- cognitia-0.3.0b1/tests/unit/test_runtime_ports_base.py +54 -0
- cognitia-0.3.0b1/tests/unit/test_runtime_types.py +410 -0
- cognitia-0.3.0b1/tests/unit/test_sandbox_docker.py +134 -0
- cognitia-0.3.0b1/tests/unit/test_sandbox_e2b.py +139 -0
- cognitia-0.3.0b1/tests/unit/test_sandbox_local.py +267 -0
- cognitia-0.3.0b1/tests/unit/test_sandbox_types.py +186 -0
- cognitia-0.3.0b1/tests/unit/test_sdk_query.py +392 -0
- cognitia-0.3.0b1/tests/unit/test_sdk_tools.py +75 -0
- cognitia-0.3.0b1/tests/unit/test_session_manager.py +337 -0
- cognitia-0.3.0b1/tests/unit/test_sessions_deprecation.py +33 -0
- cognitia-0.3.0b1/tests/unit/test_settings_loader.py +94 -0
- cognitia-0.3.0b1/tests/unit/test_skill_validation.py +56 -0
- cognitia-0.3.0b1/tests/unit/test_skills.py +214 -0
- cognitia-0.3.0b1/tests/unit/test_sqlite_memory.py +283 -0
- cognitia-0.3.0b1/tests/unit/test_standalone_import.py +88 -0
- cognitia-0.3.0b1/tests/unit/test_subagent_types.py +102 -0
- cognitia-0.3.0b1/tests/unit/test_summarizer.py +73 -0
- cognitia-0.3.0b1/tests/unit/test_team_messaging.py +165 -0
- cognitia-0.3.0b1/tests/unit/test_team_orchestration.py +182 -0
- cognitia-0.3.0b1/tests/unit/test_team_types.py +95 -0
- cognitia-0.3.0b1/tests/unit/test_thin_budgets.py +172 -0
- cognitia-0.3.0b1/tests/unit/test_thin_events.py +172 -0
- cognitia-0.3.0b1/tests/unit/test_thin_executor.py +160 -0
- cognitia-0.3.0b1/tests/unit/test_thin_modes.py +100 -0
- cognitia-0.3.0b1/tests/unit/test_thin_planner.py +148 -0
- cognitia-0.3.0b1/tests/unit/test_thin_planner_mode.py +190 -0
- cognitia-0.3.0b1/tests/unit/test_thin_runtime.py +238 -0
- cognitia-0.3.0b1/tests/unit/test_thin_schemas.py +150 -0
- cognitia-0.3.0b1/tests/unit/test_thin_subagent.py +105 -0
- cognitia-0.3.0b1/tests/unit/test_thinking_tool.py +75 -0
- cognitia-0.3.0b1/tests/unit/test_todo_fs_provider.py +57 -0
- cognitia-0.3.0b1/tests/unit/test_todo_provider.py +262 -0
- cognitia-0.3.0b1/tests/unit/test_tool_budget.py +154 -0
- cognitia-0.3.0b1/tests/unit/test_tool_id_codec.py +128 -0
- cognitia-0.3.0b1/tests/unit/test_tool_policy.py +199 -0
- cognitia-0.3.0b1/tests/unit/test_types.py +130 -0
- cognitia-0.3.0b1/tests/unit/test_web_providers.py +682 -0
cognitia-0.3.0b1/.git
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gitdir: ../../.git/modules/packages/cognitia
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'docs/**'
|
|
8
|
+
- 'mkdocs.yml'
|
|
9
|
+
- '.github/workflows/docs.yml'
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.12'
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
pip install mkdocs-material mkdocs-minify-plugin
|
|
30
|
+
|
|
31
|
+
- name: Deploy to GitHub Pages
|
|
32
|
+
run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.3.0b1] - 2026-03-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Agent Facade API** (`cognitia.agent`) — high-level 3-line API for AI agents
|
|
12
|
+
- `Agent` class with `query()`, `stream()`, `conversation()` methods
|
|
13
|
+
- `@tool` decorator for defining tools with auto-inferred JSON Schema
|
|
14
|
+
- `Middleware` protocol with built-in `CostTracker` and `SecurityGuard`
|
|
15
|
+
- `Conversation` for explicit multi-turn dialog management
|
|
16
|
+
- **Import isolation** — `import cognitia` works without any optional dependencies
|
|
17
|
+
- **Test markers** — `requires_claude_sdk`, `requires_anthropic`, `requires_langchain`, `live`
|
|
18
|
+
- LICENSE (MIT), CHANGELOG, CONTRIBUTING, comprehensive documentation
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- `@tool` handler contract mismatch with Claude Agent SDK MCP format
|
|
22
|
+
- `hooks/__init__.py` crash when `claude_agent_sdk` not installed
|
|
23
|
+
- Optional dependency boundaries fully verified with smoke tests
|
|
24
|
+
|
|
25
|
+
## [0.2.0] - 2026-02-11
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- **Multi-runtime support** — 3 pluggable runtimes:
|
|
29
|
+
- `claude_sdk` — Claude Agent SDK (subprocess, built-in MCP)
|
|
30
|
+
- `thin` — lightweight built-in loop (react/planner/conversational modes)
|
|
31
|
+
- `deepagents` — LangChain Deep Agents integration
|
|
32
|
+
- **RuntimeFactory** — create runtime by config/env/override
|
|
33
|
+
- **Runtime Ports** — `BaseRuntimePort`, `ThinRuntimePort`, `DeepAgentsRuntimePort`
|
|
34
|
+
- **Model Registry** — multi-provider (Anthropic, OpenAI, Google, DeepSeek) with aliases
|
|
35
|
+
- **CognitiaStack** — bootstrap facade factory for quick setup
|
|
36
|
+
- **Memory providers** — InMemory, PostgreSQL, SQLite
|
|
37
|
+
- **Web tools** — pluggable search (DuckDuckGo, Tavily, SearXNG, Brave) and fetch providers
|
|
38
|
+
- **Orchestration** — plan manager, subagent spawning, team coordination
|
|
39
|
+
- **SDK 0.1.48 integration** — `one_shot_query`, `sdk_tools`, hooks bridge
|
|
40
|
+
- **LLM Summarizer** — automatic conversation summarization with history cap
|
|
41
|
+
- **Circuit Breaker** — resilience pattern for external calls
|
|
42
|
+
- 14 ISP-compliant protocols (each <=5 methods)
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- Domain-agnostic: removed all finance-specific defaults from library code
|
|
46
|
+
- `RoleSkillsLoader` moved to `cognitia.config.role_skills`
|
|
47
|
+
- `RoleRouterConfig` is now a typed dataclass (was dict)
|
|
48
|
+
|
|
49
|
+
## [0.1.0] - 2026-02-10
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
- **Core protocols** — `FactStore`, `GoalStore`, `MessageStore`, `SummaryStore`, `UserStore`, `SessionStateStore`, `PhaseStore`, `ToolEventStore`
|
|
53
|
+
- **Behavior protocols** — `RoleRouter`, `ModelSelector`, `ToolIdCodec`, `ContextBuilder`, `SessionRehydrator`, `RuntimePort`
|
|
54
|
+
- **Session management** — `InMemorySessionManager`, `DefaultSessionRehydrator`
|
|
55
|
+
- **Context builder** — `DefaultContextBuilder` with token budget and priority-based overflow
|
|
56
|
+
- **Tool policy** — `DefaultToolPolicy` with default-deny and always-denied tools list
|
|
57
|
+
- **Skills** — `YamlSkillLoader`, `SkillRegistry` for declarative MCP skill management
|
|
58
|
+
- **Routing** — `KeywordRoleRouter` for keyword-based role resolution
|
|
59
|
+
- **Observability** — `AgentLogger` with structured JSON logging
|
|
60
|
+
- **Memory** — `InMemoryMemoryProvider`, `PostgresMemoryProvider`
|
|
61
|
+
- **Commands** — `CommandRegistry` with aliases
|
|
62
|
+
|
|
63
|
+
[0.3.0b1]: https://github.com/fockus/cognitia/compare/v0.2.0...v0.3.0b1
|
|
64
|
+
[0.2.0]: https://github.com/fockus/cognitia/compare/v0.1.0...v0.2.0
|
|
65
|
+
[0.1.0]: https://github.com/fockus/cognitia/releases/tag/v0.1.0
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Contributing to Cognitia
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to Cognitia!
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Clone the repository
|
|
9
|
+
git clone https://github.com/fockus/cognitia.git
|
|
10
|
+
cd cognitia
|
|
11
|
+
|
|
12
|
+
# Create virtual environment
|
|
13
|
+
python -m venv .venv
|
|
14
|
+
source .venv/bin/activate # or .venv\Scripts\activate on Windows
|
|
15
|
+
|
|
16
|
+
# Install with dev dependencies and all extras
|
|
17
|
+
pip install -e ".[dev,all]"
|
|
18
|
+
|
|
19
|
+
# Verify installation
|
|
20
|
+
python -c "import cognitia; print(cognitia.__version__)"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Running Tests
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# All offline tests (default)
|
|
27
|
+
pytest
|
|
28
|
+
|
|
29
|
+
# Include tests that require Claude Agent SDK
|
|
30
|
+
pytest -m "requires_claude_sdk or not requires_claude_sdk"
|
|
31
|
+
|
|
32
|
+
# Include live/network tests
|
|
33
|
+
pytest -m live
|
|
34
|
+
|
|
35
|
+
# With coverage
|
|
36
|
+
pytest --cov=cognitia --cov-report=term-missing
|
|
37
|
+
|
|
38
|
+
# Specific test file
|
|
39
|
+
pytest tests/unit/test_agent_tool.py -v
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Code Style
|
|
43
|
+
|
|
44
|
+
We use [Ruff](https://docs.astral.sh/ruff/) for linting and formatting:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Check
|
|
48
|
+
ruff check src/ tests/
|
|
49
|
+
ruff format --check src/ tests/
|
|
50
|
+
|
|
51
|
+
# Auto-fix
|
|
52
|
+
ruff check --fix src/ tests/
|
|
53
|
+
ruff format src/ tests/
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Type checking with [mypy](https://mypy-lang.org/):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
mypy src/cognitia/
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Architecture Principles
|
|
63
|
+
|
|
64
|
+
- **Clean Architecture** — dependencies point inward: Infrastructure -> Application -> Domain
|
|
65
|
+
- **Protocol-first** — define `Protocol` interfaces before implementations
|
|
66
|
+
- **TDD** — write tests before implementation (Red -> Green -> Refactor)
|
|
67
|
+
- **SOLID** — SRP (<300 lines per module), ISP (<=5 methods per protocol), DIP (depend on abstractions)
|
|
68
|
+
- **Domain-agnostic** — cognitia must not contain any domain-specific logic (finance, medical, etc.)
|
|
69
|
+
|
|
70
|
+
## Pull Request Process
|
|
71
|
+
|
|
72
|
+
1. Fork the repository
|
|
73
|
+
2. Create a feature branch: `git checkout -b feat/my-feature`
|
|
74
|
+
3. Write tests first (TDD)
|
|
75
|
+
4. Implement the feature
|
|
76
|
+
5. Ensure all tests pass: `pytest`
|
|
77
|
+
6. Ensure code style: `ruff check && ruff format --check`
|
|
78
|
+
7. Submit a pull request with a clear description
|
|
79
|
+
|
|
80
|
+
### Commit Messages
|
|
81
|
+
|
|
82
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
feat: add new middleware for rate limiting
|
|
86
|
+
fix: handle empty tool parameters in @tool decorator
|
|
87
|
+
docs: update runtime switching guide
|
|
88
|
+
test: add integration tests for SQLite provider
|
|
89
|
+
refactor: extract common logic from runtime ports
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Optional Dependencies
|
|
93
|
+
|
|
94
|
+
Cognitia uses optional dependency groups. When adding features that require new packages:
|
|
95
|
+
|
|
96
|
+
1. Add the dependency to the appropriate extra in `pyproject.toml`
|
|
97
|
+
2. Use lazy imports (inside functions/methods) for optional packages
|
|
98
|
+
3. Never import optional packages at module top-level
|
|
99
|
+
4. Add a smoke test in `tests/unit/test_import_isolation.py`
|
|
100
|
+
5. Mark tests that require the extra with the appropriate marker:
|
|
101
|
+
- `@pytest.mark.requires_claude_sdk`
|
|
102
|
+
- `@pytest.mark.requires_anthropic`
|
|
103
|
+
- `@pytest.mark.requires_langchain`
|
|
104
|
+
- `@pytest.mark.live` (for network-dependent tests)
|
|
105
|
+
|
|
106
|
+
## Questions?
|
|
107
|
+
|
|
108
|
+
Open an issue on GitHub for questions, bug reports, or feature requests.
|
cognitia-0.3.0b1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 cognitia contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|