Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Event Types Reference

Complete reference for all event types in Nexus, organized by domain.

Core Events

Event TypePayloadDescription
core.bootBootConfigEngine boot started
core.ready(none)All plugins initialized and ready
core.shutdownShutdownReasonEngine shutting down
core.tickTickInfoPeriodic heartbeat
core.errorErrorInfoError reported by a plugin
core.config.reload.requestConfigReloadRequestExternal trigger asks the engine to re-read its config
core.config.reload.resultConfigReloadResultEngine response to a reload request (success / error)

Payloads

BootConfig

FieldTypeDescription
ConfigPathstringPath to the config file
ProfilestringProfile name

ShutdownReason

FieldTypeDescription
ReasonstringWhy: "user", "error", or "signal"
ErrorerrorAssociated error (if any)

TickInfo

FieldTypeDescription
SequenceintTick counter
Timetime.TimeWhen the tick occurred

ErrorInfo

FieldTypeDescription
SourcestringPlugin that reported the error
ErrerrorThe error
FatalboolWhether this should trigger shutdown
RetryableboolWhether this error class is retryable (429, 5xx)
RetriesExhaustedboolProvider’s own retry logic gave up
RequestMetamap[string]anyEcho of LLMRequest.Metadata for correlation

core.error is vetoable — providers emit before:core.error first. The fallback plugin can veto the error to suppress it and retry with an alternate provider.


I/O Events

Event TypePayloadDescription
io.inputUserInputUser submitted a message
io.outputAgentOutputAgent produced output
io.output.streamOutputChunkStreaming output chunk
io.output.stream.endStreamRefStreaming complete
io.output.clear(none)Clear partial streamed content (used by fallback)
io.statusStatusUpdateAgent state changed
io.approval.requestApprovalRequestApproval needed for an action
io.approval.responseApprovalResponseUser responded to approval
io.askAskUserAgent asking user a question
io.ask.responseAskUserResponseUser answered the question
io.history.replayHistoryReplayReplaying conversation on resume
io.session.startSessionInfoSession started
io.session.end(none)Session ended

Payloads

UserInput

FieldTypeDescription
ContentstringMessage text
Files[]FileAttachmentAttached files
SessionIDstringCurrent session

FileAttachment

FieldTypeDescription
NamestringFilename
MimeTypestringMIME type
Data[]byteFile contents

AgentOutput

FieldTypeDescription
ContentstringOutput text
Rolestring"assistant", "system", or "tool"
Metadatamap[string]anyAdditional context
TurnIDstringAssociated turn

OutputChunk

FieldTypeDescription
ContentstringChunk text
TurnIDstringAssociated turn
IndexintChunk sequence number

StatusUpdate

FieldTypeDescription
Statestring"idle", "thinking", "tool_running", "streaming"
DetailstringAdditional info
ToolIDstringTool being run (if applicable)

ApprovalRequest

FieldTypeDescription
PromptIDstringUnique identifier for this approval
DescriptionstringWhat needs approval
ToolCallanyThe tool call details
Riskstring"low", "medium", "high"

ApprovalResponse

FieldTypeDescription
PromptIDstringMatches the request
ApprovedboolWhether approved
AlwaysboolRemember this decision

AskUser

FieldTypeDescription
PromptIDstringUnique identifier
QuestionstringThe question text
TurnIDstringAssociated turn

AskUserResponse

FieldTypeDescription
PromptIDstringMatches the request
AnswerstringUser’s response

Provider Events

Event TypePayloadDescription
provider.fallbackProviderFallbackProvider switch due to failure
provider.fanout.startProviderFanoutStartParallel fanout initiated
provider.fanout.responseProviderFanoutResponseIndividual provider responded
provider.fanout.completeProviderFanoutCompleteAll fanout responses collected

Payloads

ProviderFallback

FieldTypeDescription
RolestringModel role being resolved
FailedProviderstringPlugin ID of the provider that failed
FailedModelstringModel that failed
ErrorstringError description
NextProviderstringPlugin ID of the fallback provider
NextModelstringModel being tried next
Attemptint0-based index in the fallback chain

ProviderFanoutStart

FieldTypeDescription
FanoutIDstringUnique fanout sequence identifier
RolestringModel role being resolved
StrategystringSelection strategy (all, llm_judge, heuristic, user)
Targets[]ProviderFanoutTargetProviders being dispatched to

ProviderFanoutTarget

FieldTypeDescription
ProviderstringPlugin ID
ModelstringModel identifier

ProviderFanoutResponse

FieldTypeDescription
FanoutIDstringFanout sequence identifier
ProviderstringPlugin ID that responded
ModelstringModel that responded
Successboolfalse if provider errored or timed out
ErrorstringNon-empty on failure

ProviderFanoutComplete

FieldTypeDescription
FanoutIDstringFanout sequence identifier
RolestringModel role
StrategystringSelection strategy used
SucceededintNumber of successful responses
FailedintNumber of errors or timeouts

LLM Events

Event TypePayloadDescription
llm.requestLLMRequestRequest to an LLM provider
llm.responseLLMResponseComplete LLM response
llm.stream.chunkStreamChunkStreaming response chunk
llm.stream.endStreamEndStreaming complete

Payloads

LLMRequest

FieldTypeDescription
RolestringModel role name (resolved by provider)
ModelstringExplicit model ID (optional, overrides role)
Messages[]MessageConversation messages
Tools[]ToolDefAvailable tools
ToolChoice*ToolChoiceTool choice constraint (nil = provider default)
ToolFilter*ToolFilterTool include/exclude filter (nil = no filtering)
ResponseFormat*ResponseFormatStructured output constraint (nil = no constraint)
MaxTokensintMax response tokens
Temperature*float64Sampling temperature (nil = provider default)
StreamboolEnable streaming
Metadatamap[string]anyAdditional context (e.g., _source for planner tagging)

Message

FieldTypeDescription
Rolestring"system", "user", "assistant", "tool"
ContentstringMessage text
ToolCallIDstringFor tool role: which call this responds to
ToolCalls[]ToolCallRequestFor assistant role: tool calls made

ToolCallRequest

FieldTypeDescription
IDstringUnique call identifier
NamestringTool name
ArgumentsstringJSON-encoded arguments

ToolDef

FieldTypeDescription
NamestringTool name
DescriptionstringWhat the tool does
ParametersstringJSON Schema for parameters

ToolChoice

FieldTypeDescription
Modestring"auto", "required", "none", "tool"
NamestringTool name (only when Mode is "tool")

ToolFilter

FieldTypeDescription
Include[]stringOnly these tools (empty = all). Takes precedence over Exclude
Exclude[]stringRemove these tools

ResponseFormat

FieldTypeDescription
Typestring"text", "json_object", or "json_schema"
NamestringSchema name (required by OpenAI for json_schema type)
Schemamap[string]anyJSON Schema definition
StrictboolEnforce strict schema adherence

Metadata Conventions

Certain metadata keys carry special meaning:

KeyOnTypeDescription
_sourceLLMRequest / LLMResponsestringCorrelates retry requests with responses (used by gates)
_expects_schemaLLMRequeststringSchema name to attach via the schema registry
_structured_outputLLMResponsebooltrue when provider enforced structured output (native or simulated)

LLMResponse

FieldTypeDescription
ContentstringResponse text
ToolCalls[]ToolCallRequestTool calls in the response
UsageUsageToken usage statistics
CostUSDfloat64Provider-computed cost in USD for this request
ModelstringModel that was used
FinishReasonstringWhy the response ended
Metadatamap[string]anyAdditional context
Alternatives[]LLMResponseAdditional responses from parallel fanout providers (nil for non-fanout)

Usage

FieldTypeDescription
PromptTokensintInput tokens consumed
CompletionTokensintOutput tokens generated
TotalTokensintTotal tokens
ReasoningTokensintThinking / reasoning tokens (Gemini 2.5 thoughtTokenCount, etc.)
CachedTokensintTokens served from a prompt cache
CacheWriteTokensintTokens written into a prompt cache
ModalityBreakdownmap[string]intPer-modality token counts when the provider reports them. Lowercase keys: text, image, audio, video, document. Empty when the provider does not split modalities (Anthropic) or the request was text-only. Cost-attribution consumers read this to bill image / audio turns separately.

Multimodal tool results

ToolResult carries an OutputParts []MessagePart field for tools that emit multimodal content (image, audio, document, video). When non-empty, memory plugins copy the parts onto the resulting tool-role Message.Parts so the next LLM request includes the multimodal content alongside (or in place of) Output.

Large payloads should be stored via pkg/engine/blobs and referenced via MessagePart.URI = "nexus-blob:<sha256>" so the journal stays compact; small payloads can ride inline as MessagePart.Data. Provider plugins resolve nexus-blob: URIs at request-assembly time.

StreamChunk

FieldTypeDescription
ContentstringChunk text
ToolCall*ToolCallRequestPartial tool call (if applicable)
IndexintChunk sequence number
TurnIDstringAssociated turn

StreamEnd

FieldTypeDescription
TurnIDstringAssociated turn
UsageUsageFinal token usage
FinishReasonstringWhy the stream ended

Tool Events

Event TypePayloadDescription
tool.registerToolDefTool available for use
before:tool.invokeToolCallBefore tool execution (vetoable)
tool.invokeToolCallTool invocation
before:tool.resultToolResultBefore tool result propagation (vetoable)
tool.resultToolResultTool execution result

Payloads

ToolCall

FieldTypeDescription
IDstringCall identifier
NamestringTool name
Argumentsmap[string]anyParsed arguments
TurnIDstringAssociated turn

ToolResult

FieldTypeDescription
IDstringMatches the call ID
NamestringTool name
OutputstringHuman-readable result text (what the LLM sees)
ErrorstringError message (if failed)
OutputFilestringPath to output file (optional)
OutputData[]byteBinary output data (optional)
OutputStructuredmap[string]anyOptional structured payload. When the tool’s ToolDef.OutputSchema is set, this should match that schema. Consumed by typed consumers like run_code’s bindings — Output stays freeform text for the LLM.
TurnIDstringAssociated turn

ToolDef

FieldTypeDescription
NamestringTool name the LLM will use
DescriptionstringDescription shown to the LLM
Parametersmap[string]anyJSON Schema for inputs
OutputSchemamap[string]anyOptional JSON Schema describing the shape of ToolResult.OutputStructured. When set, run_code generates a typed Go struct bound to this schema.
Class / Subclass / Tagsstring / []stringSemantic metadata for filtering

Code Execution Events

Emitted by nexus.tool.code_exec alongside the standard tool.invoke/tool.result pair. Let other plugins observe programmatic tool-calling scripts without recomputing the run_code envelope from a tool result.

Event TypePayloadDescription
code.exec.requestCodeExecRequestScript about to run; carries source, imports, active skills
code.exec.stdoutCodeExecStdoutIncremental stdout chunk produced while the script runs; Final=true marks the last chunk
code.exec.resultCodeExecResultScript finished (success, compile error, runtime error, veto, or timeout)

CodeExecRequest

FieldTypeDescription
CallIDstringMatches the outer run_code tool call ID
TurnIDstringAssociated turn
ScriptstringFull Go source submitted by the LLM
Imports[]stringImport paths referenced by the script
Skills[]stringNames of currently-active skills whose helpers were staged

CodeExecStdout

FieldTypeDescription
CallIDstringMatches the outer run_code tool call ID
TurnIDstringAssociated turn
ChunkstringUTF-8 bytes written to stdout since the last emission; may contain newlines
FinalboolTrue for the closing chunk of this call; code.exec.result follows immediately after
TruncatedboolOnly meaningful on the final chunk — true when total stdout exceeded max_output_bytes

Chunks are flushed on every newline and on a ~512-byte threshold so long lines without newlines still reach the UI promptly. Consumers should concatenate Chunk values across events to reconstruct the full stdout stream; the final CodeExecResult.Output also carries the full aggregated string for non-streaming consumers.

CodeExecResult

FieldTypeDescription
CallIDstringMatches the outer run_code tool call ID
TurnIDstringAssociated turn
OutputstringCaptured stdout (capped at max_output_bytes)
ResultstringJSON-marshaled Run() return value
ErrorstringFirst error encountered (AST rejection, compile, runtime, timeout)
Durationint64Execution wall time in milliseconds
TruncatedboolStdout was truncated by the output cap

Agent Events

Event TypePayloadDescription
agent.turn.startTurnInfoAgent began processing
agent.turn.endTurnInfoAgent finished processing
agent.planPlanAgent’s current plan
agent.tool_choiceAgentToolChoiceDynamic tool choice override

Payloads

TurnInfo

FieldTypeDescription
TurnIDstringUnique turn identifier
IterationintCurrent iteration count
SessionIDstringCurrent session

Plan

FieldTypeDescription
Steps[]PlanStepPlan steps
TurnIDstringAssociated turn

PlanStep

FieldTypeDescription
DescriptionstringWhat this step does
Statusstring"pending", "active", "completed", "failed"

AgentToolChoice

FieldTypeDescription
Modestring"auto", "required", "none", "tool"
ToolNamestringTool name when Mode is "tool"
Durationstring"once" (next request only) or "sticky" (until replaced)

Subagent Events

Event TypePayloadDescription
subagent.spawnSubagentSpawnSubagent creation requested
subagent.startedSubagentStartedSubagent began execution
subagent.iterationSubagentIterationSubagent completed an iteration
subagent.completeSubagentCompleteSubagent finished

Payloads

SubagentSpawn

FieldTypeDescription
SpawnIDstringUnique spawn identifier
TaskstringTask description
SystemPromptstringOverride system prompt
Tools[]stringAvailable tools
ModelRolestringModel role
ParentTurnIDstringParent’s turn ID

SubagentComplete

FieldTypeDescription
SpawnIDstringSpawn identifier
ResultstringFinal result
ErrorstringError (if failed)
IterationsintNumber of iterations used
TokensUsedUsageToken consumption
CostUSDfloat64Accumulated cost in USD
ParentTurnIDstringParent’s turn ID

Memory Events

Event TypePayloadDescription
memory.storeMemoryEntryStore a memory entry
memory.queryMemoryQueryQuery conversation history
memory.resultMemoryResultQuery results
memory.compaction.triggeredCompactionTriggeredCompaction started
memory.compactedCompactionCompleteCompaction finished

Payloads

MemoryEntry

FieldTypeDescription
KeystringEntry identifier
ContentstringContent to store
Metadatamap[string]anyAdditional context
SessionIDstringCurrent session

MemoryQuery

FieldTypeDescription
QuerystringSearch query (empty = all)
LimitintMax results
SessionIDstringCurrent session

CompactionTriggered

FieldTypeDescription
ReasonstringWhy compaction triggered
MessageCountintMessages before compaction
BackupPathstringBackup file location

CompactionComplete

FieldTypeDescription
Messages[]MessageNew compacted message set
BackupPathstringBackup file location
MessageCountintMessages after compaction
PrevCountintMessages before compaction

Long-Term Memory Events

Event TypePayloadDescription
memory.longterm.loadedLongTermMemoryLoadedMemory index injected into system prompt
memory.longterm.storeLongTermMemoryStoreRequestWrite or update a memory entry
memory.longterm.storedLongTermMemoryStoredWrite confirmed
memory.longterm.readLongTermMemoryReadRequestRead a memory entry
memory.longterm.resultLongTermMemoryReadResultRead result
memory.longterm.deleteLongTermMemoryDeleteRequestDelete a memory entry
memory.longterm.deletedLongTermMemoryDeletedDelete confirmed
memory.longterm.listLongTermMemoryQueryList/filter memories
memory.longterm.list.resultLongTermMemoryListResultList result

LongTermMemoryIndex

FieldTypeDescription
KeystringMemory key
PreviewstringFirst line of content
Tagsmap[string]stringKey-value tags
Updatedtime.TimeLast update timestamp

LongTermMemoryStoreRequest

FieldTypeDescription
KeystringMemory key
ContentstringMarkdown content
Tagsmap[string]stringOptional tags

Plan Events

Event TypePayloadDescription
plan.requestPlanRequestRequest plan generation
plan.resultPlanResultPlan generated
plan.createdPlanResultPlan ready for display
plan.approval.request(plan data)User approval needed
plan.approval.response(approval)User responded
plan.progressPlanProgressStep status updated

Payloads

PlanRequest

FieldTypeDescription
TurnIDstringAssociated turn
SessionIDstringCurrent session
InputstringUser’s original input

PlanResult

FieldTypeDescription
TurnIDstringAssociated turn
PlanIDstringUnique plan identifier
Steps[]PlanResultStepPlan steps
SummarystringPlan summary
ApprovedboolWhether approved
Sourcestring"dynamic" or "static"

PlanResultStep

FieldTypeDescription
IDstringStep identifier
DescriptionstringWhat this step does
InstructionsstringDetailed instructions (optional)
StatusstringCurrent status
OrderintExecution order

PlanProgress

FieldTypeDescription
TurnIDstringAssociated turn
PlanIDstringPlan identifier
StepIDstringStep being updated
StatusstringNew status
DetailstringAdditional info

Skill Events

Event TypePayloadDescription
skill.discoverSkillCatalogSkills catalog assembled
skill.activateSkillActivationSkill activation requested
before:skill.activateSkillActivationBefore activation (vetoable)
skill.loadedSkillContentSkill content loaded
skill.deactivateSkillRefSkill deactivation requested
skill.resource.readSkillResourceReqResource file requested
skill.resource.resultSkillResourceDataResource content returned

Payloads

SkillCatalog

FieldTypeDescription
Skills[]SkillSummaryAll discovered skills

SkillSummary

FieldTypeDescription
NamestringSkill name
DescriptionstringWhat the skill does
LocationstringDirectory path
Scopestring"project", "user", "builtin", "config"

SkillContent

FieldTypeDescription
NamestringSkill name
BodystringMarkdown content
Resources[]stringAvailable resource files
ScopestringSkill scope
BaseDirstringSkill directory

Schema Events

Event TypePayloadDescription
schema.registerSchemaRegistrationRegister an output schema with the registry
schema.deregisterSchemaDeregistrationRemove a schema from the registry

Payloads

SchemaRegistration

FieldTypeDescription
NamestringSchema name (e.g. "skill.code_review.output")
Schemamap[string]anyJSON Schema definition
SourcestringPlugin ID that registered it

SchemaDeregistration

FieldTypeDescription
NamestringSchema name to remove
SourcestringPlugin ID that registered it

Session Events

Event TypePayloadDescription
session.file.createdSessionFileNew file in session
session.file.updatedSessionFileFile updated in session

SessionFile

FieldTypeDescription
PathstringFile path within session
Actionstring"created" or "updated"
SizeintFile size in bytes

Cancellation Events

Event TypePayloadDescription
cancel.requestCancelRequestUser requested cancellation
cancel.activeCancelActiveCancellation broadcast
cancel.completeCancelCompleteCancellation processed
cancel.resumeCancelResumeResume after cancellation

CancelRequest

FieldTypeDescription
TurnIDstringTurn to cancel
SourcestringWho requested: "tui", "browser", etc.

Embeddings Events

Event TypePayloadDescription
embeddings.request*EmbeddingsRequestEmbed a batch of texts. Pointer-fill — provider mutates in place.

Payloads

EmbeddingsRequest

FieldTypeDescription
Texts[]stringBatch of strings to embed (input). Used when Inputs is empty — back-compat with text-only adapters.
Inputs[]EmbeddingsInputPolymorphic batch (text + image inputs) for multimodal-aware providers. When non-empty, providers consume Inputs and ignore Texts.
ModelstringRequested model; provider may echo back actual model used.
DimensionsintOptional truncation hint. Zero = provider default.
Vectors[][]float32Result vectors, in input order (output).
ProviderstringPlugin ID of the adapter that answered (output).
UsageEmbeddingsUsageToken usage when reported by the provider (output).
ErrorstringNon-empty on failure (output).

EmbeddingsInput

FieldTypeDescription
TextstringText snippet. Mutually exclusive with Image and ImageURI.
Image[]byteInline image bytes. Mutually exclusive with Text and ImageURI. Requires MimeType.
ImageURIstringImage reference: nexus-blob:<sha> (engine blob store) or external URL. Mutually exclusive with Text and Image.
MimeTypestringIANA media type (e.g. image/png). Required when Image is set; recommended for ImageURI.

Adapters that don’t support image inputs must return a clear error when they encounter an image-bearing input rather than silently downgrading. See nexus.embeddings.cohere_multimodal for a multimodal-aware reference adapter.

EmbeddingsUsage

FieldTypeDescription
PromptTokensintTokens consumed by the input.
TotalTokensintTotal billable tokens.

Vector Store Events

Event TypePayloadDescription
vector.upsert*VectorUpsertInsert or replace docs in a namespace.
vector.query*VectorQueryNearest-neighbor lookup in a namespace.
vector.delete*VectorDeleteRemove docs by ID.
vector.namespace.drop*VectorNamespaceDropRemove an entire namespace (idempotent).

All four are pointer-fill — adapter sets Provider / Error (and Matches on query) in place.

Payloads

VectorDoc

FieldTypeDescription
IDstringStable identifier; upsert replaces by ID.
Vector[]float32Embedding. Adapters may require unit-normalized.
ContentstringOriginal text (optional but typically stored for re-ranking / display).
Metadatamap[string]stringString-keyed metadata.

VectorMatch

FieldTypeDescription
IDstringDoc ID.
ContentstringDoc content.
Metadatamap[string]stringDoc metadata.
Similarityfloat32Cosine similarity in [-1, 1].

VectorUpsert

FieldTypeDescription
NamespacestringTarget namespace (input).
Docs[]VectorDocDocs to upsert (input).
ProviderstringAdapter plugin ID (output).
ErrorstringNon-empty on failure (output).

VectorQuery

FieldTypeDescription
NamespacestringTarget namespace (input).
Vector[]float32Query vector (input).
KintMax results (input).
Filtermap[string]stringExact-match metadata filter (input, optional).
Matches[]VectorMatchHits sorted by similarity desc (output).
ProviderstringAdapter plugin ID (output).
ErrorstringNon-empty on failure (output).

VectorDelete

FieldTypeDescription
NamespacestringTarget namespace (input).
IDs[]stringDoc IDs to remove. Unknown IDs are ignored (input).
ProviderstringAdapter plugin ID (output).
ErrorstringNon-empty on failure (output).

VectorNamespaceDrop

FieldTypeDescription
NamespacestringNamespace to drop (input).
ProviderstringAdapter plugin ID (output).
ErrorstringNon-empty on failure (output).

RAG Events

Event TypePayloadDescription
rag.ingest*RAGIngestIngest one file. Pointer-fill.
rag.ingest.delete*RAGIngestDeleteDrop a file’s chunks. Pointer-fill.
rag.ingest.result*RAGIngestNotification emitted after rag.ingest completes (read-only).
memory.vector.store*VectorMemoryStoreExplicit store into vector memory. Pointer-fill.

Payloads

RAGIngest

FieldTypeDescription
PathstringFile path (input).
NamespacestringTarget namespace (input).
Metadatamap[string]stringOptional metadata merged into every chunk (input).
ProviderstringIngest plugin ID (output).
ChunksintNumber of chunks upserted (output).
SkippedCachedintHow many of those came from the embedding cache (output).
ErrorstringNon-empty on failure (output).

RAGIngestDelete

FieldTypeDescription
PathstringFile path (input).
NamespacestringTarget namespace (input).
ProviderstringIngest plugin ID (output).
DeletedintReserved; currently always zero (output).
ErrorstringNon-empty on failure (output).

VectorMemoryStore

FieldTypeDescription
ContentstringContent to store (input).
SourcestringShort label recorded as metadata (e.g. user, agent, compaction) (input).
Metadatamap[string]stringExtra metadata merged into the stored doc (input).
ProviderstringPlugin ID of the memory.vector plugin (output).
ErrorstringNon-empty on failure (output).

Delegate Events

Emitted by nexus.agent.delegate when a parent agent invokes a posture via the delegate tool. Payloads are map[string]any records — see pkg/delegate.Runtime for the canonical fields.

Event TypePayloadDescription
delegate.startmapSub-session is starting. Keys: sub_session_id, posture, posture_ver, task, parent_turn, depth.
delegate.completemapSub-session finished. Keys: sub_session_id, posture, posture_ver, status (success/partial/error/timeout/cancelled/cache_hit), error, tokens_used, tool_calls_used, elapsed_ms, result, depth.

Posture Events

Emitted by nexus.agent.postures as posture YAML loads or changes.

Event TypePayloadDescription
posture.registeredmapA posture was installed or updated. Keys: name, version, source (file path or scan dir).
posture.removedmapA posture was removed (file deleted / load error). Keys: name.

Scene Events

Emitted by nexus.scene on every mutation. agent_id on the payload comes from Event.Causation.AgentID — sub-agent contributions remain attributable in the journal.

Event TypePayloadDescription
scene.createdmapNew Scene created. Keys: session_id, scene_id, schema, version, agent_id, content (initial content).
scene.patchedmapScene content updated. Keys: session_id, scene_id, version, agent_id, content (full post-merge content).
scene.deletedmapScene removed. Keys: session_id, scene_id, agent_id.

Tool Stream Events

Emitted by pkg/streamtool.Bridge while a ChannelTool runs. Consumers that only need the final value still subscribe to tool.result; UIs and observability collectors that want incremental progress subscribe here.

Event TypePayloadDescription
tool.stream.progressmapStatus-only update from a streaming tool. Keys: tool_name, tool_id, turn_id, sequence, progress (0.0–1.0 or -1), payload.
tool.stream.partialmapIncremental data the consumer can render now. Keys: tool_name, tool_id, turn_id, sequence, payload.

Thinking Events

Event TypePayloadDescription
thinking.stepThinkingStepAgent reasoning step

ThinkingStep

FieldTypeDescription
TurnIDstringAssociated turn
SourcestringPlugin that generated this
ContentstringThinking content
Phasestring"planning", "executing", "reasoning"
Timestamptime.TimeWhen this occurred

ICM Workflow Events

Emitted by nexus.workflows.icm on top of the generic plan.created / plan.progress surface. Every payload carries a _schema_version field (constants in plugins/workflows/icm/icmtypes/types.go).

Event TypePayloadDescription
icm.run.startedICMRunStartedWorkspace loaded; run created; before stage 1 dispatches.
icm.run.completedICMRunCompletedAll stages finished without halt.
icm.run.haltedICMRunHaltedStage error policy halted, gate rejected, or run context cancelled.
icm.stage.startedICMStageStartedStage execution begins, before any human_gate: start.
icm.stage.completedICMStageCompletedArtifact written; any end gate resolved.
icm.stage.failedICMStageFailedStage halted (dispatch error, rejected gate, or loop.on_exhausted: error).
icm.stage.iterationICMStageIterationOne per loop iteration, immediately before the iteration’s invocation.
icm.turnICMTurnAfter each turn within an invocation (richer-UI feed; basic UIs already see plan.progress).
icm.fanout.itemICMFanoutItemItem lifecycle boundary in a fan-out stage (activecompleted | failed).
icm.predicate.failedICMPredicateFailedAny predicate evaluation returns verdict=false. Pass paths are not emitted.

ICMRunStarted

FieldTypeDescription
RunIDstringRun identifier (r_<id>); also the on-disk dir under the plugin’s session data dir.
InstanceIDstringPlugin instance ID (nexus.workflows.icm or nexus.workflows.icm/<suffix>).
WorkspaceRootstringAbsolute path to the loaded workspace.
WorkspaceNamestringLast folder name of the workspace path.
StagesintStage count.

ICMRunCompleted

FieldTypeDescription
RunIDstringRun identifier.
StagesRunintNumber of stages that completed.
AggregatePathstringOptional run aggregate path (set when a top-level aggregate is produced).
ElapsedSecondsint64Wall-clock seconds from icm.run.started.

ICMRunHalted

FieldTypeDescription
RunIDstringRun identifier.
ReasonstringFree-text halt reason.
HaltedAtStagestringStage ID where the halt fired (empty for pre-stage halts).
Cancelledbooltrue when the halt was a context cancellation rather than a gate reject.
ElapsedSecondsint64Wall-clock seconds from icm.run.started.

ICMStageStarted

FieldTypeDescription
RunIDstringRun identifier.
StageIDstringStage folder name (e.g. 02_brief).
PostureNamestringDerived posture name registered for this stage (icm.<runID>.<stage_id>).
Orderint1-based stage order in the workspace.

ICMStageCompleted

FieldTypeDescription
RunIDstringRun identifier.
StageIDstringStage folder name.
ArtifactPathstringPath to the final artifact.
IterationsRunintLoop iterations executed (0 for non-looping stages).
ConvergenceFailedbooltrue when the loop exhausted without satisfying until.

ICMStageFailed

FieldTypeDescription
RunIDstringRun identifier.
StageIDstringStage folder name.
ReasonstringFree-text failure reason.

ICMStageIteration

FieldTypeDescription
RunIDstringRun identifier.
StageIDstringStage folder name.
ItemIDstringFan-out item ID (empty for non-fan-out stages).
Iterationint1-based iteration index.
MaxIterationsintloop.max_iterations.
ExitFailures[]ConditionResultPrevious iteration’s failing until predicates (empty on iteration 1).

ICMTurn

FieldTypeDescription
RunIDstringRun identifier.
StageIDstringStage folder name.
ItemIDstringFan-out item ID (empty for non-fan-out stages).
IterationintLoop iteration index (0 for non-looping stages).
Turnint1-based turn index.
MaxTurnsintturns.max.
LastFailures[]ConditionResultPrevious turn’s failing validators (drives until_valid retry).

ICMFanoutItem

FieldTypeDescription
RunIDstringRun identifier.
StageIDstringStage folder name.
ItemIDstringPer-item ID (from fan_out.item_id gojq or fallback index).
Indexint1-based item index.
TotalintTotal items in the fan-out.
Statusstring"active" | "completed" | "failed".
ErrorstringFailure reason when Status="failed".

ICMPredicateFailed

FieldTypeDescription
RunIDstringRun identifier.
StageIDstringStage folder name.
ItemIDstringFan-out item ID (empty for non-fan-out stages).
Containerstring"output.validators" | "loop.until" | "verifier".
PredicateNamestringPredicate name: (or <type>_<index> fallback).
PredicateTypestring"schema" | "regex" | "native" | "command" | "llm" | "human".
FeedbackstringPredicate-supplied failure feedback.

ConditionResult (shared by ICMStageIteration.ExitFailures and ICMTurn.LastFailures)

FieldTypeDescription
TypestringPredicate type.
NamestringPredicate name.
Verdictstring"pass" | "fail".
FeedbackstringPredicate-supplied feedback.
Score*float64Optional numeric score (LLM judges typically populate this).