@mplp/schema 1.0.4 → 1.0.6
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 +17 -0
- package/LICENSE.txt +201 -201
- package/README.md +25 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -0
- package/dist/kernel-duties.d.ts +9 -0
- package/dist/kernel-duties.js +19 -0
- package/package.json +17 -7
- 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 +115 -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 +139 -147
- package/schemas/invariants/learning-invariants.yaml +98 -106
- package/schemas/invariants/map-invariants.yaml +65 -73
- package/schemas/invariants/observability-invariants.yaml +98 -106
- package/schemas/invariants/sa-invariants.yaml +64 -72
- package/schemas/kernel-duties.json +18 -0
- 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
|
@@ -1,106 +1,98 @@
|
|
|
1
|
-
# MPLP v1.0.0 FROZEN – Invariant Set
|
|
2
|
-
# ©
|
|
3
|
-
# Governance: MPLP Protocol Governance Committee (MPGC)
|
|
4
|
-
|
|
5
|
-
# MPLP Protocol
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- id:
|
|
61
|
-
scope: learning_sample
|
|
62
|
-
path:
|
|
63
|
-
rule: non-empty-string
|
|
64
|
-
description: "
|
|
65
|
-
note: "Apply
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- id:
|
|
76
|
-
scope: learning_sample
|
|
77
|
-
path:
|
|
78
|
-
rule:
|
|
79
|
-
description: "
|
|
80
|
-
note: "Apply when sample_family ==
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
path: state.risk_level
|
|
100
|
-
rule: enum(low,medium,high,critical)
|
|
101
|
-
description: "Delta risk level must be valid enum if present"
|
|
102
|
-
note: "Apply when sample_family == delta_impact AND field exists"
|
|
103
|
-
# Note: Conditional invariants (based on sample_family) are indicated in "note" fields.
|
|
104
|
-
# If the invariant engine does not support conditional application, these should be
|
|
105
|
-
# enforced at the schema level (already done in family-specific schemas) or during
|
|
106
|
-
# runtime validation. These invariants provide an additional validation layer.
|
|
1
|
+
# MPLP v1.0.0 FROZEN – Invariant Set
|
|
2
|
+
# © 2026 Bangshi Beijing Network Technology Limited Company – Apache-2.0
|
|
3
|
+
# Governance: MPLP Protocol Governance Committee (MPGC)
|
|
4
|
+
|
|
5
|
+
# MPLP Protocol 1.0.0 — Frozen Specification
|
|
6
|
+
# Status: Frozen as of 2025-11-30
|
|
7
|
+
# Copyright: © 2026 Bangshi Beijing Network Technology Limited Company
|
|
8
|
+
# License: Apache-2.0 (see LICENSE at repository root)
|
|
9
|
+
# Any normative change requires a new protocol version.
|
|
10
|
+
|
|
11
|
+
invariants:
|
|
12
|
+
# Core LearningSample Structure Invariants
|
|
13
|
+
- id: learning_sample_id_is_uuid
|
|
14
|
+
scope: learning_sample
|
|
15
|
+
path: sample_id
|
|
16
|
+
rule: uuid-v4
|
|
17
|
+
description: "All LearningSamples must have UUID v4 sample_id"
|
|
18
|
+
|
|
19
|
+
- id: learning_sample_family_non_empty
|
|
20
|
+
scope: learning_sample
|
|
21
|
+
path: sample_family
|
|
22
|
+
rule: non-empty-string
|
|
23
|
+
description: "LearningSample must have non-empty sample_family"
|
|
24
|
+
|
|
25
|
+
- id: learning_sample_created_at_iso
|
|
26
|
+
scope: learning_sample
|
|
27
|
+
path: created_at
|
|
28
|
+
rule: iso-datetime
|
|
29
|
+
description: "LearningSample created_at must be ISO 8601 timestamp"
|
|
30
|
+
|
|
31
|
+
# Input/Output Existence (using non-empty-string on a required sub-field if possible)
|
|
32
|
+
- id: learning_sample_has_input_section
|
|
33
|
+
scope: learning_sample
|
|
34
|
+
path: input
|
|
35
|
+
rule: exists
|
|
36
|
+
description: "LearningSample must have input section"
|
|
37
|
+
|
|
38
|
+
- id: learning_sample_has_output_section
|
|
39
|
+
scope: learning_sample
|
|
40
|
+
path: output
|
|
41
|
+
rule: exists
|
|
42
|
+
description: "LearningSample must have output section"
|
|
43
|
+
|
|
44
|
+
# Meta Field Invariants (optional but validate when present)
|
|
45
|
+
- id: learning_sample_feedback_label_valid
|
|
46
|
+
scope: learning_sample
|
|
47
|
+
path: meta.human_feedback_label
|
|
48
|
+
rule: enum(approved,rejected,not_reviewed)
|
|
49
|
+
description: "If human_feedback_label present, must be valid enum"
|
|
50
|
+
note: "Apply only when meta.human_feedback_label exists"
|
|
51
|
+
|
|
52
|
+
- id: learning_sample_source_flow_non_empty
|
|
53
|
+
scope: learning_sample
|
|
54
|
+
path: meta.source_flow_id
|
|
55
|
+
rule: non-empty-string
|
|
56
|
+
description: "If source_flow_id present, must be non-empty"
|
|
57
|
+
note: "Apply only when meta.source_flow_id exists"
|
|
58
|
+
|
|
59
|
+
# Intent Resolution Family Invariants
|
|
60
|
+
- id: learning_intent_has_intent_id
|
|
61
|
+
scope: learning_sample
|
|
62
|
+
path: input.intent_id
|
|
63
|
+
rule: non-empty-string
|
|
64
|
+
description: "Intent resolution samples must have intent_id in input"
|
|
65
|
+
note: "Apply when sample_family == intent_resolution"
|
|
66
|
+
|
|
67
|
+
- id: learning_intent_quality_label_valid
|
|
68
|
+
scope: learning_sample
|
|
69
|
+
path: output.resolution_quality_label
|
|
70
|
+
rule: enum(good,acceptable,bad,unknown)
|
|
71
|
+
description: "Intent resolution quality label must be valid enum if present"
|
|
72
|
+
note: "Apply when sample_family == intent_resolution AND field exists"
|
|
73
|
+
|
|
74
|
+
# Delta Impact Family Invariants
|
|
75
|
+
- id: learning_delta_has_delta_id
|
|
76
|
+
scope: learning_sample
|
|
77
|
+
path: input.delta_id
|
|
78
|
+
rule: non-empty-string
|
|
79
|
+
description: "Delta impact samples must have delta_id in input"
|
|
80
|
+
note: "Apply when sample_family == delta_impact"
|
|
81
|
+
|
|
82
|
+
- id: learning_delta_scope_valid
|
|
83
|
+
scope: learning_sample
|
|
84
|
+
path: output.impact_scope
|
|
85
|
+
rule: enum(local,module,system,global)
|
|
86
|
+
description: "Delta impact scope must be valid enum"
|
|
87
|
+
note: "Apply when sample_family == delta_impact"
|
|
88
|
+
|
|
89
|
+
- id: learning_delta_risk_valid
|
|
90
|
+
scope: learning_sample
|
|
91
|
+
path: state.risk_level
|
|
92
|
+
rule: enum(low,medium,high,critical)
|
|
93
|
+
description: "Delta risk level must be valid enum if present"
|
|
94
|
+
note: "Apply when sample_family == delta_impact AND field exists"
|
|
95
|
+
# Note: Conditional invariants (based on sample_family) are indicated in "note" fields.
|
|
96
|
+
# If the invariant engine does not support conditional application, these should be
|
|
97
|
+
# enforced at the schema level (already done in family-specific schemas) or during
|
|
98
|
+
# runtime validation. These invariants provide an additional validation layer.
|
|
@@ -1,73 +1,65 @@
|
|
|
1
|
-
# MPLP v1.0.0 FROZEN – Invariant Set
|
|
2
|
-
# ©
|
|
3
|
-
# Governance: MPLP Protocol Governance Committee (MPGC)
|
|
4
|
-
|
|
5
|
-
# MPLP Protocol
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
description: "
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
rule: non-empty-string
|
|
67
|
-
description: "All participant_id values must be non-empty strings"
|
|
68
|
-
|
|
69
|
-
- id: map_participant_kind_valid
|
|
70
|
-
scope: collab
|
|
71
|
-
path: participants[*].kind
|
|
72
|
-
rule: enum(agent,human,system,external)
|
|
73
|
-
description: "Participant kind must be valid enum value"
|
|
1
|
+
# MPLP v1.0.0 FROZEN – Invariant Set
|
|
2
|
+
# © 2026 Bangshi Beijing Network Technology Limited Company – Apache-2.0
|
|
3
|
+
# Governance: MPLP Protocol Governance Committee (MPGC)
|
|
4
|
+
|
|
5
|
+
# MPLP Protocol 1.0.0 — Frozen Specification
|
|
6
|
+
# Status: Frozen as of 2025-11-30
|
|
7
|
+
# Copyright: © 2026 Bangshi Beijing Network Technology Limited Company
|
|
8
|
+
# License: Apache-2.0 (see LICENSE at repository root)
|
|
9
|
+
# Any normative change requires a new protocol version.
|
|
10
|
+
|
|
11
|
+
invariants:
|
|
12
|
+
# Session structure invariants
|
|
13
|
+
- id: map_session_requires_multiple_participants
|
|
14
|
+
scope: collab
|
|
15
|
+
path: participants
|
|
16
|
+
rule: min-length(2)
|
|
17
|
+
description: "MAP sessions require at least 2 participants for multi-agent collaboration"
|
|
18
|
+
|
|
19
|
+
- id: map_collab_mode_valid
|
|
20
|
+
scope: collab
|
|
21
|
+
path: mode
|
|
22
|
+
rule: enum(broadcast,round_robin,orchestrated,swarm,pair)
|
|
23
|
+
description: "Collab.mode must be valid collaboration pattern"
|
|
24
|
+
|
|
25
|
+
- id: map_session_id_is_uuid
|
|
26
|
+
scope: collab
|
|
27
|
+
path: collab_id
|
|
28
|
+
rule: uuid-v4
|
|
29
|
+
description: "Session ID (collab_id) must be valid UUID v4"
|
|
30
|
+
|
|
31
|
+
- id: map_participants_have_role_ids
|
|
32
|
+
scope: collab
|
|
33
|
+
path: participants[*].role_id
|
|
34
|
+
rule: non-empty-string
|
|
35
|
+
description: "All participants must have valid role_id binding"
|
|
36
|
+
|
|
37
|
+
# Event consistency invariants (descriptive, not all auto-enforceable)
|
|
38
|
+
- id: map_turn_completion_matches_dispatch
|
|
39
|
+
scope: trace
|
|
40
|
+
description: "Every MAPTurnDispatched event should have a corresponding MAPTurnCompleted event for the same session_id and role_id"
|
|
41
|
+
note: "This is a higher-level invariant that requires trace event analysis. Mark as manual check or implement custom rule."
|
|
42
|
+
|
|
43
|
+
- id: map_broadcast_has_receivers
|
|
44
|
+
scope: trace
|
|
45
|
+
description: "If MAPBroadcastSent exists, at least one MAPBroadcastReceived must exist for the same session_id"
|
|
46
|
+
note: "Requires cross-event validation. Can be checked via trace event count."
|
|
47
|
+
|
|
48
|
+
# Role binding invariants
|
|
49
|
+
- id: map_role_ids_are_uuids
|
|
50
|
+
scope: collab
|
|
51
|
+
path: participants[*].role_id
|
|
52
|
+
rule: uuid-v4
|
|
53
|
+
description: "All role_id values must be valid UUID v4 format"
|
|
54
|
+
|
|
55
|
+
- id: map_participant_ids_are_non_empty
|
|
56
|
+
scope: collab
|
|
57
|
+
path: participants[*].participant_id
|
|
58
|
+
rule: non-empty-string
|
|
59
|
+
description: "All participant_id values must be non-empty strings"
|
|
60
|
+
|
|
61
|
+
- id: map_participant_kind_valid
|
|
62
|
+
scope: collab
|
|
63
|
+
path: participants[*].kind
|
|
64
|
+
rule: enum(agent,human,system,external)
|
|
65
|
+
description: "Participant kind must be valid enum value"
|
|
@@ -1,106 +1,98 @@
|
|
|
1
|
-
# MPLP v1.0.0 FROZEN – Invariant Set
|
|
2
|
-
# ©
|
|
3
|
-
# Governance: MPLP Protocol Governance Committee (MPGC)
|
|
4
|
-
|
|
5
|
-
# MPLP Protocol
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- id:
|
|
61
|
-
scope: event
|
|
62
|
-
path:
|
|
63
|
-
rule:
|
|
64
|
-
description: "
|
|
65
|
-
note: "Apply when event_family ==
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- id:
|
|
76
|
-
scope: event
|
|
77
|
-
path:
|
|
78
|
-
rule:
|
|
79
|
-
description: "
|
|
80
|
-
note: "Apply when event_family ==
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
path: status
|
|
100
|
-
rule: enum(pending,running,completed,failed,cancelled)
|
|
101
|
-
description: "RuntimeExecutionEvent status must be valid enum"
|
|
102
|
-
note: "Apply when event_family == runtime_execution"
|
|
103
|
-
# Note: The "note" fields indicate conditional application based on event_family.
|
|
104
|
-
# If the invariant engine does not support conditional rules, these should be
|
|
105
|
-
# validated at the schema level (which is already done in the event schemas).
|
|
106
|
-
# These invariants provide additional layer of validation for runtime enforcement.
|
|
1
|
+
# MPLP v1.0.0 FROZEN – Invariant Set
|
|
2
|
+
# © 2026 Bangshi Beijing Network Technology Limited Company – Apache-2.0
|
|
3
|
+
# Governance: MPLP Protocol Governance Committee (MPGC)
|
|
4
|
+
|
|
5
|
+
# MPLP Protocol 1.0.0 — Frozen Specification
|
|
6
|
+
# Status: Frozen as of 2025-11-30
|
|
7
|
+
# Copyright: © 2026 Bangshi Beijing Network Technology Limited Company
|
|
8
|
+
# License: Apache-2.0 (see LICENSE at repository root)
|
|
9
|
+
# Any normative change requires a new protocol version.
|
|
10
|
+
|
|
11
|
+
invariants:
|
|
12
|
+
# Core Event Structure Invariants
|
|
13
|
+
- id: obs_event_id_is_uuid
|
|
14
|
+
scope: event
|
|
15
|
+
path: event_id
|
|
16
|
+
rule: uuid-v4
|
|
17
|
+
description: "All events must have UUID v4 event_id"
|
|
18
|
+
|
|
19
|
+
- id: obs_event_type_non_empty
|
|
20
|
+
scope: event
|
|
21
|
+
path: event_type
|
|
22
|
+
rule: non-empty-string
|
|
23
|
+
description: "All events must have non-empty event_type"
|
|
24
|
+
|
|
25
|
+
- id: obs_event_family_valid
|
|
26
|
+
scope: event
|
|
27
|
+
path: event_family
|
|
28
|
+
rule: enum(import_process,intent,delta_intent,impact_analysis,compensation_plan,methodology,reasoning_graph,pipeline_stage,graph_update,runtime_execution,cost_budget,external_integration)
|
|
29
|
+
description: "Event family must be valid enum value"
|
|
30
|
+
|
|
31
|
+
- id: obs_timestamp_iso_format
|
|
32
|
+
scope: event
|
|
33
|
+
path: timestamp
|
|
34
|
+
rule: iso-datetime
|
|
35
|
+
description: "All events must have ISO 8601 timestamp"
|
|
36
|
+
|
|
37
|
+
# PipelineStageEvent Specific Invariants
|
|
38
|
+
- id: obs_pipeline_event_has_pipeline_id
|
|
39
|
+
scope: event
|
|
40
|
+
path: pipeline_id
|
|
41
|
+
rule: uuid-v4
|
|
42
|
+
description: "PipelineStageEvent must have valid pipeline_id"
|
|
43
|
+
note: "Apply when event_family == pipeline_stage"
|
|
44
|
+
|
|
45
|
+
- id: obs_pipeline_stage_id_non_empty
|
|
46
|
+
scope: event
|
|
47
|
+
path: stage_id
|
|
48
|
+
rule: non-empty-string
|
|
49
|
+
description: "PipelineStageEvent must have non-empty stage_id"
|
|
50
|
+
note: "Apply when event_family == pipeline_stage"
|
|
51
|
+
|
|
52
|
+
- id: obs_pipeline_stage_status_valid
|
|
53
|
+
scope: event
|
|
54
|
+
path: stage_status
|
|
55
|
+
rule: enum(pending,running,completed,failed,skipped)
|
|
56
|
+
description: "PipelineStageEvent stage_status must be valid enum"
|
|
57
|
+
note: "Apply when event_family == pipeline_stage"
|
|
58
|
+
|
|
59
|
+
# GraphUpdateEvent Specific Invariants
|
|
60
|
+
- id: obs_graph_event_has_graph_id
|
|
61
|
+
scope: event
|
|
62
|
+
path: graph_id
|
|
63
|
+
rule: uuid-v4
|
|
64
|
+
description: "GraphUpdateEvent must have valid graph_id"
|
|
65
|
+
note: "Apply when event_family == graph_update"
|
|
66
|
+
|
|
67
|
+
- id: obs_graph_update_kind_valid
|
|
68
|
+
scope: event
|
|
69
|
+
path: update_kind
|
|
70
|
+
rule: enum(node_add,node_update,node_delete,edge_add,edge_update,edge_delete,bulk)
|
|
71
|
+
description: "GraphUpdateEvent update_kind must be valid enum"
|
|
72
|
+
note: "Apply when event_family == graph_update"
|
|
73
|
+
|
|
74
|
+
# RuntimeExecutionEvent Specific Invariants
|
|
75
|
+
- id: obs_runtime_event_has_execution_id
|
|
76
|
+
scope: event
|
|
77
|
+
path: execution_id
|
|
78
|
+
rule: uuid-v4
|
|
79
|
+
description: "RuntimeExecutionEvent must have valid execution_id"
|
|
80
|
+
note: "Apply when event_family == runtime_execution"
|
|
81
|
+
|
|
82
|
+
- id: obs_runtime_executor_kind_valid
|
|
83
|
+
scope: event
|
|
84
|
+
path: executor_kind
|
|
85
|
+
rule: enum(agent,tool,llm,worker,external)
|
|
86
|
+
description: "RuntimeExecutionEvent executor_kind must be valid enum"
|
|
87
|
+
note: "Apply when event_family == runtime_execution"
|
|
88
|
+
|
|
89
|
+
- id: obs_runtime_status_valid
|
|
90
|
+
scope: event
|
|
91
|
+
path: status
|
|
92
|
+
rule: enum(pending,running,completed,failed,cancelled)
|
|
93
|
+
description: "RuntimeExecutionEvent status must be valid enum"
|
|
94
|
+
note: "Apply when event_family == runtime_execution"
|
|
95
|
+
# Note: The "note" fields indicate conditional application based on event_family.
|
|
96
|
+
# If the invariant engine does not support conditional rules, these should be
|
|
97
|
+
# validated at the schema level (which is already done in the event schemas).
|
|
98
|
+
# These invariants provide additional layer of validation for runtime enforcement.
|