@mplp/schema 1.0.0 → 1.0.2
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/README.md +11 -0
- package/dist/index.d.ts +0 -11
- package/dist/index.js +7 -11
- package/package.json +23 -4
- package/schemas/common/common-types.schema.json +49 -49
- package/schemas/common/events.schema.json +66 -66
- package/schemas/common/identifiers.schema.json +13 -13
- package/schemas/common/learning-sample.schema.json +194 -194
- package/schemas/common/metadata.schema.json +113 -113
- package/schemas/common/trace-base.schema.json +43 -43
- package/schemas/events/mplp-event-core.schema.json +58 -58
- package/schemas/events/mplp-graph-update-event.schema.json +58 -58
- package/schemas/events/mplp-map-event.schema.json +147 -147
- package/schemas/events/mplp-pipeline-stage-event.schema.json +56 -56
- package/schemas/events/mplp-runtime-execution-event.schema.json +58 -58
- package/schemas/events/mplp-sa-event.schema.json +109 -109
- package/schemas/integration/mplp-ci-event.schema.json +130 -130
- package/schemas/integration/mplp-file-update-event.schema.json +70 -70
- package/schemas/integration/mplp-git-event.schema.json +98 -98
- package/schemas/integration/mplp-tool-event.schema.json +83 -83
- package/schemas/invariants/integration-invariants.yaml +12 -8
- package/schemas/invariants/learning-invariants.yaml +12 -8
- package/schemas/invariants/map-invariants.yaml +12 -8
- package/schemas/invariants/observability-invariants.yaml +12 -8
- package/schemas/invariants/sa-invariants.yaml +12 -8
- package/schemas/learning/mplp-learning-sample-core.schema.json +94 -94
- package/schemas/learning/mplp-learning-sample-delta.schema.json +137 -137
- package/schemas/learning/mplp-learning-sample-intent.schema.json +119 -119
- package/schemas/mplp-collab.schema.json +243 -243
- package/schemas/mplp-confirm.schema.json +226 -226
- package/schemas/mplp-context.schema.json +246 -246
- package/schemas/mplp-core.schema.json +183 -183
- package/schemas/mplp-dialog.schema.json +198 -198
- package/schemas/mplp-extension.schema.json +179 -179
- package/schemas/mplp-network.schema.json +230 -230
- package/schemas/mplp-plan.schema.json +193 -193
- package/schemas/mplp-role.schema.json +139 -139
- package/schemas/mplp-trace.schema.json +216 -216
package/README.md
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MPLP Protocol v1.0.0 — Frozen Specification
|
|
3
|
-
* Freeze Date: 2025-12-03
|
|
4
|
-
* Status: FROZEN (no breaking changes permitted)
|
|
5
|
-
* Governance: MPLP Protocol Governance Committee (MPGC)
|
|
6
|
-
*
|
|
7
|
-
* © 2025 邦士(北京)网络科技有限公司. All rights reserved.
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*/
|
|
12
1
|
import Ajv from 'ajv';
|
|
13
2
|
/**
|
|
14
3
|
* Schema loader and validator for MPLP Protocol v1.0
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MPLP Protocol v1.0.0 — Frozen Specification
|
|
4
|
-
* Freeze Date: 2025-12-03
|
|
5
|
-
* Status: FROZEN (no breaking changes permitted)
|
|
6
|
-
* Governance: MPLP Protocol Governance Committee (MPGC)
|
|
7
|
-
*
|
|
8
|
-
* © 2025 邦士(北京)网络科技有限公司. All rights reserved.
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*/
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
@@ -18,6 +7,13 @@ exports.SCHEMA_NAMES = void 0;
|
|
|
18
7
|
exports.loadSchema = loadSchema;
|
|
19
8
|
exports.createValidator = createValidator;
|
|
20
9
|
exports.validate = validate;
|
|
10
|
+
/**
|
|
11
|
+
* © 2025 邦士(北京)网络科技有限公司
|
|
12
|
+
* Licensed under the Apache License, Version 2.0.
|
|
13
|
+
*
|
|
14
|
+
* This file is part of the MPLP reference implementation.
|
|
15
|
+
* It is NOT part of the frozen protocol specification.
|
|
16
|
+
*/
|
|
21
17
|
const fs_1 = require("fs");
|
|
22
18
|
const path_1 = require("path");
|
|
23
19
|
const ajv_1 = __importDefault(require("ajv"));
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
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
2
|
"name": "@mplp/schema",
|
|
4
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
5
4
|
"description": "MPLP Protocol v1.0 JSON Schemas - All protocol schema definitions",
|
|
6
5
|
"license": "Apache-2.0",
|
|
7
6
|
"repository": {
|
|
8
7
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
8
|
+
"url": "https://github.com/coregentis/MPLP-Protocol.git",
|
|
10
9
|
"directory": "packages/schema"
|
|
11
10
|
},
|
|
12
11
|
"keywords": [
|
|
@@ -14,7 +13,9 @@
|
|
|
14
13
|
"schema",
|
|
15
14
|
"json-schema",
|
|
16
15
|
"protocol",
|
|
17
|
-
"validation"
|
|
16
|
+
"validation",
|
|
17
|
+
"MPLP",
|
|
18
|
+
"multi-agent"
|
|
18
19
|
],
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"access": "public"
|
|
@@ -32,6 +33,24 @@
|
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"typescript": "^5.0.0"
|
|
34
35
|
},
|
|
36
|
+
"author": "邦士(北京)网络科技有限公司",
|
|
37
|
+
"copyright": "© 2025 邦士(北京)网络科技有限公司",
|
|
38
|
+
"mplp": {
|
|
39
|
+
"protocolVersion": "1.0.0",
|
|
40
|
+
"frozen": true,
|
|
41
|
+
"governance": "MPGC"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/coregentis/MPLP-Protocol",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/coregentis/MPLP-Protocol/issues"
|
|
46
|
+
},
|
|
47
|
+
"exports": {
|
|
48
|
+
".": {
|
|
49
|
+
"import": "./dist/index.js",
|
|
50
|
+
"types": "./dist/index.d.ts"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"sideEffects": false,
|
|
35
54
|
"scripts": {
|
|
36
55
|
"build": "tsc -p tsconfig.json"
|
|
37
56
|
}
|
|
@@ -1,49 +1,49 @@
|
|
|
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
|
-
"$id": "https://schemas.mplp.dev/v1.0/common/common-types.schema.json",
|
|
4
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"title": "MPLP Common Types",
|
|
6
|
-
"description": "Common type definitions used across MPLP modules to ensure consistency and reduce duplication.",
|
|
7
|
-
"definitions": {
|
|
8
|
-
"MplpId": {
|
|
9
|
-
"$ref": "identifiers.schema.json"
|
|
10
|
-
},
|
|
11
|
-
"Ref": {
|
|
12
|
-
"type": "object",
|
|
13
|
-
"description": "A standard reference to another MPLP object.",
|
|
14
|
-
"properties": {
|
|
15
|
-
"id": {
|
|
16
|
-
"$ref": "#/definitions/MplpId"
|
|
17
|
-
},
|
|
18
|
-
"module": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"enum": [
|
|
21
|
-
"context",
|
|
22
|
-
"plan",
|
|
23
|
-
"confirm",
|
|
24
|
-
"trace",
|
|
25
|
-
"role",
|
|
26
|
-
"extension",
|
|
27
|
-
"dialog",
|
|
28
|
-
"collab",
|
|
29
|
-
"core",
|
|
30
|
-
"network"
|
|
31
|
-
],
|
|
32
|
-
"description": "The module name of the referenced object."
|
|
33
|
-
},
|
|
34
|
-
"description": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"description": "Optional description of the reference relationship."
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"required": [
|
|
40
|
-
"id",
|
|
41
|
-
"module"
|
|
42
|
-
],
|
|
43
|
-
"additionalProperties": false
|
|
44
|
-
},
|
|
45
|
-
"BaseMeta": {
|
|
46
|
-
"$ref": "metadata.schema.json"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
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
|
+
"$id": "https://schemas.mplp.dev/v1.0/common/common-types.schema.json",
|
|
4
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
+
"title": "MPLP Common Types",
|
|
6
|
+
"description": "Common type definitions used across MPLP modules to ensure consistency and reduce duplication.",
|
|
7
|
+
"definitions": {
|
|
8
|
+
"MplpId": {
|
|
9
|
+
"$ref": "identifiers.schema.json"
|
|
10
|
+
},
|
|
11
|
+
"Ref": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "A standard reference to another MPLP object.",
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"$ref": "#/definitions/MplpId"
|
|
17
|
+
},
|
|
18
|
+
"module": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": [
|
|
21
|
+
"context",
|
|
22
|
+
"plan",
|
|
23
|
+
"confirm",
|
|
24
|
+
"trace",
|
|
25
|
+
"role",
|
|
26
|
+
"extension",
|
|
27
|
+
"dialog",
|
|
28
|
+
"collab",
|
|
29
|
+
"core",
|
|
30
|
+
"network"
|
|
31
|
+
],
|
|
32
|
+
"description": "The module name of the referenced object."
|
|
33
|
+
},
|
|
34
|
+
"description": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Optional description of the reference relationship."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"id",
|
|
41
|
+
"module"
|
|
42
|
+
],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
},
|
|
45
|
+
"BaseMeta": {
|
|
46
|
+
"$ref": "metadata.schema.json"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,66 +1,66 @@
|
|
|
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
|
-
"$id": "https://schemas.mplp.dev/v1.0/common/events.schema.json",
|
|
4
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"title": "MPLP Base Event",
|
|
6
|
-
"description": "Base model for all event structures in MPLP. Designed based on CloudEvents v1.0 core fields, providing unified event identification, type, source, and timestamp. ExecutionEvent, StateTransitionEvent, etc., are extensions of this.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"properties": {
|
|
9
|
-
"event_id": {
|
|
10
|
-
"$ref": "identifiers.schema.json",
|
|
11
|
-
"description": "Unique identifier for the event (UUID v4)."
|
|
12
|
-
},
|
|
13
|
-
"event_type": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"description": "Event type identifier, e.g., execution.started / vsl.transition.applied / plan.created. Uses dot-separated namespace format.",
|
|
16
|
-
"pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*)*$",
|
|
17
|
-
"examples": [
|
|
18
|
-
"execution.started",
|
|
19
|
-
"execution.completed",
|
|
20
|
-
"vsl.transition.applied",
|
|
21
|
-
"plan.created"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"source": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "Event source, typically a module or component identifier. Can be a module name (e.g., 'context') or component path (e.g., 'runtime.ael').",
|
|
27
|
-
"examples": [
|
|
28
|
-
"context",
|
|
29
|
-
"plan",
|
|
30
|
-
"runtime.ael",
|
|
31
|
-
"runtime.vsl"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"timestamp": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"format": "date-time",
|
|
37
|
-
"description": "Event occurrence time (ISO 8601 format).",
|
|
38
|
-
"examples": [
|
|
39
|
-
"2025-01-28T15:30:00.000Z"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
"trace_id": {
|
|
43
|
-
"description": "Optional trace ID to associate the event with a specific Trace.",
|
|
44
|
-
"$ref": "identifiers.schema.json"
|
|
45
|
-
},
|
|
46
|
-
"data": {
|
|
47
|
-
"anyOf": [
|
|
48
|
-
{
|
|
49
|
-
"type": "object",
|
|
50
|
-
"description": "Business data related to the event, constrained by upper-layer structures. Can be any JSON object or null."
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"type": "null",
|
|
54
|
-
"description": "Business data related to the event, constrained by upper-layer structures. Can be any JSON object or null."
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"required": [
|
|
60
|
-
"event_id",
|
|
61
|
-
"event_type",
|
|
62
|
-
"source",
|
|
63
|
-
"timestamp"
|
|
64
|
-
],
|
|
65
|
-
"additionalProperties": false
|
|
66
|
-
}
|
|
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
|
+
"$id": "https://schemas.mplp.dev/v1.0/common/events.schema.json",
|
|
4
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
+
"title": "MPLP Base Event",
|
|
6
|
+
"description": "Base model for all event structures in MPLP. Designed based on CloudEvents v1.0 core fields, providing unified event identification, type, source, and timestamp. ExecutionEvent, StateTransitionEvent, etc., are extensions of this.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"event_id": {
|
|
10
|
+
"$ref": "identifiers.schema.json",
|
|
11
|
+
"description": "Unique identifier for the event (UUID v4)."
|
|
12
|
+
},
|
|
13
|
+
"event_type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Event type identifier, e.g., execution.started / vsl.transition.applied / plan.created. Uses dot-separated namespace format.",
|
|
16
|
+
"pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*)*$",
|
|
17
|
+
"examples": [
|
|
18
|
+
"execution.started",
|
|
19
|
+
"execution.completed",
|
|
20
|
+
"vsl.transition.applied",
|
|
21
|
+
"plan.created"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"source": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Event source, typically a module or component identifier. Can be a module name (e.g., 'context') or component path (e.g., 'runtime.ael').",
|
|
27
|
+
"examples": [
|
|
28
|
+
"context",
|
|
29
|
+
"plan",
|
|
30
|
+
"runtime.ael",
|
|
31
|
+
"runtime.vsl"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"timestamp": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"format": "date-time",
|
|
37
|
+
"description": "Event occurrence time (ISO 8601 format).",
|
|
38
|
+
"examples": [
|
|
39
|
+
"2025-01-28T15:30:00.000Z"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"trace_id": {
|
|
43
|
+
"description": "Optional trace ID to associate the event with a specific Trace.",
|
|
44
|
+
"$ref": "identifiers.schema.json"
|
|
45
|
+
},
|
|
46
|
+
"data": {
|
|
47
|
+
"anyOf": [
|
|
48
|
+
{
|
|
49
|
+
"type": "object",
|
|
50
|
+
"description": "Business data related to the event, constrained by upper-layer structures. Can be any JSON object or null."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "null",
|
|
54
|
+
"description": "Business data related to the event, constrained by upper-layer structures. Can be any JSON object or null."
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"event_id",
|
|
61
|
+
"event_type",
|
|
62
|
+
"source",
|
|
63
|
+
"timestamp"
|
|
64
|
+
],
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
"$id": "https://schemas.mplp.dev/v1.0/common/identifiers.schema.json",
|
|
4
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"title": "MPLP Identifier",
|
|
6
|
-
"description": "Unified identifier type used for contextId/planId/traceId/eventId, etc. Uses UUID v4 standard to ensure global uniqueness and collision-free generation in distributed environments.",
|
|
7
|
-
"type": "string",
|
|
8
|
-
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
|
|
9
|
-
"examples": [
|
|
10
|
-
"123e4567-e89b-12d3-a456-426614174000",
|
|
11
|
-
"550e8400-e29b-41d4-a716-446655440000"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
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
|
+
"$id": "https://schemas.mplp.dev/v1.0/common/identifiers.schema.json",
|
|
4
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
+
"title": "MPLP Identifier",
|
|
6
|
+
"description": "Unified identifier type used for contextId/planId/traceId/eventId, etc. Uses UUID v4 standard to ensure global uniqueness and collision-free generation in distributed environments.",
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
|
|
9
|
+
"examples": [
|
|
10
|
+
"123e4567-e89b-12d3-a456-426614174000",
|
|
11
|
+
"550e8400-e29b-41d4-a716-446655440000"
|
|
12
|
+
]
|
|
13
|
+
}
|