Class ExtractDirectoryDoer
java.lang.Object
ai.redouble.nucleo.harness.AbstractJob<ExtractReport>
ai.redouble.nucleo.tools.AbstractTool<ExtractRequest, ExtractReport>
ai.redouble.nucleo.tools.AbstractOrchestrator<ExtractRequest, ExtractReport>
ai.redouble.nucleo.tools.AbstractDoer<ExtractRequest, ExtractReport>
ai.redouble.demo.extract.ExtractDirectoryDoer
- All Implemented Interfaces:
GuardedExecution, ScopeAuthority, Identifiable, Job<ExtractReport>, Doer<ExtractRequest, ExtractReport>, Orchestrator<ExtractRequest, ExtractReport>, Tool<ExtractRequest, ExtractReport>
The demo's workflow: every file under a directory, read-only, each routed to the cheapest
tier that can read it, all of them in parallel under admission, and a report of what each
one cost. Code reads what code can read; a model that can see reads scans and images; a
small model judges what nothing else could place; and what came out is embedded into the
index so a person can ask the directory a question afterwards.
A doer, because it coordinates and holds nothing: every file is a child job with its own admission, and the dispatcher drains them at the rate the account's limits allow. The request's budgets become the workflow's spend caps before the first child is submitted; a child refused at the cap is a row in the report and the run continues to its end, refusing the rest cheaply.
- Since:
- 0.1 (2026-09-14)
- Author:
- Andrey Santrosyan
-
Field Summary
Fields inherited from class AbstractOrchestrator
META_ITERATIONFields 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
ConstructorsConstructorDescriptionExtractDirectoryDoer(Identifiable parent, CostLedger ledger, FileIndex index, Path directory) -
Method Summary
Modifier and TypeMethodDescriptionexecute(JobContext<ExtractReport> context) Main execution - spawn jobs, wait on handles, return when done.Methods inherited from class AbstractDoer
nextStep, submitInCurrentStep, submitInCurrentStep, submitInCurrentStep, submitInStepMethods inherited from class AbstractOrchestrator
execute, getJobType, getRequirements, getScopeGuard, getTimeout, sealScopeGuard, setScopeGuard, setTimeout, submitInIteration, submitInIteration, submitInIterationMethods inherited from class AbstractTool
getInput, postExecute, preExecute, setInputMethods inherited from class AbstractJob
getId, getName, getParentJobId, getPriority, getUpstreamRetries, getUserId, getWorkflowId, randomIdSuffix, 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, getJobType, getName, getPriority, getRequirements, getTimeout, getUpstreamRetries, postExecute, preExecuteMethods inherited from interface ScopeAuthority
getScopeGuard, sealScopeGuard, setScopeGuardMethods inherited from interface Tool
execute, getInput, guardedInputTarget, setInput
-
Constructor Details
-
ExtractDirectoryDoer
public ExtractDirectoryDoer(Identifiable parent, CostLedger ledger, FileIndex index, Path directory) - Parameters:
directory- the directory to read, an existing, readable one; the host names it, which is why a bad one is a programming error here rather than an input the caller can correct
-
-
Method Details
-
execute
Description copied from class:AbstractOrchestratorMain execution - spawn jobs, wait on handles, return when done.Write natural Java code. Spawn children through the iteration-stamping helpers (
AbstractOrchestrator.submitInIteration(long, Job), or a doer's step helpers), callhandle.get()to wait. Branch, loop, whatever. Return when done.- Specified by:
executein classAbstractOrchestrator<ExtractRequest, ExtractReport>- Parameters:
context- the job context for progress reporting and cancellation- Returns:
- the result of the coordinator's work
- Throws:
LLMReadableCheckedException- if coordination fails
-