@principal-ai/principal-view-core 0.24.67 → 0.24.69
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.
|
@@ -26,10 +26,10 @@ class ScopesCanvasValidator {
|
|
|
26
26
|
violations.push({
|
|
27
27
|
ruleId: 'scopes-canvas-required',
|
|
28
28
|
severity: 'error',
|
|
29
|
-
file: scopesCanvasPath || '.principal-views/
|
|
29
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
30
30
|
message: 'Scopes canvas is required when library.yaml defines owned-scopes',
|
|
31
31
|
impact: 'Cannot visualize or validate instrumentation scope boundaries',
|
|
32
|
-
suggestion: `Create a scopes canvas at .principal-views/
|
|
32
|
+
suggestion: `Create a scopes canvas at .principal-views/architecture.scopes.canvas with nodes for each scope:\n` +
|
|
33
33
|
ownedScopes.map(s => ` - ${s}`).join('\n') +
|
|
34
34
|
'\n\nEach node should have pv.nodeType: "scope" and pv.otel.scope set to the scope name.',
|
|
35
35
|
});
|
|
@@ -81,7 +81,7 @@ class ScopesCanvasValidator {
|
|
|
81
81
|
violations.push({
|
|
82
82
|
ruleId: 'scopes-canvas-incomplete',
|
|
83
83
|
severity: 'error',
|
|
84
|
-
file: scopesCanvasPath || '.principal-views/
|
|
84
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
85
85
|
message: `Scopes canvas is missing ${missingScopes.length} scope(s) from library.yaml`,
|
|
86
86
|
impact: 'These scopes are not documented in the scope boundary map',
|
|
87
87
|
suggestion: `Add nodes for the following scopes:\n` +
|
|
@@ -93,7 +93,7 @@ class ScopesCanvasValidator {
|
|
|
93
93
|
violations.push({
|
|
94
94
|
ruleId: 'scopes-canvas-extra-scopes',
|
|
95
95
|
severity: 'warn',
|
|
96
|
-
file: scopesCanvasPath || '.principal-views/
|
|
96
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
97
97
|
message: `Scopes canvas contains ${extraScopes.length} scope(s) not in library.yaml owned-scopes`,
|
|
98
98
|
impact: 'These scopes may be external or need to be added to library.yaml',
|
|
99
99
|
suggestion: `Either:\n` +
|
|
@@ -108,7 +108,7 @@ class ScopesCanvasValidator {
|
|
|
108
108
|
violations.push({
|
|
109
109
|
ruleId: 'scopes-canvas-node-description',
|
|
110
110
|
severity: 'warn',
|
|
111
|
-
file: scopesCanvasPath || '.principal-views/
|
|
111
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
112
112
|
path: `nodes[${nodeId}]`,
|
|
113
113
|
message: `Scope node "${scope}" is missing a description`,
|
|
114
114
|
impact: 'Scope documentation is incomplete without a description',
|
|
@@ -120,7 +120,7 @@ class ScopesCanvasValidator {
|
|
|
120
120
|
violations.push({
|
|
121
121
|
ruleId: 'scopes-canvas-node-type',
|
|
122
122
|
severity: 'warn',
|
|
123
|
-
file: scopesCanvasPath || '.principal-views/
|
|
123
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
124
124
|
path: `nodes[${nodeId}]`,
|
|
125
125
|
message: `Scope node "${scope}" should have nodeType: "scope"`,
|
|
126
126
|
impact: 'Node may not be recognized as a scope node',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopesCanvasValidator.js","sourceRoot":"","sources":["../../src/scopes/ScopesCanvasValidator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAsEH;;GAEG;AACH,MAAa,qBAAqB;IAChC;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAsC;QACnD,MAAM,UAAU,GAA4B,EAAE,CAAC;QAC/C,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QAE1E,+BAA+B;QAC/B,MAAM,gBAAgB,GAAa,EAAE,CAAC;QACtC,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,MAAM,WAAW,GAAa,EAAE,CAAC;QAEjC,8DAA8D;QAC9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ACjC,QAAQ,EAAE,MAAM;oBAChB,IAAI,EAAE,gBAAgB,IAAI,6CAA6C;oBACvE,IAAI,EAAE,SAAS,MAAM,GAAG;oBACxB,OAAO,EAAE,eAAe,KAAK,iCAAiC;oBAC9D,MAAM,EAAE,4CAA4C;oBACpD,UAAU,EAAE,uCAAuC;iBACpD,CAAC,CAAC;aACJ;SACF;QAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;QAE9D,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;YAC1B,UAAU;YACV,QAAQ,EAAE;gBACR,gBAAgB,EAAE,WAAW,CAAC,MAAM;gBACpC,gBAAgB;gBAChB,aAAa;gBACb,WAAW;aACZ;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,uBAAuB,CAC7B,MAAsB;QAEtB,MAAM,MAAM,GAAuE,EAAE,CAAC;QAEtF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE;YACrC,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC;YACnC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBACtC,MAAM,CAAC,IAAI,CAAC;oBACV,KAAK;oBACL,MAAM,EAAE,IAAI,CAAC,EAAE;oBACf,IAAI,EAAE,IAA0B;iBACjC,CAAC,CAAC;aACJ;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AApKD,sDAoKC"}
|
package/package.json
CHANGED
|
@@ -94,10 +94,10 @@ export class ScopesCanvasValidator {
|
|
|
94
94
|
violations.push({
|
|
95
95
|
ruleId: 'scopes-canvas-required',
|
|
96
96
|
severity: 'error',
|
|
97
|
-
file: scopesCanvasPath || '.principal-views/
|
|
97
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
98
98
|
message: 'Scopes canvas is required when library.yaml defines owned-scopes',
|
|
99
99
|
impact: 'Cannot visualize or validate instrumentation scope boundaries',
|
|
100
|
-
suggestion: `Create a scopes canvas at .principal-views/
|
|
100
|
+
suggestion: `Create a scopes canvas at .principal-views/architecture.scopes.canvas with nodes for each scope:\n` +
|
|
101
101
|
ownedScopes.map(s => ` - ${s}`).join('\n') +
|
|
102
102
|
'\n\nEach node should have pv.nodeType: "scope" and pv.otel.scope set to the scope name.',
|
|
103
103
|
});
|
|
@@ -154,7 +154,7 @@ export class ScopesCanvasValidator {
|
|
|
154
154
|
violations.push({
|
|
155
155
|
ruleId: 'scopes-canvas-incomplete',
|
|
156
156
|
severity: 'error',
|
|
157
|
-
file: scopesCanvasPath || '.principal-views/
|
|
157
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
158
158
|
message: `Scopes canvas is missing ${missingScopes.length} scope(s) from library.yaml`,
|
|
159
159
|
impact: 'These scopes are not documented in the scope boundary map',
|
|
160
160
|
suggestion: `Add nodes for the following scopes:\n` +
|
|
@@ -167,7 +167,7 @@ export class ScopesCanvasValidator {
|
|
|
167
167
|
violations.push({
|
|
168
168
|
ruleId: 'scopes-canvas-extra-scopes',
|
|
169
169
|
severity: 'warn',
|
|
170
|
-
file: scopesCanvasPath || '.principal-views/
|
|
170
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
171
171
|
message: `Scopes canvas contains ${extraScopes.length} scope(s) not in library.yaml owned-scopes`,
|
|
172
172
|
impact: 'These scopes may be external or need to be added to library.yaml',
|
|
173
173
|
suggestion: `Either:\n` +
|
|
@@ -183,7 +183,7 @@ export class ScopesCanvasValidator {
|
|
|
183
183
|
violations.push({
|
|
184
184
|
ruleId: 'scopes-canvas-node-description',
|
|
185
185
|
severity: 'warn',
|
|
186
|
-
file: scopesCanvasPath || '.principal-views/
|
|
186
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
187
187
|
path: `nodes[${nodeId}]`,
|
|
188
188
|
message: `Scope node "${scope}" is missing a description`,
|
|
189
189
|
impact: 'Scope documentation is incomplete without a description',
|
|
@@ -196,7 +196,7 @@ export class ScopesCanvasValidator {
|
|
|
196
196
|
violations.push({
|
|
197
197
|
ruleId: 'scopes-canvas-node-type',
|
|
198
198
|
severity: 'warn',
|
|
199
|
-
file: scopesCanvasPath || '.principal-views/
|
|
199
|
+
file: scopesCanvasPath || '.principal-views/architecture.scopes.canvas',
|
|
200
200
|
path: `nodes[${nodeId}]`,
|
|
201
201
|
message: `Scope node "${scope}" should have nodeType: "scope"`,
|
|
202
202
|
impact: 'Node may not be recognized as a scope node',
|