@mplp/schema 1.0.0
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/LICENSE.txt +201 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +63 -0
- package/package.json +38 -0
- package/schemas/common/common-types.schema.json +49 -0
- package/schemas/common/events.schema.json +66 -0
- package/schemas/common/identifiers.schema.json +13 -0
- package/schemas/common/learning-sample.schema.json +194 -0
- package/schemas/common/metadata.schema.json +113 -0
- package/schemas/common/trace-base.schema.json +43 -0
- package/schemas/events/mplp-event-core.schema.json +58 -0
- package/schemas/events/mplp-graph-update-event.schema.json +58 -0
- package/schemas/events/mplp-map-event.schema.json +147 -0
- package/schemas/events/mplp-pipeline-stage-event.schema.json +56 -0
- package/schemas/events/mplp-runtime-execution-event.schema.json +58 -0
- package/schemas/events/mplp-sa-event.schema.json +109 -0
- package/schemas/integration/mplp-ci-event.schema.json +130 -0
- package/schemas/integration/mplp-file-update-event.schema.json +70 -0
- package/schemas/integration/mplp-git-event.schema.json +98 -0
- package/schemas/integration/mplp-tool-event.schema.json +83 -0
- package/schemas/invariants/integration-invariants.yaml +143 -0
- package/schemas/invariants/learning-invariants.yaml +102 -0
- package/schemas/invariants/map-invariants.yaml +69 -0
- package/schemas/invariants/observability-invariants.yaml +102 -0
- package/schemas/invariants/sa-invariants.yaml +68 -0
- package/schemas/learning/mplp-learning-sample-core.schema.json +94 -0
- package/schemas/learning/mplp-learning-sample-delta.schema.json +137 -0
- package/schemas/learning/mplp-learning-sample-intent.schema.json +119 -0
- package/schemas/mplp-collab.schema.json +243 -0
- package/schemas/mplp-confirm.schema.json +226 -0
- package/schemas/mplp-context.schema.json +246 -0
- package/schemas/mplp-core.schema.json +183 -0
- package/schemas/mplp-dialog.schema.json +198 -0
- package/schemas/mplp-extension.schema.json +179 -0
- package/schemas/mplp-network.schema.json +230 -0
- package/schemas/mplp-plan.schema.json +193 -0
- package/schemas/mplp-role.schema.json +139 -0
- package/schemas/mplp-trace.schema.json +216 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP Protocol v1.0.0 — Frozen Specification\nFreeze Date: 2025-12-03\nStatus: FROZEN (no breaking changes permitted)\nGovernance: MPLP Protocol Governance Committee (MPGC)\nCopyright: © 2025 邦士(北京)网络科技有限公司\nLicense: Apache-2.0\nAny normative change requires a new protocol version.",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://schemas.mplp.dev/v1.0/mplp-context.schema.json",
|
|
5
|
+
"title": "MPLP Context Module – Core Protocol v1.0",
|
|
6
|
+
"description": "Context Module Core Protocol: Describes the context resources and their minimal required semantics (Core Profile) for a multi-agent collaboration project/session.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"meta": {
|
|
11
|
+
"$ref": "common/metadata.schema.json",
|
|
12
|
+
"description": "[PROTOCOL-CORE] MPLP protocol and schema metadata (version, source, cross-cutting tags, etc.)."
|
|
13
|
+
},
|
|
14
|
+
"governance": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "[PROTOCOL-CORE] Governance metadata for lifecycle management, truth domain authority, and locking status.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"lifecyclePhase": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Current phase in the lifecycle fence (e.g., 'design', 'implementation', 'review')."
|
|
21
|
+
},
|
|
22
|
+
"truthDomain": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The truth domain this object belongs to (e.g., 'requirements', 'architecture')."
|
|
25
|
+
},
|
|
26
|
+
"locked": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "If true, this object cannot be modified except by specific governance overrides."
|
|
29
|
+
},
|
|
30
|
+
"lastConfirmRef": {
|
|
31
|
+
"$ref": "common/common-types.schema.json#/definitions/Ref",
|
|
32
|
+
"description": "Reference to the last Confirm decision that validated this state."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
},
|
|
37
|
+
"context_id": {
|
|
38
|
+
"$ref": "common/identifiers.schema.json",
|
|
39
|
+
"description": "[PROTOCOL-CORE] Global unique identifier for the Context."
|
|
40
|
+
},
|
|
41
|
+
"root": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "[PROTOCOL-CORE] Context root node definition (business domain, environment, entry point resources, etc.).",
|
|
44
|
+
"properties": {
|
|
45
|
+
"domain": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "[PROTOCOL-CORE] Business domain identifier."
|
|
48
|
+
},
|
|
49
|
+
"environment": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "[PROTOCOL-CORE] Runtime environment identifier (e.g., development, production)."
|
|
52
|
+
},
|
|
53
|
+
"entry_point": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "[PROTOCOL-CORE] Entry point resource identifier."
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": [
|
|
59
|
+
"domain",
|
|
60
|
+
"environment"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": true
|
|
63
|
+
},
|
|
64
|
+
"title": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1,
|
|
67
|
+
"description": "[PROTOCOL-CORE] Context title, used for human and Agent identification of the project/session."
|
|
68
|
+
},
|
|
69
|
+
"summary": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "[PROTOCOL-CORE] Brief summary of the Context (background, scope, etc.)."
|
|
72
|
+
},
|
|
73
|
+
"status": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "[PROTOCOL-CORE] Current lifecycle status of the Context.",
|
|
76
|
+
"enum": [
|
|
77
|
+
"draft",
|
|
78
|
+
"active",
|
|
79
|
+
"suspended",
|
|
80
|
+
"archived",
|
|
81
|
+
"closed"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"tags": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"description": "[PROTOCOL-CORE] List of tags for classification and retrieval.",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"language": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "[PROTOCOL-CORE] Primary working language of the Context (e.g., en, zh-CN)."
|
|
95
|
+
},
|
|
96
|
+
"owner_role": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "[PROTOCOL-CORE] Identifier of the primary owner role (should correspond to role_id in Role module)."
|
|
99
|
+
},
|
|
100
|
+
"constraints": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "[PROTOCOL-CORE] Key constraints for the Context, such as security boundaries, compliance requirements, budget, or deadlines.",
|
|
103
|
+
"additionalProperties": true
|
|
104
|
+
},
|
|
105
|
+
"created_at": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"format": "date-time",
|
|
108
|
+
"description": "[PROTOCOL-CORE] Context creation time (ISO 8601)."
|
|
109
|
+
},
|
|
110
|
+
"updated_at": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"format": "date-time",
|
|
113
|
+
"description": "[PROTOCOL-CORE] Context last update time (ISO 8601)."
|
|
114
|
+
},
|
|
115
|
+
"trace": {
|
|
116
|
+
"$ref": "common/trace-base.schema.json",
|
|
117
|
+
"description": "[PROTOCOL-CORE] Main Trace reference bound to this Context (for global tracing)."
|
|
118
|
+
},
|
|
119
|
+
"events": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"description": "[PROTOCOL-CORE] List of key events directly related to this Context (creation, status change, archiving, etc.).",
|
|
122
|
+
"items": {
|
|
123
|
+
"$ref": "common/events.schema.json"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": [
|
|
128
|
+
"meta",
|
|
129
|
+
"context_id",
|
|
130
|
+
"root",
|
|
131
|
+
"title",
|
|
132
|
+
"status"
|
|
133
|
+
],
|
|
134
|
+
"$defs": {
|
|
135
|
+
"context_core_properties": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"meta": {
|
|
139
|
+
"$ref": "common/metadata.schema.json",
|
|
140
|
+
"description": "[PROTOCOL-CORE] MPLP protocol and schema metadata (version, source, cross-cutting tags, etc.)."
|
|
141
|
+
},
|
|
142
|
+
"context_id": {
|
|
143
|
+
"$ref": "common/identifiers.schema.json",
|
|
144
|
+
"description": "[PROTOCOL-CORE] Global unique identifier for the Context."
|
|
145
|
+
},
|
|
146
|
+
"root": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"description": "[PROTOCOL-CORE] Context root node definition (business domain, environment, entry point resources, etc.).",
|
|
149
|
+
"properties": {
|
|
150
|
+
"domain": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "[PROTOCOL-CORE] Business domain identifier."
|
|
153
|
+
},
|
|
154
|
+
"environment": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"description": "[PROTOCOL-CORE] Runtime environment identifier (e.g., development, production)."
|
|
157
|
+
},
|
|
158
|
+
"entry_point": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "[PROTOCOL-CORE] Entry point resource identifier."
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": [
|
|
164
|
+
"domain",
|
|
165
|
+
"environment"
|
|
166
|
+
],
|
|
167
|
+
"additionalProperties": true
|
|
168
|
+
},
|
|
169
|
+
"title": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"minLength": 1,
|
|
172
|
+
"description": "[PROTOCOL-CORE] Context title, used for human and Agent identification of the project/session."
|
|
173
|
+
},
|
|
174
|
+
"summary": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "[PROTOCOL-CORE] Brief summary of the Context (background, scope, etc.)."
|
|
177
|
+
},
|
|
178
|
+
"status": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"description": "[PROTOCOL-CORE] Current lifecycle status of the Context.",
|
|
181
|
+
"enum": [
|
|
182
|
+
"draft",
|
|
183
|
+
"active",
|
|
184
|
+
"suspended",
|
|
185
|
+
"archived",
|
|
186
|
+
"closed"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"tags": {
|
|
190
|
+
"type": "array",
|
|
191
|
+
"description": "[PROTOCOL-CORE] List of tags for classification and retrieval.",
|
|
192
|
+
"items": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"minLength": 1
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"language": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "[PROTOCOL-CORE] Primary working language of the Context (e.g., en, zh-CN)."
|
|
200
|
+
},
|
|
201
|
+
"owner_role": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"description": "[PROTOCOL-CORE] Identifier of the primary owner role (should correspond to role_id in Role module)."
|
|
204
|
+
},
|
|
205
|
+
"constraints": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"description": "[PROTOCOL-CORE] Key constraints for the Context, such as security boundaries, compliance requirements, budget, or deadlines.",
|
|
208
|
+
"additionalProperties": true
|
|
209
|
+
},
|
|
210
|
+
"created_at": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"format": "date-time",
|
|
213
|
+
"description": "[PROTOCOL-CORE] Context creation time (ISO 8601)."
|
|
214
|
+
},
|
|
215
|
+
"updated_at": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"format": "date-time",
|
|
218
|
+
"description": "[PROTOCOL-CORE] Context last update time (ISO 8601)."
|
|
219
|
+
},
|
|
220
|
+
"trace": {
|
|
221
|
+
"$ref": "common/trace-base.schema.json",
|
|
222
|
+
"description": "[PROTOCOL-CORE] Main Trace reference bound to this Context (for global tracing)."
|
|
223
|
+
},
|
|
224
|
+
"events": {
|
|
225
|
+
"type": "array",
|
|
226
|
+
"description": "[PROTOCOL-CORE] List of key events directly related to this Context (creation, status change, archiving, etc.).",
|
|
227
|
+
"items": {
|
|
228
|
+
"$ref": "common/events.schema.json"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"required": [
|
|
233
|
+
"meta",
|
|
234
|
+
"context_id",
|
|
235
|
+
"root",
|
|
236
|
+
"title",
|
|
237
|
+
"status"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"uuid": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
|
|
243
|
+
"description": "[DEPRECATED] Please use common/identifiers.schema.json. This definition is retained for backward compatibility only and is no longer recommended for reference."
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP Protocol v1.0.0 — Frozen Specification\nFreeze Date: 2025-12-03\nStatus: FROZEN (no breaking changes permitted)\nGovernance: MPLP Protocol Governance Committee (MPGC)\nCopyright: © 2025 邦士(北京)网络科技有限公司\nLicense: Apache-2.0\nAny normative change requires a new protocol version.",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://schemas.mplp.dev/v1.0/mplp-core.schema.json",
|
|
5
|
+
"title": "MPLP Core Module – Core Protocol v1.0",
|
|
6
|
+
"description": "Core Module Core Protocol: Describes the minimal required semantics (Core Profile) for an MPLP protocol instance's version, enabled modules, and overall state.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"meta": {
|
|
11
|
+
"$ref": "common/metadata.schema.json",
|
|
12
|
+
"description": "[PROTOCOL-CORE] MPLP protocol and schema metadata."
|
|
13
|
+
},
|
|
14
|
+
"governance": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "[PROTOCOL-CORE] Governance metadata for lifecycle management, truth domain authority, and locking status.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"lifecyclePhase": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Current phase in the lifecycle fence (e.g., 'design', 'implementation', 'review')."
|
|
21
|
+
},
|
|
22
|
+
"truthDomain": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The truth domain this object belongs to (e.g., 'requirements', 'architecture')."
|
|
25
|
+
},
|
|
26
|
+
"locked": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "If true, this object cannot be modified except by specific governance overrides."
|
|
29
|
+
},
|
|
30
|
+
"lastConfirmRef": {
|
|
31
|
+
"$ref": "common/common-types.schema.json#/definitions/Ref",
|
|
32
|
+
"description": "Reference to the last Confirm decision that validated this state."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
},
|
|
37
|
+
"core_id": {
|
|
38
|
+
"$ref": "common/identifiers.schema.json",
|
|
39
|
+
"description": "[PROTOCOL-CORE] Global unique identifier for the current Core instance."
|
|
40
|
+
},
|
|
41
|
+
"protocol_version": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"description": "[PROTOCOL-CORE] Major version number of the current MPLP protocol instance (e.g., 1.0.0)."
|
|
45
|
+
},
|
|
46
|
+
"status": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "[PROTOCOL-CORE] Lifecycle status of the current Core instance.",
|
|
49
|
+
"enum": [
|
|
50
|
+
"draft",
|
|
51
|
+
"active",
|
|
52
|
+
"deprecated",
|
|
53
|
+
"archived"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"modules": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"description": "[PROTOCOL-CORE] List of L2 modules enabled in the current protocol instance.",
|
|
59
|
+
"minItems": 1,
|
|
60
|
+
"items": {
|
|
61
|
+
"$ref": "#/$defs/core_module_descriptor"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"trace": {
|
|
65
|
+
"$ref": "common/trace-base.schema.json",
|
|
66
|
+
"description": "[PROTOCOL-CORE] Main Trace reference bound to this Core instance, used for auditing Core layer configuration changes."
|
|
67
|
+
},
|
|
68
|
+
"events": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"description": "[PROTOCOL-CORE] List of key events related to this Core instance (version upgrades, module enable/disable, etc.).",
|
|
71
|
+
"items": {
|
|
72
|
+
"$ref": "common/events.schema.json"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"meta",
|
|
78
|
+
"core_id",
|
|
79
|
+
"protocol_version",
|
|
80
|
+
"status",
|
|
81
|
+
"modules"
|
|
82
|
+
],
|
|
83
|
+
"$defs": {
|
|
84
|
+
"core_core_properties": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"meta": {
|
|
88
|
+
"$ref": "common/metadata.schema.json"
|
|
89
|
+
},
|
|
90
|
+
"core_id": {
|
|
91
|
+
"$ref": "common/identifiers.schema.json"
|
|
92
|
+
},
|
|
93
|
+
"protocol_version": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"minLength": 1
|
|
96
|
+
},
|
|
97
|
+
"status": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"enum": [
|
|
100
|
+
"draft",
|
|
101
|
+
"active",
|
|
102
|
+
"deprecated",
|
|
103
|
+
"archived"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"modules": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"minItems": 1,
|
|
109
|
+
"items": {
|
|
110
|
+
"$ref": "#/$defs/core_module_descriptor"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"trace": {
|
|
114
|
+
"$ref": "common/trace-base.schema.json"
|
|
115
|
+
},
|
|
116
|
+
"events": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"$ref": "common/events.schema.json"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": [
|
|
124
|
+
"meta",
|
|
125
|
+
"core_id",
|
|
126
|
+
"protocol_version",
|
|
127
|
+
"status",
|
|
128
|
+
"modules"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"core_module_descriptor": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"description": "[PROTOCOL-CORE] L2 module descriptor (used to declare which modules are enabled in the current instance).",
|
|
134
|
+
"additionalProperties": false,
|
|
135
|
+
"properties": {
|
|
136
|
+
"module_id": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"description": "[PROTOCOL-CORE] Module identifier.",
|
|
139
|
+
"enum": [
|
|
140
|
+
"context",
|
|
141
|
+
"plan",
|
|
142
|
+
"confirm",
|
|
143
|
+
"trace",
|
|
144
|
+
"role",
|
|
145
|
+
"extension",
|
|
146
|
+
"dialog",
|
|
147
|
+
"collab",
|
|
148
|
+
"core",
|
|
149
|
+
"network"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"version": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"minLength": 1,
|
|
155
|
+
"description": "[PROTOCOL-CORE] Protocol version used by this module in the current instance (SemVer recommended)."
|
|
156
|
+
},
|
|
157
|
+
"status": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "[PROTOCOL-CORE] Status of this module in the current instance.",
|
|
160
|
+
"enum": [
|
|
161
|
+
"enabled",
|
|
162
|
+
"disabled",
|
|
163
|
+
"experimental",
|
|
164
|
+
"deprecated"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"required": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"description": "[PROTOCOL-CORE] Whether this module is mandatory for the current instance."
|
|
170
|
+
},
|
|
171
|
+
"description": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"description": "[PROTOCOL-CORE] Brief description of the module, for humans and Agents."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": [
|
|
177
|
+
"module_id",
|
|
178
|
+
"version",
|
|
179
|
+
"status"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "MPLP Protocol v1.0.0 — Frozen Specification\nFreeze Date: 2025-12-03\nStatus: FROZEN (no breaking changes permitted)\nGovernance: MPLP Protocol Governance Committee (MPGC)\nCopyright: © 2025 邦士(北京)网络科技有限公司\nLicense: Apache-2.0\nAny normative change requires a new protocol version.",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$id": "https://schemas.mplp.dev/v1.0/mplp-dialog.schema.json",
|
|
5
|
+
"title": "MPLP Dialog Module – Core Protocol v1.0",
|
|
6
|
+
"description": "Dialog Module Core Protocol: Describes the dialog interaction semantics in multi-agent systems, adopting Minimal Protocol Format aligned with OpenAI/Anthropic standards.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"meta": {
|
|
11
|
+
"$ref": "common/metadata.schema.json",
|
|
12
|
+
"description": "[PROTOCOL-CORE] MPLP protocol and schema metadata."
|
|
13
|
+
},
|
|
14
|
+
"governance": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "[PROTOCOL-CORE] Governance metadata for lifecycle management, truth domain authority, and locking status.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"lifecyclePhase": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Current phase in the lifecycle fence (e.g., 'design', 'implementation', 'review')."
|
|
21
|
+
},
|
|
22
|
+
"truthDomain": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The truth domain this object belongs to (e.g., 'requirements', 'architecture')."
|
|
25
|
+
},
|
|
26
|
+
"locked": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "If true, this object cannot be modified except by specific governance overrides."
|
|
29
|
+
},
|
|
30
|
+
"lastConfirmRef": {
|
|
31
|
+
"$ref": "common/common-types.schema.json#/definitions/Ref",
|
|
32
|
+
"description": "Reference to the last Confirm decision that validated this state."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
},
|
|
37
|
+
"dialog_id": {
|
|
38
|
+
"$ref": "common/identifiers.schema.json",
|
|
39
|
+
"description": "[PROTOCOL-CORE] Global unique identifier for the Dialog."
|
|
40
|
+
},
|
|
41
|
+
"context_id": {
|
|
42
|
+
"$ref": "common/identifiers.schema.json",
|
|
43
|
+
"description": "[PROTOCOL-CORE] Associated Context ID."
|
|
44
|
+
},
|
|
45
|
+
"thread_id": {
|
|
46
|
+
"$ref": "common/identifiers.schema.json",
|
|
47
|
+
"description": "[PROTOCOL-CORE] Dialog thread ID (for multi-turn dialog grouping)."
|
|
48
|
+
},
|
|
49
|
+
"status": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "[PROTOCOL-CORE] Dialog status.",
|
|
52
|
+
"enum": [
|
|
53
|
+
"active",
|
|
54
|
+
"paused",
|
|
55
|
+
"completed",
|
|
56
|
+
"cancelled"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"messages": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"description": "[PROTOCOL-CORE] Dialog message list (Minimal Protocol Format).",
|
|
62
|
+
"items": {
|
|
63
|
+
"$ref": "#/$defs/dialog_message_core"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"started_at": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"format": "date-time",
|
|
69
|
+
"description": "[PROTOCOL-CORE] Dialog start time (ISO 8601)."
|
|
70
|
+
},
|
|
71
|
+
"ended_at": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"format": "date-time",
|
|
74
|
+
"description": "[PROTOCOL-CORE] Dialog end time (ISO 8601)."
|
|
75
|
+
},
|
|
76
|
+
"trace": {
|
|
77
|
+
"$ref": "common/trace-base.schema.json",
|
|
78
|
+
"description": "[PROTOCOL-CORE] Audit trace reference associated with this dialog."
|
|
79
|
+
},
|
|
80
|
+
"events": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"description": "[PROTOCOL-CORE] List of key events directly related to this dialog.",
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "common/events.schema.json"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"meta",
|
|
90
|
+
"dialog_id",
|
|
91
|
+
"context_id",
|
|
92
|
+
"status",
|
|
93
|
+
"messages"
|
|
94
|
+
],
|
|
95
|
+
"$defs": {
|
|
96
|
+
"dialog_core_properties": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"meta": {
|
|
100
|
+
"$ref": "common/metadata.schema.json",
|
|
101
|
+
"description": "[PROTOCOL-CORE] MPLP protocol and schema metadata."
|
|
102
|
+
},
|
|
103
|
+
"dialog_id": {
|
|
104
|
+
"$ref": "common/identifiers.schema.json",
|
|
105
|
+
"description": "[PROTOCOL-CORE] Global unique identifier for the Dialog."
|
|
106
|
+
},
|
|
107
|
+
"context_id": {
|
|
108
|
+
"$ref": "common/identifiers.schema.json",
|
|
109
|
+
"description": "[PROTOCOL-CORE] Associated Context ID."
|
|
110
|
+
},
|
|
111
|
+
"thread_id": {
|
|
112
|
+
"$ref": "common/identifiers.schema.json",
|
|
113
|
+
"description": "[PROTOCOL-CORE] Dialog thread ID (for multi-turn dialog grouping)."
|
|
114
|
+
},
|
|
115
|
+
"status": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "[PROTOCOL-CORE] Dialog status.",
|
|
118
|
+
"enum": [
|
|
119
|
+
"active",
|
|
120
|
+
"paused",
|
|
121
|
+
"completed",
|
|
122
|
+
"cancelled"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"messages": {
|
|
126
|
+
"type": "array",
|
|
127
|
+
"description": "[PROTOCOL-CORE] Dialog message list (Minimal Protocol Format).",
|
|
128
|
+
"items": {
|
|
129
|
+
"$ref": "#/$defs/dialog_message_core"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"started_at": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"format": "date-time",
|
|
135
|
+
"description": "[PROTOCOL-CORE] Dialog start time (ISO 8601)."
|
|
136
|
+
},
|
|
137
|
+
"ended_at": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"format": "date-time",
|
|
140
|
+
"description": "[PROTOCOL-CORE] Dialog end time (ISO 8601)."
|
|
141
|
+
},
|
|
142
|
+
"trace": {
|
|
143
|
+
"$ref": "common/trace-base.schema.json",
|
|
144
|
+
"description": "[PROTOCOL-CORE] Audit trace reference associated with this dialog."
|
|
145
|
+
},
|
|
146
|
+
"events": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"description": "[PROTOCOL-CORE] List of key events directly related to this dialog.",
|
|
149
|
+
"items": {
|
|
150
|
+
"$ref": "common/events.schema.json"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"meta",
|
|
156
|
+
"dialog_id",
|
|
157
|
+
"context_id",
|
|
158
|
+
"status",
|
|
159
|
+
"messages"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"dialog_message_core": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"description": "Minimal Protocol Format - Aligned with OpenAI/Anthropic standards",
|
|
165
|
+
"additionalProperties": false,
|
|
166
|
+
"properties": {
|
|
167
|
+
"role": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"description": "Message sender role.",
|
|
170
|
+
"enum": [
|
|
171
|
+
"user",
|
|
172
|
+
"assistant",
|
|
173
|
+
"system",
|
|
174
|
+
"agent"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
"content": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"description": "Message content (plain text)."
|
|
180
|
+
},
|
|
181
|
+
"timestamp": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"format": "date-time",
|
|
184
|
+
"description": "Message timestamp (ISO 8601)."
|
|
185
|
+
},
|
|
186
|
+
"event": {
|
|
187
|
+
"$ref": "common/events.schema.json",
|
|
188
|
+
"description": "Optional L1 Event reference (for deep integration with Trace module)."
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": [
|
|
192
|
+
"role",
|
|
193
|
+
"content",
|
|
194
|
+
"timestamp"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|