Skip to main content

[!FROZEN] MPLP Protocol v1.0.0 Frozen Specification Freeze Date: 2025-12-03 Status: FROZEN (no breaking changes permitted) Governance: MPLP Protocol Governance Committee (MPGC) License: Apache-2.0 Note: Any normative change requires a new protocol version.

Module Event Matrix

1. Purpose

The Module Event Matrix defines which L2 Modules are responsible for emitting which Event Families. It serves as a guide for implementers to ensure complete observability coverage.

2. Emission Matrix

2.1 Module Event Family Mapping

ModulePrimary EventsSecondary EventsNotes
Contextimport_process, graph_updateintentContext initialization and state
Planpipeline_stage, graph_updatemethodology, impact_analysisPlan lifecycle and DAG changes
Trace(Consumer - stores all events)cost_budgetCentral event persistence
Rolegraph_update-Role definitions and bindings
Confirmpipeline_stage, graph_updatereasoning_graphApproval workflow events
Dialogintent, delta_intent-User interaction capture
Collabpipeline_stage, runtime_executionreasoning_graphSession lifecycle
Extensionruntime_execution, external_integration-Plugin execution
Networkgraph_updateruntime_executionTopology changes
Corepipeline_stagecost_budget, compensation_planProtocol-level events

2.2 Visual Matrix

3. Trigger Points

3.1 Context Module

TriggerEvent FamilyEvent Type
Context createdgraph_updatecontext_created
Context activatedpipeline_stagecontext_activated
World state updatedgraph_updateworld_state_updated
Project importedimport_processimport_completed

3.2 Plan Module

TriggerEvent FamilyEvent Type
Plan createdgraph_updateplan_created
Plan status changedpipeline_stageplan_status_changed
Step addedgraph_updatestep_added
Step startedpipeline_stagestep_started
Step completedpipeline_stagestep_completed
Step failedpipeline_stagestep_failed
DAG modifiedgraph_updatedag_edge_added

3.3 Confirm Module

TriggerEvent FamilyEvent Type
Confirm createdgraph_updateconfirm_created
Decision addedpipeline_stageconfirm_decision_added
Confirm resolvedpipeline_stageconfirm_resolved

3.4 Dialog Module

TriggerEvent FamilyEvent Type
Message receivedintentuser_message_received
Intent parsedintentintent_extracted
Change requesteddelta_intentmodification_requested

3.5 Collab Module

TriggerEvent FamilyEvent Type
Session startedpipeline_stagesession_started
Turn dispatchedruntime_executionturn_dispatched
Turn completedruntime_executionturn_completed
Session completedpipeline_stagesession_completed

3.6 Extension Module

TriggerEvent FamilyEvent Type
Extension registeredgraph_updateextension_registered
Extension activatedruntime_executionextension_activated
Tool invokedruntime_executiontool_execution_started
Tool completedruntime_executiontool_execution_completed
External callexternal_integrationexternal_api_call

4. Event Flow Example

4.1 Plan Execution Flow

5. Compliance Requirements

5.1 Required Emissions

Every MPLP-compliant module MUST emit:

ModuleRequired Events
Planpipeline_stage on status change, graph_update on DAG change
Contextgraph_update on state change
Confirmpipeline_stage on decision

Modules SHOULD emit for complete observability:

ModuleRecommended Events
Dialogintent on user input
Extensionruntime_execution on tool call
Corecost_budget on token usage

6. SDK Implementation

class ModuleventEmitter {
constructor(
private moduleName: string,
private eventBus: EventBus
) {}

emitGraphUpdate(operation: string, nodeType: string, nodeId: string): void {
this.eventBus.emit({
event_id: uuidv4(),
event_type: `${nodeType}_${operation}`,
event_family: 'graph_update',
timestamp: new Date().toISOString(),
payload: {
module: this.moduleName,
operation,
node_type: nodeType,
node_id: nodeId
}
});
}

emitPipelineStage(resourceType: string, resourceId: string, fromStatus: string, toStatus: string): void {
this.eventBus.emit({
event_id: uuidv4(),
event_type: `${resourceType}_status_changed`,
event_family: 'pipeline_stage',
timestamp: new Date().toISOString(),
payload: {
module: this.moduleName,
resource_type: resourceType,
resource_id: resourceId,
from_status: fromStatus,
to_status: toStatus
}
});
}
}

// Usage in Plan module
const planEmitter = new ModuleventEmitter('plan', eventBus);
planEmitter.emitGraphUpdate('create', 'plan', plan.plan_id);
planEmitter.emitPipelineStage('plan', plan.plan_id, 'draft', 'proposed');

Observability:

Modules:


Document Status: Normative (Implementation Guide)
Modules Covered: 10
Required Events: graph_update, pipeline_stage
Trigger Points Documented: 25+

2025 Bangshi Beijing Network Technology Limited Company Licensed under the Apache License, Version 2.0.