agentic-codebase-navigator 1.2.0__tar.gz → 1.3.1__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.
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/CHANGELOG.md +87 -0
- {agentic_codebase_navigator-1.2.0/src/agentic_codebase_navigator.egg-info → agentic_codebase_navigator-1.3.1}/PKG-INFO +42 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/README.md +41 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/README.md +10 -3
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/adr/0001-hexagonal-modular-monolith.md +1 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/adr/0002-optional-provider-dependencies.md +1 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/adr/0003-jsonl-log-schema-versioning.md +1 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/api-reference.md +65 -4
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/architecture.md +43 -21
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/configuration.md +4 -4
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/contributing/commit-conventions.md +1 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/environments/execution-environments.md +27 -27
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/internals/logging.md +1 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/internals/ports.md +2 -6
- {agentic_codebase_navigator-1.2.0/docs → agentic_codebase_navigator-1.3.1/docs/internals}/protocol.md +1 -10
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/internals/state-machine.md +47 -47
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/migration.md +1 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/providers/llm-providers.md +1 -1
- agentic_codebase_navigator-1.3.1/docs/relay/composition.md +35 -0
- agentic_codebase_navigator-1.3.1/docs/relay/overview.md +60 -0
- agentic_codebase_navigator-1.3.1/docs/relay/states.md +100 -0
- agentic_codebase_navigator-1.3.1/docs/relay/validation.md +30 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/pyproject.toml +3 -2
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1/src/agentic_codebase_navigator.egg-info}/PKG-INFO +42 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/agentic_codebase_navigator.egg-info/SOURCES.txt +34 -12
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/environments/docker.py +31 -3
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/environments/local.py +36 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/anthropic.py +13 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/azure_openai.py +52 -12
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/gemini.py +8 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/litellm.py +25 -2
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/openai.py +62 -12
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/portkey.py +25 -2
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/provider_base.py +27 -1
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/llm/retry.py +46 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/__init__.py +22 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/executors/__init__.py +9 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/executors/async_.py +231 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/executors/sync.py +261 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/nested_handler.py +94 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/retry.py +16 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/states/__init__.py +19 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/states/async_state.py +60 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/states/function_state.py +65 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/states/llm_state.py +84 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/states/pipeline_state.py +116 -0
- agentic_codebase_navigator-1.3.1/src/rlm/adapters/relay/states/rlm_state.py +70 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/api/factory.py +15 -2
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/api/registries.py +24 -6
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/api/rlm.py +7 -1
- agentic_codebase_navigator-1.3.1/src/rlm/application/relay/__init__.py +8 -0
- agentic_codebase_navigator-1.3.1/src/rlm/application/relay/root_composer.py +105 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/application/use_cases/run_completion.py +75 -7
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/__init__.py +2 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/models/nested_call.py +17 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/orchestration_types.py +3 -3
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/policies/timeouts.py +1 -1
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/ports.py +18 -2
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/__init__.py +48 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/baton.py +128 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/budget.py +35 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/composition.py +32 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/errors.py +25 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/execution.py +18 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/join.py +12 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/pipeline.py +171 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/ports.py +25 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/registry.py +50 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/state.py +53 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/trace.py +20 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/transitions.py +56 -0
- agentic_codebase_navigator-1.3.1/src/rlm/domain/relay/validation.py +155 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/rlm_orchestrator.py +25 -23
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/tools_mode_event_source.py +136 -20
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/logging.py +12 -4
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/uv.lock +46 -16
- agentic_codebase_navigator-1.2.0/docs/api.md +0 -204
- agentic_codebase_navigator-1.2.0/docs/extending.md +0 -377
- agentic_codebase_navigator-1.2.0/docs/integration_gates.md +0 -45
- agentic_codebase_navigator-1.2.0/docs/internals/protocol.md +0 -111
- agentic_codebase_navigator-1.2.0/docs/llm_providers.md +0 -146
- agentic_codebase_navigator-1.2.0/docs/log_schema_v1.md +0 -68
- agentic_codebase_navigator-1.2.0/docs/logging.md +0 -66
- agentic_codebase_navigator-1.2.0/docs/ports.md +0 -86
- agentic_codebase_navigator-1.2.0/docs/releasing.md +0 -273
- agentic_codebase_navigator-1.2.0/docs/versioning.md +0 -28
- agentic_codebase_navigator-1.2.0/src/rlm/codebase/__init__.py +0 -7
- agentic_codebase_navigator-1.2.0/src/rlm/domain/result.py +0 -16
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/LICENSE +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/MANIFEST.in +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/cli.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/contributing/development-setup.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/contributing/releasing.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/extending/extension-protocols.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/extending/pydantic-integration.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/getting-started.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/internals/log-schema-v1.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/testing/testing-guide.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/docs/troubleshooting.md +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/setup.cfg +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/agentic_codebase_navigator.egg-info/dependency_links.txt +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/agentic_codebase_navigator.egg-info/entry_points.txt +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/agentic_codebase_navigator.egg-info/requires.txt +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/agentic_codebase_navigator.egg-info/top_level.txt +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/__main__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/_meta.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/base.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/broker/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/broker/tcp.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/environments/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/environments/modal.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/environments/prime.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/llm/mock.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/logger/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/logger/console.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/logger/jsonl.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/logger/noop.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/policies/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/policies/compression.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/policies/nested.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/policies/stopping.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/sdk_boundaries.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/tools/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/tools/native.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/tools/pydantic_output.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/adapters/tools/registry.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/api/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/application/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/application/config.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/application/use_cases/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/cli.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/agent_ports.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/errors.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/completion.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/iteration.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/json_schema_mapper.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/llm_request.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/model_spec.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/query_metadata.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/repl.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/result.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/run_metadata.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/safe_accessor.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/serialization.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/state_machine.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/type_mapping.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/usage.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/models/validation.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/policies/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/code_mode_event_source.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/code_mode_machine.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/parsing.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/prompts.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/tool_serialization.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/services/tools_mode_machine.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/domain/types.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/comms/__init__.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/comms/codec.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/comms/messages.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/comms/protocol.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/execution_namespace_policy.py +0 -0
- {agentic_codebase_navigator-1.2.0 → agentic_codebase_navigator-1.3.1}/src/rlm/infrastructure/ids.py +0 -0
|
@@ -2,6 +2,93 @@
|
|
|
2
2
|
|
|
3
3
|
This project follows a lightweight changelog format. The public API lives under the `rlm` import package.
|
|
4
4
|
|
|
5
|
+
## 1.3.1
|
|
6
|
+
|
|
7
|
+
Security patch release.
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
|
|
11
|
+
- **protobuf**: Bump `protobuf` from 6.33.2 to 6.33.5 to address CVE JSON recursion depth bypass in `ParseDict()` (CVSS 8.2, Dependabot alert #6)
|
|
12
|
+
|
|
13
|
+
### Infrastructure
|
|
14
|
+
|
|
15
|
+
- **CI**: Disable uv dependency cache in publish-only release jobs (`testpypi`, `pypi`) that lack checkout steps
|
|
16
|
+
|
|
17
|
+
## 1.3.0
|
|
18
|
+
|
|
19
|
+
Feature release introducing the **Relay Pipeline Library** — a type-safe, composable pipeline framework for orchestrating multi-step LLM workflows with conditional routing, parallel execution, and nested agent composition.
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
- **Relay Pipeline Library**: Full pipeline DSL for composing stateful LLM workflows (`src/rlm/domain/relay/`, `src/rlm/adapters/relay/`)
|
|
24
|
+
- `StateSpec[InputT, OutputT]` descriptors with operator overloading: `>>` (sequence), `|` (parallel), `.when()` (conditional)
|
|
25
|
+
- `Pipeline` builder for defining state graphs with typed edges, guards, and join groups
|
|
26
|
+
- `Baton[T]` immutable request-response envelope with validation, trace events, and metadata propagation
|
|
27
|
+
- Compile-time validation: type compatibility, reachability, terminal states, cycle detection via `validate_pipeline()`
|
|
28
|
+
- `allow_cycles(max_iterations=...)` decorator for intentional loops
|
|
29
|
+
- Full documentation in `docs/relay/`
|
|
30
|
+
|
|
31
|
+
- **Pipeline Executors**: Sync and async orchestrators for pipeline execution
|
|
32
|
+
- `SyncPipelineExecutor` with `ThreadPoolExecutor` for parallel state execution
|
|
33
|
+
- `AsyncPipelineExecutor` with native `asyncio` concurrency
|
|
34
|
+
- Join aggregation: `"all"` (keyed dict) and `"race"` (first result) modes
|
|
35
|
+
- Guard evaluation, budget checks, and trace recording at each step
|
|
36
|
+
|
|
37
|
+
- **State Executor Types**: Pluggable execution strategies for pipeline states
|
|
38
|
+
- `FunctionStateExecutor` — pure Python callables with optional retry
|
|
39
|
+
- `LLMStateExecutor` — LLM calls via `LLMPort` with request builder
|
|
40
|
+
- `AsyncStateExecutor` — async callables with event loop detection
|
|
41
|
+
- `RLMStateExecutor` — full agent orchestration as a pipeline state
|
|
42
|
+
- `SyncPipelineStateExecutor` / `AsyncPipelineStateExecutor` — nested pipeline composition
|
|
43
|
+
|
|
44
|
+
- **Token Budget & Trace Tracking**: Execution observability across pipeline runs
|
|
45
|
+
- `TokenBudget` with max tokens, per-state estimates, and consumption tracking
|
|
46
|
+
- `PipelineTrace` immutable append-only audit log with state-level timing and status
|
|
47
|
+
|
|
48
|
+
- **Pipeline Registry & LLM-Assisted Composition**: Dynamic pipeline discovery and chaining
|
|
49
|
+
- `PipelineTemplate` with name, description, types, factory, and tags
|
|
50
|
+
- `InMemoryPipelineRegistry` with substring and tag-based search
|
|
51
|
+
- `RootAgentComposer` — uses LLM to select and chain pipelines from registry
|
|
52
|
+
|
|
53
|
+
- **Nested Agent Policy for Relay**: Agent-as-state integration
|
|
54
|
+
- `RelayNestedCallHandler` implements `NestedCallHandlerPort` + `NestedCallPolicy`
|
|
55
|
+
- Registry lookup, pipeline composition, synchronous execution with depth enforcement
|
|
56
|
+
|
|
57
|
+
- **LLM Provider Resilience**: Exponential backoff retry across providers
|
|
58
|
+
- `RetryStrategy` with configurable max attempts, backoff, and exception types
|
|
59
|
+
- Applied to OpenAI, Azure OpenAI, LiteLLM, and Portkey adapters
|
|
60
|
+
- Enhanced debug logging and error handling across all providers
|
|
61
|
+
|
|
62
|
+
- **Examples**: Three runnable examples demonstrating pipeline patterns
|
|
63
|
+
- `relay_conditional_routing.py` — if/else branching with guards
|
|
64
|
+
- `relay_parallel_join.py` — fan-out/fan-in with "all" join mode
|
|
65
|
+
- `relay_research_pipeline.py` — sequential multi-step chain with Pydantic models
|
|
66
|
+
|
|
67
|
+
### Improvements
|
|
68
|
+
|
|
69
|
+
- **Remote Environment Adapter**: New adapter with memory profiling support
|
|
70
|
+
- **Enhanced Live LLM Testing**: `tests/live_llm.py` harness for opt-in provider smoke tests
|
|
71
|
+
- **Tooling Optimization**: Improved mise venv and Python configuration
|
|
72
|
+
- **Performance Thresholds**: Updated serialization benchmarks
|
|
73
|
+
|
|
74
|
+
### Infrastructure
|
|
75
|
+
|
|
76
|
+
- **New documentation files**:
|
|
77
|
+
- `docs/relay/overview.md` — Relay pipeline philosophy and quick start
|
|
78
|
+
- `docs/relay/composition.md` — DSL operators and composition patterns
|
|
79
|
+
- `docs/relay/states.md` — All executor types with usage examples
|
|
80
|
+
- `docs/relay/validation.md` — Pipeline validation rules and cycle handling
|
|
81
|
+
- **SOPS Encrypted Secrets**: `.sops.yaml` + `.env.enc` for secure secrets management
|
|
82
|
+
- **CI/CD Updates**: Bumped `actions/checkout` to v6, `actions/download-artifact` to v7, `astral-sh/setup-uv` to v7
|
|
83
|
+
- **Dependency Updates**: `python-multipart` 0.0.21 → 0.0.22
|
|
84
|
+
|
|
85
|
+
### Test Coverage
|
|
86
|
+
|
|
87
|
+
- **11 new test files** spanning unit, integration, and e2e layers (~1,500 LOC)
|
|
88
|
+
- Unit: baton, budget/trace, composition, executors, pipeline, state, validation
|
|
89
|
+
- Integration: pipeline execution, composition chains, nested handler, nested policy (live)
|
|
90
|
+
- E2E: full pipeline workflows, composition flows, nested policy integration
|
|
91
|
+
|
|
5
92
|
## 1.2.0-rc.1
|
|
6
93
|
|
|
7
94
|
Major architecture release introducing declarative state machine orchestration, subprocess-based local execution, and optional Pydantic integration.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentic-codebase-navigator
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: Agentic codebase navigator built on Recursive Language Model (RLM) patterns.
|
|
5
5
|
Author: Luiz Frias
|
|
6
6
|
Maintainer: Luiz Frias
|
|
@@ -396,6 +396,36 @@ Available protocols:
|
|
|
396
396
|
|
|
397
397
|
See [docs/extending.md](docs/extending.md) for detailed documentation.
|
|
398
398
|
|
|
399
|
+
## Relay Pipeline Library
|
|
400
|
+
|
|
401
|
+
Build type-safe, composable multi-step LLM workflows using a pipeline DSL:
|
|
402
|
+
|
|
403
|
+
```python
|
|
404
|
+
from rlm.domain.relay import StateSpec, Pipeline, Baton
|
|
405
|
+
from rlm.adapters.relay.states import FunctionStateExecutor
|
|
406
|
+
from rlm.adapters.relay.executors import SyncPipelineExecutor
|
|
407
|
+
|
|
408
|
+
# Define states with typed inputs/outputs
|
|
409
|
+
analyze = StateSpec[str, dict]("analyze", str, dict, FunctionStateExecutor(analyze_fn))
|
|
410
|
+
summarize = StateSpec[dict, str]("summarize", dict, str, FunctionStateExecutor(summarize_fn))
|
|
411
|
+
|
|
412
|
+
# Compose with operators: >> (sequence), | (parallel), .when() (conditional)
|
|
413
|
+
pipeline = Pipeline(analyze >> summarize)
|
|
414
|
+
|
|
415
|
+
# Execute with typed baton
|
|
416
|
+
executor = SyncPipelineExecutor(pipeline)
|
|
417
|
+
result = executor.run(Baton(payload="Analyze this codebase"))
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Key capabilities:**
|
|
421
|
+
- **Conditional routing**: `state.when(predicate) >> target` with `.otherwise()` fallback
|
|
422
|
+
- **Parallel execution**: `(left | right).join(mode="all")` with fan-out/fan-in
|
|
423
|
+
- **Nested pipelines**: Use pipelines or full RLM agents as pipeline states
|
|
424
|
+
- **Token budgets**: Track and enforce token consumption across pipeline runs
|
|
425
|
+
- **Compile-time validation**: Type compatibility, reachability, and cycle detection
|
|
426
|
+
|
|
427
|
+
See [docs/relay/overview.md](docs/relay/overview.md) for the full guide.
|
|
428
|
+
|
|
399
429
|
## LLM Provider Configuration
|
|
400
430
|
|
|
401
431
|
| Provider | Extra | Environment Variables |
|
|
@@ -414,11 +444,14 @@ RLM uses a **hexagonal (ports & adapters) architecture**:
|
|
|
414
444
|
```
|
|
415
445
|
src/rlm/
|
|
416
446
|
├── domain/ # Pure business logic, ports (protocols), models
|
|
447
|
+
│ └── relay/ # Pipeline DSL: states, baton, validation, composition
|
|
417
448
|
├── application/ # Use cases, configuration
|
|
449
|
+
│ └── relay/ # Pipeline registry composer
|
|
418
450
|
├── infrastructure/ # Wire protocol, execution policies
|
|
419
451
|
├── adapters/
|
|
420
452
|
│ ├── llm/ # LLM providers (OpenAI, Anthropic, Gemini, etc.)
|
|
421
453
|
│ ├── environments/# Execution environments (local, docker)
|
|
454
|
+
│ ├── relay/ # Pipeline executors, state implementations
|
|
422
455
|
│ ├── tools/ # Tool calling infrastructure
|
|
423
456
|
│ ├── policies/ # Extension protocol implementations
|
|
424
457
|
│ ├── broker/ # TCP broker for nested LLM calls
|
|
@@ -519,6 +552,14 @@ uv run --group dev ty check src/rlm
|
|
|
519
552
|
- **Logger**: `JsonlLoggerAdapter`, `ConsoleLoggerAdapter`, `NoopLoggerAdapter`
|
|
520
553
|
- **Tools**: `ToolRegistry`, `tool` decorator, `NativeToolAdapter`
|
|
521
554
|
|
|
555
|
+
### Relay Pipeline
|
|
556
|
+
|
|
557
|
+
- **`StateSpec`** - Type-safe state descriptor with operators (`>>`, `|`, `.when()`)
|
|
558
|
+
- **`Pipeline`** - State graph builder with validation
|
|
559
|
+
- **`Baton`** - Immutable request-response envelope
|
|
560
|
+
- **`SyncPipelineExecutor`** / **`AsyncPipelineExecutor`** - Pipeline orchestrators
|
|
561
|
+
- **State Executors**: `FunctionStateExecutor`, `LLMStateExecutor`, `RLMStateExecutor`, `AsyncStateExecutor`
|
|
562
|
+
|
|
522
563
|
### Extension Protocols
|
|
523
564
|
|
|
524
565
|
- **`StoppingPolicy`** - Control iteration termination
|
|
@@ -327,6 +327,36 @@ Available protocols:
|
|
|
327
327
|
|
|
328
328
|
See [docs/extending.md](docs/extending.md) for detailed documentation.
|
|
329
329
|
|
|
330
|
+
## Relay Pipeline Library
|
|
331
|
+
|
|
332
|
+
Build type-safe, composable multi-step LLM workflows using a pipeline DSL:
|
|
333
|
+
|
|
334
|
+
```python
|
|
335
|
+
from rlm.domain.relay import StateSpec, Pipeline, Baton
|
|
336
|
+
from rlm.adapters.relay.states import FunctionStateExecutor
|
|
337
|
+
from rlm.adapters.relay.executors import SyncPipelineExecutor
|
|
338
|
+
|
|
339
|
+
# Define states with typed inputs/outputs
|
|
340
|
+
analyze = StateSpec[str, dict]("analyze", str, dict, FunctionStateExecutor(analyze_fn))
|
|
341
|
+
summarize = StateSpec[dict, str]("summarize", dict, str, FunctionStateExecutor(summarize_fn))
|
|
342
|
+
|
|
343
|
+
# Compose with operators: >> (sequence), | (parallel), .when() (conditional)
|
|
344
|
+
pipeline = Pipeline(analyze >> summarize)
|
|
345
|
+
|
|
346
|
+
# Execute with typed baton
|
|
347
|
+
executor = SyncPipelineExecutor(pipeline)
|
|
348
|
+
result = executor.run(Baton(payload="Analyze this codebase"))
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**Key capabilities:**
|
|
352
|
+
- **Conditional routing**: `state.when(predicate) >> target` with `.otherwise()` fallback
|
|
353
|
+
- **Parallel execution**: `(left | right).join(mode="all")` with fan-out/fan-in
|
|
354
|
+
- **Nested pipelines**: Use pipelines or full RLM agents as pipeline states
|
|
355
|
+
- **Token budgets**: Track and enforce token consumption across pipeline runs
|
|
356
|
+
- **Compile-time validation**: Type compatibility, reachability, and cycle detection
|
|
357
|
+
|
|
358
|
+
See [docs/relay/overview.md](docs/relay/overview.md) for the full guide.
|
|
359
|
+
|
|
330
360
|
## LLM Provider Configuration
|
|
331
361
|
|
|
332
362
|
| Provider | Extra | Environment Variables |
|
|
@@ -345,11 +375,14 @@ RLM uses a **hexagonal (ports & adapters) architecture**:
|
|
|
345
375
|
```
|
|
346
376
|
src/rlm/
|
|
347
377
|
├── domain/ # Pure business logic, ports (protocols), models
|
|
378
|
+
│ └── relay/ # Pipeline DSL: states, baton, validation, composition
|
|
348
379
|
├── application/ # Use cases, configuration
|
|
380
|
+
│ └── relay/ # Pipeline registry composer
|
|
349
381
|
├── infrastructure/ # Wire protocol, execution policies
|
|
350
382
|
├── adapters/
|
|
351
383
|
│ ├── llm/ # LLM providers (OpenAI, Anthropic, Gemini, etc.)
|
|
352
384
|
│ ├── environments/# Execution environments (local, docker)
|
|
385
|
+
│ ├── relay/ # Pipeline executors, state implementations
|
|
353
386
|
│ ├── tools/ # Tool calling infrastructure
|
|
354
387
|
│ ├── policies/ # Extension protocol implementations
|
|
355
388
|
│ ├── broker/ # TCP broker for nested LLM calls
|
|
@@ -450,6 +483,14 @@ uv run --group dev ty check src/rlm
|
|
|
450
483
|
- **Logger**: `JsonlLoggerAdapter`, `ConsoleLoggerAdapter`, `NoopLoggerAdapter`
|
|
451
484
|
- **Tools**: `ToolRegistry`, `tool` decorator, `NativeToolAdapter`
|
|
452
485
|
|
|
486
|
+
### Relay Pipeline
|
|
487
|
+
|
|
488
|
+
- **`StateSpec`** - Type-safe state descriptor with operators (`>>`, `|`, `.when()`)
|
|
489
|
+
- **`Pipeline`** - State graph builder with validation
|
|
490
|
+
- **`Baton`** - Immutable request-response envelope
|
|
491
|
+
- **`SyncPipelineExecutor`** / **`AsyncPipelineExecutor`** - Pipeline orchestrators
|
|
492
|
+
- **State Executors**: `FunctionStateExecutor`, `LLMStateExecutor`, `RLMStateExecutor`, `AsyncStateExecutor`
|
|
493
|
+
|
|
453
494
|
### Extension Protocols
|
|
454
495
|
|
|
455
496
|
- **`StoppingPolicy`** - Control iteration termination
|
|
@@ -14,6 +14,7 @@ Welcome to the documentation for **agentic-codebase-navigator** (`rlm`) — an a
|
|
|
14
14
|
| Add a new LLM provider | [LLM Providers](providers/llm-providers.md) |
|
|
15
15
|
| Use different execution environments | [Environments](environments/execution-environments.md) |
|
|
16
16
|
| Extend with custom policies | [Extension Protocols](extending/extension-protocols.md) |
|
|
17
|
+
| Build multi-step LLM pipelines | [Relay Pipeline](relay/overview.md) |
|
|
17
18
|
| Run tests | [Testing Guide](testing/testing-guide.md) |
|
|
18
19
|
| Contribute to the project | [Contributing](contributing/development-setup.md) |
|
|
19
20
|
| Release a new version | [Releasing](contributing/releasing.md) |
|
|
@@ -21,7 +22,7 @@ Welcome to the documentation for **agentic-codebase-navigator** (`rlm`) — an a
|
|
|
21
22
|
|
|
22
23
|
## Documentation Structure
|
|
23
24
|
|
|
24
|
-
```
|
|
25
|
+
```bash
|
|
25
26
|
docs/
|
|
26
27
|
├── README.md # This file (navigation)
|
|
27
28
|
├── getting-started.md # Quick start tutorial
|
|
@@ -40,6 +41,12 @@ docs/
|
|
|
40
41
|
├── extending/
|
|
41
42
|
│ └── extension-protocols.md # StoppingPolicy, ContextCompressor, NestedCallPolicy
|
|
42
43
|
│
|
|
44
|
+
├── relay/
|
|
45
|
+
│ ├── overview.md # Relay pipeline philosophy and quick start
|
|
46
|
+
│ ├── composition.md # DSL operators (>>, |, .when(), .join())
|
|
47
|
+
│ ├── states.md # State executor types and usage
|
|
48
|
+
│ └── validation.md # Pipeline validation and cycle detection
|
|
49
|
+
│
|
|
43
50
|
├── testing/
|
|
44
51
|
│ └── testing-guide.md # How to run and write tests
|
|
45
52
|
│
|
|
@@ -83,7 +90,7 @@ RLM supports two agent modes:
|
|
|
83
90
|
|
|
84
91
|
RLM uses a **hexagonal (ports & adapters) architecture**:
|
|
85
92
|
|
|
86
|
-
```
|
|
93
|
+
```bash
|
|
87
94
|
┌─────────────────────────────────────────────────────────┐
|
|
88
95
|
│ API Layer │
|
|
89
96
|
│ (RLM, create_rlm, factories) │
|
|
@@ -104,7 +111,7 @@ RLM uses a **hexagonal (ports & adapters) architecture**:
|
|
|
104
111
|
|
|
105
112
|
## Version
|
|
106
113
|
|
|
107
|
-
Current version: **1.
|
|
114
|
+
Current version: **1.3.0**
|
|
108
115
|
|
|
109
116
|
See [CHANGELOG.md](../CHANGELOG.md) for release history.
|
|
110
117
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Public API
|
|
1
|
+
# Public API
|
|
2
2
|
|
|
3
3
|
This document defines the **stable user-facing Python API** for the refactored `rlm` package.
|
|
4
4
|
|
|
@@ -198,7 +198,68 @@ Tool calling is supported across multiple LLM providers:
|
|
|
198
198
|
- **Gemini**: FunctionDeclaration format
|
|
199
199
|
- **LiteLLM** / **Portkey**: Passthrough to underlying provider
|
|
200
200
|
|
|
201
|
-
##
|
|
201
|
+
## Relay Pipeline Library
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
Type-safe, composable multi-step LLM workflows. See [Relay Overview](relay/overview.md) for the full guide.
|
|
204
|
+
|
|
205
|
+
### Core Types
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
from rlm.domain.relay import StateSpec, Pipeline, Baton, validate_pipeline, allow_cycles
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
| Type | Purpose |
|
|
212
|
+
|------|---------|
|
|
213
|
+
| `StateSpec[InputT, OutputT]` | Type-safe state descriptor with operator overloading |
|
|
214
|
+
| `Pipeline` | State graph builder with edges, guards, and join groups |
|
|
215
|
+
| `Baton[T]` | Immutable request-response envelope with metadata and trace |
|
|
216
|
+
| `TokenBudget` | Token consumption tracking across pipeline runs |
|
|
217
|
+
| `PipelineTrace` | Immutable append-only execution audit log |
|
|
218
|
+
| `PipelineTemplate` | Registry entry with name, types, factory, and tags |
|
|
219
|
+
| `InMemoryPipelineRegistry` | In-memory pipeline discovery with search |
|
|
220
|
+
|
|
221
|
+
### Pipeline Composition Operators
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
# Sequential: state_a >> state_b
|
|
225
|
+
# Parallel: state_a | state_b
|
|
226
|
+
# Conditional: state_a.when(predicate) >> state_b
|
|
227
|
+
# Join: (state_a | state_b).join(mode="all") >> merge_state
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### State Executors
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
from rlm.adapters.relay.states import (
|
|
234
|
+
FunctionStateExecutor, # Pure Python callables
|
|
235
|
+
LLMStateExecutor, # LLM calls via LLMPort
|
|
236
|
+
AsyncStateExecutor, # Async callables
|
|
237
|
+
RLMStateExecutor, # Full agent orchestration
|
|
238
|
+
)
|
|
239
|
+
from rlm.adapters.relay.states.pipeline_state import (
|
|
240
|
+
SyncPipelineStateExecutor, # Nested pipeline (sync)
|
|
241
|
+
AsyncPipelineStateExecutor, # Nested pipeline (async)
|
|
242
|
+
)
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Pipeline Executors
|
|
246
|
+
|
|
247
|
+
```python
|
|
248
|
+
from rlm.adapters.relay.executors import SyncPipelineExecutor, AsyncPipelineExecutor
|
|
249
|
+
|
|
250
|
+
executor = SyncPipelineExecutor(pipeline)
|
|
251
|
+
result = executor.run(Baton(payload="input"))
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Pipeline Registry
|
|
255
|
+
|
|
256
|
+
```python
|
|
257
|
+
from rlm.domain.relay import InMemoryPipelineRegistry, PipelineTemplate
|
|
258
|
+
from rlm.application.relay import RootAgentComposer
|
|
259
|
+
|
|
260
|
+
registry = InMemoryPipelineRegistry()
|
|
261
|
+
registry.register(PipelineTemplate(name="research", ...))
|
|
262
|
+
|
|
263
|
+
composer = RootAgentComposer(registry=registry, llm=llm_port)
|
|
264
|
+
pipeline = composer.compose_from_registry("analyze this codebase")
|
|
265
|
+
```
|
|
@@ -4,23 +4,23 @@ RLM implements a **hexagonal modular monolith** (ports & adapters) architecture
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```bash
|
|
8
8
|
┌─────────────────────────────────────────────────────────────────┐
|
|
9
|
-
│ API Layer
|
|
9
|
+
│ API Layer │
|
|
10
10
|
│ (RLM, create_rlm, factories) │
|
|
11
|
-
│ Composition Root
|
|
11
|
+
│ Composition Root │
|
|
12
12
|
├─────────────────────────────────────────────────────────────────┤
|
|
13
|
-
│ Application Layer
|
|
14
|
-
│ (use cases, configuration DTOs)
|
|
13
|
+
│ Application Layer │
|
|
14
|
+
│ (use cases, configuration DTOs) │
|
|
15
15
|
├─────────────────────────────────────────────────────────────────┤
|
|
16
|
-
│ Domain Layer
|
|
17
|
-
│ (orchestrator, ports, models — zero dependencies)
|
|
16
|
+
│ Domain Layer │
|
|
17
|
+
│ (orchestrator, ports, models — zero dependencies) │
|
|
18
18
|
├─────────────────────────────────────────────────────────────────┤
|
|
19
|
-
│ Adapters Layer
|
|
20
|
-
│ (LLM providers, environments, tools, broker, logger)
|
|
19
|
+
│ Adapters Layer │
|
|
20
|
+
│ (LLM providers, environments, tools, broker, logger) │
|
|
21
21
|
├─────────────────────────────────────────────────────────────────┤
|
|
22
|
-
│ Infrastructure Layer
|
|
23
|
-
│ (wire protocol, comms, execution policy)
|
|
22
|
+
│ Infrastructure Layer │
|
|
23
|
+
│ (wire protocol, comms, execution policy) │
|
|
24
24
|
└─────────────────────────────────────────────────────────────────┘
|
|
25
25
|
```
|
|
26
26
|
|
|
@@ -42,6 +42,7 @@ Dependencies **must point inward**:
|
|
|
42
42
|
- **Ports** (`ports.py`, `agent_ports.py`): Protocol definitions (interfaces)
|
|
43
43
|
- **Models** (`models/`): Domain value objects (`ChatCompletion`, `LLMRequest`, `Iteration`, etc.)
|
|
44
44
|
- **Services** (`services/`): Core orchestrator and prompt builders
|
|
45
|
+
- **Relay** (`relay/`): Pipeline DSL — states, baton, validation, composition, registry
|
|
45
46
|
- **Errors** (`errors.py`): Domain exception hierarchy
|
|
46
47
|
- **Types** (`types.py`): Type aliases and literals
|
|
47
48
|
|
|
@@ -65,6 +66,7 @@ Dependencies **must point inward**:
|
|
|
65
66
|
**Contents**:
|
|
66
67
|
- **Config** (`config.py`): Dataclass-based configuration (`RLMConfig`, `LLMConfig`, etc.)
|
|
67
68
|
- **Use Cases** (`use_cases/`): Application-level orchestration
|
|
69
|
+
- **Relay** (`relay/`): Pipeline registry composer (`RootAgentComposer`)
|
|
68
70
|
|
|
69
71
|
**Key Use Case**: `run_completion(request, deps)`
|
|
70
72
|
|
|
@@ -94,7 +96,7 @@ Dependencies **must point inward**:
|
|
|
94
96
|
**Purpose**: Concrete implementations of domain ports.
|
|
95
97
|
|
|
96
98
|
**Structure**:
|
|
97
|
-
```
|
|
99
|
+
```bash
|
|
98
100
|
adapters/
|
|
99
101
|
├── llm/ # LLM provider adapters
|
|
100
102
|
│ ├── openai.py
|
|
@@ -103,12 +105,18 @@ adapters/
|
|
|
103
105
|
│ ├── azure_openai.py
|
|
104
106
|
│ ├── litellm.py
|
|
105
107
|
│ ├── portkey.py
|
|
106
|
-
│
|
|
108
|
+
│ ├── mock.py
|
|
109
|
+
│ └── retry.py # Exponential backoff retry strategy
|
|
107
110
|
├── environments/ # Code execution environments
|
|
108
111
|
│ ├── local.py
|
|
109
112
|
│ ├── docker.py
|
|
110
113
|
│ ├── modal.py # stub
|
|
111
114
|
│ └── prime.py # stub
|
|
115
|
+
├── relay/ # Pipeline executors and state implementations
|
|
116
|
+
│ ├── executors/ # Sync/async pipeline orchestrators
|
|
117
|
+
│ ├── states/ # Function, LLM, RLM, async, pipeline state executors
|
|
118
|
+
│ ├── nested_handler.py # Nested call policy for relay
|
|
119
|
+
│ └── retry.py # Retry strategy for state executors
|
|
112
120
|
├── tools/ # Tool calling infrastructure
|
|
113
121
|
│ ├── registry.py
|
|
114
122
|
│ └── native.py
|
|
@@ -156,14 +164,15 @@ RLM supports two agent paradigms:
|
|
|
156
164
|
|
|
157
165
|
LLM generates Python code in ` ```repl ` blocks:
|
|
158
166
|
|
|
159
|
-
```
|
|
167
|
+
```bash
|
|
160
168
|
User: What is 6 * 7?
|
|
161
169
|
|
|
162
170
|
LLM: Let me calculate that.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
|
|
172
|
+
# ```repl
|
|
173
|
+
# result = 6 * 7
|
|
174
|
+
# print(f"The answer is {result}")
|
|
175
|
+
# ```
|
|
167
176
|
|
|
168
177
|
LLM: FINAL(42)
|
|
169
178
|
```
|
|
@@ -178,7 +187,7 @@ LLM: FINAL(42)
|
|
|
178
187
|
|
|
179
188
|
LLM invokes registered tools via function calling:
|
|
180
189
|
|
|
181
|
-
```
|
|
190
|
+
```bash
|
|
182
191
|
User: What's the weather in Tokyo?
|
|
183
192
|
|
|
184
193
|
LLM: [calls get_weather(city="Tokyo")]
|
|
@@ -233,7 +242,7 @@ class NestedCallPolicy(Protocol):
|
|
|
233
242
|
|
|
234
243
|
## Request Flow
|
|
235
244
|
|
|
236
|
-
```
|
|
245
|
+
```bash
|
|
237
246
|
┌──────────┐ ┌─────────┐ ┌─────────────┐ ┌─────────────┐
|
|
238
247
|
│ User │───▶│ RLM │───▶│ Use Case │───▶│ Orchestrator│
|
|
239
248
|
│ │ │ (Facade)│ │ │ │ │
|
|
@@ -289,7 +298,7 @@ The architecture enables comprehensive testing:
|
|
|
289
298
|
|
|
290
299
|
## Directory Structure
|
|
291
300
|
|
|
292
|
-
```
|
|
301
|
+
```bash
|
|
293
302
|
src/rlm/
|
|
294
303
|
├── __init__.py # Public exports
|
|
295
304
|
├── _meta.py # Version info
|
|
@@ -306,12 +315,24 @@ src/rlm/
|
|
|
306
315
|
│ │ ├── llm_request.py
|
|
307
316
|
│ │ ├── iteration.py
|
|
308
317
|
│ │ └── ...
|
|
318
|
+
│ ├── relay/ # Pipeline DSL (states, baton, validation, composition)
|
|
319
|
+
│ │ ├── state.py # StateSpec with operator overloading
|
|
320
|
+
│ │ ├── pipeline.py # Pipeline builder and graph definition
|
|
321
|
+
│ │ ├── baton.py # Immutable request-response envelope
|
|
322
|
+
│ │ ├── validation.py # Type/reachability/cycle validation
|
|
323
|
+
│ │ ├── composition.py # ComposablePipeline, WorkflowSeed
|
|
324
|
+
│ │ ├── registry.py # PipelineTemplate, PipelineRegistry
|
|
325
|
+
│ │ ├── budget.py # TokenBudget tracking
|
|
326
|
+
│ │ ├── trace.py # PipelineTrace audit log
|
|
327
|
+
│ │ └── ...
|
|
309
328
|
│ └── services/
|
|
310
329
|
│ ├── rlm_orchestrator.py
|
|
311
330
|
│ └── prompts.py
|
|
312
331
|
│
|
|
313
332
|
├── application/ # USE CASES
|
|
314
333
|
│ ├── config.py # Configuration DTOs
|
|
334
|
+
│ ├── relay/ # Pipeline registry composer
|
|
335
|
+
│ │ └── root_composer.py # LLM-assisted pipeline selection
|
|
315
336
|
│ └── use_cases/
|
|
316
337
|
│ └── run_completion.py
|
|
317
338
|
│
|
|
@@ -373,5 +394,6 @@ See [Architecture Decision Records](adr/) for rationale:
|
|
|
373
394
|
- [API Reference](api-reference.md) — Public API documentation
|
|
374
395
|
- [Configuration](configuration.md) — All configuration options
|
|
375
396
|
- [Extension Protocols](extending/extension-protocols.md) — Custom policies
|
|
397
|
+
- [Relay Pipeline](relay/overview.md) — Pipeline DSL and composition
|
|
376
398
|
- [Internals: Ports](internals/ports.md) — Port interface details
|
|
377
399
|
- [Internals: Protocol](internals/protocol.md) — Wire protocol specification
|
|
@@ -296,10 +296,10 @@ config = RLMConfig(
|
|
|
296
296
|
The LLM generates code in ` ```repl ` blocks that get executed:
|
|
297
297
|
|
|
298
298
|
```python
|
|
299
|
-
```repl
|
|
300
|
-
result = 2 + 2
|
|
301
|
-
print(result)
|
|
302
|
-
```
|
|
299
|
+
# ```repl
|
|
300
|
+
# result = 2 + 2
|
|
301
|
+
# print(result)
|
|
302
|
+
# ```
|
|
303
303
|
```
|
|
304
304
|
|
|
305
305
|
### Tools Mode
|
|
@@ -19,24 +19,24 @@ The local environment executes Python code in **isolated subprocess workers** (v
|
|
|
19
19
|
|
|
20
20
|
### Architecture
|
|
21
21
|
|
|
22
|
-
```
|
|
22
|
+
```bash
|
|
23
23
|
┌─────────────────────────────────────────────┐
|
|
24
|
-
│ Parent Process
|
|
25
|
-
│ ┌─────────────┐ ┌──────────────────┐
|
|
26
|
-
│ │ RLM │ │ Broker │
|
|
27
|
-
│ │ Orchestrator│◄───│ (llm_query) │
|
|
28
|
-
│ └─────────────┘ └──────────────────┘
|
|
24
|
+
│ Parent Process │
|
|
25
|
+
│ ┌─────────────┐ ┌──────────────────┐ │
|
|
26
|
+
│ │ RLM │ │ Broker │ │
|
|
27
|
+
│ │ Orchestrator│◄───│ (llm_query) │ │
|
|
28
|
+
│ └─────────────┘ └──────────────────┘ │
|
|
29
29
|
│ │ ▲ │
|
|
30
30
|
│ │ spawn │ IPC │
|
|
31
31
|
│ ▼ │ │
|
|
32
|
-
│ ┌──────────────────────────┴──────────┐
|
|
33
|
-
│ │ Worker Subprocess
|
|
34
|
-
│ │ ┌─────────────────────────────┐ │
|
|
35
|
-
│ │ │ Isolated Namespace │ │
|
|
36
|
-
│ │ │ - Code execution │ │
|
|
37
|
-
│ │ │ - llm_query() → parent IPC │ │
|
|
38
|
-
│ │ └─────────────────────────────┘ │
|
|
39
|
-
│ └─────────────────────────────────────┘
|
|
32
|
+
│ ┌──────────────────────────┴──────────┐ │
|
|
33
|
+
│ │ Worker Subprocess │ │
|
|
34
|
+
│ │ ┌─────────────────────────────┐ │ │
|
|
35
|
+
│ │ │ Isolated Namespace │ │ │
|
|
36
|
+
│ │ │ - Code execution │ │ │
|
|
37
|
+
│ │ │ - llm_query() → parent IPC │ │ │
|
|
38
|
+
│ │ └─────────────────────────────┘ │ │
|
|
39
|
+
│ └─────────────────────────────────────┘ │
|
|
40
40
|
└─────────────────────────────────────────────┘
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -129,25 +129,25 @@ config = RLMConfig(
|
|
|
129
129
|
|
|
130
130
|
### Architecture
|
|
131
131
|
|
|
132
|
-
```
|
|
132
|
+
```bash
|
|
133
133
|
┌─────────────────────────────────────────────┐
|
|
134
134
|
│ Host Process │
|
|
135
135
|
│ │
|
|
136
|
-
│ ┌─────────────┐ ┌──────────────────┐
|
|
137
|
-
│ │ RLM │ │ HTTP Proxy │
|
|
138
|
-
│ │ Orchestrator│◄───│ (llm_query) │
|
|
139
|
-
│ └─────────────┘ └──────────────────┘
|
|
136
|
+
│ ┌─────────────┐ ┌──────────────────┐ │
|
|
137
|
+
│ │ RLM │ │ HTTP Proxy │ │
|
|
138
|
+
│ │ Orchestrator│◄───│ (llm_query) │ │
|
|
139
|
+
│ └─────────────┘ └──────────────────┘ │
|
|
140
140
|
│ │ ▲ │
|
|
141
141
|
│ │ docker exec │ HTTP │
|
|
142
142
|
│ ▼ │ │
|
|
143
|
-
│ ┌──────────────────────────┴──────────┐
|
|
144
|
-
│ │ Docker Container
|
|
145
|
-
│ │ ┌─────────────────────────────┐ │
|
|
146
|
-
│ │ │ Python Runtime │ │
|
|
147
|
-
│ │ │ - context variable │ │
|
|
148
|
-
│ │ │ - llm_query() → HTTP proxy │ │
|
|
149
|
-
│ │ └─────────────────────────────┘ │
|
|
150
|
-
│ └─────────────────────────────────────┘
|
|
143
|
+
│ ┌──────────────────────────┴──────────┐ │
|
|
144
|
+
│ │ Docker Container │ │
|
|
145
|
+
│ │ ┌─────────────────────────────┐ │ │
|
|
146
|
+
│ │ │ Python Runtime │ │ │
|
|
147
|
+
│ │ │ - context variable │ │ │
|
|
148
|
+
│ │ │ - llm_query() → HTTP proxy │ │ │
|
|
149
|
+
│ │ └─────────────────────────────┘ │ │
|
|
150
|
+
│ └─────────────────────────────────────┘ │
|
|
151
151
|
└─────────────────────────────────────────────┘
|
|
152
152
|
```
|
|
153
153
|
|