exports/pipeline
Pipeline module exports — V2 Pipeline OS types and adapters.
Classes
ArtifactStore
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:80
In-memory artifact store with bounded capacity.
When the store exceeds maxArtifacts, the oldest artifacts are evicted
(FIFO — insertion order, never reordered on get()). Content size is
validated on put().
This is a bounded in-memory working cache, NOT the durable audit
substrate (#2867): once maxArtifacts is reached, old artifacts and
their provenance are dropped. For tamper-evident, retained audit
history use the on-disk Merkle audit log via the verify_audit_chain
MCP tool.
Implements
Constructors
Constructor
new ArtifactStore(options?): ArtifactStore;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:86
Parameters
options?
Returns
Accessors
size
Get Signature
get size(): number;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:91
Returns
number
Implementation of
Methods
get()
get(ref): Artifact | undefined;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:113
Parameters
ref
id
string = ...
type
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote" = ...
Returns
Artifact | undefined
Implementation of
provenance()
provenance(ref): readonly ProvenanceEntry[];
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:137
Returns the full provenance chain for an artifact — the artifact
itself plus every ancestor transitively reachable via inputRefs
(#2867). Iterative DFS; the visited set makes it safe against
cycles and diamond/multi-parent DAGs (each artifact appears once).
Entries are in reachability (start-node-first DFS) order, not
topological order. An ancestor that has been FIFO-evicted from the
store is silently skipped — the chain truncates there rather than
throwing. A missing root returns [].
Parameters
ref
id
string = ...
type
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote" = ...
Returns
readonly ProvenanceEntry[]
Implementation of
put()
put(artifact): {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
};
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:95
Parameters
artifact
Returns
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}
id
id: string;
type
type:
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
Implementation of
query()
query(filter): readonly {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:117
Parameters
filter
Returns
readonly {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[]
Implementation of
AuthoritativeDecisionStore
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-store.ts:43
Constructors
Constructor
new AuthoritativeDecisionStore(config?): AuthoritativeDecisionStore;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-store.ts:46
Parameters
config?
AuthoritativeDecisionStoreConfig = {}
Returns
Methods
commitTransition()
commitTransition(input): Result<CommitTransitionOutcome, string>;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-store.ts:51
Required state commits before diagnostic delivery; exports cannot undo it.
Parameters
input
DecisionTransitionInput
Returns
Result<CommitTransitionOutcome, string>
flushPendingOutbox()
flushPendingOutbox(taskId, eventBus?): FlushOutboxOutcome;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-store.ts:143
Diagnostic delivery is at least once across an emit/ack crash. Emission is not consumer completion. Collector failure cannot reset a bus acknowledgement.
Parameters
taskId
string
eventBus?
Returns
FlushOutboxOutcome
getTaskSnapshot()
getTaskSnapshot(taskId): Result<AuthoritativeTaskSnapshot | null, string>;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-store.ts:156
Absence is ok(null); unreadable or invalid state is an explicit error.
Parameters
taskId
string
Returns
Result<AuthoritativeTaskSnapshot | null, string>
recordPipelineFinish()
recordPipelineFinish(
task,
context,
outcome
): string | null;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-store.ts:98
Terminal decision and notification commit together, before delivery.
Parameters
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
context
PipelineDecisionContext
outcome
durationMs
number
error?
string
executionSettled?
boolean
False retains ownership; a deadline does not prove callback settlement.
receipts?
readonly EvidenceReceipt[]
success
boolean
Returns
string | null
recordPipelineStart()
recordPipelineStart(task, context): string | null;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-store.ts:68
Atomically admits one attempt. Duplicate or incomplete previous admissions refuse execution. Delivery waits until the trace subscriber is installed.
Parameters
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
context
PipelineDecisionContext
Returns
string | null
EventBus
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:53
In-memory event bus with bounded circular buffer.
Events are stored in a circular buffer. When the buffer is full, the oldest events are evicted. Subscribers receive events that match their filter. Handler errors are caught and logged.
Implements
Constructors
Constructor
new EventBus(options?): EventBus;
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:58
Parameters
options?
Returns
Accessors
bufferSize
Get Signature
get bufferSize(): number;
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:68
Current buffer size.
Returns
number
Current buffer size.
Implementation of
subscriptionCount
Get Signature
get subscriptionCount(): number;
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:73
Number of active subscriptions (for observability/testing).
Returns
number
totalEmitted
Get Signature
get totalEmitted(): number;
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:64
Total events emitted (including evicted).
Returns
number
Total events emitted (including evicted).
Implementation of
Methods
emit()
emit(event): void;
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:77
Emit an event. Handlers must not throw.
Parameters
event
Returns
void
Implementation of
query()
query(filter, limit?): readonly PipelineEvent[];
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:92
Query recent events (bounded buffer).
Parameters
filter
limit?
number
Returns
readonly PipelineEvent[]
Implementation of
subscribe()
subscribe(filter, handler): Unsubscribe;
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:83
Subscribe to events matching filter. Returns unsubscribe function.
Parameters
filter
handler
Returns
Implementation of
PipelineRunner
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:234
Compiles PlanContracts and executes them as graphs.
Constructors
Constructor
new PipelineRunner(): PipelineRunner;
Returns
Methods
compile()
compile(plan, options?): CompileResult;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:236
Compiles a PlanContract into a CompiledPipeline.
Parameters
plan
approvalRequired
boolean = ...
estimatedCost
{
estimatedCostUsd: number;
modelCalls: number;
totalTokensIn: number;
totalTokensOut: number;
} = CostEstimateSchema
estimatedCost.estimatedCostUsd
number = ...
estimatedCost.modelCalls
number = ...
estimatedCost.totalTokensIn
number = ...
estimatedCost.totalTokensOut
number = ...
maxIterations
number = ...
policyGates
{
afterStage: string;
beforeStage: string;
id: string;
rules: string[];
}[] = ...
stages
{
config: Record<string, unknown>;
dependencies: string[];
id: string;
inputArtifacts: string[];
maxRetries?: number;
outputArtifacts: string[];
pluginId: string;
preferredCli?: string;
timeoutMs?: number;
type: "analyze" | "validate" | "execute" | "gate" | "route" | "aggregate";
}[] = ...
taskId
string = ...
timeoutMs
number = ...
options?
Returns
CompileResult
execute()
execute(
pipeline,
task,
options?
): Promise<ExecuteResult>;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:250
Executes a compiled pipeline.
Parameters
pipeline
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
options?
Returns
Promise<ExecuteResult>
retryFailed()
retryFailed(
pipeline,
previousResult,
task,
options?
): Promise<ExecuteResult>;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:303
Retries a previous run’s failures selectively (#3534): prior successful
nodes are replayed (not re-executed) via priorResults, so only the failed
nodes and their dependents run again.
Gated on retryability: retries only when at least one failed node is
isRetryable (transient). If every failure is permanent
(validation/permission/business/internal) it returns previousResult
unchanged rather than looping on errors that won’t clear.
Back-compat: a previousResult without nodeResults (e.g. an older caller)
falls back to the prior whole-pipeline retry gated on stepResults.
NOTE: non-retryable failures that coexist with a retryable one still re-run
(and re-fail) under continueOnFailure; pinning them as terminal is a
future refinement.
Parameters
pipeline
previousResult
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
options?
Returns
Promise<ExecuteResult>
PluginRegistry
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:44
In-memory plugin registry with manifest and configuration validation.
Plugins are registered during startup. After freeze(), no further registrations are accepted.
Implements
Constructors
Constructor
new PluginRegistry(_options?): PluginRegistry;
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:49
Parameters
_options?
Returns
Accessors
frozen
Get Signature
get frozen(): boolean;
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:53
Whether the registry is frozen.
Returns
boolean
Whether the registry is frozen.
Implementation of
Methods
freeze()
freeze(): void;
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:101
Freeze the registry — no further registrations allowed.
Returns
void
Implementation of
isEnabled()
isEnabled(pluginId): boolean;
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:97
Check if a plugin is registered and enabled.
Parameters
pluginId
string
Returns
boolean
Implementation of
listEnabled()
listEnabled(): readonly {
description: string;
experimental: boolean;
id: string;
requiredCapabilities: string[];
stages: ("analyze" | "validate" | "execute" | "gate" | "route" | "aggregate")[];
trustLevel: "standard" | "external" | "core" | "experimental";
version: string;
}[];
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:93
List all enabled plugins with their manifests.
Returns
readonly {
description: string;
experimental: boolean;
id: string;
requiredCapabilities: string[];
stages: ("analyze" | "validate" | "execute" | "gate" | "route" | "aggregate")[];
trustLevel: "standard" | "external" | "core" | "experimental";
version: string;
}[]
Implementation of
register()
register(plugin): Result<void, RegistrationError>;
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:57
Register a plugin. Validates manifest and config. Returns error if plugin ID conflicts or capabilities missing.
Parameters
plugin
Returns
Result<void, RegistrationError>
Implementation of
resolve()
resolve(pluginId): PipelinePlugin | undefined;
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:89
Resolve a plugin by ID. Returns undefined if not registered or disabled.
Parameters
pluginId
string
Returns
PipelinePlugin | undefined
Implementation of
PolicyEngine
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:106
In-memory policy engine with priority-ordered rule evaluation.
Rules are evaluated in descending priority order. First blocking rule short-circuits evaluation.
Implements
Constructors
Constructor
new PolicyEngine(): PolicyEngine;
Returns
Methods
evaluate()
evaluate(gate, context): PolicyDecision;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:116
Parameters
gate
afterStage
string = ...
beforeStage
string = ...
id
string = ...
rules
string[] = ...
context
Returns
Implementation of
listRules()
listRules(): readonly PolicyRule[];
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:134
Returns
readonly PolicyRule[]
Implementation of
registerRule()
registerRule(rule): void;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:109
Parameters
rule
Returns
void
Implementation of
Interfaces
AcceptanceContext
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:54
Canonical immutable snapshots required by builtin withAcceptance.
Properties
projection
readonly projection: Readonly<{
identity: AcceptanceIdentity;
text: string;
}>;
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:56
provenance
readonly provenance: Readonly<{
argumentSanitization: AcceptanceSanitization;
callerTrustTier: TrustTier | "unmeasured";
projectionSanitization: AcceptanceSanitization;
sourceTrustTier: TrustTier | "unmeasured";
}>;
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:57
source
readonly source: AcceptanceSource;
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:55
AcceptanceIdentity
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:19
Canonical immutable snapshots required by builtin withAcceptance.
Properties
bytes
readonly bytes: number;
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:21
sha256
readonly sha256: string;
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:20
AdaptiveOrchestratorOptions
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:40
Options for the adaptive orchestrator.
Extends
Properties
dryRun?
readonly dryRun?: boolean;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:30
When true, stop after the dryRunStopAfter stage.
Inherited from
maxSteps?
readonly maxSteps?: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:35
Maximum graph node executions (default: 20). Parallel super-steps are atomic and start only when their full batch fits in the remaining budget.
Inherited from
signal?
readonly signal?: AbortSignal;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:43
Cancels the run at the next super-step boundary (#6305). Handed to the
graph executor, which checks it before each super-step and fails the run
with Graph execution aborted; a stage already in flight is not
interrupted. run_pipeline threads cancel_job’s signal here. Absent: the
run is not cancellable.
Inherited from
stages
readonly stages: StageRegistry;
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:44
Stage registry to use. If omitted, stages must be provided per-template.
stageTimeoutMs?
readonly stageTimeoutMs?: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:52
Deadline for EACH stage, in ms (#6730) — not a budget for the whole run.
Replaces every stage’s default, the vote stage’s panel-sized one included,
clamped to the pipeline class guard. Absent: the vote stage runs under the
multi-llm-panel class guard, every other stage under
GRAPH_TIMEOUTS.defaultMs. The run as a whole is bounded by the pipeline
class guard either way.
Inherited from
GraphPipelineOptions.stageTimeoutMs
templateId?
readonly templateId?: string;
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:42
Force a specific template (skip auto-detection).
AdaptiveOrchestratorResult
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:48
Result of adaptive orchestration — extends GraphPipelineResult with metadata.
Extends
Properties
dryRun?
readonly dryRun?: true;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:70
Set when the run was a dry run. Mirrors DevPipelineResult.dryRun: a
consumer reading success alone reported a truncated dry run as a full
pipeline. Absent means a normal run.
Inherited from
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:60
Inherited from
GraphPipelineResult.durationMs
error?
readonly error?: string;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:62
Inherited from
errorDetail?
readonly errorDetail?: Readonly<Record<string, unknown>>;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:64
Failed stages’ output for error reporting; never committed to finalState.
Inherited from
GraphPipelineResult.errorDetail
finalState
readonly finalState: Readonly<Record<string, unknown>>;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:61
Inherited from
GraphPipelineResult.finalState
selectionMethod
readonly selectionMethod: "explicit" | "auto-detected";
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:50
How the template was selected.
stagesPlanned
readonly stagesPlanned: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:80
Stages the template declares, and stages this run actually executed.
templateId names the FULL template even when resolveEffectiveTemplate
truncated it at dryRunStopAfter, so templateId: 'dev' with
success: true used to be byte-identical whether qa and security ran or
were sliced away. These two numbers are what makes the coverage legible
without the consumer having to know dryRunStopAfter and the stage list.
Inherited from
GraphPipelineResult.stagesPlanned
stagesRun
readonly stagesRun: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:81
Inherited from
stepsExecuted
readonly stepsExecuted: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:59
Inherited from
GraphPipelineResult.stepsExecuted
success
readonly success: boolean;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:57
Inherited from
taskClassification
readonly taskClassification: TaskClassification;
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:52
Task classification used for selection.
templateId
readonly templateId: string;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:58
Inherited from
GraphPipelineResult.templateId
AgentExecutorConfig
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:235
Configuration for the agent executor.
Properties
acceptance?
readonly acceptance?: AcceptanceContext;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:236
auditLogger?
readonly auditLogger?: IAuditLogger;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:283
Server’s durable audit logger for hash-chained policy records (#4694).
budget?
readonly budget?: AgentBudgetConfig;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:259
Opt-in per-run token budget (#3395). When set, expert calls are metered through a BudgetGuard: once cumulative usage crosses the ceiling, further expert calls short-circuit to a failure result (stopping spend) rather than aborting mid-pipeline. Absent → no enforcement (default).
callerTrustTier?
readonly callerTrustTier?: string;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:266
Caller authentication from measuredTrustTier(), recorded at stage entry. Absent callerInfo means ‘unmeasured’; the MCP server supplies the connected transport as callerInfo (#6795), so a stdio caller records Tier 1. Enforced at startStage for execute stages (#4694). Takes precedence over trustTier.
dryRun?
readonly dryRun?: boolean;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:238
Restrict every expert stage to read-only analysis during a dry run.
inputSanitization?
readonly inputSanitization?: "unmeasured" | "modified" | "unmodified";
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:273
Whether the handler’s sanitizer changed its input; absent means ‘unmeasured’.
inputSanitizationCounts?
readonly inputSanitizationCounts?: {
commentsRemoved: number;
fieldsModified: number;
tagsRemoved: number;
};
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:275
Sanitizer counts, emitted beside inputSanitization only when it is ‘modified’.
commentsRemoved
readonly commentsRemoved: number;
fieldsModified
readonly fieldsModified: number;
tagsRemoved
readonly tagsRemoved: number;
issueNumber?
readonly issueNumber?: number;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:251
quickMode?
readonly quickMode?: boolean;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:249
Use 3 agents instead of the full 7-role panel for faster voting (default: false).
repo?
readonly repo?: string;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:252
scanTarget?
readonly scanTarget?: string;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:241
securityBaseline?
readonly securityBaseline?: SecurityBaseline;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:243
The pipeline’s pinned base commit and its source repository.
sessionId?
readonly sessionId?: string;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:240
Pipeline checkpoint session, also used by the run trace; absent means unscoped.
simulateVotes?
readonly simulateVotes?: boolean;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:244
tracker?
readonly tracker?: ITaskTracker;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:250
trustTier?
readonly trustTier?: string;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:271
Caller authentication, emitted with the same value as callerTrustTier.
Deprecated
Use callerTrustTier. Removal is scheduled for the next major.
votingStrategy?
readonly votingStrategy?:
| "simple_majority"
| "supermajority"
| "unanimous"
| "higher_order"
| "opinion_wise";
Defined in: packages/nexus-agents/src/pipeline/agent-executor-core.ts:246
Voting strategy for consensus stages (default: higher_order).
Artifact
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:24
Full artifact with content and metadata.
Properties
content
readonly content: unknown;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:27
createdAt
readonly createdAt: number;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:30
createdBy
readonly createdBy: string;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:29
id
readonly id: string;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:25
inputRefs
readonly inputRefs: readonly {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:31
metadata
readonly metadata: Record<string, unknown>;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:28
type
readonly type:
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:26
ArtifactFilter
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:35
Filter for querying artifacts.
Properties
createdBy?
readonly createdBy?: string;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:37
type?
readonly type?:
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:36
ArtifactStoreOptions
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:58
Options for ArtifactStore behavior.
Properties
maxArtifacts?
readonly maxArtifacts?: number;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:59
maxContentSize?
readonly maxContentSize?: number;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:60
AuthoritativeDecisionStoreConfig
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-types.ts:89
Properties
eventBus?
readonly eventBus?: IEventBus;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-types.ts:91
now?
readonly now?: () => number;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-types.ts:94
Returns
number
openDatabase?
readonly openDatabase?: (dbPath) => ISQLiteDatabase;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-types.ts:93
Parameters
dbPath
string
Returns
storageDir?
readonly storageDir?: string;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-types.ts:90
telemetrySink?
readonly telemetrySink?: (event) => void;
Defined in: packages/nexus-agents/src/pipeline/authoritative-decision-types.ts:92
Parameters
event
Returns
void
CompiledPipeline
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:39
Compiled pipeline ready for execution.
Properties
graph
readonly graph: CompiledGraph;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:40
plan
readonly plan: {
approvalRequired: boolean;
estimatedCost: {
estimatedCostUsd: number;
modelCalls: number;
totalTokensIn: number;
totalTokensOut: number;
};
maxIterations: number;
policyGates: {
afterStage: string;
beforeStage: string;
id: string;
rules: string[];
}[];
stages: {
config: Record<string, unknown>;
dependencies: string[];
id: string;
inputArtifacts: string[];
maxRetries?: number;
outputArtifacts: string[];
pluginId: string;
preferredCli?: string;
timeoutMs?: number;
type: "analyze" | "validate" | "execute" | "gate" | "route" | "aggregate";
}[];
taskId: string;
timeoutMs: number;
};
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:41
approvalRequired
approvalRequired: boolean;
estimatedCost
estimatedCost: {
estimatedCostUsd: number;
modelCalls: number;
totalTokensIn: number;
totalTokensOut: number;
} = CostEstimateSchema;
estimatedCost.estimatedCostUsd
estimatedCostUsd: number;
estimatedCost.modelCalls
modelCalls: number;
estimatedCost.totalTokensIn
totalTokensIn: number;
estimatedCost.totalTokensOut
totalTokensOut: number;
maxIterations
maxIterations: number;
policyGates
policyGates: {
afterStage: string;
beforeStage: string;
id: string;
rules: string[];
}[];
stages
stages: {
config: Record<string, unknown>;
dependencies: string[];
id: string;
inputArtifacts: string[];
maxRetries?: number;
outputArtifacts: string[];
pluginId: string;
preferredCli?: string;
timeoutMs?: number;
type: "analyze" | "validate" | "execute" | "gate" | "route" | "aggregate";
}[];
taskId
taskId: string;
timeoutMs
timeoutMs: number;
CorePluginRegistrationResult
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:116
Result of core plugin registration.
Properties
errors
readonly errors: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:119
failed
readonly failed: number;
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:118
registered
readonly registered: number;
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:117
DelegateInputLike
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:83
Minimal input shape matching DelegateInput. Avoids circular mcp/tools import.
Properties
billing_mode?
readonly billing_mode?: string;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:87
model_hint?
readonly model_hint?: string;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:86
preferred_capability?
readonly preferred_capability?: string;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:85
task
readonly task: string;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:84
DevPipelineOptions
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:464
Options for pipeline execution.
Properties
auditLogger?
readonly auditLogger?: IAuditLogger;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:548
Durable, hash-chained audit logger (#3710). When supplied (the MCP server
threads its single startup auditLogger), the consensus→execute policy gate
ALSO persists each policy.evaluated decision to the immutable store —
carrying mode/ruleIds/stageType — so warn-mode soak evidence survives process
exit and feeds the tune/readiness loop. MUST be the server’s single instance,
not a competing FileAuditStorage (shared hash chain). When undefined (pure-CLI
path), behavior is unchanged — the in-memory bus emit is the only sink.
beliefMemory?
readonly beliefMemory?: IHindsightBeliefMemory;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:493
Optional BeliefMemory for hindsight updates after plan outcomes (#1720).
dryRun?
readonly dryRun?: boolean;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:468
When true, stop after plan+vote and return partial result (#1717).
maxQaIterations?
readonly maxQaIterations?: number;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:491
Cap on implement→QA rounds (#4939). Omitted uses MAX_QA_ITERATIONS.
maxVoteIterations?
readonly maxVoteIterations?: number;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:489
Cap on plan→vote rounds (#4939). Omitted uses MAX_VOTE_ITERATIONS.
The MCP tool has advertised maxVoteIterations since it shipped — bounds
checked, defaulted to 3, described in the generated tool reference — and
nothing read it, so setting it changed nothing.
mode?
readonly mode?: PipelineMode;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:474
Pipeline mode (#1704):
- ‘autonomous’ (default): full pipeline runs internally
- ‘harness’: stops after decompose, returns tasks for external implementation
qualityGate?
readonly qualityGate?: QualityGateMode;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:481
Local pre-ship quality-gate mode (#3356). Default ‘off’ so the pipeline
never wedges repos that lack standard build/test scripts. See
QualityGateMode. Requires stages.qualityGate to be supplied;
if the stage is absent the gate is skipped regardless of mode.
researchOverride?
readonly researchOverride?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:510
Pre-seeded research text (#3643). When set, the RESEARCH stage uses this
instead of calling stages.research() — so the IMPLEMENT phase can run the
pipeline plan-only (from the typed RemediationPlan) with NO fresh untrusted
read, while untrustedInputGuard still fail-closes any code path that
forgets to seed it.
sessionId?
readonly sessionId?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:466
Session ID for checkpoint/resume. Omit for no persistence.
signal?
readonly signal?: AbortSignal;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:556
Cancels the run (#6305). Checked immediately before every stage call; once
it has fired the run rejects with an error naming the stage it stopped
before, and no further stage runs. It also aborts the signal handed to the
stage in flight (#6736), so that stage’s model calls stop. run_dev_pipeline
threads cancel_job’s signal here. Absent: the run is not cancellable.
sourceTrustTier?
readonly sourceTrustTier?: "1" | "2" | "3" | "4";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:538
The caller’s DECLARED tier for the task content itself (#6795) — same enum
and meaning as memory_write’s sourceTrustTier. Omitted means Tier 3
(Untrusted): a trusted caller can relay content it did not write. The
content tier is the least-trusted of this, trustTier and each
measured source, so a declaration never raises trust above the caller.
Recorded with the caller tier in the gate’s pipelineState.trustProvenance.
stageTimeoutMs?
readonly stageTimeoutMs?: number;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:566
Deadline for EACH stage call, in ms (#6736) — not a budget for the whole
run. Every plan/vote and implement/QA iteration gets its own. Replaces
every stage’s default, the vote’s included, and is clamped to the
pipeline class guard. Absent: the vote runs under the multi-llm-panel
class guard and every other stage under the pipeline class guard. A
stage past its deadline fails the run with a timeout naming the stage, and
the signal it was handed is aborted.
trustTier?
readonly trustTier?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:529
The CALLER’s trust tier (‘1’–‘4’) — who invoked the run, not where its
content came from (#3712, #6751). The MCP run_dev_pipeline handler and the
run entry point thread RequestContext.trustTier; the auto-remediation
IMPLEMENT path may pass '1' only because #3643’s typed RemediationPlan +
CapabilityLedger confine untrusted input upstream (it also sets
researchOverride, so no external source feeds that run). Since
#6795 such a caller must ALSO declare sourceTrustTier '1': the
caller tier alone no longer vouches for the task text.
The consensus→execute policy snapshot does NOT receive this value directly.
It receives the CONTENT tier: the least-trusted of this caller tier, the
task content’s tier (sourceTrustTier, 3 when omitted) and each
source that fed a stage — fresh or resumed research counts as external
(EXTERNAL_CONTENT_TRUST_TIER); a researchOverride adds no source.
When undefined the snapshot carries no tier and the engine defaults to
untrusted (4), fail-closed — never infer a trusted tier from absence.
untrustedInputGuard?
readonly untrustedInputGuard?: () => void;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:502
Fail-closed guard invoked at the RESEARCH stage — the untrusted-read
chokepoint (#3643). The auto-remediation enforce path (#3618) wires this to
CapabilityLedger.assertCapability('untrusted-input'), so running the
untrusted research stage inside the write+secrets IMPLEMENT phase throws
(Rule-of-Two). Not called when researchOverride is set (no untrusted
read happens). Default: undefined (no guard — normal pipeline behavior).
Returns
void
DevPipelineResult
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:209
Overall pipeline result.
Properties
acceptance?
readonly acceptance?: AcceptanceSummary;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:210
changes?
readonly changes?: {
baseSha: string;
dependencies: DevPipelineDependencies;
diff: string;
empty: boolean;
isolation: {
mode: "os-sandbox" | "best-effort";
reason?: string;
};
status: "changes" | "no_changes" | "tampered";
worktreePath: string;
worktreeRemoved: boolean;
};
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:212
Operator-applied patch and the scratch checkout’s cleanup status.
baseSha
readonly baseSha: string;
dependencies
readonly dependencies: DevPipelineDependencies;
Frozen-lockfile provisioning outcome, scoped to this scratch checkout.
diff
readonly diff: string;
empty
readonly empty: boolean;
isolation
readonly isolation: {
mode: "os-sandbox" | "best-effort";
reason?: string;
};
Measured subprocess isolation, with a reason when unavailable.
isolation.mode
readonly mode: "os-sandbox" | "best-effort";
isolation.reason?
readonly reason?: string;
status
readonly status: "changes" | "no_changes" | "tampered";
Tampered metadata refuses patch capture and returns an empty diff.
worktreePath
readonly worktreePath: string;
Provenance; a cleanup failure leaves this path for the operator to remove.
worktreeRemoved
readonly worktreeRemoved: boolean;
checkpoint?
readonly checkpoint?: CheckpointOutcome;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:227
Checkpoint qualification is separate from stage delivery observations.
completed
readonly completed: boolean;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:234
Whether the pipeline completed successfully.
True only when every planned task is present in tasks with status ‘done’
AND the security gate passed (#5645).
dryRun?
readonly dryRun?: true;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:308
Whether this run stopped after plan+vote because the caller asked it to.
completed: false alone cannot distinguish “the pipeline failed” from “the
pipeline did exactly what was requested and stopped” — and a consumer that
reads completed as the verdict reports a successful dry run as an engine
fault. Absent means a normal run.
harnessMode?
readonly harnessMode?: true;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:319
Present only for mode: 'harness' runs. Absent means a normal run.
The second legitimate completed: false, and it had no marker while the
dry run had one (#5888). Harness mode hands the tasks back for external
implementation and stops on purpose — exactly the distinction
DevPipelineResult.dryRun exists to make, so a consumer reading
completed as the verdict reported a successful harness run as an engine
fault. run_dev_pipeline’s async job status is that consumer.
plan
readonly plan: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:235
planStatus?
readonly planStatus?: "empty" | "no_quorum" | "unapproved";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:277
Terminal planning-gate state. Absent means the panel approved a usable plan.
'empty' means the planner returned nothing; 'no_quorum' means the retry
budget ended without a valid panel; 'unapproved' means every permitted
revision was rejected. Every present state stops before implementation.
planVoteApprovalPercentage?
readonly planVoteApprovalPercentage?: number;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:284
Last panel approval percentage for a terminal plan-vote outcome, or for the approving vote of a dry run (#7181).
planVoteDecision?
readonly planVoteDecision?: "rejected" | "approved" | "no_quorum";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:290
The last plan vote’s decision (#7181). Set on a dry run and on a terminal plan-gate stop; absent on a full run, on a resumed plan (no vote ran this run), and when the planner returned nothing (no vote was held).
planVoteFeedback?
readonly planVoteFeedback?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:299
Last rejection feedback when planStatus is 'unapproved'.
planVoteProposal?
readonly planVoteProposal?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:297
Exact executed proposal, diagnostics only; never a resumable approved plan.
planVoteReason?
readonly planVoteReason?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:279
Last quorum failure reason when planStatus is 'no_quorum'.
planVoteRecordId?
readonly planVoteRecordId?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:295
Id of the vote record that decision persisted to the ledger (#7181). Set alongside planVoteDecision only when a record was written.
qaIterations
readonly qaIterations: number;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:238
securityComparison?
readonly securityComparison?: SecurityBaselineComparison;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:264
Baseline counts and blocking findings, including explicit incomplete coverage.
securityNote?
readonly securityNote?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:262
Security-stage feedback explaining a failed or skipped scan, or partial dependency coverage on a pass.
securityPassed
readonly securityPassed: boolean;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:246
Whether the security gate passed.
Read together with DevPipelineResult.securityRan (#4772): false
with securityRan: false means no scan produced a measured verdict and is
NOT a failed security review.
securityRan?
readonly securityRan?: boolean;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:260
Whether the security gate actually ran (#4772).
Set on every path runDevPipeline can return through, so
securityPassed: false is always readable as verdict-vs-absence. Four
paths report false: a dry run (plan+vote only), harness mode (tasks are
handed back for external implementation), a red quality gate in blocking
mode, and a security scan that returned skip. Only a post-scan pass or
fail verdict reports true.
Absent means the producer predates the distinction (#4782), not that the
scan’s status is unknown — treat an absent value as unmeasured, not false.
tasks
readonly tasks: readonly PipelineTask[];
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:236
taskStatus?
readonly taskStatus?: "none" | "partial" | "all_done";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:331
Aggregate completion status of planned tasks (#5645).
'all_done' when every planned task was implemented and passed QA;
'partial' when some but not all tasks completed with status 'done';
'none' when zero tasks completed with status 'done' (including empty
plans where nothing was planned).
Optional so early-return shapes that never ran the implement loop need not carry it.
voteIterations
readonly voteIterations: number;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:237
warnings?
readonly warnings?: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:270
Conditions the caller should know about that do not change the verdict (#6792), e.g. a quality gate that ran scripts in the directory the implement expert edited. Absent when there are none.
DevPipelineStages
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:349
Pluggable stage implementations — inject real or mock agents.
Every method takes a trailing optional signal (#6736). runDevPipeline
passes each call its own signal, which aborts when the run is cancelled or
the stage’s deadline passes; an implementation should hand it to its model
calls, fetches and subprocesses so the work stops. One that ignores it still
fails at the deadline, but its work runs on in the background. The built-in
stages all honour it: research ends its source fetches, and qualityGate and
securityScan end their subprocess trees (#6747).
Properties
implementWorkspace?
readonly implementWorkspace?: {
accessMode: ExecutionAccessMode;
directory: string;
};
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:389
Where and how implement edits files (#6792), when the stages declare it: the access mode its expert runs under and the directory it runs in. The pipeline reads it to warn when a quality gate will then run scripts in that directory. Absent means undeclared: no warning.
accessMode
readonly accessMode: ExecutionAccessMode;
directory
readonly directory: string;
Methods
decompose()
decompose(plan, signal?): Promise<PipelineTask[]>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:380
PM decomposes approved plan into tasks.
Parameters
plan
string
signal?
AbortSignal
Returns
Promise<PipelineTask[]>
implement()
implement(task, signal?): Promise<string>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:382
Code expert implements a task. Returns the work product.
Parameters
task
signal?
AbortSignal
Returns
Promise<string>
plan()
plan(
task,
research,
priorFeedback?,
signal?
): Promise<string>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:366
Architect creates a plan from research + task.
Parameters
task
string
research
string
priorFeedback?
string
signal?
AbortSignal
Returns
Promise<string>
qaReview()
qaReview(
task,
implementation,
signal?
): Promise<QaReviewResult>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:394
QA expert reviews implementation.
Parameters
task
implementation
string
signal?
AbortSignal
Returns
Promise<QaReviewResult>
qualityGate()?
qualityGate?(signal?): Promise<{
feedback: string;
passed: boolean;
verdict?: "skip" | "fail" | "pass";
}>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:407
Local QA quality gate (typecheck/lint/tests/build) run before ship (#3356).
Optional: pipelines that don’t supply it simply skip the gate. Returns
passed plus actionable feedback from the underlying runQualityGate
engine. verdict: skip means unmeasured, including dependency provisioning
failure. Whether a red gate fails the phase is governed by the
qualityGate mode in DevPipelineOptions, not this method.
Parameters
signal?
AbortSignal
Returns
Promise<{
feedback: string;
passed: boolean;
verdict?: "skip" | "fail" | "pass";
}>
research()
research(task, signal?): Promise<ResearchContext>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:364
Research expert gathers context for the task. Returns the full
ResearchContext (#3234 seam 0): .text feeds plan/vote as before,
.metadata is attached to decomposed tasks for routing-experience enrichment.
Parameters
task
string
signal?
AbortSignal
Returns
Promise<ResearchContext>
securityScan()
securityScan(signal?): Promise<{
comparison?: SecurityBaselineComparison;
coverageNote?: string;
feedback: string;
passed: boolean;
verdict?: "skip" | "fail" | "pass";
}>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:418
Security scan. verdict preserves the scanner’s tri-state so a skip
(scanner absent or errored) is not recorded as a rejection (#5502).
Optional so stage implementations that predate the field still satisfy
the contract; when absent, passed is read as a measured pass/fail.
Parameters
signal?
AbortSignal
Returns
Promise<{
comparison?: SecurityBaselineComparison;
coverageNote?: string;
feedback: string;
passed: boolean;
verdict?: "skip" | "fail" | "pass";
}>
vote()
vote(
plan,
research,
signal?
): Promise<VoteResult>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:378
Consensus vote on the plan. Returns approval + feedback. research is the
research-stage context, surfaced to voters so they can weigh research
maturity (#3258) — appended to the proposal as informational, untrusted
text (never as instructions).
Parameters
plan
string
research
string
signal?
AbortSignal
Returns
Promise<VoteResult>
withAcceptance()?
withAcceptance?(binding): DevPipelineStages;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:351
Bind one immutable host-resolved baseline without changing stage arguments.
Parameters
binding
Returns
withWorkspace()?
withWorkspace?(binding): DevPipelineStages;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:358
Rebind execution stages to a per-run scratch directory, sharing the run’s budget. One binding object, not positional arguments: a wrapper that re-exposes this method forwards the whole binding, so it cannot silently drop the dependency outcome the quality gate reads (#6794 panel; a 1-arg lambda type-checks).
Parameters
binding
DevPipelineWorkspaceBinding
Returns
EventBusOptions
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:29
Options for EventBus behavior.
Properties
maxBufferSize?
readonly maxBufferSize?: number;
Defined in: packages/nexus-agents/src/pipeline/event-bus.ts:30
EventFilter
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:313
Filter for subscribing to or querying events.
Properties
executionId?
readonly executionId?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:316
since?
readonly since?: number;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:317
taskId?
readonly taskId?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:315
type?
readonly type?:
| "task.created"
| "task.status_changed"
| "task.completed"
| "task.failed"
| "pipeline.started"
| "pipeline.completed"
| "pipeline.checkpoint"
| "stage.started"
| "stage.completed"
| "stage.failed"
| "stage.retrying"
| "policy.evaluated"
| "artifact.created"
| "model.called"
| "routing.decision"
| "tool.invoked"
| "tool.completed"
| "wave.started"
| "wave.completed"
| "signal.fitness_declined"
| "signal.swarm_unhealthy"
| "signal.vote_rejected"
| readonly (
| "task.created"
| "task.status_changed"
| "task.completed"
| "task.failed"
| "pipeline.started"
| "pipeline.completed"
| "pipeline.checkpoint"
| "stage.started"
| "stage.completed"
| "stage.failed"
| "stage.retrying"
| "policy.evaluated"
| "artifact.created"
| "model.called"
| "routing.decision"
| "tool.invoked"
| "tool.completed"
| "wave.started"
| "wave.completed"
| "signal.fitness_declined"
| "signal.swarm_unhealthy"
| "signal.vote_rejected")[];
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:314
EvidenceReport
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:58
Properties
acceptedReceipts
readonly acceptedReceipts: number;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:61
criteria
readonly criteria: number;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:60
diagnostics
readonly diagnostics: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:66
fulfilledObligations
readonly fulfilledObligations: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:63
missing
readonly missing: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:64
rejectedReceipts
readonly rejectedReceipts: number;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:62
status
readonly status: "incomplete" | "unmeasured" | "complete" | "not_applicable";
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:59
unmetAdvisory
readonly unmetAdvisory: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:65
EvidenceVerificationConfig
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:50
Properties
authorizations
readonly authorizations: readonly {
artifactRef: string;
expectedBytes: number;
expectedDigest: string;
issuer: string;
obligationId: string;
operation: "artifact-content-digest";
}[];
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:51
verify
readonly verify: (request) =>
| readonly {
artifactRef: string;
attemptId: string;
bytes: number;
coverage: {
end: number;
start: number;
};
digest: string;
issuer: string;
obligationId: string;
operation: "artifact-content-digest";
subjectRevision: string;
taskId: string;
}[]
| Promise<readonly {
artifactRef: string;
attemptId: string;
bytes: number;
coverage: {
end: number;
start: number;
};
digest: string;
issuer: string;
obligationId: string;
operation: "artifact-content-digest";
subjectRevision: string;
taskId: string;
}[]>;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:53
Trusted host code must perform the claimed content operation; no model JSON receipts.
Parameters
request
Returns
| readonly {
artifactRef: string;
attemptId: string;
bytes: number;
coverage: {
end: number;
start: number;
};
digest: string;
issuer: string;
obligationId: string;
operation: "artifact-content-digest";
subjectRevision: string;
taskId: string;
}[]
| Promise<readonly {
artifactRef: string;
attemptId: string;
bytes: number;
coverage: {
end: number;
start: number;
};
digest: string;
issuer: string;
obligationId: string;
operation: "artifact-content-digest";
subjectRevision: string;
taskId: string;
}[]>
EvidenceVerificationRequest
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:44
Properties
authorizations
readonly authorizations: readonly {
artifactRef: string;
expectedBytes: number;
expectedDigest: string;
issuer: string;
obligationId: string;
operation: "artifact-content-digest";
}[];
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:46
binding
readonly binding: Readonly<EvidenceBinding>;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:45
signal
readonly signal: AbortSignal;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:47
ExpertBridgeResult
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:56
Result of an expert execution.
Properties
accessMode?
readonly accessMode?: ExecutionAccessMode;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:68
The access mode the arm that served the call reported enforcing (#6792), after routing. Absent when no arm served it (a failed route, a refusal) or the arm did not report one; routedArm / cli name the arm. Compare requestedAccessMode.
cli?
readonly cli?: "claude" | "gemini" | "codex" | "opencode";
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:89
CLI that actually executed the task, resolved from the underlying
CliResponse.model via getCliForModelId. Undefined when the bridge
failed before dispatch (no adapters / circuit-open / rate-limit cap).
Callers writing to OutcomeStore should use this rather than hardcoding
a cli — see #2823 (#1154 regression).
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:60
error?
readonly error?: string;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:61
expertType
readonly expertType: BuiltInExpertType;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:59
gatewayArm?
readonly gatewayArm?: `api:${string}`;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:142
The gateway arm that served model, when a gateway model answered
(#6624, CliResponse.gatewayArm). An outcome writer prices the call by
the arm’s declaration instead of the model’s list rate.
model?
readonly model?: string;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:126
Operational model attribution from CliResponse.model,
when present (#3387). Distinct from cli (the slot): one CLI can run
several models. A selected alias is not a serving report. Undefined when
the adapter supplied no operational model or the
bridge failed before dispatch. Required to emit a model.called event.
permissionDenials?
readonly permissionDenials?: readonly CliPermissionDenial[];
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:81
Tool calls the serving CLI’s permission layer refused (#6792).
reportedModel?
readonly reportedModel?: string;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:128
Raw upstream identity, kept separate from operational attribution (#7569).
requestedAccessMode?
readonly requestedAccessMode?: ExecutionAccessMode;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:73
The access mode the caller asked for (#6792), 'default' when it named
none. executeExpert always sets it; optional on the published type.
routedArm?
readonly routedArm?: RoutingArmId;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:96
Routing arm id the router ran (#6552), when it names one: api:anthropic
for the Anthropic API arm, where cli reads the claude slot. An
outcome row records this, so warm start credits the arm that ran.
Undefined when no arm ran, or when the router named only a slot.
routedBy?
readonly routedBy?: "composite-router";
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:104
'composite-router' when CompositeRouter.executeTask selected the CLI
that produced this result, success or failure (#6521). Set where the
router’s decision and the execution meet (adaptCompositeRouter), so an
outcome recorder copies it rather than asserting routing on its own.
Undefined when no arm ran: routing failed, no adapters, circuit open.
routedDurationMs?
readonly routedDurationMs?: number;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:110
Wall time of the routed arm’s call alone (#6521), from the router. Unlike durationMs it excludes expert import, MCP-config setup and rate-limit backoff. Undefined when no arm ran.
success
readonly success: boolean;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:57
text
readonly text: string;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:58
textOnly?
readonly textOnly?: true;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:79
True when the arm that served the call runs nothing on the host (#6792): a direct-API or gateway arm. No file was read or edited, whatever the access mode allowed; the text is the whole output.
tokensIn?
readonly tokensIn?: number;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:135
Input/output token split from the adapter’s CliResponse.usage (#3387),
when reported. Best-effort like tokensUsed; both undefined together
when no usage was available. tokensIn + tokensOut reconciles with
tokensUsed (single source of truth — both derive from the same record).
tokensOut?
readonly tokensOut?: number;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:136
tokensUsed?
readonly tokensUsed?: number;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:118
Total tokens (input + output) the underlying CLI/adapter reported for this
call, when available (#3396). Best-effort: CliResponse.usage is optional
— CLI-subprocess paths whose extractUsage returns null leave this
undefined. Consumers (budget enforcement #3395, model.called attribution
#3387, routing-experience metrics) must tolerate undefined.
GraphPipelineOptions
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:28
Options for graph-based pipeline execution.
Extended by
Properties
dryRun?
readonly dryRun?: boolean;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:30
When true, stop after the dryRunStopAfter stage.
maxSteps?
readonly maxSteps?: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:35
Maximum graph node executions (default: 20). Parallel super-steps are atomic and start only when their full batch fits in the remaining budget.
signal?
readonly signal?: AbortSignal;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:43
Cancels the run at the next super-step boundary (#6305). Handed to the
graph executor, which checks it before each super-step and fails the run
with Graph execution aborted; a stage already in flight is not
interrupted. run_pipeline threads cancel_job’s signal here. Absent: the
run is not cancellable.
stageTimeoutMs?
readonly stageTimeoutMs?: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:52
Deadline for EACH stage, in ms (#6730) — not a budget for the whole run.
Replaces every stage’s default, the vote stage’s panel-sized one included,
clamped to the pipeline class guard. Absent: the vote stage runs under the
multi-llm-panel class guard, every other stage under
GRAPH_TIMEOUTS.defaultMs. The run as a whole is bounded by the pipeline
class guard either way.
GraphPipelineResult
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:56
Result of a graph-based pipeline execution.
Extended by
Properties
dryRun?
readonly dryRun?: true;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:70
Set when the run was a dry run. Mirrors DevPipelineResult.dryRun: a
consumer reading success alone reported a truncated dry run as a full
pipeline. Absent means a normal run.
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:60
error?
readonly error?: string;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:62
errorDetail?
readonly errorDetail?: Readonly<Record<string, unknown>>;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:64
Failed stages’ output for error reporting; never committed to finalState.
finalState
readonly finalState: Readonly<Record<string, unknown>>;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:61
stagesPlanned
readonly stagesPlanned: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:80
Stages the template declares, and stages this run actually executed.
templateId names the FULL template even when resolveEffectiveTemplate
truncated it at dryRunStopAfter, so templateId: 'dev' with
success: true used to be byte-identical whether qa and security ran or
were sliced away. These two numbers are what makes the coverage legible
without the consumer having to know dryRunStopAfter and the stage list.
stagesRun
readonly stagesRun: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:81
stepsExecuted
readonly stepsExecuted: number;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:59
success
readonly success: boolean;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:57
templateId
readonly templateId: string;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:58
IArtifactStore
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:49
Artifact store interface.
Properties
size
readonly size: number;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:54
Methods
get()
get(ref): Artifact | undefined;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:51
Parameters
ref
id
string = ...
type
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote" = ...
Returns
Artifact | undefined
provenance()
provenance(ref): readonly ProvenanceEntry[];
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:53
Parameters
ref
id
string = ...
type
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote" = ...
Returns
readonly ProvenanceEntry[]
put()
put(artifact): {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
};
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:50
Parameters
artifact
Returns
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}
id
id: string;
type
type:
| "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
query()
query(filter): readonly {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:52
Parameters
filter
Returns
readonly {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[]
IEventBus
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:330
Event bus interface — fire-and-forget event emission with typed subscriptions and bounded query.
Properties
bufferSize
readonly bufferSize: number;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:344
Current buffer size.
totalEmitted
readonly totalEmitted: number;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:341
Total events emitted (including evicted).
Methods
emit()
emit(event): void;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:332
Emit an event. Handlers must not throw.
Parameters
event
Returns
void
query()
query(filter, limit?): readonly PipelineEvent[];
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:338
Query recent events (bounded buffer).
Parameters
filter
limit?
number
Returns
readonly PipelineEvent[]
subscribe()
subscribe(filter, handler): Unsubscribe;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:335
Subscribe to events matching filter. Returns unsubscribe function.
Parameters
filter
handler
Returns
IPipelineStage
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:47
A pipeline stage that can be compiled into a graph node.
Properties
id
readonly id: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:49
Unique stage identifier (used as graph node ID).
name
readonly name: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:51
Human-readable stage name.
Methods
execute()
execute(context): Promise<StageOutput>;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:53
Execute the stage.
Parameters
context
Returns
Promise<StageOutput>
IPluginRegistry
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:147
Plugin registry — manages plugin lifecycle and resolution.
Registry is frozen after startup — no runtime registration.
Properties
frozen
readonly frozen: boolean;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:167
Whether the registry is frozen.
Methods
freeze()
freeze(): void;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:164
Freeze the registry — no further registrations allowed.
Returns
void
isEnabled()
isEnabled(pluginId): boolean;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:161
Check if a plugin is registered and enabled.
Parameters
pluginId
string
Returns
boolean
listEnabled()
listEnabled(): readonly {
description: string;
experimental: boolean;
id: string;
requiredCapabilities: string[];
stages: ("analyze" | "validate" | "execute" | "gate" | "route" | "aggregate")[];
trustLevel: "standard" | "external" | "core" | "experimental";
version: string;
}[];
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:158
List all enabled plugins with their manifests.
Returns
readonly {
description: string;
experimental: boolean;
id: string;
requiredCapabilities: string[];
stages: ("analyze" | "validate" | "execute" | "gate" | "route" | "aggregate")[];
trustLevel: "standard" | "external" | "core" | "experimental";
version: string;
}[]
register()
register(plugin): Result<void, RegistrationError>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:152
Register a plugin. Validates manifest and config. Returns error if plugin ID conflicts or capabilities missing.
Parameters
plugin
Returns
Result<void, RegistrationError>
resolve()
resolve(pluginId): PipelinePlugin | undefined;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:155
Resolve a plugin by ID. Returns undefined if not registered or disabled.
Parameters
pluginId
string
Returns
PipelinePlugin | undefined
IPolicyEngine
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:90
Policy engine interface.
Methods
evaluate()
evaluate(gate, context): PolicyDecision;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:91
Parameters
gate
afterStage
string = ...
beforeStage
string = ...
id
string = ...
rules
string[] = ...
context
Returns
listRules()
listRules(): readonly PolicyRule[];
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:93
Returns
readonly PolicyRule[]
registerRule()
registerRule(rule): void;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:92
Parameters
rule
Returns
void
IterativeConsensusConfig
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:24
Configuration for an iterative consensus vote.
Properties
errorPolicy?
readonly errorPolicy?:
| "reduce_denominator"
| "count_as_abstain"
| "fail_closed"
| "absolute_quorum";
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:41
#4138: error policy for votes run by this reusable helper (default:
‘absolute_quorum’). An errored voter degrades to a recoverable no_quorum
handled by maxNoQuorumRetries. Overridable per caller.
The production dev-pipeline plan gate applies the same policy directly through
DevPipelineStages.vote; it does not call runIterativeConsensus.
logger?
readonly logger?: ILogger;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:53
Logger instance.
maxIterations?
readonly maxIterations?: number;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:26
Maximum plan→vote iterations (default: 3).
maxNoQuorumRetries?
readonly maxNoQuorumRetries?: number;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:49
#4135: how many times to re-run the SAME plan when a vote returns
no_quorum — an unmet quorum rather than a plan rejection — before giving up
(default: 2). Counted SEPARATELY from maxIterations: bounded retries use
the same plan without treating the quorum cause as plan-revision feedback,
so they do not consume the refine budget.
maxProposalLength?
readonly maxProposalLength?: number;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:51
Max proposal length sent to voters (default: 4000).
pipelinePrefix?
readonly pipelinePrefix?: string;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:55
Pipeline prefix for observability events.
quickMode?
readonly quickMode?: boolean;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:30
Use quick mode (3 agents instead of the full 7-role panel).
simulateVotes?
readonly simulateVotes?: boolean;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:28
Use simulated votes (for testing).
strategy?
readonly strategy?: VotingStrategy;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:32
Voting strategy (default: ‘higher_order’).
IterativeConsensusResult
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:59
Result of the iterative consensus process.
Properties
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:62
iterations
readonly iterations: number;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:61
vote
readonly vote: VoteResult;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:60
OrchestrateInputLike
Defined in: packages/nexus-agents/src/pipeline/v2-orchestrate.ts:30
Minimal shape of orchestrate input (avoids circular import).
Properties
context?
readonly context?: Record<string, unknown>;
Defined in: packages/nexus-agents/src/pipeline/v2-orchestrate.ts:32
maxIterations?
readonly maxIterations?: number;
Defined in: packages/nexus-agents/src/pipeline/v2-orchestrate.ts:33
task
readonly task: string;
Defined in: packages/nexus-agents/src/pipeline/v2-orchestrate.ts:31
PipelineCheckpointState
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:62
Partial pipeline state loaded from checkpoints.
Properties
implementedTasks?
readonly implementedTasks?: readonly PipelineTask[];
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:67
lastCompletedStage?
readonly lastCompletedStage?: CheckpointPipelineStage;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:69
plan?
readonly plan?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:64
research?
readonly research?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:63
securityPassed?
readonly securityPassed?: boolean;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:68
tasks?
readonly tasks?: readonly PipelineTask[];
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:66
voteIterations?
readonly voteIterations?: number;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:65
PipelineContext
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:15
Read-only pipeline context passed to every stage.
Properties
executionId
readonly executionId: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:17
Unique pipeline execution ID.
state
readonly state: Readonly<Record<string, unknown>>;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:29
Accumulated state from prior stages. The only cross-stage handoff
channel — sharedMemory (the #1764 SharedMemoryStore) was removed
in #2937 after being write-only since introduction. If you need
structured cross-stage data, add a well-known key to
PIPELINE_STATE_KEYS and write/read through state.
task
readonly task: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:19
The original task/prompt that started the pipeline.
templateId
readonly templateId: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:21
Pipeline template being executed.
PipelineDeps
Defined in: packages/nexus-agents/src/pipeline/pipeline-deps.ts:29
Injectable pipeline dependencies. Every field is optional; an unset field falls back to its documented process-global default at resolve time.
Properties
pluginRegistry?
readonly pluginRegistry?: IPluginRegistry;
Defined in: packages/nexus-agents/src/pipeline/pipeline-deps.ts:34
Plugin registry for resolving stage handlers. Defaults to the global
pipeline registry (getPipelinePluginRegistry()) when unset.
PipelineExecuteOptions
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:82
Pipeline execution options.
Properties
continueOnFailure?
readonly continueOnFailure?: boolean;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:89
When true, continue executing independent steps after a failure.
decisionAttemptId?
readonly decisionAttemptId?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:114
Stable retry identity; changing it explicitly requests a distinct attempt.
decisionScope?
readonly decisionScope?: "pipeline-attempt" | "v2-route-instrumentation";
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:116
Persist the actual scope: V2 route instrumentation never certifies V1 work.
decisionStore?
readonly decisionStore?: AuthoritativeDecisionStore;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:112
Authoritative decision store (Task T10 / #7522). When provided, persists authoritative transitions and outbox intents before/after execution.
eventBus?
readonly eventBus?: IEventBus;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:96
EventBus for trace persistence. When provided, creates a TraceWriter.
evidenceVerification?
readonly evidenceVerification?: EvidenceVerificationConfig;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:83
maxSteps?
readonly maxSteps?: number;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:85
onStageComplete?
readonly onStageComplete?: (stageId) => void;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:87
Parameters
stageId
string
Returns
void
priorResults?
readonly priorResults?: ReadonlyMap<string, NodeResult>;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:94
Prior NodeResults to replay (#3534) — succeeded nodes are reused instead of
re-executed. Set by retryFailed so a retry re-runs only the failed nodes.
runsDir?
readonly runsDir?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:102
Override base directory for trace output. Default: getDefaultRunsDir(),
i.e. nexusDataPath('runs') — per-repo aware. NOT getNexusDataDir()/runs,
which bypassed per-repo routing (#2889).
signal?
readonly signal?: AbortSignal;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:84
timeout?
readonly timeout?: number;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:86
workerReadiness?
readonly workerReadiness?: WorkerReadinessConfig;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:107
Worker boundary readiness configuration (Task T06 / #5129). When provided, verifies capability requirements on the actual worker before execution.
PipelineGraphResult
Defined in: packages/nexus-agents/src/pipeline/pipeline-graph.ts:26
Result of compiling a pipeline template into a graph.
Properties
error?
readonly error?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-graph.ts:29
graph?
readonly graph?: CompiledGraph;
Defined in: packages/nexus-agents/src/pipeline/pipeline-graph.ts:28
ok
readonly ok: boolean;
Defined in: packages/nexus-agents/src/pipeline/pipeline-graph.ts:27
PipelineMetrics
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:91
Metrics from V2 pipeline execution.
Properties
compiled
readonly compiled: boolean;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:92
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:95
executed
readonly executed: boolean;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:93
policyBlocked?
readonly policyBlocked?: boolean;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:97
True only when policy actually stopped the run (block mode + denial).
policyMode?
readonly policyMode?: PipelinePolicyMode;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:110
The mode those violations were evaluated under, when there are any.
policyViolations?
readonly policyViolations?: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:108
Violations the policy evaluator found, present whether or not they stopped the run.
Under warn mode PolicyEvalResult.allowed is true regardless of
violations, so a metrics object that only populated this alongside
policyBlocked reported a warn-mode denial identically to a clean
evaluation (#5862). Read policyBlocked for “did it stop”, this for
“what did it find”.
stepsExecuted
readonly stepsExecuted: number;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:94
PipelinePlugin
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:92
Plugin interface — every stage implementation must conform.
Plugins are the ONLY way stage logic runs. They communicate via ArtifactStore and EventBus (injected via context).
Properties
manifest
readonly manifest: {
description: string;
experimental: boolean;
id: string;
requiredCapabilities: string[];
stages: ("analyze" | "validate" | "execute" | "gate" | "route" | "aggregate")[];
trustLevel: "standard" | "external" | "core" | "experimental";
version: string;
};
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:94
Manifest declaring this plugin’s identity and capabilities.
description
description: string;
experimental
experimental: boolean;
id
id: string;
requiredCapabilities
requiredCapabilities: string[];
stages
stages: ("analyze" | "validate" | "execute" | "gate" | "route" | "aggregate")[];
trustLevel
trustLevel: "standard" | "external" | "core" | "experimental";
version
version: string;
Methods
execute()
execute(stage, context): Promise<{
error?: string;
metadata: Record<string, unknown>;
outputArtifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
success: boolean;
}>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:102
Execute a pipeline stage.
Parameters
stage
The stage specification from the PlanContract
config
Record<string, unknown> = ...
dependencies
string[] = ...
id
string = ...
inputArtifacts
string[] = ...
maxRetries?
number = ...
outputArtifacts
string[] = ...
pluginId
string = ...
preferredCli?
string = ...
timeoutMs?
number = ...
type
"analyze" | "validate" | "execute" | "gate" | "route" | "aggregate" = ...
context
Runtime context with abort signal and task
Returns
Promise<{
error?: string;
metadata: Record<string, unknown>;
outputArtifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
success: boolean;
}>
Stage result with output artifacts
onLoad()?
onLoad?(): Promise<void>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:111
Optional lifecycle hook — called when plugin is loaded.
Returns
Promise<void>
onUnload()?
onUnload?(): Promise<void>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:114
Optional lifecycle hook — called when plugin is unloaded.
Returns
Promise<void>
validateConfig()
validateConfig(config): Result<void, PluginValidationError>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:108
Validate plugin configuration at registration time. Called once when the plugin is registered, not per-execution.
Parameters
config
unknown
Returns
Result<void, PluginValidationError>
PipelinePolicyViolation
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:63
A single policy violation.
Properties
escalateTo?
readonly escalateTo?: string;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:66
reason
readonly reason: string;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:65
ruleId
readonly ruleId: string;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:64
PipelineResult
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:45
Pipeline execution result.
Properties
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:49
error?
readonly error?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:50
evidence?
readonly evidence?: EvidenceReport;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:47
nodeResults?
readonly nodeResults?: readonly NodeResult[];
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:58
Raw per-node results from the run (#3534). Retained so retryFailed can
replay prior successes and re-run only the failed nodes; carries the
isRetryable signal used to gate the retry.
stepResults?
readonly stepResults?: readonly StepOutcome[];
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:52
Per-step breakdown when continueOnFailure is enabled.
stepsExecuted
readonly stepsExecuted: number;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:48
success
readonly success: boolean;
Defined in: packages/nexus-agents/src/pipeline/pipeline-runner.ts:46
PipelineTask
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:89
A task decomposed by the PM.
Properties
assignedTo
readonly assignedTo: PipelineRole;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:93
description
readonly description: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:92
feedback?
readonly feedback?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:95
id
readonly id: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:90
implementation?
readonly implementation?: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:97
Implementation text from the code expert (surfaced for harness use).
researchMaturity?
readonly researchMaturity?: number;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:103
#3234: deterministic research-maturity [0,1] of the run that produced this
task, attached after decompose. RECORDED on the routing outcome and measured
(the gated live-routing use is #3815). Absent → treated as no-research (0).
status
readonly status: "review" | "rejected" | "done" | "in_progress" | "pending";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:94
title
readonly title: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:91
writeTargets?
readonly writeTargets?:
| {
kind: "workspace-relative";
paths: readonly string[];
}
| {
kind: "none";
}
| {
kind: "unmeasured";
};
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:105
Host-validated portable output scope. Missing means unmeasured and fails before dispatch.
PipelineTemplate
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:71
A declarative pipeline template defining stages and their connections.
Properties
dryRunStopAfter?
readonly dryRunStopAfter?: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:81
Stage IDs that can be skipped via dryRun.
edges?
readonly edges?: readonly PipelineEdge[];
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:79
Edge overrides (for non-linear flows like vote→plan feedback loops).
id
readonly id: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:73
Unique template identifier.
name
readonly name: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:75
Human-readable name.
stages
readonly stages: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:77
Ordered stage IDs (for simple linear pipelines).
PlanCompileOptions
Defined in: packages/nexus-agents/src/pipeline/plan-compiler.ts:36
Options for plan compilation.
Properties
pluginRegistry?
readonly pluginRegistry?: IPluginRegistry;
Defined in: packages/nexus-agents/src/pipeline/plan-compiler.ts:39
Plugin registry for resolving stage handlers. When provided, stages with a registered pluginId will use the plugin’s execute() method.
policyEnforcement?
readonly policyEnforcement?: GatePolicyEnforcement;
Defined in: packages/nexus-agents/src/pipeline/plan-compiler.ts:46
Policy enforcement for gate nodes (#3177). When provided, each policy gate
node evaluates evaluatePipelinePolicy at runtime — denying (in BLOCK
mode) by throwing PolicyBlockedError, which halts the pipeline. When
absent, gate nodes remain no-op passes (back-compat).
PluginRegistryOptions
Defined in: packages/nexus-agents/src/pipeline/plugin-registry.ts:32
Reserved options for plugin registry behavior. No options are currently supported; retained for API compatibility.
PluginValidationError
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:122
Validation error from plugin config validation.
Properties
field?
readonly field?: string;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:124
message
readonly message: string;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:123
PolicyContext
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:75
Context provided to policy rules for evaluation.
Properties
pipelineState
readonly pipelineState: PipelineStateSnapshot;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:79
stageId
readonly stageId: string;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:77
stageType
readonly stageType: string;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:78
taskId
readonly taskId: string;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:76
PolicyEvalResult
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:56
Result of a policy evaluation at a stage boundary.
Properties
allowed
readonly allowed: boolean;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:57
mode
readonly mode: PipelinePolicyMode;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:59
violations
readonly violations: readonly PipelinePolicyViolation[];
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:58
PolicyEvaluatorOptions
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:40
Options for PolicyEvaluator.
Properties
auditTrail?
readonly auditTrail?: AuditTrail;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:52
Optional DURABLE audit trail (#3710). When present, each violation is ALSO
appended to the hash-chained store (dual-emit) carrying mode/ruleIds/
stageType — so soak(warn)-vs-enforce(block) evidence survives process exit
for the tune/readiness loop. The in-memory eventBus emit is unchanged
(back-compat). When absent, behavior is byte-identical to before.
engine
readonly engine: IPolicyEngine;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:42
Only listRules() is consumed, so the interface — not the class — suffices.
eventBus?
readonly eventBus?: IEventBus;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:43
mode?
readonly mode?: PipelinePolicyMode;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:44
PolicyRule
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:83
A policy rule with priority-ordered evaluation.
Properties
id
readonly id: string;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:84
priority
readonly priority: number;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:85
Methods
evaluate()
evaluate(context): PolicyDecision;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:86
Parameters
context
Returns
ProvenanceEntry
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:41
Provenance entry for artifact traceability.
Properties
artifactId
readonly artifactId: string;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:42
inputArtifacts
readonly inputArtifacts: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:45
plugin
readonly plugin: string;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:43
timestamp
readonly timestamp: number;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:44
QaReviewResult
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:173
QA review result.
Properties
coverage?
readonly coverage?: QaReviewCoverage;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:184
Portion of the implementation the reviewer actually consumed. ABSENT when
the whole artifact was reviewed; present with partial: true when the
implementation exceeded the prompt budget. Without this the verdict was
byte-identical for a 500-char and a 500,000-char implementation (#4140
shape, applied to QA).
feedback
readonly feedback: string;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:175
issues
readonly issues: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:176
verdict
readonly verdict: "reject" | "pass" | "needs_work";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:174
ResearchTriggerConfig
Defined in: packages/nexus-agents/src/pipeline/research-trigger.ts:23
Configuration for research trigger behavior.
Properties
existingTaskIds?
readonly existingTaskIds?: ReadonlySet<string>;
Defined in: packages/nexus-agents/src/pipeline/research-trigger.ts:31
Known task IDs to skip (dedup).
maxTriggers?
readonly maxTriggers?: number;
Defined in: packages/nexus-agents/src/pipeline/research-trigger.ts:27
Max tasks per invocation. Default: 3
qualityThreshold?
readonly qualityThreshold?: number;
Defined in: packages/nexus-agents/src/pipeline/research-trigger.ts:25
Minimum quality score to trigger (0-10). Default: 7
topic?
readonly topic?: string;
Defined in: packages/nexus-agents/src/pipeline/research-trigger.ts:29
Topic filter for research_discover.
ResolvedPipelineDeps
Defined in: packages/nexus-agents/src/pipeline/pipeline-deps.ts:38
Fully-resolved pipeline dependencies — every field concrete.
Properties
pluginRegistry
readonly pluginRegistry: IPluginRegistry;
Defined in: packages/nexus-agents/src/pipeline/pipeline-deps.ts:39
StageCompletedOptions
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:26
Options for emitting a stage completed event.
Properties
bus?
readonly bus?: IEventBus;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:27
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:30
executionId
readonly executionId: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:28
stageId
readonly stageId: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:29
success?
readonly success?: boolean;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:31
StageContext
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:71
Runtime context passed to plugins during stage execution. Plugins communicate only via artifacts and events.
Properties
config
readonly config: Record<string, unknown>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:83
Stage configuration from the plan.
pipelineId?
readonly pipelineId?: string;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:77
Plan taskId; populated by compilePlan, optional for external callers.
pluginId?
readonly pluginId?: string;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:75
Plugin identity; populated by compilePlan, optional for external callers.
signal
readonly signal: AbortSignal;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:79
Abort signal for cancellation.
stageId?
readonly stageId?: string;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:73
Stage identity; populated by compilePlan, optional for external callers.
task
readonly task: Readonly<TaskContract>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:81
Task contract for reference (read-only).
StageFailedOptions
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:35
Options for emitting a stage failed event.
Properties
bus?
readonly bus?: IEventBus;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:36
error
readonly error: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:39
executionId
readonly executionId: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:37
model?
readonly model?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:44
Concrete model id the failing stage’s executor reported, when known (#4194). Omit for stages with no single model — never guess.
stageId
readonly stageId: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:38
StageOutput
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:33
Result of executing a single pipeline stage.
Properties
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:39
Duration in milliseconds.
error?
readonly error?: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:43
Error message if failed.
stateKey
readonly stateKey: string;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:35
The key to store this stage’s output under in pipeline state.
success
readonly success: boolean;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:41
Whether the stage succeeded.
value
readonly value: unknown;
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:37
The output value (stored in GraphState).
StageStartedOptions
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:18
Options for emitting a stage started event.
Extends
StageStartProvenance
Properties
bus?
readonly bus?: IEventBus;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:19
callerTrustTier?
readonly callerTrustTier?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:113
Inherited from
StageStartProvenance.callerTrustTier
executionId
readonly executionId: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:20
inputSanitization?
readonly inputSanitization?: "unmeasured" | "modified" | "unmodified";
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:116
Inherited from
StageStartProvenance.inputSanitization
inputSanitizationCounts?
readonly inputSanitizationCounts?: {
commentsRemoved: number;
fieldsModified: number;
tagsRemoved: number;
};
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:117
commentsRemoved
readonly commentsRemoved: number;
fieldsModified
readonly fieldsModified: number;
tagsRemoved
readonly tagsRemoved: number;
Inherited from
StageStartProvenance.inputSanitizationCounts
pluginId?
readonly pluginId?: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:22
stageId
readonly stageId: string;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:21
trustTier?
readonly trustTier?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:115
Deprecated alias retained for existing stage-entry consumers.
Inherited from
StageStartProvenance.trustTier
TaskClassification
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:56
Classification of a task for template routing.
Properties
complexity
readonly complexity: "simple" | "complex" | "moderate";
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:58
confidence
readonly confidence: number;
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:59
keywords
readonly keywords: readonly string[];
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:60
pipelineType
readonly pipelineType: PipelineType;
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:57
ToolCompletedEvent
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:250
Extends
BaseEvent
Properties
attemptId?
readonly attemptId?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:63
Execution attempt that committed a persisted notification.
Inherited from
BaseEvent.attemptId
durationMs
readonly durationMs: number;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:254
errorMessage?
readonly errorMessage?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:256
intentId?
readonly intentId?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:61
Stable identity on persisted diagnostic notifications; delivery may replay.
Inherited from
BaseEvent.intentId
invocationId
readonly invocationId: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:253
origin?
readonly origin?:
| {
attemptId?: string;
kind: "run";
producer: "dev-pipeline" | "contract-pipeline" | "graph-pipeline";
runId: string;
taskId?: string;
}
| {
kind: "global";
producer: "consensus" | "failover" | "fitness-review" | "swarm-health";
};
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:58
Explicit producing context; diagnostic only, absent means UNKNOWN.
Inherited from
BaseEvent.origin
success
readonly success: boolean;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:255
timestamp
readonly timestamp: number;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:59
Inherited from
BaseEvent.timestamp
toolName
readonly toolName: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:252
type
readonly type: "tool.completed";
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:251
ToolInvokedEvent
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:244
MCP tool lifecycle events (Issue #1186).
Extends
BaseEvent
Properties
attemptId?
readonly attemptId?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:63
Execution attempt that committed a persisted notification.
Inherited from
BaseEvent.attemptId
intentId?
readonly intentId?: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:61
Stable identity on persisted diagnostic notifications; delivery may replay.
Inherited from
BaseEvent.intentId
invocationId
readonly invocationId: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:247
origin?
readonly origin?:
| {
attemptId?: string;
kind: "run";
producer: "dev-pipeline" | "contract-pipeline" | "graph-pipeline";
runId: string;
taskId?: string;
}
| {
kind: "global";
producer: "consensus" | "failover" | "fitness-review" | "swarm-health";
};
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:58
Explicit producing context; diagnostic only, absent means UNKNOWN.
Inherited from
BaseEvent.origin
timestamp
readonly timestamp: number;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:59
Inherited from
BaseEvent.timestamp
toolName
readonly toolName: string;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:246
type
readonly type: "tool.invoked";
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:245
V2Config
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:26
Resolved V2 configuration.
Properties
aorchestraEnabled
readonly aorchestraEnabled: boolean;
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:36
Whether AOrchestra dynamic agent planning is enabled (Issue #935).
delegateEnabled
readonly delegateEnabled: boolean;
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:30
Whether delegate_to_model uses V2 pipeline (legacy override knob; V2 is standard).
dispatchEnabled
readonly dispatchEnabled: boolean;
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:38
Whether AOrchestra worker dispatch is enabled (Issue #1321).
mode
readonly mode: V2Mode;
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:28
Overall V2 mode. Legacy umbrella mode; V2 is standard (‘full’).
orchestrateEnabled
readonly orchestrateEnabled: boolean;
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:32
Whether orchestrate uses V2 pipeline (legacy override knob; V2 is standard).
policyMode
readonly policyMode: "warn" | "off" | "block";
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:34
Policy enforcement mode.
Type Aliases
AcceptanceSanitization
type AcceptanceSanitization =
| Readonly<{
status: "unmeasured";
}>
| Readonly<{
status: "unmodified";
}>
| Readonly<{
counts: Readonly<{
commentsRemoved: number;
fieldsModified: number;
tagsRemoved: number;
}>;
status: "modified";
}>;
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:25
An absent observation never becomes an observed zero.
ArtifactRef
type ArtifactRef = z.infer<typeof ArtifactRefSchema>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:253
ArtifactType
type ArtifactType = typeof ARTIFACT_TYPES[number];
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:98
CheckpointPipelineStage
type CheckpointPipelineStage = "research" | "plan" | "vote" | "decompose" | "implement" | "security";
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:37
Stages that can be checkpointed.
CostEstimate
type CostEstimate = z.infer<typeof CostEstimateSchema>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:252
EventHandler
type EventHandler = (event) => void;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:321
Event handler callback.
Parameters
event
Returns
void
EvidenceAuthorization
type EvidenceAuthorization = z.infer<typeof EvidenceAuthorizationSchema>;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:20
EvidenceBinding
type EvidenceBinding = z.infer<typeof EvidenceBindingSchema>;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:29
EvidenceObservation
type EvidenceObservation = z.infer<typeof EvidenceObservationSchema>;
Defined in: packages/nexus-agents/src/pipeline/evidence-verification-types.ts:42
PipelineEdge
type PipelineEdge =
| {
from: string;
to: string;
type: "fixed";
}
| {
from: string;
routerKey: string;
targets: readonly string[];
type: "conditional";
};
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:61
Edge definition in a pipeline template.
PipelineEvent
type PipelineEvent =
| TaskCreatedEvent
| TaskStatusChangedEvent
| TaskCompletedEvent
| TaskFailedEvent
| PipelineStartedEvent
| PipelineCompletedEvent
| PipelineCheckpointEvent
| StageStartedEvent
| StageCompletedEvent
| StageFailedEvent
| StageRetryingEvent
| PolicyEvaluatedEvent
| ArtifactCreatedEvent
| ModelCalledEvent
| RoutingDecisionEvent
| ToolInvokedEvent
| ToolCompletedEvent
| WaveStartedEvent
| WaveCompletedEvent
| FitnessDeclinedSignalEvent
| SwarmUnhealthySignalEvent
| VoteRejectedSignalEvent;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:284
Discriminated union of all pipeline events.
PipelineEventType
type PipelineEventType = typeof PIPELINE_EVENT_TYPES[number];
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:49
PipelineMode
type PipelineMode = "autonomous" | "harness";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:451
Pipeline execution mode.
PipelinePolicyMode
type PipelinePolicyMode = "off" | "warn" | "block";
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:37
Policy enforcement mode.
PipelineRole
type PipelineRole = "researcher" | "architect" | "pm" | "coder" | "qa" | "security";
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:86
Agent roles used in the pipeline.
PipelineStageData
type PipelineStageData =
| {
text: string;
type: "research";
}
| {
iterations: number;
text: string;
type: "plan";
}
| {
approved: boolean;
iterations: number;
type: "vote";
}
| {
tasks: readonly PipelineTask[];
type: "decompose";
}
| {
tasks: readonly PipelineTask[];
type: "implement";
}
| {
passed: boolean;
type: "security";
};
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:49
Discriminated union of stage data.
PipelineType
type PipelineType = "dev" | "research" | "audit" | "greenfield" | "general";
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:64
Pipeline type derived from task analysis.
PlanContract
type PlanContract = z.infer<typeof PlanContractSchema>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:249
PluginManifest
type PluginManifest = z.infer<typeof PluginManifestSchema>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:62
Plugin manifest declaring identity and capabilities.
PluginTrustLevel
type PluginTrustLevel = typeof PLUGIN_TRUST_LEVELS[number];
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:32
PolicyDecision
type PolicyDecision =
| {
allow: true;
}
| {
allow: false;
escalateTo?: string;
reason: string;
};
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:22
Decision returned by a policy rule evaluation.
PolicyGateSpec
type PolicyGateSpec = z.infer<typeof PolicyGateSpecSchema>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:251
RegistrationError
type RegistrationError =
| {
pluginId: string;
type: "duplicate_id";
}
| {
message: string;
type: "invalid_manifest";
}
| {
capability: string;
type: "missing_capability";
}
| {
message: string;
type: "validation_failed";
}
| {
type: "registry_frozen";
};
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:128
Registration error when adding a plugin to the registry.
StageRegistry
type StageRegistry = ReadonlyMap<string, IPipelineStage>;
Defined in: packages/nexus-agents/src/pipeline/pipeline-graph.ts:33
Map of stage ID → stage implementation.
StageResult
type StageResult = z.infer<typeof StageResultSchema>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:65
Result of a plugin stage execution.
StageSpec
type StageSpec = z.infer<typeof StageSpecSchema>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:250
StageType
type StageType = typeof STAGE_TYPES[number];
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:97
TaskContract
type TaskContract = z.infer<typeof TaskContractSchema>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:248
TaskStatus
type TaskStatus = typeof TASK_STATUSES[number];
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:96
Unsubscribe
type Unsubscribe = () => void;
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:324
Unsubscribe function returned by subscribe.
Returns
void
V2Mode
type V2Mode = "off" | "partial" | "full";
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:23
V2 umbrella mode. Legacy override knob (#925 Phase F); V2 is standard (‘full’).
VoteResult
type VoteResult = (
| {
approvalPercentage: number;
kind: "approved";
voteRecordId?: string;
}
| {
approvalPercentage: number;
feedback: string;
kind: "rejected";
voteRecordId?: string;
}
| {
approvalPercentage: number;
kind: "no_quorum";
reason: string;
voteRecordId?: string;
}) & {
proposal?: string;
};
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:119
Vote result from consensus.
voteRecordId (#7181) is the id of the vote record the stage persisted to
the ledger; absent when nothing was persisted (a simulated panel, a failed
write, or a stage that does not record).
Type Declaration
proposal?
readonly proposal?: string;
Variables
ARTIFACT_TYPES
const ARTIFACT_TYPES: readonly ["code", "review", "plan", "test", "report", "vote", "spec", "analysis"];
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:81
All valid artifact types.
ArtifactRefSchema
const ArtifactRefSchema: ZodObject<{
id: ZodString;
type: ZodEnum<{
analysis: "analysis";
code: "code";
plan: "plan";
report: "report";
review: "review";
spec: "spec";
test: "test";
vote: "vote";
}>;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:158
Reference to an artifact by ID and type.
AUDIT_PIPELINE_TEMPLATE
const AUDIT_PIPELINE_TEMPLATE: PipelineTemplate;
Defined in: packages/nexus-agents/src/pipeline/templates.ts:29
Security audit pipeline: analyze → scan → report.
BUILT_IN_RULES
const BUILT_IN_RULES: readonly PolicyRule[];
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:206
All built-in policy rules.
CORE_PLUGINS
const CORE_PLUGINS: readonly PipelinePlugin[];
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:105
All core plugins in registration order.
CostEstimateSchema
const CostEstimateSchema: ZodObject<{
estimatedCostUsd: ZodNumber;
modelCalls: ZodNumber;
totalTokensIn: ZodNumber;
totalTokensOut: ZodNumber;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:226
Cost estimate for a pipeline execution plan.
DEV_PIPELINE_TEMPLATE
const DEV_PIPELINE_TEMPLATE: PipelineTemplate;
Defined in: packages/nexus-agents/src/pipeline/templates.ts:17
Development pipeline: research → plan → vote → decompose → implement → qa → security.
GENERAL_PIPELINE_TEMPLATE
const GENERAL_PIPELINE_TEMPLATE: PipelineTemplate;
Defined in: packages/nexus-agents/src/pipeline/templates.ts:65
General-purpose pipeline for tasks that don’t match a specific template. Includes security gate (fail-safe: unclassified tasks must not bypass security).
PIPELINE_EVENT_TYPES
const PIPELINE_EVENT_TYPES: readonly ["task.created", "task.status_changed", "task.completed", "task.failed", "pipeline.started", "pipeline.completed", "pipeline.checkpoint", "stage.started", "stage.completed", "stage.failed", "stage.retrying", "policy.evaluated", "artifact.created", "model.called", "routing.decision", "tool.invoked", "tool.completed", "wave.started", "wave.completed", "signal.fitness_declined", "signal.swarm_unhealthy", "signal.vote_rejected"];
Defined in: packages/nexus-agents/src/pipeline/event-types.ts:19
All valid pipeline event types.
PIPELINE_STATE_KEYS
const PIPELINE_STATE_KEYS: {
COMPLETED: "completed";
FINDINGS: "findings";
IMPLEMENTATIONS: "implementations";
PARSED_SPEC: "parsedSpec";
PLAN: "plan";
QA_ITERATIONS: "qaIterations";
RESEARCH: "research";
SCAFFOLD_OUTPUT: "scaffoldOutput";
SECURITY_PASSED: "securityPassed";
TASK: "task";
TASKS: "tasks";
VOTE_FEEDBACK: "voteFeedback";
VOTE_ITERATIONS: "voteIterations";
VOTE_RESULT: "voteResult";
};
Defined in: packages/nexus-agents/src/pipeline/stage-types.ts:89
Standard state keys used across pipeline templates.
Type Declaration
COMPLETED
readonly COMPLETED: "completed" = 'completed';
FINDINGS
readonly FINDINGS: "findings" = 'findings';
IMPLEMENTATIONS
readonly IMPLEMENTATIONS: "implementations" = 'implementations';
PARSED_SPEC
readonly PARSED_SPEC: "parsedSpec" = 'parsedSpec';
PLAN
readonly PLAN: "plan" = 'plan';
QA_ITERATIONS
readonly QA_ITERATIONS: "qaIterations" = 'qaIterations';
RESEARCH
readonly RESEARCH: "research" = 'research';
SCAFFOLD_OUTPUT
readonly SCAFFOLD_OUTPUT: "scaffoldOutput" = 'scaffoldOutput';
SECURITY_PASSED
readonly SECURITY_PASSED: "securityPassed" = 'securityPassed';
TASK
readonly TASK: "task" = 'task';
TASKS
readonly TASKS: "tasks" = 'tasks';
VOTE_FEEDBACK
readonly VOTE_FEEDBACK: "voteFeedback" = 'voteFeedback';
VOTE_ITERATIONS
readonly VOTE_ITERATIONS: "voteIterations" = 'voteIterations';
VOTE_RESULT
readonly VOTE_RESULT: "voteResult" = 'voteResult';
PIPELINE_TEMPLATES
const PIPELINE_TEMPLATES: ReadonlyMap<string, PipelineTemplate>;
Defined in: packages/nexus-agents/src/pipeline/templates.ts:83
All available pipeline templates.
PlanContractSchema
const PlanContractSchema: ZodObject<{
approvalRequired: ZodBoolean;
estimatedCost: ZodObject<{
estimatedCostUsd: ZodNumber;
modelCalls: ZodNumber;
totalTokensIn: ZodNumber;
totalTokensOut: ZodNumber;
}, $strip>;
maxIterations: ZodNumber;
policyGates: ZodArray<ZodObject<{
afterStage: ZodString;
beforeStage: ZodString;
id: ZodString;
rules: ZodArray<ZodString>;
}, $strip>>;
stages: ZodArray<ZodObject<{
config: ZodRecord<ZodString, ZodUnknown>;
dependencies: ZodArray<ZodString>;
id: ZodString;
inputArtifacts: ZodArray<ZodString>;
maxRetries: ZodOptional<ZodNumber>;
outputArtifacts: ZodArray<ZodString>;
pluginId: ZodString;
preferredCli: ZodOptional<ZodString>;
timeoutMs: ZodOptional<ZodNumber>;
type: ZodEnum<{
aggregate: "aggregate";
analyze: "analyze";
execute: "execute";
gate: "gate";
route: "route";
validate: "validate";
}>;
}, $strip>>;
taskId: ZodString;
timeoutMs: ZodNumber;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:234
Execution plan contract.
PLUGIN_TRUST_LEVELS
const PLUGIN_TRUST_LEVELS: readonly ["core", "standard", "experimental", "external"];
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:21
All valid plugin trust levels.
PluginManifestSchema
const PluginManifestSchema: ZodObject<{
description: ZodString;
experimental: ZodBoolean;
id: ZodString;
requiredCapabilities: ZodArray<ZodString>;
stages: ZodArray<ZodEnum<{
aggregate: "aggregate";
analyze: "analyze";
execute: "execute";
gate: "gate";
route: "route";
validate: "validate";
}>>;
trustLevel: ZodEnum<{
core: "core";
experimental: "experimental";
external: "external";
standard: "standard";
}>;
version: ZodString;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:39
Schema for plugin manifests.
PolicyGateSpecSchema
const PolicyGateSpecSchema: ZodObject<{
afterStage: ZodString;
beforeStage: ZodString;
id: ZodString;
rules: ZodArray<ZodString>;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:218
Policy gate inserted between pipeline stages.
NOTE on enforcement (#4019): the gate’s effective enforcement mode is resolved
SOLELY by the runtime enforcement bundle — GatePolicyEnforcement.mode (or
NEXUS_POLICY_GATE_MODE, warn-by-default per #3177). There is intentionally NO
per-gate fail-action field here: the former onFail enum was inert (consumed
nowhere — verified) and required every gate to declare a fail action that did
nothing, so authoring onFail:'block' gave a false sense of enforcement.
Removed (7/0 higher_order vote) so the contract cannot promise enforcement the
runtime won’t deliver. Set the enforcement mode to make a gate block.
STAGE_TYPES
const STAGE_TYPES: readonly ["analyze", "route", "execute", "validate", "aggregate", "gate"];
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:71
All valid pipeline stage types.
StageResultSchema
const StageResultSchema: ZodObject<{
error: ZodOptional<ZodString>;
metadata: ZodRecord<ZodString, ZodUnknown>;
outputArtifacts: ZodArray<ZodObject<{
id: ZodString;
type: ZodEnum<{
analysis: "analysis";
code: "code";
plan: "plan";
report: "report";
review: "review";
spec: "spec";
test: "test";
vote: "vote";
}>;
}, $strip>>;
success: ZodBoolean;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/plugin-types.ts:50
Schema for stage execution results.
StageSpecSchema
const StageSpecSchema: ZodObject<{
config: ZodRecord<ZodString, ZodUnknown>;
dependencies: ZodArray<ZodString>;
id: ZodString;
inputArtifacts: ZodArray<ZodString>;
maxRetries: ZodOptional<ZodNumber>;
outputArtifacts: ZodArray<ZodString>;
pluginId: ZodString;
preferredCli: ZodOptional<ZodString>;
timeoutMs: ZodOptional<ZodNumber>;
type: ZodEnum<{
aggregate: "aggregate";
analyze: "analyze";
execute: "execute";
gate: "gate";
route: "route";
validate: "validate";
}>;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:193
Pipeline stage specification.
TASK_STATUSES
const TASK_STATUSES: readonly ["intake", "clarifying", "planning", "approved", "executing", "validating", "done", "failed"];
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:59
All valid task lifecycle statuses.
TaskContractSchema
const TaskContractSchema: ZodObject<{
analysis: ZodObject<{
ambiguityScore: ZodNumber;
complexity: ZodString;
taskType: ZodString;
}, $strip>;
artifacts: ZodArray<ZodObject<{
id: ZodString;
type: ZodEnum<{
analysis: "analysis";
code: "code";
plan: "plan";
report: "report";
review: "review";
spec: "spec";
test: "test";
vote: "vote";
}>;
}, $strip>>;
capabilityGaps: ZodObject<{
allSatisfied: ZodBoolean;
available: ZodObject<{
experts: ZodArray<ZodString>;
tools: ZodArray<ZodString>;
}, $strip>;
gaps: ZodArray<ZodUnknown>;
gapsMeasured: ZodBoolean;
}, $strip>;
capabilityRequirements: ZodOptional<ZodArray<ZodObject<{
id: ZodString;
mode: ZodDefault<ZodEnum<{
advisory: "advisory";
enforcing: "enforcing";
}>>;
operation: ZodString;
resourceRef: ZodOptional<ZodString>;
scope: ZodOptional<ZodString>;
}, $strip>>>;
completedAt: ZodOptional<ZodNumber>;
constraints: ZodObject<{
quality: ZodOptional<ZodString>;
scope: ZodArray<ZodString>;
time: ZodOptional<ZodString>;
}, $strip>;
contractVersion: ZodOptional<ZodString>;
createdAt: ZodNumber;
description: ZodString;
error: ZodOptional<ZodString>;
evidenceObligations: ZodOptional<ZodArray<ZodObject<{
artifactRef: ZodString;
claim: ZodOptional<ZodString>;
id: ZodString;
mode: ZodDefault<ZodEnum<{
advisory: "advisory";
enforcing: "enforcing";
}>>;
receiptIssuer: ZodOptional<ZodString>;
required: ZodDefault<ZodBoolean>;
}, $strip>>>;
id: ZodString;
metadata: ZodRecord<ZodString, ZodUnknown>;
parentId: ZodOptional<ZodString>;
requiredCapabilities: ZodObject<{
experts: ZodArray<ZodString>;
tools: ZodArray<ZodString>;
}, $strip>;
status: ZodEnum<{
approved: "approved";
clarifying: "clarifying";
done: "done";
executing: "executing";
failed: "failed";
intake: "intake";
planning: "planning";
validating: "validating";
}>;
updatedAt: ZodNumber;
}, $strip>;
Defined in: packages/nexus-agents/src/pipeline/task-contract.ts:172
Unified task lifecycle contract.
Capability representations note:
requiredCapabilitiesandcapabilityGapstrack inferred or observed tool/expert capabilities from LLM task analysis.capabilityRequirementsspecifies explicit, declarative requirements with execution enforcement modes (‘enforcing’ | ‘advisory’) for worker dispatch gates.
Functions
captureAcceptanceContext()
function captureAcceptanceContext(input): Result<AcceptanceContext, Error>;
Defined in: packages/nexus-agents/src/pipeline/acceptance-context.ts:112
Capture values, not mutable buffers or caller-owned measurement objects.
Parameters
input
CaptureAcceptanceInput
Returns
Result<AcceptanceContext, Error>
checkForResearchTriggers()
function checkForResearchTriggers(config?): Promise<PipelineTask[]>;
Defined in: packages/nexus-agents/src/pipeline/research-trigger.ts:187
Check for research discoveries and convert high-quality ones to pipeline tasks.
Calls research_discover via expert-bridge, filters by quality threshold, deduplicates against known tasks, and rate-limits output.
Returns empty array when expert-bridge is unavailable (graceful degradation).
Parameters
config?
Returns
Promise<PipelineTask[]>
checkPipelinePolicy()
function checkPipelinePolicy(task, stageType): PolicyEvalResult;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:195
Evaluates pipeline policy before execution.
Builds PolicyContext from TaskContract metadata and stage type.
Uses the default PolicyEngine, whose BUILT_IN_RULES is the single
trustTierRule. The four siblings that once sat beside it were removed as
unwired (policy-engine.ts), so no cost, security or high-risk gate runs
on this path.
Parameters
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
stageType
string
Returns
checkpointToResult()
function checkpointToResult(state): Partial<DevPipelineResult>;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:460
Build a DevPipelineResult from checkpoint state (for resume scenarios).
Parameters
state
Returns
Partial<DevPipelineResult>
classifyTask()
function classifyTask(task): TaskClassification;
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:155
Classify a task for pipeline routing.
Parameters
task
string
Returns
cleanupCheckpoint()
function cleanupCheckpoint(sessionId, customDir?): boolean;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:448
Delete checkpoint file on successful completion.
Parameters
sessionId
string
customDir?
string
Returns
boolean
compilePipelineGraph()
function compilePipelineGraph(
template,
stages,
options?
): PipelineGraphResult;
Defined in: packages/nexus-agents/src/pipeline/pipeline-graph.ts:79
Compile a pipeline template + stages into an executable graph.
Each IPipelineStage is wrapped as a GraphBuilder node handler. Linear edges are auto-generated from template.stages order. Custom edges override the linear flow for feedback loops.
Parameters
template
stages
options?
PipelineGraphCompileOptions
Returns
compilePlan()
function compilePlan(plan, options?): CompileResult;
Defined in: packages/nexus-agents/src/pipeline/plan-compiler.ts:62
Compiles a PlanContract into a CompiledGraph.
- Each stage becomes a node with a handler (plugin-backed or placeholder)
- Dependencies become fixed edges
- Policy gates become gate nodes between stages
- Stages with no dependencies get edges from START
- Stages with no dependents get edges to END
Parameters
plan
approvalRequired
boolean = ...
estimatedCost
{
estimatedCostUsd: number;
modelCalls: number;
totalTokensIn: number;
totalTokensOut: number;
} = CostEstimateSchema
estimatedCost.estimatedCostUsd
number = ...
estimatedCost.modelCalls
number = ...
estimatedCost.totalTokensIn
number = ...
estimatedCost.totalTokensOut
number = ...
maxIterations
number = ...
policyGates
{
afterStage: string;
beforeStage: string;
id: string;
rules: string[];
}[] = ...
stages
{
config: Record<string, unknown>;
dependencies: string[];
id: string;
inputArtifacts: string[];
maxRetries?: number;
outputArtifacts: string[];
pluginId: string;
preferredCli?: string;
timeoutMs?: number;
type: "analyze" | "validate" | "execute" | "gate" | "route" | "aggregate";
}[] = ...
taskId
string = ...
timeoutMs
number = ...
options?
Returns
CompileResult
createAgentStages()
function createAgentStages(config?): DevPipelineStages;
Defined in: packages/nexus-agents/src/pipeline/agent-executor.ts:115
Parameters
config?
AgentExecutorConfig = {}
Returns
createCorePluginRegistry()
function createCorePluginRegistry(): PluginRegistry;
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:151
Creates a PluginRegistry with core plugins pre-registered and frozen. Convenience function for server startup.
Returns
createDefaultPolicyEngine()
function createDefaultPolicyEngine(): PolicyEngine;
Defined in: packages/nexus-agents/src/pipeline/policy-engine.ts:211
Creates a PolicyEngine with all built-in rules registered.
Returns
createDelegatePipeline()
function createDelegatePipeline(task): DelegatePipelineResult;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:72
Creates a compiled V2 pipeline for delegate_to_model from a TaskContract.
The pipeline has a single ‘route’ stage and no policy gate (#4657), so the
compile call passes no policyEnforcement bundle: with zero gates there is
no node that would consult one, and supplying it read as “policy enforced
at the stage boundary” when nothing was. Routing logic lives in the stage
handler (placeholder here, real handler injected by the MCP tool).
Parameters
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
Returns
DelegatePipelineResult
createDevStageRegistry()
function createDevStageRegistry(stages): Map<string, IPipelineStage>;
Defined in: packages/nexus-agents/src/pipeline/stage-wrappers.ts:330
Create a complete stage registry for the dev pipeline template.
Parameters
stages
Returns
Map<string, IPipelineStage>
createFeedbackSubscriber()
function createFeedbackSubscriber(bus, store): Unsubscribe;
Defined in: packages/nexus-agents/src/pipeline/feedback-subscriber.ts:54
Creates a subscriber that bridges EventBus events to OutcomeStore.
Listens for stage.failed events and records them as failed TaskOutcome
entries in the OutcomeStore.
Returns an Unsubscribe handle; the caller owns the lifecycle.
There is deliberately no server-wide singleton. #2938 added a
startFeedbackSubscriber / shutdownFeedbackSubscriber pair, and #5003’s
panel then removed this bridge from the server: StageFailedEvent carries no
cli, so the subscriber hardcoded cli: 'claude' on every stage failure and
double-counted against agent-executor, which is now the single canonical
outcome writer. The start half was dropped from initV2PipelineSubsystems
and the pair was left behind — shutdown still called from cli-server.ts
as an unconditional no-op, and the init log still reporting
feedbackSubscriber: 'active'. Both are gone; this function stays because it
is public API for SDK embedders who DO manage their own store.
Parameters
bus
store
Returns
Unsubscribe function to stop the bridge.
delegateInputToTaskContract()
function delegateInputToTaskContract(input, opts?): {
analysis: {
ambiguityScore: number;
complexity: string;
taskType: string;
};
artifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
capabilityGaps: {
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
};
capabilityRequirements?: {
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[];
completedAt?: number;
constraints: {
quality?: string;
scope: string[];
time?: string;
};
contractVersion?: string;
createdAt: number;
description: string;
error?: string;
evidenceObligations?: {
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[];
id: string;
metadata: Record<string, unknown>;
parentId?: string;
requiredCapabilities: {
experts: string[];
tools: string[];
};
status: | "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating";
updatedAt: number;
};
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:123
Converts delegate_to_model input into a V2 TaskContract. Input fields are preserved in metadata for downstream pipeline stages.
Parameters
input
opts?
DelegateContractOpts = {}
Returns
{
analysis: {
ambiguityScore: number;
complexity: string;
taskType: string;
};
artifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
capabilityGaps: {
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
};
capabilityRequirements?: {
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[];
completedAt?: number;
constraints: {
quality?: string;
scope: string[];
time?: string;
};
contractVersion?: string;
createdAt: number;
description: string;
error?: string;
evidenceObligations?: {
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[];
id: string;
metadata: Record<string, unknown>;
parentId?: string;
requiredCapabilities: {
experts: string[];
tools: string[];
};
status: | "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating";
updatedAt: number;
}
analysis
analysis: {
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema;
analysis.ambiguityScore
ambiguityScore: number;
analysis.complexity
complexity: string;
analysis.taskType
taskType: string;
artifacts
artifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
capabilityGaps
capabilityGaps: {
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema;
capabilityGaps.allSatisfied
allSatisfied: boolean;
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
available: {
experts: string[];
tools: string[];
};
capabilityGaps.available.experts
experts: string[];
capabilityGaps.available.tools
tools: string[];
capabilityGaps.gaps
gaps: unknown[];
capabilityGaps.gapsMeasured
gapsMeasured: boolean;
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
capabilityRequirements?: {
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[];
completedAt?
completedAt?: number;
constraints
constraints: {
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema;
constraints.quality?
quality?: string;
constraints.scope
scope: string[];
constraints.time?
time?: string;
contractVersion?
contractVersion?: string;
createdAt
createdAt: number;
description
description: string;
error?
error?: string;
evidenceObligations?
evidenceObligations?: {
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[];
id
id: string;
metadata
metadata: Record<string, unknown>;
parentId?
parentId?: string;
requiredCapabilities
requiredCapabilities: {
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema;
requiredCapabilities.experts
experts: string[];
requiredCapabilities.tools
tools: string[];
status
status:
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating";
updatedAt
updatedAt: number;
emitPipelineStageEvent()
function emitPipelineStageEvent(
prefix,
stage,
status,
details?
): void;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:187
Parameters
prefix
string
stage
string
status
"failed" | "completed" | "started"
details?
Record<string, unknown>
Returns
void
emitStageCompleted()
function emitStageCompleted(options): void;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:97
Emit a stage.completed event.
Parameters
options
Returns
void
emitStageFailed()
function emitStageFailed(options): void;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:111
Emit a stage.failed event.
Parameters
options
Returns
void
emitStageStarted()
function emitStageStarted(options): void;
Defined in: packages/nexus-agents/src/pipeline/pipeline-observability.ts:76
Emit a stage.started event.
Parameters
options
Returns
void
evaluatePipelinePolicy()
function evaluatePipelinePolicy(options, context): PolicyEvalResult;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:207
Evaluates all registered policy rules for a stage boundary.
In WARN mode, violations are logged and emitted but execution continues. In BLOCK mode, violations halt the pipeline. In OFF mode, evaluation is skipped entirely.
Parameters
options
context
Returns
executeDelegatePipeline()
function executeDelegatePipeline(task): Promise<PipelineMetrics>;
Defined in: packages/nexus-agents/src/pipeline/v2-delegate.ts:159
Compiles and executes a V2 pipeline for the given TaskContract. Returns metrics for observability — never throws.
This path performs no route-stage policy evaluation (#5485): the only
built-in rule denies execute stages, so such a check could not fail. The
enforcing seams remain the execute check in v2-orchestrate.ts and
enforceConsensusExecutePolicy in dev-pipeline.ts.
Parameters
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
Returns
Promise<PipelineMetrics>
executeExpert()
Execute with an optional working directory for the expert’s CLI subprocess, an optional signal that aborts the routed call (#6736), and an optional access mode (#6768). The optional wrapper confines CLI startup, project configuration and hooks to the scratch sandbox.
Call Signature
function executeExpert(expertType, prompt): Promise<ExpertBridgeResult>;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:591
Execute an expert task with the full nexus-agents expert pipeline.
Creates a built-in expert, executes via CompositeRouter (for intelligent CLI routing), and records outcomes. Falls back gracefully on failure.
Parameters
expertType
Built-in expert type (code, architecture, security, qa, etc.)
prompt
string
Task prompt for the expert
Returns
Promise<ExpertBridgeResult>
Expert result with text output
Throws
TypeError when options.accessMode is not an ExecutionAccessMode
Call Signature
function executeExpert(
expertType,
prompt,
options
): Promise<ExpertBridgeResult>;
Defined in: packages/nexus-agents/src/pipeline/expert-bridge.ts:595
Execute an expert task with the full nexus-agents expert pipeline.
Creates a built-in expert, executes via CompositeRouter (for intelligent CLI routing), and records outcomes. Falls back gracefully on failure.
Parameters
expertType
Built-in expert type (code, architecture, security, qa, etc.)
prompt
string
Task prompt for the expert
options
ExpertCallOptions
Returns
Promise<ExpertBridgeResult>
Expert result with text output
Throws
TypeError when options.accessMode is not an ExecutionAccessMode
executeOrchestratePipeline()
function executeOrchestratePipeline(task): Promise<PipelineMetrics>;
Defined in: packages/nexus-agents/src/pipeline/v2-orchestrate.ts:71
Executes the V2 orchestrate pipeline and returns metrics.
Parameters
task
analysis
{
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema
analysis.ambiguityScore
number = ...
analysis.complexity
string = ...
analysis.taskType
string = ...
artifacts
{
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[] = ...
capabilityGaps
{
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema
capabilityGaps.allSatisfied
boolean = ...
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
{
experts: string[];
tools: string[];
} = ...
capabilityGaps.available.experts
string[] = ...
capabilityGaps.available.tools
string[] = ...
capabilityGaps.gaps
unknown[] = ...
capabilityGaps.gapsMeasured
boolean = ...
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
{
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[] = ...
completedAt?
number = ...
constraints
{
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema
constraints.quality?
string = ...
constraints.scope
string[] = ...
constraints.time?
string = ...
contractVersion?
string = ...
createdAt
number = ...
description
string = ...
error?
string = ...
evidenceObligations?
{
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[] = ...
id
string = ...
metadata
Record<string, unknown> = ...
parentId?
string = ...
requiredCapabilities
{
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema
requiredCapabilities.experts
string[] = ...
requiredCapabilities.tools
string[] = ...
status
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating" = ...
updatedAt
number = ...
Returns
Promise<PipelineMetrics>
extractStateValue()
function extractStateValue(state, key): unknown;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:336
Reads one key out of the final pipeline state.
UNTYPED, which the header above used to deny — it promised “typed access to
well-known state keys” (#5771). The well-known keys do exist
(PIPELINE_STATE_KEYS in stage-types.ts), but this function does not use
them: key is a bare string, so a typo compiles, and the return is
unknown, so every caller narrows it itself. Narrowing the parameter to
(typeof PIPELINE_STATE_KEYS)[keyof typeof PIPELINE_STATE_KEYS] would make
the old header true, but this is published API and that is a breaking
change — queued with the next-major batch rather than done here.
Returns undefined for a key the run never set, which is indistinguishable
from a key set to undefined; a caller needing to tell those apart must
inspect the state object directly. Falsy values come back as themselves.
Published (exports/pipeline.ts) and, as of #5771, with no consumer at all
— not even a test. These assertions exist so the behaviour is pinned rather
than merely exported.
Parameters
state
Readonly<Record<string, unknown>>
key
string
Returns
unknown
flushPipelineMemory()
function flushPipelineMemory(): void;
Defined in: packages/nexus-agents/src/pipeline/agent-executor-memory.ts:80
Flush pipeline memory session.
Returns
void
getPipelineArtifactStore()
function getPipelineArtifactStore(): IArtifactStore;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:189
Returns the global ArtifactStore (created lazily on first call).
Returns
getPipelinePluginRegistry()
function getPipelinePluginRegistry(): PluginRegistry;
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:164
Returns the global PluginRegistry (created lazily on first call).
Returns
getPolicyMode()
function getPolicyMode(): PipelinePolicyMode;
Defined in: packages/nexus-agents/src/pipeline/policy-evaluator.ts:196
Reads policy mode from V2 config (umbrella + individual override).
Default: block in full mode, warn in partial, off when V2 is off.
Returns
getTemplate()
function getTemplate(id): PipelineTemplate | undefined;
Defined in: packages/nexus-agents/src/pipeline/templates.ts:99
Get a pipeline template by ID.
Parameters
id
string
Returns
PipelineTemplate | undefined
listTemplateIds()
function listTemplateIds(): readonly string[];
Defined in: packages/nexus-agents/src/pipeline/templates.ts:104
List all available template IDs.
Returns
readonly string[]
loadCheckpointState()
function loadCheckpointState(sessionId, customDir?): PipelineCheckpointState | null;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:130
Load checkpoint state for a session. Returns null if no checkpoints exist.
Parameters
sessionId
string
customDir?
string
Returns
PipelineCheckpointState | null
orchestrateInputToTaskContract()
function orchestrateInputToTaskContract(input, opts?): {
analysis: {
ambiguityScore: number;
complexity: string;
taskType: string;
};
artifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
capabilityGaps: {
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
};
capabilityRequirements?: {
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[];
completedAt?: number;
constraints: {
quality?: string;
scope: string[];
time?: string;
};
contractVersion?: string;
createdAt: number;
description: string;
error?: string;
evidenceObligations?: {
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[];
id: string;
metadata: Record<string, unknown>;
parentId?: string;
requiredCapabilities: {
experts: string[];
tools: string[];
};
status: | "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating";
updatedAt: number;
};
Defined in: packages/nexus-agents/src/pipeline/v2-orchestrate.ts:47
Converts orchestrate input to a TaskContract.
Parameters
input
opts?
OrchestrateContractOpts = {}
Returns
{
analysis: {
ambiguityScore: number;
complexity: string;
taskType: string;
};
artifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
capabilityGaps: {
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
};
capabilityRequirements?: {
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[];
completedAt?: number;
constraints: {
quality?: string;
scope: string[];
time?: string;
};
contractVersion?: string;
createdAt: number;
description: string;
error?: string;
evidenceObligations?: {
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[];
id: string;
metadata: Record<string, unknown>;
parentId?: string;
requiredCapabilities: {
experts: string[];
tools: string[];
};
status: | "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating";
updatedAt: number;
}
analysis
analysis: {
ambiguityScore: number;
complexity: string;
taskType: string;
} = TaskAnalysisSummarySchema;
analysis.ambiguityScore
ambiguityScore: number;
analysis.complexity
complexity: string;
analysis.taskType
taskType: string;
artifacts
artifacts: {
id: string;
type: | "code"
| "analysis"
| "test"
| "spec"
| "review"
| "report"
| "plan"
| "vote";
}[];
capabilityGaps
capabilityGaps: {
allSatisfied: boolean;
available: {
experts: string[];
tools: string[];
};
gaps: unknown[];
gapsMeasured: boolean;
} = CapabilityGapSummarySchema;
capabilityGaps.allSatisfied
allSatisfied: boolean;
Meaningful ONLY when gapsMeasured is true. gaps: [] from a detector
that ran and gaps: [] from a builder that never called one are
byte-identical on the wire; this field is what tells them apart.
capabilityGaps.available
available: {
experts: string[];
tools: string[];
};
capabilityGaps.available.experts
experts: string[];
capabilityGaps.available.tools
tools: string[];
capabilityGaps.gaps
gaps: unknown[];
capabilityGaps.gapsMeasured
gapsMeasured: boolean;
Whether a capability-gap detector actually ran (#5919).
buildBaseTaskContract runs the canonical detector on inferred
requirements for both entry points. Its report describes registry support,
not observed tool execution; inferred gaps retain their origin (#5923).
Named for the vocabulary this repo already uses for exactly this —
tokensMeasured, policyEvaluated, routerTypeMeasured. A consumer that
needs a real answer must branch on this, not on allSatisfied alone.
capabilityRequirements?
capabilityRequirements?: {
id: string;
mode: "advisory" | "enforcing";
operation: string;
resourceRef?: string;
scope?: string;
}[];
completedAt?
completedAt?: number;
constraints
constraints: {
quality?: string;
scope: string[];
time?: string;
} = TaskConstraintsSummarySchema;
constraints.quality?
quality?: string;
constraints.scope
scope: string[];
constraints.time?
time?: string;
contractVersion?
contractVersion?: string;
createdAt
createdAt: number;
description
description: string;
error?
error?: string;
evidenceObligations?
evidenceObligations?: {
artifactRef: string;
claim?: string;
id: string;
mode: "advisory" | "enforcing";
receiptIssuer?: string;
required: boolean;
}[];
id
id: string;
metadata
metadata: Record<string, unknown>;
parentId?
parentId?: string;
requiredCapabilities
requiredCapabilities: {
experts: string[];
tools: string[];
} = RequiredCapabilitiesSummarySchema;
requiredCapabilities.experts
experts: string[];
requiredCapabilities.tools
tools: string[];
status
status:
| "planning"
| "failed"
| "approved"
| "done"
| "executing"
| "intake"
| "clarifying"
| "validating";
updatedAt
updatedAt: number;
registerCorePlugins()
function registerCorePlugins(registry?): CorePluginRegistrationResult;
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:126
Registers all core plugins into a PluginRegistry and freezes it. Returns registration summary. Never throws.
Parameters
registry?
Returns
resetPipelineArtifactStore()
function resetPipelineArtifactStore(): void;
Defined in: packages/nexus-agents/src/pipeline/artifact-store.ts:195
Resets the global ArtifactStore (for testing).
Returns
void
resetPipelinePluginRegistry()
function resetPipelinePluginRegistry(): void;
Defined in: packages/nexus-agents/src/pipeline/core-plugins.ts:170
Resets the global PluginRegistry (for testing).
Returns
void
resolvePipelineDeps()
function resolvePipelineDeps(deps?): ResolvedPipelineDeps;
Defined in: packages/nexus-agents/src/pipeline/pipeline-deps.ts:48
Resolves a PipelineDeps bundle, filling any unset field from its
documented global default. An injected field is returned untouched; an omitted
field returns the process-global default. The only side effect is the lazy,
idempotent creation of the global registry inside getPipelinePluginRegistry().
Parameters
deps?
Returns
resolveV2Config()
function resolveV2Config(): V2Config;
Defined in: packages/nexus-agents/src/pipeline/v2-config.ts:85
Resolves the full V2 configuration from environment variables.
Deprecation Notice (#925 Phase F):
The umbrella toggle (NEXUS_V2_MODE) and override flags (NEXUS_V2_DELEGATE,
NEXUS_V2_ORCHESTRATE) are legacy compatibility knobs slated for removal.
V2 pipeline execution is standard across nexus-agents.
Priority: individual flag > umbrella flag > defaults.
| NEXUS_V2_MODE | delegate | orchestrate | policy |
|---|---|---|---|
| full (default) | true | true | block |
| partial | true | false | warn |
| off | false | false | off |
Returns
runAdaptiveOrchestrator()
function runAdaptiveOrchestrator(task, options): Promise<AdaptiveOrchestratorResult>;
Defined in: packages/nexus-agents/src/pipeline/adaptive-orchestrator.ts:337
Run the adaptive orchestrator — classify task, select template, execute.
This is the single entry point for all pipeline execution.
Parameters
task
string
options
Returns
Promise<AdaptiveOrchestratorResult>
runDevPipeline()
function runDevPipeline(
task,
stages,
options?
): Promise<DevPipelineResult>;
Defined in: packages/nexus-agents/src/pipeline/dev-pipeline.ts:580
Execute the full multi-agent development pipeline.
When sessionId is provided, each stage checkpoints to disk. On crash,
re-running with the same sessionId resumes from the last completed stage.
Parameters
task
string
High-level task description
stages
Pluggable stage implementations
options?
Pipeline options (sessionId for checkpoint/resume)
Returns
Promise<DevPipelineResult>
Pipeline result with all outputs
runGraphPipeline()
function runGraphPipeline(
task,
template,
stages,
options?
): Promise<GraphPipelineResult>;
Defined in: packages/nexus-agents/src/pipeline/graph-pipeline-runner.ts:100
Run a pipeline using graph-based execution.
Compiles the template + stages into a graph, then executes via the graph executor (super-step BSP model).
Parameters
task
string
template
stages
options?
Returns
Promise<GraphPipelineResult>
runIterativeConsensus()
function runIterativeConsensus(
initialPlan,
revisePlan,
config?
): Promise<IterativeConsensusResult>;
Defined in: packages/nexus-agents/src/pipeline/iterative-consensus.ts:172
Parameters
initialPlan
string
revisePlan
(plan, feedback) => Promise<string>
config?
Returns
Promise<IterativeConsensusResult>
saveStageCheckpoint()
function saveStageCheckpoint(
sessionId,
stage,
data,
customDir?
): boolean;
Defined in: packages/nexus-agents/src/pipeline/pipeline-checkpoint.ts:96
Append a stage checkpoint to disk.
Parameters
sessionId
string
stage
data
customDir?
string
Returns
boolean