@polydeukes/core 0.3.0 → 0.5.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.
@@ -19,7 +19,7 @@
19
19
  "protectedPaths": {
20
20
  "description": "Raw protected path patterns — normalization happens at resolve time.",
21
21
  "type": "array",
22
- "items": { "type": "string" }
22
+ "items": { "type": "string", "minLength": 1 }
23
23
  },
24
24
  "adapters": {
25
25
  "description": "Adapter namespaces — keys are adapter names, values are each adapter's own settings object (contents not validated by the core schema).",
@@ -64,8 +64,10 @@
64
64
  "additionalProperties": false,
65
65
  "properties": {
66
66
  "logPath": {
67
- "description": "Telemetry log path. Defaults to .polydeukes/roi.log when omitted.",
68
- "type": "string"
67
+ "description": "Telemetry log path. Defaults to .polydeukes/roi.log when omitted. Must be non-empty after trimming.",
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "pattern": "\\S"
69
71
  }
70
72
  }
71
73
  },
@@ -89,14 +91,19 @@
89
91
  }
90
92
  },
91
93
  "disciplineId": {
92
- "description": "Unique handle — telemetry label and verdict reason prefix.",
94
+ "description": "Unique handle — telemetry label and verdict reason prefix. The three meta-covenant labels are reserved.",
93
95
  "type": "string",
94
- "minLength": 1
96
+ "minLength": 1,
97
+ "not": { "enum": ["self-mod", "shell-mod", "transcript-mod"] }
95
98
  },
96
99
  "disciplineWhy": {
97
- "description": "Prose rationale, documentation only never judged.",
100
+ "description": "Prose rationale — never judged, and carried into the break message.",
98
101
  "type": "string"
99
102
  },
103
+ "enforceLevel": {
104
+ "description": "The entry's own level. 'advise' records a break without stopping it; 'block' pins the entry at block. Composes with the surface's level, the lenient side winning; absent means advise; 'block' is the promotion rung.",
105
+ "enum": ["block", "advise"]
106
+ },
100
107
  "globOrGlobs": {
101
108
  "anyOf": [
102
109
  { "type": "string", "minLength": 1 },
@@ -122,8 +129,25 @@
122
129
  }
123
130
  },
124
131
  "discipline": {
125
- "description": "One discipline entry — exactly one predicate family (forbid | immutable | forbidCommand | requirePrecedent); in/except scope the forbid and requirePrecedent families, and when scopes requirePrecedent only.",
132
+ "description": "One discipline entry — exactly one predicate family (forbid | immutable | forbidCommand | requirePrecedent), or a draft (id + why + draft: true, no predicate); in/except scope the forbid and requirePrecedent families, and when scopes requirePrecedent only.",
126
133
  "oneOf": [
134
+ {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["id", "why", "draft"],
138
+ "properties": {
139
+ "id": { "$ref": "#/$defs/disciplineId" },
140
+ "why": {
141
+ "description": "A draft's only body is its prose, so why is required and non-empty here.",
142
+ "type": "string",
143
+ "minLength": 1
144
+ },
145
+ "draft": {
146
+ "description": "Marks an unpromoted entry — declared as prose, never judged, never recorded. Only the literal true exists; false would be dead data synonymous with absence.",
147
+ "const": true
148
+ }
149
+ }
150
+ },
127
151
  {
128
152
  "type": "object",
129
153
  "additionalProperties": false,
@@ -131,18 +155,19 @@
131
155
  "properties": {
132
156
  "id": { "$ref": "#/$defs/disciplineId" },
133
157
  "why": { "$ref": "#/$defs/disciplineWhy" },
158
+ "enforce": { "$ref": "#/$defs/enforceLevel" },
134
159
  "in": { "$ref": "#/$defs/globOrGlobs" },
135
160
  "except": { "$ref": "#/$defs/globOrGlobs" },
136
161
  "forbid": {
137
162
  "description": "Delta family — string shorthand is equivalent to { added }.",
138
163
  "anyOf": [
139
- { "type": "string", "format": "regex" },
164
+ { "type": "string", "minLength": 1, "format": "regex" },
140
165
  {
141
166
  "type": "object",
142
167
  "additionalProperties": false,
143
168
  "required": ["added"],
144
169
  "properties": {
145
- "added": { "type": "string", "format": "regex" }
170
+ "added": { "type": "string", "minLength": 1, "format": "regex" }
146
171
  }
147
172
  }
148
173
  ]
@@ -156,6 +181,7 @@
156
181
  "properties": {
157
182
  "id": { "$ref": "#/$defs/disciplineId" },
158
183
  "why": { "$ref": "#/$defs/disciplineWhy" },
184
+ "enforce": { "$ref": "#/$defs/enforceLevel" },
159
185
  "immutable": {
160
186
  "description": "Path family — its own glob is the scope.",
161
187
  "$ref": "#/$defs/globOrGlobs"
@@ -169,9 +195,11 @@
169
195
  "properties": {
170
196
  "id": { "$ref": "#/$defs/disciplineId" },
171
197
  "why": { "$ref": "#/$defs/disciplineWhy" },
198
+ "enforce": { "$ref": "#/$defs/enforceLevel" },
172
199
  "forbidCommand": {
173
200
  "description": "Command family — regex over shell command strings.",
174
201
  "type": "string",
202
+ "minLength": 1,
175
203
  "format": "regex"
176
204
  }
177
205
  }
@@ -183,6 +211,7 @@
183
211
  "properties": {
184
212
  "id": { "$ref": "#/$defs/disciplineId" },
185
213
  "why": { "$ref": "#/$defs/disciplineWhy" },
214
+ "enforce": { "$ref": "#/$defs/enforceLevel" },
186
215
  "in": { "$ref": "#/$defs/globOrGlobs" },
187
216
  "except": { "$ref": "#/$defs/globOrGlobs" },
188
217
  "when": {