Module: Phronomy
- Defined in:
- lib/phronomy/tool.rb,
lib/phronomy.rb,
lib/phronomy/eval.rb,
lib/phronomy/task.rb,
lib/phronomy/agent.rb,
lib/phronomy/event.rb,
lib/phronomy/context.rb,
lib/phronomy/metrics.rb,
lib/phronomy/runtime.rb,
lib/phronomy/testing.rb,
lib/phronomy/version.rb,
lib/phronomy/runnable.rb,
lib/phronomy/workflow.rb,
lib/phronomy/tools/mcp.rb,
lib/phronomy/agent/base.rb,
lib/phronomy/event_loop.rb,
lib/phronomy/task_group.rb,
lib/phronomy/diagnostics.rb,
lib/phronomy/eval/runner.rb,
lib/phronomy/eval/scorer.rb,
lib/phronomy/filter/base.rb,
lib/phronomy/llm_adapter.rb,
lib/phronomy/token_usage.rb,
lib/phronomy/tools/agent.rb,
lib/phronomy/agent/runner.rb,
lib/phronomy/eval/dataset.rb,
lib/phronomy/eval/metrics.rb,
lib/phronomy/task/backend.rb,
lib/phronomy/tracing/base.rb,
lib/phronomy/vector_store.rb,
lib/phronomy/configuration.rb,
lib/phronomy/output_parser.rb,
lib/phronomy/eval/eval_case.rb,
lib/phronomy/eval/comparison.rb,
lib/phronomy/workflow_runner.rb,
lib/phronomy/agent/checkpoint.rb,
lib/phronomy/eval/eval_result.rb,
lib/phronomy/eval/scorer/base.rb,
lib/phronomy/knowledge_source.rb,
lib/phronomy/llm_adapter/base.rb,
lib/phronomy/state_store/base.rb,
lib/phronomy/workflow_context.rb,
lib/phronomy/runtime/scheduler.rb,
lib/phronomy/vector_store/base.rb,
lib/phronomy/agent/shared_state.rb,
lib/phronomy/generator_verifier.rb,
lib/phronomy/invocation_context.rb,
lib/phronomy/output_parser/base.rb,
lib/phronomy/task/fiber_backend.rb,
lib/phronomy/testing/fake_clock.rb,
lib/phronomy/agent/tool_executor.rb,
lib/phronomy/multi_agent/handoff.rb,
lib/phronomy/runtime/timer_queue.rb,
lib/phronomy/task/mapped_backend.rb,
lib/phronomy/task/thread_backend.rb,
lib/phronomy/tools/vector_search.rb,
lib/phronomy/tracing/null_tracer.rb,
lib/phronomy/agent/suspend_signal.rb,
lib/phronomy/concurrency/deadline.rb,
lib/phronomy/llm_adapter/ruby_llm.rb,
lib/phronomy/workflow/fsm_session.rb,
lib/phronomy/eval/scorer/llm_judge.rb,
lib/phronomy/runtime/task_registry.rb,
lib/phronomy/runtime/timer_service.rb,
lib/phronomy/state_store/in_memory.rb,
lib/phronomy/vector_store/pgvector.rb,
lib/phronomy/agent/checkpoint_store.rb,
lib/phronomy/runtime/fake_scheduler.rb,
lib/phronomy/task/immediate_backend.rb,
lib/phronomy/testing/fake_scheduler.rb,
lib/phronomy/vector_store/in_memory.rb,
lib/phronomy/concurrency/async_queue.rb,
lib/phronomy/eval/scorer/exact_match.rb,
lib/phronomy/runtime/runtime_metrics.rb,
lib/phronomy/tracing/langfuse_tracer.rb,
lib/phronomy/agent/concerns/retryable.rb,
lib/phronomy/multi_agent/orchestrator.rb,
lib/phronomy/runtime/thread_scheduler.rb,
lib/phronomy/vector_store/loader/base.rb,
lib/phronomy/agent/concerns/filterable.rb,
lib/phronomy/concurrency/gate_registry.rb,
lib/phronomy/concurrency/pool_registry.rb,
lib/phronomy/output_parser/json_parser.rb,
lib/phronomy/testing/scheduler_helpers.rb,
lib/phronomy/vector_store/redis_search.rb,
lib/phronomy/agent/concerns/suspendable.rb,
lib/phronomy/vector_store/async_backend.rb,
lib/phronomy/vector_store/splitter/base.rb,
lib/phronomy/eval/scorer/includes_scorer.rb,
lib/phronomy/agent/context/knowledge/base.rb,
lib/phronomy/concurrency/concurrency_gate.rb,
lib/phronomy/llm_context_window/assembler.rb,
lib/phronomy/multi_agent/team_coordinator.rb,
lib/phronomy/vector_store/embeddings/base.rb,
lib/phronomy/agent/context/capability/base.rb,
lib/phronomy/tracing/open_telemetry_tracer.rb,
lib/phronomy/concurrency/cancellation_scope.rb,
lib/phronomy/concurrency/cancellation_token.rb,
lib/phronomy/filter/prompt_injection_filter.rb,
lib/phronomy/multi_agent/parallel_tool_chat.rb,
lib/phronomy/vector_store/loader/csv_loader.rb,
lib/phronomy/workflow/phase_machine_builder.rb,
lib/phronomy/agent/before_completion_context.rb,
lib/phronomy/llm_context_window/token_budget.rb,
lib/phronomy/output_parser/structured_parser.rb,
lib/phronomy/runtime/deterministic_scheduler.rb,
lib/phronomy/runtime/scheduler_timer_adapter.rb,
lib/phronomy/agent/concerns/before_completion.rb,
lib/phronomy/agent/concerns/error_translation.rb,
lib/phronomy/concurrency/blocking_adapter_pool.rb,
lib/phronomy/llm_context_window/token_estimator.rb,
lib/phronomy/vector_store/loader/markdown_loader.rb,
lib/phronomy/agent/context/capability/scope_policy.rb,
lib/phronomy/vector_store/loader/plain_text_loader.rb,
lib/phronomy/agent/context/knowledge/entity_knowledge.rb,
lib/phronomy/agent/context/knowledge/static_knowledge.rb,
lib/phronomy/llm_context_window/context_version_cache.rb,
lib/phronomy/vector_store/splitter/recursive_splitter.rb,
lib/phronomy/agent/context/instruction/prompt_template.rb,
lib/phronomy/vector_store/splitter/fixed_size_splitter.rb,
lib/phronomy/vector_store/embeddings/ruby_llm_embeddings.rb
Overview
This file is intentionally empty. Tool definitions have moved to Phronomy::Agent::Context::Capability. See lib/phronomy/agent/context/capability/.
Defined Under Namespace
Modules: Agent, Concurrency, Context, Diagnostics, Eval, Filter, KnowledgeSource, LLMAdapter, LlmContextWindow, Metrics, MultiAgent, OutputParser, Runnable, StateStore, Testing, Tool, Tools, Tracing, VectorStore, WorkflowContext Classes: ActionTimeoutError, AuthenticationError, BackpressureError, CancellationError, CheckpointAlreadyResumedError, Configuration, ConfigurationError, ContextLengthError, Error, Event, EventLoop, FilterBlockError, GeneratorVerifier, HandoffError, InvocationContext, LowConfidenceError, ParseError, PoolShutdownError, RateLimitError, RecursionLimitError, Runtime, SchedulerReentrancyError, ScopeTimeoutError, Task, TaskGroup, TimeoutError, TokenUsage, ToolError, TransportError, Workflow, WorkflowContextOwnershipError, WorkflowRunner
Constant Summary collapse
- VERSION =
"0.11.0"
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
-
.reset_configuration! ⇒ Object
Resets the global Phronomy configuration to defaults.
-
.reset_runtime! ⇒ Object
Resets all Phronomy runtime state: configuration and the EventLoop singleton (if running).
-
.with_configuration {|config| ... } ⇒ Object
Yields the current Configuration object, then restores the original configuration on exit (even if the block raises).
Class Method Details
.configuration ⇒ Object
134 135 136 |
# File 'lib/phronomy.rb', line 134 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
138 139 140 |
# File 'lib/phronomy.rb', line 138 def configure yield configuration end |
.reset_configuration! ⇒ Object
Resets the global Phronomy configuration to defaults.
Intended for test suites only. Calling this in a production process will drop all runtime configuration (tracer, model, tokenizer, etc.) globally and immediately affect all subsequent agent and workflow calls.
Parallel test suites warning: When tests run in parallel (e.g.
parallel_tests or parallel_rspec), +reset_configuration!+ in one
worker will clear configuration shared with other workers in the same
process. Prefer process-isolation strategies (forked workers) over
thread-based parallelism when using this method.
Typical usage in a sequential test suite: after { Phronomy.reset_configuration! }
156 157 158 |
# File 'lib/phronomy.rb', line 156 def reset_configuration! @configuration = Configuration.new end |
.reset_runtime! ⇒ Object
Resets all Phronomy runtime state: configuration and the EventLoop singleton (if running).
Intended for test suites only. Stops any running EventLoop thread, clears the EventLoop singleton, and resets configuration to defaults. Call once before/after each example to ensure test isolation.
189 190 191 192 |
# File 'lib/phronomy.rb', line 189 def reset_runtime! Phronomy::EventLoop.reset! @configuration = Configuration.new end |
.with_configuration {|config| ... } ⇒ Object
Yields the current Configuration object, then restores the original configuration on exit (even if the block raises).
Intended for test helpers that need to temporarily override settings without permanently mutating the global configuration.
172 173 174 175 176 177 |
# File 'lib/phronomy.rb', line 172 def with_configuration original = @configuration&.dup yield configuration ensure @configuration = original end |