@mplp/sdk-ts 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +29 -0
- package/dist/builders/confirm-builder.d.ts +4 -8
- package/dist/builders/confirm-builder.js +6 -10
- package/dist/builders/context-builder.d.ts +4 -8
- package/dist/builders/context-builder.js +6 -10
- package/dist/builders/plan-builder.d.ts +4 -8
- package/dist/builders/plan-builder.js +6 -10
- package/dist/builders/trace-builder.d.ts +4 -8
- package/dist/builders/trace-builder.js +6 -10
- package/dist/client/runtime-client.d.ts +4 -8
- package/dist/client/runtime-client.js +6 -10
- package/dist/coordination/index.d.ts +8 -0
- package/dist/coordination/index.js +11 -0
- package/dist/core/index.d.ts +28 -0
- package/dist/core/index.js +21 -0
- package/dist/core/validators/index.d.ts +12 -0
- package/dist/core/validators/index.js +22 -0
- package/dist/index.d.ts +4 -8
- package/dist/index.js +7 -11
- package/dist/runtime/index.d.ts +11 -0
- package/dist/runtime/index.js +14 -0
- package/dist/runtime-minimal/index.d.ts +52 -0
- package/dist/runtime-minimal/index.js +28 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/index.js +2 -0
- package/package.json +55 -14
- package/schemas/common/common-types.schema.json +55 -0
- package/schemas/common/events.schema.json +72 -0
- package/schemas/common/identifiers.schema.json +19 -0
- package/schemas/common/learning-sample.schema.json +200 -0
- package/schemas/common/metadata.schema.json +119 -0
- package/schemas/common/trace-base.schema.json +49 -0
- package/schemas/events/mplp-event-core.schema.json +64 -0
- package/schemas/events/mplp-graph-update-event.schema.json +64 -0
- package/schemas/events/mplp-map-event.schema.json +153 -0
- package/schemas/events/mplp-pipeline-stage-event.schema.json +62 -0
- package/schemas/events/mplp-runtime-execution-event.schema.json +64 -0
- package/schemas/events/mplp-sa-event.schema.json +115 -0
- package/schemas/integration/mplp-ci-event.schema.json +136 -0
- package/schemas/integration/mplp-file-update-event.schema.json +76 -0
- package/schemas/integration/mplp-git-event.schema.json +104 -0
- package/schemas/integration/mplp-tool-event.schema.json +89 -0
- package/schemas/invariants/integration-invariants.yaml +147 -0
- package/schemas/invariants/learning-invariants.yaml +106 -0
- package/schemas/invariants/map-invariants.yaml +73 -0
- package/schemas/invariants/observability-invariants.yaml +106 -0
- package/schemas/invariants/sa-invariants.yaml +72 -0
- package/schemas/learning/mplp-learning-sample-core.schema.json +100 -0
- package/schemas/learning/mplp-learning-sample-delta.schema.json +143 -0
- package/schemas/learning/mplp-learning-sample-intent.schema.json +125 -0
- package/schemas/mplp-collab.schema.json +249 -0
- package/schemas/mplp-confirm.schema.json +232 -0
- package/schemas/mplp-context.schema.json +252 -0
- package/schemas/mplp-core.schema.json +189 -0
- package/schemas/mplp-dialog.schema.json +204 -0
- package/schemas/mplp-extension.schema.json +185 -0
- package/schemas/mplp-network.schema.json +236 -0
- package/schemas/mplp-plan.schema.json +199 -0
- package/schemas/mplp-role.schema.json +145 -0
- package/schemas/mplp-trace.schema.json +222 -0
- package/src/builders/confirm-builder.ts +0 -44
- package/src/builders/context-builder.ts +0 -56
- package/src/builders/plan-builder.ts +0 -56
- package/src/builders/trace-builder.ts +0 -55
- package/src/client/runtime-client.ts +0 -103
- package/src/index.ts +0 -18
- package/tests/builders.test.ts +0 -80
- package/tests/client-single-agent.test.ts +0 -48
- package/tsconfig.json +0 -23
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP v1.0.0 FROZEN – © 2025 邦士(北京)网络科技有限公司 – Apache-2.0 – Governance: MPGC",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://mplp.dev/schemas/v1.0/events/mplp-map-event.schema.json",
|
|
5
|
+
"title": "MPLP MAP Event v1.0",
|
|
6
|
+
"description": "Events emitted by Multi-Agent Profile (MAP) collaboration sessions in MPLP v1.0 protocol",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"event_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "uuid",
|
|
12
|
+
"description": "Unique identifier for this event"
|
|
13
|
+
},
|
|
14
|
+
"event_type": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"MAPSessionStarted",
|
|
18
|
+
"MAPRolesAssigned",
|
|
19
|
+
"MAPTurnDispatched",
|
|
20
|
+
"MAPTurnCompleted",
|
|
21
|
+
"MAPBroadcastSent",
|
|
22
|
+
"MAPBroadcastReceived",
|
|
23
|
+
"MAPConflictDetected",
|
|
24
|
+
"MAPConflictResolved",
|
|
25
|
+
"MAPSessionCompleted"
|
|
26
|
+
],
|
|
27
|
+
"description": "Type of MAP session lifecycle event"
|
|
28
|
+
},
|
|
29
|
+
"timestamp": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"format": "date-time",
|
|
32
|
+
"description": "ISO 8601 timestamp when event occurred"
|
|
33
|
+
},
|
|
34
|
+
"session_id": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"format": "uuid",
|
|
37
|
+
"description": "Collaboration session ID (corresponds to Collab.collab_id)"
|
|
38
|
+
},
|
|
39
|
+
"initiator_role": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Role ID of the initiating agent (optional, depends on event type)"
|
|
42
|
+
},
|
|
43
|
+
"target_roles": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"description": "Array of target role IDs for this event (e.g., broadcast targets)"
|
|
49
|
+
},
|
|
50
|
+
"payload": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"description": "Event-specific data payload",
|
|
53
|
+
"additionalProperties": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": [
|
|
57
|
+
"event_id",
|
|
58
|
+
"event_type",
|
|
59
|
+
"timestamp",
|
|
60
|
+
"session_id"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"$defs": {
|
|
64
|
+
"turn_dispatched_payload": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"role_id": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"format": "uuid",
|
|
70
|
+
"description": "Role receiving execution token"
|
|
71
|
+
},
|
|
72
|
+
"turn_number": {
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"description": "Sequential turn number"
|
|
75
|
+
},
|
|
76
|
+
"token_id": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"format": "uuid",
|
|
79
|
+
"description": "Execution token identifier"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"role_id",
|
|
84
|
+
"turn_number"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"turn_completed_payload": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"role_id": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"format": "uuid",
|
|
93
|
+
"description": "Role that completed the turn"
|
|
94
|
+
},
|
|
95
|
+
"turn_number": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"description": "Sequential turn number"
|
|
98
|
+
},
|
|
99
|
+
"result": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": "Turn execution result"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"role_id",
|
|
106
|
+
"turn_number"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"broadcast_sent_payload": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"broadcaster_role_id": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Role sending broadcast"
|
|
115
|
+
},
|
|
116
|
+
"target_count": {
|
|
117
|
+
"type": "integer",
|
|
118
|
+
"description": "Number of target agents"
|
|
119
|
+
},
|
|
120
|
+
"message": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"description": "Broadcast message content"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": [
|
|
126
|
+
"broadcaster_role_id",
|
|
127
|
+
"target_count"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"broadcast_received_payload": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"properties": {
|
|
133
|
+
"receiver_role_id": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"description": "Role that received broadcast"
|
|
136
|
+
},
|
|
137
|
+
"response": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"description": "Agent response to broadcast"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"receiver_role_id"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"x-mplp-meta": {
|
|
148
|
+
"protocolVersion": "1.0.0",
|
|
149
|
+
"frozen": true,
|
|
150
|
+
"freezeDate": "2025-12-03",
|
|
151
|
+
"governance": "MPGC"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP v1.0.0 FROZEN – © 2025 邦士(北京)网络科技有限公司 – Apache-2.0 – Governance: MPGC",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://mplp.dev/schemas/v1.0/events/mplp-pipeline-stage-event.schema.json",
|
|
5
|
+
"title": "MPLP PipelineStageEvent v1.0",
|
|
6
|
+
"description": "**REQUIRED** - Pipeline stage transition events (MANDATORY for v1.0 compliance)",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "mplp-event-core.schema.json"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"event_family": {
|
|
15
|
+
"const": "pipeline_stage",
|
|
16
|
+
"description": "Must be 'pipeline_stage' for this event type"
|
|
17
|
+
},
|
|
18
|
+
"pipeline_id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "uuid",
|
|
21
|
+
"description": "Pipeline instance identifier"
|
|
22
|
+
},
|
|
23
|
+
"stage_id": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Stage identifier (e.g., 'import', 'analyze', 'execute')"
|
|
26
|
+
},
|
|
27
|
+
"stage_name": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Human-readable stage name"
|
|
30
|
+
},
|
|
31
|
+
"stage_status": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": [
|
|
34
|
+
"pending",
|
|
35
|
+
"running",
|
|
36
|
+
"completed",
|
|
37
|
+
"failed",
|
|
38
|
+
"skipped"
|
|
39
|
+
],
|
|
40
|
+
"description": "Current status of the pipeline stage"
|
|
41
|
+
},
|
|
42
|
+
"stage_order": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 0,
|
|
45
|
+
"description": "Sequential order of this stage in pipeline"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"event_family",
|
|
50
|
+
"pipeline_id",
|
|
51
|
+
"stage_id",
|
|
52
|
+
"stage_status"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"x-mplp-meta": {
|
|
57
|
+
"protocolVersion": "1.0.0",
|
|
58
|
+
"frozen": true,
|
|
59
|
+
"freezeDate": "2025-12-03",
|
|
60
|
+
"governance": "MPGC"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP v1.0.0 FROZEN – © 2025 邦士(北京)网络科技有限公司 – Apache-2.0 – Governance: MPGC",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://mplp.dev/schemas/v1.0/events/mplp-runtime-execution-event.schema.json",
|
|
5
|
+
"title": "MPLP RuntimeExecutionEvent v1.0",
|
|
6
|
+
"description": "Runtime execution lifecycle events (agents, tools, LLMs, workers)",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "mplp-event-core.schema.json"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"event_family": {
|
|
15
|
+
"const": "runtime_execution",
|
|
16
|
+
"description": "Must be 'runtime_execution' for this event type"
|
|
17
|
+
},
|
|
18
|
+
"execution_id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "uuid",
|
|
21
|
+
"description": "Execution instance identifier"
|
|
22
|
+
},
|
|
23
|
+
"executor_kind": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": [
|
|
26
|
+
"agent",
|
|
27
|
+
"tool",
|
|
28
|
+
"llm",
|
|
29
|
+
"worker",
|
|
30
|
+
"external"
|
|
31
|
+
],
|
|
32
|
+
"description": "Type of executor performing this execution"
|
|
33
|
+
},
|
|
34
|
+
"executor_role": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Role identifier (e.g., 'planner', 'reviewer', 'curl_executor')"
|
|
37
|
+
},
|
|
38
|
+
"status": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"pending",
|
|
42
|
+
"running",
|
|
43
|
+
"completed",
|
|
44
|
+
"failed",
|
|
45
|
+
"cancelled"
|
|
46
|
+
],
|
|
47
|
+
"description": "Current execution status"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [
|
|
51
|
+
"event_family",
|
|
52
|
+
"execution_id",
|
|
53
|
+
"executor_kind",
|
|
54
|
+
"status"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"x-mplp-meta": {
|
|
59
|
+
"protocolVersion": "1.0.0",
|
|
60
|
+
"frozen": true,
|
|
61
|
+
"freezeDate": "2025-12-03",
|
|
62
|
+
"governance": "MPGC"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP v1.0.0 FROZEN – © 2025 邦士(北京)网络科技有限公司 – Apache-2.0 – Governance: MPGC",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://mplp.dev/schemas/v1.0/events/mplp-sa-event.schema.json",
|
|
5
|
+
"title": "MPLP SA Event v1.0",
|
|
6
|
+
"description": "Events emitted by a Single Agent (SA) execution in MPLP v1.0 protocol",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"event_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "uuid",
|
|
12
|
+
"description": "Unique identifier for this event"
|
|
13
|
+
},
|
|
14
|
+
"event_type": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"SAInitialized",
|
|
18
|
+
"SAContextLoaded",
|
|
19
|
+
"SAPlanEvaluated",
|
|
20
|
+
"SAStepStarted",
|
|
21
|
+
"SAStepCompleted",
|
|
22
|
+
"SAStepFailed",
|
|
23
|
+
"SATraceEmitted",
|
|
24
|
+
"SACompleted"
|
|
25
|
+
],
|
|
26
|
+
"description": "Type of SA lifecycle event"
|
|
27
|
+
},
|
|
28
|
+
"timestamp": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "date-time",
|
|
31
|
+
"description": "ISO 8601 timestamp when event occurred"
|
|
32
|
+
},
|
|
33
|
+
"sa_id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "uuid",
|
|
36
|
+
"description": "Identifier of the SA instance emitting this event"
|
|
37
|
+
},
|
|
38
|
+
"context_id": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "uuid",
|
|
41
|
+
"description": "Context ID bound to this SA execution"
|
|
42
|
+
},
|
|
43
|
+
"plan_id": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"format": "uuid",
|
|
46
|
+
"description": "Plan ID being executed by this SA"
|
|
47
|
+
},
|
|
48
|
+
"trace_id": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"format": "uuid",
|
|
51
|
+
"description": "Trace ID where this event is recorded"
|
|
52
|
+
},
|
|
53
|
+
"payload": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"description": "Event-specific data payload",
|
|
56
|
+
"additionalProperties": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"event_id",
|
|
61
|
+
"event_type",
|
|
62
|
+
"timestamp",
|
|
63
|
+
"sa_id"
|
|
64
|
+
],
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"$defs": {
|
|
67
|
+
"step_started_payload": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"step_id": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"format": "uuid"
|
|
73
|
+
},
|
|
74
|
+
"agent_role": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"description": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": [
|
|
82
|
+
"step_id"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"step_completed_payload": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"step_id": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"format": "uuid"
|
|
91
|
+
},
|
|
92
|
+
"status": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"enum": [
|
|
95
|
+
"completed",
|
|
96
|
+
"failed"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"result": {
|
|
100
|
+
"type": "object"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"step_id",
|
|
105
|
+
"status"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"x-mplp-meta": {
|
|
110
|
+
"protocolVersion": "1.0.0",
|
|
111
|
+
"frozen": true,
|
|
112
|
+
"freezeDate": "2025-12-03",
|
|
113
|
+
"governance": "MPGC"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP v1.0.0 FROZEN – © 2025 邦士(北京)网络科技有限公司 – Apache-2.0 – Governance: MPGC",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://mplp.dev/schemas/v1.0/integration/mplp-ci-event.json",
|
|
5
|
+
"title": "MPLP CI Event v1.0",
|
|
6
|
+
"description": "CI pipeline execution status",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"ci_provider": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"description": "CI platform identifier",
|
|
14
|
+
"examples": [
|
|
15
|
+
"github-actions",
|
|
16
|
+
"gitlab-ci",
|
|
17
|
+
"jenkins",
|
|
18
|
+
"circleci",
|
|
19
|
+
"travis-ci"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"pipeline_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"description": "Pipeline or workflow identifier",
|
|
26
|
+
"examples": [
|
|
27
|
+
"build-and-test",
|
|
28
|
+
"deploy-production"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"run_id": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1,
|
|
34
|
+
"description": "Unique identifier for this pipeline run",
|
|
35
|
+
"examples": [
|
|
36
|
+
"123456789",
|
|
37
|
+
"run-2025-11-30-001"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"status": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": [
|
|
43
|
+
"pending",
|
|
44
|
+
"running",
|
|
45
|
+
"succeeded",
|
|
46
|
+
"failed",
|
|
47
|
+
"cancelled"
|
|
48
|
+
],
|
|
49
|
+
"description": "Current pipeline status"
|
|
50
|
+
},
|
|
51
|
+
"started_at": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"format": "date-time",
|
|
54
|
+
"description": "Pipeline start timestamp (ISO 8601)"
|
|
55
|
+
},
|
|
56
|
+
"completed_at": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"format": "date-time",
|
|
59
|
+
"description": "Pipeline completion timestamp (ISO 8601)"
|
|
60
|
+
},
|
|
61
|
+
"branch_name": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "Git branch that triggered the pipeline"
|
|
64
|
+
},
|
|
65
|
+
"commit_id": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "Commit SHA that triggered the pipeline"
|
|
68
|
+
},
|
|
69
|
+
"run_url": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"format": "uri",
|
|
72
|
+
"description": "URL to view pipeline run details"
|
|
73
|
+
},
|
|
74
|
+
"duration_ms": {
|
|
75
|
+
"type": "integer",
|
|
76
|
+
"minimum": 0,
|
|
77
|
+
"description": "Pipeline execution duration in milliseconds"
|
|
78
|
+
},
|
|
79
|
+
"stages": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"properties": {
|
|
85
|
+
"stage_name": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"status": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": [
|
|
91
|
+
"pending",
|
|
92
|
+
"running",
|
|
93
|
+
"succeeded",
|
|
94
|
+
"failed",
|
|
95
|
+
"cancelled",
|
|
96
|
+
"skipped"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"duration_ms": {
|
|
100
|
+
"type": "integer",
|
|
101
|
+
"minimum": 0
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"stage_name",
|
|
106
|
+
"status"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"description": "Pipeline stages and their statuses (optional)"
|
|
110
|
+
},
|
|
111
|
+
"trigger_kind": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"enum": [
|
|
114
|
+
"push",
|
|
115
|
+
"pull_request",
|
|
116
|
+
"schedule",
|
|
117
|
+
"manual",
|
|
118
|
+
"tag",
|
|
119
|
+
"other"
|
|
120
|
+
],
|
|
121
|
+
"description": "What triggered the pipeline"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"required": [
|
|
125
|
+
"ci_provider",
|
|
126
|
+
"pipeline_id",
|
|
127
|
+
"run_id",
|
|
128
|
+
"status"
|
|
129
|
+
],
|
|
130
|
+
"x-mplp-meta": {
|
|
131
|
+
"protocolVersion": "1.0.0",
|
|
132
|
+
"frozen": true,
|
|
133
|
+
"freezeDate": "2025-12-03",
|
|
134
|
+
"governance": "MPGC"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP v1.0.0 FROZEN – © 2025 邦士(北京)网络科技有限公司 – Apache-2.0 – Governance: MPGC",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://mplp.dev/schemas/v1.0/integration/mplp-file-update-event.json",
|
|
5
|
+
"title": "MPLP File Update Event v1.0",
|
|
6
|
+
"description": "IDE file changes (save, refactor, batch modify)",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"file_path": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"description": "Path to the file (absolute or workspace-relative)",
|
|
14
|
+
"examples": [
|
|
15
|
+
"src/components/App.tsx",
|
|
16
|
+
"/Users/dev/project/main.py"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"change_type": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": [
|
|
22
|
+
"created",
|
|
23
|
+
"modified",
|
|
24
|
+
"deleted",
|
|
25
|
+
"renamed"
|
|
26
|
+
],
|
|
27
|
+
"description": "Type of file change"
|
|
28
|
+
},
|
|
29
|
+
"workspace_root": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Workspace root directory (for resolving relative paths)"
|
|
32
|
+
},
|
|
33
|
+
"change_summary": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Brief description of changes (e.g., 'Added error handling')"
|
|
36
|
+
},
|
|
37
|
+
"timestamp": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "date-time",
|
|
40
|
+
"description": "When the change occurred (ISO 8601)"
|
|
41
|
+
},
|
|
42
|
+
"lines_added": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 0,
|
|
45
|
+
"description": "Number of lines added (if applicable)"
|
|
46
|
+
},
|
|
47
|
+
"lines_removed": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 0,
|
|
50
|
+
"description": "Number of lines removed (if applicable)"
|
|
51
|
+
},
|
|
52
|
+
"previous_path": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Previous path (for renamed files)"
|
|
55
|
+
},
|
|
56
|
+
"encoding": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "File encoding (e.g., 'utf-8')"
|
|
59
|
+
},
|
|
60
|
+
"language": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Programming language or file type (e.g., 'typescript', 'python')"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": [
|
|
66
|
+
"file_path",
|
|
67
|
+
"change_type",
|
|
68
|
+
"timestamp"
|
|
69
|
+
],
|
|
70
|
+
"x-mplp-meta": {
|
|
71
|
+
"protocolVersion": "1.0.0",
|
|
72
|
+
"frozen": true,
|
|
73
|
+
"freezeDate": "2025-12-03",
|
|
74
|
+
"governance": "MPGC"
|
|
75
|
+
}
|
|
76
|
+
}
|