krons 0.2.2__tar.gz → 0.2.4__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.
- {krons-0.2.2 → krons-0.2.4}/.gitignore +2 -1
- krons-0.2.4/CHANGELOG.md +38 -0
- krons-0.2.4/CLAUDE.md +183 -0
- {krons-0.2.2 → krons-0.2.4}/PKG-INFO +1 -1
- krons-0.2.4/examples/__init__.py +50 -0
- krons-0.2.4/examples/code_review_panel.py +452 -0
- krons-0.2.4/examples/codegen_pipeline.py +352 -0
- krons-0.2.4/examples/dynamic_response.py +171 -0
- krons-0.2.4/examples/event_sourcing.py +225 -0
- krons-0.2.4/examples/multi_agent_orchestration.py +429 -0
- krons-0.2.4/examples/pipeline_router.py +215 -0
- krons-0.2.4/examples/research_agent.py +425 -0
- krons-0.2.4/examples/tech_debate.py +496 -0
- krons-0.2.4/examples/validation_loop.py +304 -0
- {krons-0.2.2 → krons-0.2.4}/pyproject.toml +1 -1
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/common.py +1 -1
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/prepare_msg.py +1 -2
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/__init__.py +0 -4
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/flow.py +7 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/node.py +27 -26
- krons-0.2.4/src/krons/core/specs/adapters/_utils.py +87 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/catalog/_content.py +6 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/types/db_types.py +103 -18
- {krons-0.2.2 → krons-0.2.4}/src/krons/session/session.py +56 -49
- krons-0.2.4/tests/session/test_session_logging.py +268 -0
- {krons-0.2.2 → krons-0.2.4}/tests/specs/test_catalog.py +10 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_db_types.py +117 -1
- {krons-0.2.2 → krons-0.2.4}/uv.lock +1 -1
- krons-0.2.2/CLAUDE.md +0 -399
- krons-0.2.2/src/krons/core/base/log.py +0 -32
- krons-0.2.2/src/krons/core/specs/adapters/_utils.py +0 -45
- krons-0.2.2/tests/core/test_log.py +0 -44
- krons-0.2.2/tests/session/test_session_logging.py +0 -337
- {krons-0.2.2 → krons-0.2.4}/.github/workflows/release.yml +0 -0
- {krons-0.2.2 → krons-0.2.4}/.python-version +0 -0
- {krons-0.2.2 → krons-0.2.4}/LICENSE +0 -0
- {krons-0.2.2 → krons-0.2.4}/README.md +0 -0
- {krons-0.2.2 → krons-0.2.4}/cookbooks/007_fan_out_in.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/cookbooks/test_conduct.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/mcps/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/mcps/loader.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/mcps/wrapper.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/action.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/assistant.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/instruction.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/role.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/message/system.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/act.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/generate.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/llm_reparse.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/operate.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/parse.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/react.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/specs.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/structure.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/operations/utils.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/providers/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/providers/anthropic_messages.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/providers/claude_code.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/providers/gemini.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/providers/match.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/providers/oai_chat.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/third_party/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/third_party/anthropic_models.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/third_party/claude_code.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/third_party/gemini_models.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/third_party/openai_models.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/agent/tool.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/broadcaster.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/element.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/event.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/eventbus.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/graph.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/pile.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/processor.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/base/progression.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/adapters/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/adapters/dataclass_field.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/adapters/factory.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/adapters/pydantic_adapter.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/adapters/sql_ddl.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/catalog/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/catalog/_audit.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/catalog/_common.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/catalog/_enforcement.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/factory.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/operable.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/protocol.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/specs/spec.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/types/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/types/_sentinel.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/types/base.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/core/types/identity.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/errors.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/protocols.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/py.typed +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/backend.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/endpoint.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/hook.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/imodel.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/registry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/utilities/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/utilities/header_factory.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/utilities/rate_limited_executor.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/utilities/rate_limiter.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/utilities/resilience.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/resource/utilities/token_calculator.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/session/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/session/constraints.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/session/exchange.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/session/message.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/session/registry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_function_arg_parser.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_hash.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_json_dump.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_lazy_init.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_pythonic_function_call.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_to_list.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_to_num.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/_utils.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_async_call.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_cancel.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_errors.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_patterns.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_primitives.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_priority_queue.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_resource_tracker.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_run_async.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_task.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/concurrency/_utils.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/display.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/fuzzy/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/fuzzy/_extract_json.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/fuzzy/_fuzzy_json.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/fuzzy/_fuzzy_match.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/fuzzy/_string_similarity.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/fuzzy/_to_dict.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/schemas/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/schemas/_breakdown_pydantic_annotation.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/schemas/_formatter.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/schemas/_minimal_yaml.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/schemas/_typescript.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/sql/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/sql/_sql_validation.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/validators/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/utils/validators/_validate_image_url.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/engine.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/form.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/operations/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/operations/builder.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/operations/context.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/operations/flow.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/operations/node.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/operations/registry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/report.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/common/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/common/boolean.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/common/choice.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/common/mapping.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/common/model.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/common/number.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/common/string.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/registry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/rule.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/rules/validator.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/src/krons/work/worker.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/agent/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/agent/test_mcps_unit.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/agent/test_message.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/agent/test_providers_e2e.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/agent/test_providers_unit.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/agent/test_tool_unit.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/conftest.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_broadcaster.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_element.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_error_paths.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_event.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_event_status_race.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_eventbus.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_flow.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_flow_edge_cases.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_graph.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_graph_event_loop.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_node.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_pile.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_pile_edge_cases.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_processor.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_processor_security.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_progression.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_progression_edge_cases.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_serialization_roundtrip.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/core/test_thread_safety_stress.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/operations/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/operations/test_builder.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/operations/test_flow.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/operations/test_node.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/operations/test_op_flow.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/operations/test_op_node.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/operations/test_registry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/test_backend.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/test_endpoint.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/test_hook.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/test_imodel.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/test_registry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/utilities/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/utilities/test_header_factory.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/utilities/test_rate_limiter.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/utilities/test_resilience.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/resource/utilities/test_resilience_retry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/rules/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/rules/test_base.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/rules/test_builtin.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/rules/test_registry.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/rules/test_rule_params_edge_cases.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/rules/test_rules_comprehensive.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/rules/test_validator.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/session/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/session/test_exchange.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/session/test_message.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/session/test_message_edge_cases.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/session/test_session.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/session/test_session_edge_cases.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/specs/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/specs/test_factory.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/test_protocols.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/conftest.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/spec_adapters/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/spec_adapters/test_adapters_py311.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/spec_adapters/test_protocol.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/spec_adapters/test_pydantic_field.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/spec_adapters/test_sql_ddl_specs.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_identity.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_model.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_operable.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_sentinel.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_spec.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_types.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/types/test_types_py311.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_async_call.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_cancel.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_errors.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_patterns.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_primitives.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_priority_queue.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_run_async.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_task.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/concurrency/test_utils.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_extract_json.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_fuzzy_json.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_fuzzy_match.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_hash.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_json_dump.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_lazy_init.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_sql_validation.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_string_similarity.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_to_dict.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_to_list.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_to_num.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/utils/test_utils.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/work/__init__.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/work/test_engine.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/work/test_form.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/work/test_report.py +0 -0
- {krons-0.2.2 → krons-0.2.4}/tests/work/test_worker.py +0 -0
krons-0.2.4/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
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.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.4] - 2026-02-04
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `parse_forward_ref` canonical parser for ForwardRef annotations
|
|
13
|
+
- Support for `FK["Model"]` and `FK['Model']` string forward references
|
|
14
|
+
- Robust nullability detection: `Optional[X]`, `Union[X, None]`, `X | None`
|
|
15
|
+
- `meta_key` parameter in `ContentSpecs.get_specs()` for DB alias customization
|
|
16
|
+
- Duck typing (`_is_spec_like`) to avoid circular imports
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- DDL generation now uses config-driven audit columns (dict pattern)
|
|
21
|
+
- `_utils.py` uses shared `parse_forward_ref` instead of duplicate implementation
|
|
22
|
+
- Removed `include_audit_columns` parameter from `generate_ddl()` (now config-driven)
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- ForwardRef parsing with `from __future__ import annotations` (PEP 563)
|
|
27
|
+
- Nested Union types in nullability detection (e.g., `Union[FK[User], None]`)
|
|
28
|
+
|
|
29
|
+
## [0.2.3] - 2026-02-04
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- Multi-agent example patterns (code_review_panel, tech_debate)
|
|
34
|
+
- 10 comprehensive examples demonstrating framework capabilities
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Pile UUID access bug for Element retrieval
|
krons-0.2.4/CLAUDE.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# krons - Spec-Based Composable Framework
|
|
2
|
+
|
|
3
|
+
## Quick Reference
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
krons/
|
|
7
|
+
├── core/ # Element, Node, Flow, Graph, Pile, Event
|
|
8
|
+
├── session/ # Session, Branch, Message (conversation orchestration)
|
|
9
|
+
├── resource/ # iModel, Endpoint, HookRegistry (API backends)
|
|
10
|
+
├── agent/ # Operations pipeline (generate → parse → structure → operate → react)
|
|
11
|
+
├── work/ # Report, Worker, Form (workflow orchestration)
|
|
12
|
+
└── utils/ # JSON, concurrency, display helpers
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Core Primitives
|
|
16
|
+
|
|
17
|
+
### Element — Base identity class
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from krons.core import Element
|
|
21
|
+
|
|
22
|
+
class MyEntity(Element):
|
|
23
|
+
name: str
|
|
24
|
+
|
|
25
|
+
e = MyEntity(name="test")
|
|
26
|
+
e.id # UUID (frozen)
|
|
27
|
+
e.created_at # datetime (frozen)
|
|
28
|
+
e.to_dict(mode="json") # Serialization with kron_class for polymorphic restore
|
|
29
|
+
Element.from_dict(data) # Polymorphic deserialization
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Pile — Thread-safe typed collection
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from krons.core import Pile
|
|
36
|
+
|
|
37
|
+
pile = Pile[MyEntity](item_type={MyEntity})
|
|
38
|
+
pile.add(entity)
|
|
39
|
+
pile.get(uuid_or_str)
|
|
40
|
+
pile[0] # By index
|
|
41
|
+
pile[lambda x: x.name] # Filter
|
|
42
|
+
async with pile: # Async lock
|
|
43
|
+
...
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Node — Polymorphic content container
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from krons.core import Node, create_node
|
|
50
|
+
|
|
51
|
+
# Dynamic node
|
|
52
|
+
node = Node(content={"key": "value"})
|
|
53
|
+
|
|
54
|
+
# Typed node with DB features
|
|
55
|
+
MyNode = create_node("MyNode", content=MyContent, flatten_content=True)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Session — Conversation Orchestration
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from krons.session import Session, SessionConfig
|
|
62
|
+
|
|
63
|
+
session = Session(config=SessionConfig(
|
|
64
|
+
default_branch_name="main",
|
|
65
|
+
default_gen_model="gpt-4",
|
|
66
|
+
log_persist_dir="./logs", # Enable persistence (None = disabled)
|
|
67
|
+
log_auto_save_on_exit=True, # atexit handler
|
|
68
|
+
))
|
|
69
|
+
|
|
70
|
+
# Register model
|
|
71
|
+
session.resources.register(imodel)
|
|
72
|
+
|
|
73
|
+
# Execute operations
|
|
74
|
+
op = await session.conduct("generate", params=GenerateParams(...))
|
|
75
|
+
op = await session.conduct("structure", params=StructureParams(...))
|
|
76
|
+
|
|
77
|
+
# Access messages
|
|
78
|
+
session.messages # Pile[Message]
|
|
79
|
+
session.dump() # Sync dump full session to JSON
|
|
80
|
+
await session.adump() # Async dump
|
|
81
|
+
|
|
82
|
+
# Restore from dump
|
|
83
|
+
restored = Session.from_dict(data) # Then re-register resources
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Resource — API Backends
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from krons.resource import iModel, Endpoint, EndpointConfig
|
|
90
|
+
|
|
91
|
+
config = EndpointConfig(
|
|
92
|
+
name="gpt-4",
|
|
93
|
+
provider="openai",
|
|
94
|
+
endpoint="chat/completions",
|
|
95
|
+
base_url="https://api.openai.com/v1",
|
|
96
|
+
api_key="...",
|
|
97
|
+
)
|
|
98
|
+
model = iModel(backend=Endpoint(config=config))
|
|
99
|
+
calling = await model.invoke(messages=[...])
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Agent Operations
|
|
103
|
+
|
|
104
|
+
Pipeline: `generate → parse → structure → operate → react`
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from krons.agent.operations import GenerateParams, StructureParams
|
|
108
|
+
|
|
109
|
+
# Generate raw LLM response
|
|
110
|
+
op = await session.conduct("generate", params=GenerateParams(
|
|
111
|
+
primary="Your prompt",
|
|
112
|
+
imodel="gpt-4",
|
|
113
|
+
))
|
|
114
|
+
|
|
115
|
+
# Structured output with validation
|
|
116
|
+
op = await session.conduct("structure", params=StructureParams(
|
|
117
|
+
generate_params=GenerateParams(primary="...", request_model=MyModel),
|
|
118
|
+
validator=Validator(),
|
|
119
|
+
operable=Operable.from_structure(MyModel),
|
|
120
|
+
))
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Work — Workflow Orchestration
|
|
124
|
+
|
|
125
|
+
### Report (declarative workflow)
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
from krons.work import Report
|
|
129
|
+
|
|
130
|
+
class MyReport(Report):
|
|
131
|
+
result: str | None = None
|
|
132
|
+
assignment: str = "input -> result"
|
|
133
|
+
form_assignments: list[str] = [
|
|
134
|
+
"step1: input -> intermediate",
|
|
135
|
+
"step2: intermediate -> result",
|
|
136
|
+
]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Worker (execution capability)
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
from krons.work import Worker, work
|
|
143
|
+
|
|
144
|
+
class MyWorker(Worker):
|
|
145
|
+
name = "processor"
|
|
146
|
+
|
|
147
|
+
@work(assignment="input -> output")
|
|
148
|
+
async def process(self, input, **kwargs):
|
|
149
|
+
return transform(input)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Protocols
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
from krons.protocols import implements, Serializable
|
|
156
|
+
|
|
157
|
+
@implements(Serializable, signature_check="error")
|
|
158
|
+
class MyClass:
|
|
159
|
+
def to_dict(self, **kwargs): ...
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Testing
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
uv run pytest tests/ -q # All tests
|
|
166
|
+
uv run pytest tests/core/ -xvs # Core module verbose
|
|
167
|
+
uv run pytest -k "test_session" -v # Pattern match
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
import pytest
|
|
172
|
+
|
|
173
|
+
@pytest.mark.anyio
|
|
174
|
+
async def test_async():
|
|
175
|
+
result = await some_call()
|
|
176
|
+
assert result
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Code Style
|
|
180
|
+
|
|
181
|
+
- Python 3.11+, Pydantic v2, anyio
|
|
182
|
+
- `uv run ruff check src/ --fix && uv run ruff format src/`
|
|
183
|
+
- Type hints required on public APIs
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright (c) 2025 - 2026, HaiyangLi <quantocean.li at gmail dot com>
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
"""krons Usage Examples
|
|
5
|
+
|
|
6
|
+
This module provides practical, runnable examples demonstrating krons patterns
|
|
7
|
+
with Claude Code integration.
|
|
8
|
+
|
|
9
|
+
Multi-Agent Patterns (parallel Claude Code):
|
|
10
|
+
code_review_panel - 3 specialist reviewers + moderator synthesis
|
|
11
|
+
tech_debate - Adversarial debate with advocate/skeptic/pragmatist + judge
|
|
12
|
+
|
|
13
|
+
Worker Patterns (declarative workflows):
|
|
14
|
+
validation_loop - Self-correcting LLM generation with bounded retries
|
|
15
|
+
codegen_pipeline - Code generation with error recovery workflow
|
|
16
|
+
research_agent - Adaptive depth research with confidence-based routing
|
|
17
|
+
|
|
18
|
+
Exchange Patterns (async message passing):
|
|
19
|
+
pipeline_router - Multi-stage data processing pipeline
|
|
20
|
+
event_sourcing - Event persistence, snapshots, and replay
|
|
21
|
+
|
|
22
|
+
Specs Patterns (dynamic schema composition):
|
|
23
|
+
dynamic_response - Runtime Pydantic model generation with validators
|
|
24
|
+
|
|
25
|
+
Combined Patterns:
|
|
26
|
+
multi_agent_orchestration - Supervisor-worker coordination via Exchange + Worker
|
|
27
|
+
|
|
28
|
+
Run any example:
|
|
29
|
+
uv run python examples/code_review_panel.py
|
|
30
|
+
uv run python examples/tech_debate.py
|
|
31
|
+
uv run python examples/validation_loop.py
|
|
32
|
+
# etc.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
# Multi-agent patterns (featured)
|
|
37
|
+
"code_review_panel",
|
|
38
|
+
"tech_debate",
|
|
39
|
+
# Worker patterns
|
|
40
|
+
"validation_loop",
|
|
41
|
+
"codegen_pipeline",
|
|
42
|
+
"research_agent",
|
|
43
|
+
# Exchange patterns
|
|
44
|
+
"pipeline_router",
|
|
45
|
+
"event_sourcing",
|
|
46
|
+
# Specs patterns
|
|
47
|
+
"dynamic_response",
|
|
48
|
+
# Combined patterns
|
|
49
|
+
"multi_agent_orchestration",
|
|
50
|
+
]
|