Module: Protege::Orchestrator

Extended by:
Orchestrator
Included in:
Orchestrator
Defined in:
lib/protege/orchestrator.rb,
lib/protege/orchestrator/context.rb,
lib/protege/orchestrator/harness.rb,
lib/protege/orchestrator/reply_context.rb,
lib/protege/orchestrator/reply_harness.rb,
lib/protege/orchestrator/resolver_chain.rb,
lib/protege/orchestrator/responsibility_context.rb,
lib/protege/orchestrator/responsibility_harness.rb

Overview

LOGI "O" — the orchestrator layer. Owns the inference-running constructs that sit between the Gateway (which produces inbound messages and sends replies) and the Inference layer (which talks to providers).

The Harness is this layer's primary construct: given one inbound message, it builds a provider request, runs the multi-turn tool loop, and produces a final response. Supporting constructs in this namespace include the Context value objects passed to extensions, the Tool and Resolver contracts, and the ResolverChain that assembles inference context per persona.

Module methods here are the cross-namespace entry points. Callers (jobs, the Extension tool mixin) use these rather than reaching into Harness subclasses or +ToolResult+/+Error+ directly.

Defined Under Namespace

Classes: Context, Harness, ReplyContext, ReplyHarness, ResolverChain, ResponsibilityContext, ResponsibilityHarness

Instance Method Summary collapse

Instance Method Details

#reply(persona:, message:) ⇒ Object

Run a reactive reply generation for an inbound message.

Parameters:

Returns:

  • (Object)

    the harness result



23
24
25
# File 'lib/protege/orchestrator.rb', line 23

def reply(persona:, message:)
  ReplyHarness.run(persona:, message:)
end

#run_responsibility(persona:, responsibility:, responsibility_run:) ⇒ Object

Run a proactive generation for a scheduled responsibility.

Parameters:

Returns:

  • (Object)

    the harness result



33
34
35
# File 'lib/protege/orchestrator.rb', line 33

def run_responsibility(persona:, responsibility:, responsibility_run:)
  ResponsibilityHarness.run(persona:, responsibility:, responsibility_run:)
end