Class DecisionCall
java.lang.Object
ai.redouble.nucleo.harness.AbstractJob<DecisionResponse>
ai.redouble.nucleo.tools.AbstractTool<DecisionRequest, DecisionResponse>
ai.redouble.nucleo.tools.deciding.DecisionCall
- All Implemented Interfaces:
GuardedExecution, Identifiable, Job<DecisionResponse>, Tool<DecisionRequest, DecisionResponse>
One decision, as a job: a
DecisionRequest in, the answers by question id out. The
leaf every decision in the runtime is, whichever code or orchestrator asks it: it declares
the decision seat, and so it goes through the whole door (resolution to the deployment's
decision model, pricing of its state against the entry's ceiling, admission on the
entry's account, the spend gates) and its call lands on the job's record with the
distributions the model produced. It holds the decision client for the length of one
round trip and nothing else.
Not a palette tool: it carries no tool name, so no thinker's model can call it. A chat model asking a decision model is a design a caller makes deliberately, by wrapping this in a named tool with a schema it authored.
- Since:
- 0.1 (2026-09-24)
- Author:
- Andrey Santrosyan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationA decision is one round trip of a few hundred milliseconds; a minute is a hung endpoint.Fields inherited from class AbstractTool
inputFields inherited from class AbstractJob
timeout, upstreamRetriesFields inherited from interface Job
DEFAULT_UPSTREAM_RETRIESFields inherited from interface Tool
OBS_INPUT, OBS_OUTPUT -
Constructor Summary
ConstructorsConstructorDescriptionDecisionCall(Identifiable parent) DecisionCall(Identifiable parent, DecisionRequest request) With the request in hand. -
Method Summary
Modifier and TypeMethodDescriptionexecute(JobResources resources, JobContext<DecisionResponse> context) Executes the job with the provided resources and context.One decision binding, priced from the request and read-only (a decision reads and writes nothing of the deployment's).voidNames the exact decision entry, skipping the deployment's declaration; the gate still judges it.Methods inherited from class AbstractTool
getInput, getJobType, postExecute, preExecute, setInputMethods inherited from class AbstractJob
getId, getName, getParentJobId, getPriority, getTimeout, getUpstreamRetries, getUserId, getWorkflowId, randomIdSuffix, setTimeout, setUpstreamRetries, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface GuardedExecution
declareAdmissionGuardrails, declareAuthGuardrails, declareContentGuardrailsMethods inherited from interface Identifiable
getParentJobId, getUserId, getWorkflowIdMethods inherited from interface Job
getDisplayName, getId, getJobId, getName, getPriority, getTimeout, getUpstreamRetriesMethods inherited from interface Tool
guardedInputTarget
-
Field Details
-
DEFAULT_TIMEOUT
A decision is one round trip of a few hundred milliseconds; a minute is a hung endpoint.
-
-
Constructor Details
-
DecisionCall
-
DecisionCall
With the request in hand.
-
-
Method Details
-
pinModel
Names the exact decision entry, skipping the deployment's declaration; the gate still judges it. -
getRequirements
One decision binding, priced from the request and read-only (a decision reads and writes nothing of the deployment's). The request must be set first: the requirements price it, so a call without one is refused here with anIllegalStateException.- Specified by:
getRequirementsin interfaceJob<DecisionResponse>- Overrides:
getRequirementsin classAbstractTool<DecisionRequest, DecisionResponse>- Returns:
- resource requirements, or null if the job needs no resources
-
execute
public DecisionResponse execute(JobResources resources, JobContext<DecisionResponse> context) throws LLMReadableCheckedException Description copied from interface:JobExecutes the job with the provided resources and context. A job reports progress and checks for cancellation through the context, and completes all its work before returning. A tool narrows this contract to the LLM-readable exceptions ofTool.execute(JobResources, JobContext).- Parameters:
resources- the allocated resourcescontext- the job execution context for monitoring- Returns:
- the job result, which may be null
- Throws:
LLMReadableCheckedException- if execution fails
-