@principal-ai/subsystems-core 0.32.0 → 0.33.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/dist/types/subsystem-model.d.ts +12 -14
- package/dist/types/subsystem-model.d.ts.map +1 -1
- package/dist/types/subsystem-model.js +1 -0
- package/dist/types/subsystem-model.js.map +1 -1
- package/package.json +1 -1
- package/schemas/subsystem-model.schema.json +10 -63
- package/src/types/subsystem-model.ts +10 -18
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Ontology: construct = what a node is, framework + stereotype = which
|
|
15
15
|
* framework pattern it plays, role = where it sits, process = where it runs,
|
|
16
|
+
* module = which source file/module the export belongs to,
|
|
16
17
|
* proposed = not yet in source (design / migration placeholder).
|
|
17
18
|
* `symbol` is the code identity; `name` is the display label.
|
|
18
19
|
*/
|
|
@@ -44,7 +45,7 @@ export type SubsystemStereotype = string;
|
|
|
44
45
|
* Topology relation type — structural / module / type claims between
|
|
45
46
|
* components. Belongs on `relations[]`, not on walkthrough hops.
|
|
46
47
|
*/
|
|
47
|
-
export type SubsystemRelationType = 'imports' | '
|
|
48
|
+
export type SubsystemRelationType = 'imports' | 'extends' | 'inherits' | 'implements' | 'mixes_in' | 'method' | 'references' | 'contains';
|
|
48
49
|
/**
|
|
49
50
|
* Walkthrough hop mechanism — runtime seams with a `file:line` site.
|
|
50
51
|
* Belongs on walkthrough steps; graph edges for these are derived.
|
|
@@ -104,12 +105,6 @@ export interface SubsystemReferenceInfo {
|
|
|
104
105
|
context?: string;
|
|
105
106
|
source_location?: string;
|
|
106
107
|
}
|
|
107
|
-
export interface SubsystemImportInfo {
|
|
108
|
-
nodeId: string;
|
|
109
|
-
name: string;
|
|
110
|
-
relation?: string;
|
|
111
|
-
source_location?: string;
|
|
112
|
-
}
|
|
113
108
|
export interface SubsystemClassDeclaration {
|
|
114
109
|
kind: 'class';
|
|
115
110
|
methods: SubsystemMethodInfo[];
|
|
@@ -174,12 +169,6 @@ export interface SubsystemTypeDeclaration {
|
|
|
174
169
|
*/
|
|
175
170
|
rhs?: string;
|
|
176
171
|
}
|
|
177
|
-
export interface SubsystemModuleDeclaration {
|
|
178
|
-
kind: 'module';
|
|
179
|
-
exports: string[];
|
|
180
|
-
imports: SubsystemImportInfo[];
|
|
181
|
-
symbols: string[];
|
|
182
|
-
}
|
|
183
172
|
export interface SubsystemExternalDeclaration {
|
|
184
173
|
kind: 'external';
|
|
185
174
|
label: string;
|
|
@@ -208,7 +197,7 @@ export interface SubsystemCustomEntityDeclaration {
|
|
|
208
197
|
attributes: SubsystemCustomEntityAttribute[];
|
|
209
198
|
}
|
|
210
199
|
/** Structured declaration shape of a construct. */
|
|
211
|
-
export type SubsystemConstructDeclaration = SubsystemClassDeclaration | SubsystemFunctionDeclaration | SubsystemMethodDeclaration | SubsystemTypeDeclaration |
|
|
200
|
+
export type SubsystemConstructDeclaration = SubsystemClassDeclaration | SubsystemFunctionDeclaration | SubsystemMethodDeclaration | SubsystemTypeDeclaration | SubsystemExternalDeclaration | SubsystemStoreDeclaration | SubsystemCustomEntityDeclaration;
|
|
212
201
|
/** A component node — the named unit, construct-tagged. */
|
|
213
202
|
export interface SubsystemComponent {
|
|
214
203
|
id: string;
|
|
@@ -239,6 +228,15 @@ export interface SubsystemComponent {
|
|
|
239
228
|
*/
|
|
240
229
|
stereotype?: SubsystemStereotype;
|
|
241
230
|
process?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Source-module membership — which file/module this export belongs to
|
|
233
|
+
* (e.g. `src/session/transcript.ts`). Nodes sharing a `module` are drawn
|
|
234
|
+
* inside one boundary frame. Prefer this over inventing a module construct:
|
|
235
|
+
* anchor each export as its real construct (`function` / `class` / …) and
|
|
236
|
+
* set `module` so the file reads as a frame, not a node. Orthogonal to
|
|
237
|
+
* `process` (runtime deployment unit).
|
|
238
|
+
*/
|
|
239
|
+
module?: string;
|
|
242
240
|
/** Code identity — real declaration in `file` when set. */
|
|
243
241
|
symbol?: string;
|
|
244
242
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subsystem-model.d.ts","sourceRoot":"","sources":["../../src/types/subsystem-model.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"subsystem-model.d.ts","sourceRoot":"","sources":["../../src/types/subsystem-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;0CAE0C;AAC1C,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,UAAU,GACV,QAAQ,GACR,WAAW,GACX,YAAY,GACZ,MAAM,GACN,OAAO,GACP,UAAU,GACV,eAAe,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,SAAS,GACT,UAAU,GACV,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,UAAU,CAAC;AAEf;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GACrC,OAAO,GACP,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,OAAO,GACP,SAAS,GACT,gBAAgB,CAAC;AAErB;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAC9B,qBAAqB,GACrB,6BAA6B,CAAC;AAElC,MAAM,MAAM,8BAA8B,GAAG,UAAU,GAAG,UAAU,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAC9B,SAAS,GACT,MAAM,GACN,QAAQ,GACR,MAAM,GACN,aAAa,GACb,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,kBAAkB;IACjC,IAAI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S,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,sBAAsB,CAYxF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,sBAAsB,GAC1B,sBAAsB,CAUxB;AAED,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,sBAAsB,GAChC,MAAM,CAER;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE;IACpC,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACvC,GAAG,sBAAsB,EAAE,CA4B3B"}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Ontology: construct = what a node is, framework + stereotype = which
|
|
16
16
|
* framework pattern it plays, role = where it sits, process = where it runs,
|
|
17
|
+
* module = which source file/module the export belongs to,
|
|
17
18
|
* proposed = not yet in source (design / migration placeholder).
|
|
18
19
|
* `symbol` is the code identity; `name` is the display label.
|
|
19
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subsystem-model.js","sourceRoot":"","sources":["../../src/types/subsystem-model.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"subsystem-model.js","sourceRoot":"","sources":["../../src/types/subsystem-model.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AA4aH;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,KAAc;IACrD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,CAAC,GA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AE;YACjB,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE;gBACX,EAAE;gBACF,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,EAAE,EAAE,CAAC,CAAC,EAAE;gBACR,SAAS,EAAE,CAAC,CAAC,YAAY;gBACzB,IAAI,EAAE,CAAC,CAAC,IAAI;aACb,CAAC,CAAC;SACJ;KACF;IACD,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,YAAY,IAAI,EAAE,EAAE;QACtC,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE;YAC1B,MAAM,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAClE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;gBACjB,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE;oBACX,EAAE;oBACF,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,EAAE,EAAE,IAAI,CAAC,EAAE;oBACX,SAAS,EAAE,IAAI,CAAC,SAAS;iBAC1B,CAAC,CAAC;aACJ;SACF;KACF;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AAC5B,CAAC;AA/BD,4CA+BC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://principal-ai.dev/schemas/subsystem-model.schema.json",
|
|
4
4
|
"title": "Subsystem Model",
|
|
5
|
-
"description": "Portable subsystem model — the shareable standard. Construct-tagged components (nodes) plus topology relations and/or runtime walkthroughs describing one subsystem of a codebase. Ontology: construct = what a node is, framework + stereotype = which framework pattern it plays, role = where it sits, process = where it runs. Symbol is the code identity; name is the display label (often derived from symbol). Host-only fields (local path binding, provenance, store ids, verification) are NOT part of this document; they belong on a hydrated envelope around it.",
|
|
5
|
+
"description": "Portable subsystem model — the shareable standard. Construct-tagged components (nodes) plus topology relations and/or runtime walkthroughs describing one subsystem of a codebase. Ontology: construct = what a node is, framework + stereotype = which framework pattern it plays, role = where it sits, process = where it runs, module = which source file/module the export belongs to. Symbol is the code identity; name is the display label (often derived from symbol). Host-only fields (local path binding, provenance, store ids, verification) are NOT part of this document; they belong on a hydrated envelope around it.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": [
|
|
8
8
|
"title",
|
|
@@ -97,9 +97,6 @@
|
|
|
97
97
|
"description": "Topology relation type — structural / module / type claim between components.",
|
|
98
98
|
"enum": [
|
|
99
99
|
"imports",
|
|
100
|
-
"imports_from",
|
|
101
|
-
"re_exports",
|
|
102
|
-
"defines",
|
|
103
100
|
"extends",
|
|
104
101
|
"inherits",
|
|
105
102
|
"implements",
|
|
@@ -188,6 +185,10 @@
|
|
|
188
185
|
"type": "string",
|
|
189
186
|
"description": "Runtime process / deployment unit membership (e.g. `principal-studio/host`). Nodes sharing a process are drawn in one boundary region; nodes without one sit outside every boundary."
|
|
190
187
|
},
|
|
188
|
+
"module": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"description": "Source-module membership — which file/module this export belongs to (e.g. `src/session/transcript.ts`). Nodes sharing a module are drawn in one boundary frame. Prefer anchoring each export as its real construct and setting module, rather than a module construct."
|
|
191
|
+
},
|
|
191
192
|
"layer": {
|
|
192
193
|
"type": "integer",
|
|
193
194
|
"description": "Semantic layout layer/phase (lower = closer to entry). When set, layout places the component in this layer for a left-to-right pipeline."
|
|
@@ -512,28 +513,6 @@
|
|
|
512
513
|
}
|
|
513
514
|
}
|
|
514
515
|
},
|
|
515
|
-
"importInfo": {
|
|
516
|
-
"type": "object",
|
|
517
|
-
"required": [
|
|
518
|
-
"nodeId",
|
|
519
|
-
"name"
|
|
520
|
-
],
|
|
521
|
-
"additionalProperties": false,
|
|
522
|
-
"properties": {
|
|
523
|
-
"nodeId": {
|
|
524
|
-
"type": "string"
|
|
525
|
-
},
|
|
526
|
-
"name": {
|
|
527
|
-
"type": "string"
|
|
528
|
-
},
|
|
529
|
-
"relation": {
|
|
530
|
-
"type": "string"
|
|
531
|
-
},
|
|
532
|
-
"source_location": {
|
|
533
|
-
"type": "string"
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
},
|
|
537
516
|
"constructDeclaration": {
|
|
538
517
|
"description": "Discriminated structured declaration of a construct (`kind`). Hand-authored declarations should set component.declarationProvenance to authored.",
|
|
539
518
|
"oneOf": [
|
|
@@ -549,9 +528,6 @@
|
|
|
549
528
|
{
|
|
550
529
|
"$ref": "#/$defs/typeDeclaration"
|
|
551
530
|
},
|
|
552
|
-
{
|
|
553
|
-
"$ref": "#/$defs/moduleDeclaration"
|
|
554
|
-
},
|
|
555
531
|
{
|
|
556
532
|
"$ref": "#/$defs/externalDeclaration"
|
|
557
533
|
},
|
|
@@ -763,40 +739,6 @@
|
|
|
763
739
|
}
|
|
764
740
|
}
|
|
765
741
|
},
|
|
766
|
-
"moduleDeclaration": {
|
|
767
|
-
"type": "object",
|
|
768
|
-
"required": [
|
|
769
|
-
"kind",
|
|
770
|
-
"exports",
|
|
771
|
-
"imports",
|
|
772
|
-
"symbols"
|
|
773
|
-
],
|
|
774
|
-
"additionalProperties": false,
|
|
775
|
-
"description": "Declaration shape for module-like drill-down. Prefer not authoring module *components*; this payload may still appear from tooling.",
|
|
776
|
-
"properties": {
|
|
777
|
-
"kind": {
|
|
778
|
-
"const": "module"
|
|
779
|
-
},
|
|
780
|
-
"exports": {
|
|
781
|
-
"type": "array",
|
|
782
|
-
"items": {
|
|
783
|
-
"type": "string"
|
|
784
|
-
}
|
|
785
|
-
},
|
|
786
|
-
"imports": {
|
|
787
|
-
"type": "array",
|
|
788
|
-
"items": {
|
|
789
|
-
"$ref": "#/$defs/importInfo"
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
"symbols": {
|
|
793
|
-
"type": "array",
|
|
794
|
-
"items": {
|
|
795
|
-
"type": "string"
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
},
|
|
800
742
|
"externalDeclaration": {
|
|
801
743
|
"type": "object",
|
|
802
744
|
"required": [
|
|
@@ -831,6 +773,11 @@
|
|
|
831
773
|
"items": {
|
|
832
774
|
"$ref": "#/$defs/propertyInfo"
|
|
833
775
|
}
|
|
776
|
+
},
|
|
777
|
+
"storage": {
|
|
778
|
+
"type": "string",
|
|
779
|
+
"enum": ["memory", "disk", "external"],
|
|
780
|
+
"description": "Where the retained state physically lives / who mediates access. Authored — graphify cannot infer it: `memory` = process-lifetime RAM, `disk` = this process reads/writes the filesystem, `external` = mediated by another system (db/service)."
|
|
834
781
|
}
|
|
835
782
|
}
|
|
836
783
|
},
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Ontology: construct = what a node is, framework + stereotype = which
|
|
15
15
|
* framework pattern it plays, role = where it sits, process = where it runs,
|
|
16
|
+
* module = which source file/module the export belongs to,
|
|
16
17
|
* proposed = not yet in source (design / migration placeholder).
|
|
17
18
|
* `symbol` is the code identity; `name` is the display label.
|
|
18
19
|
*/
|
|
@@ -61,9 +62,6 @@ export type SubsystemStereotype = string;
|
|
|
61
62
|
*/
|
|
62
63
|
export type SubsystemRelationType =
|
|
63
64
|
| 'imports'
|
|
64
|
-
| 'imports_from'
|
|
65
|
-
| 're_exports'
|
|
66
|
-
| 'defines'
|
|
67
65
|
| 'extends'
|
|
68
66
|
| 'inherits'
|
|
69
67
|
| 'implements'
|
|
@@ -159,13 +157,6 @@ export interface SubsystemReferenceInfo {
|
|
|
159
157
|
source_location?: string;
|
|
160
158
|
}
|
|
161
159
|
|
|
162
|
-
export interface SubsystemImportInfo {
|
|
163
|
-
nodeId: string;
|
|
164
|
-
name: string;
|
|
165
|
-
relation?: string;
|
|
166
|
-
source_location?: string;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
160
|
export interface SubsystemClassDeclaration {
|
|
170
161
|
kind: 'class';
|
|
171
162
|
methods: SubsystemMethodInfo[];
|
|
@@ -237,13 +228,6 @@ export interface SubsystemTypeDeclaration {
|
|
|
237
228
|
rhs?: string;
|
|
238
229
|
}
|
|
239
230
|
|
|
240
|
-
export interface SubsystemModuleDeclaration {
|
|
241
|
-
kind: 'module';
|
|
242
|
-
exports: string[];
|
|
243
|
-
imports: SubsystemImportInfo[];
|
|
244
|
-
symbols: string[];
|
|
245
|
-
}
|
|
246
|
-
|
|
247
231
|
export interface SubsystemExternalDeclaration {
|
|
248
232
|
kind: 'external';
|
|
249
233
|
label: string;
|
|
@@ -281,7 +265,6 @@ export type SubsystemConstructDeclaration =
|
|
|
281
265
|
| SubsystemFunctionDeclaration
|
|
282
266
|
| SubsystemMethodDeclaration
|
|
283
267
|
| SubsystemTypeDeclaration
|
|
284
|
-
| SubsystemModuleDeclaration
|
|
285
268
|
| SubsystemExternalDeclaration
|
|
286
269
|
| SubsystemStoreDeclaration
|
|
287
270
|
| SubsystemCustomEntityDeclaration;
|
|
@@ -316,6 +299,15 @@ export interface SubsystemComponent {
|
|
|
316
299
|
*/
|
|
317
300
|
stereotype?: SubsystemStereotype;
|
|
318
301
|
process?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Source-module membership — which file/module this export belongs to
|
|
304
|
+
* (e.g. `src/session/transcript.ts`). Nodes sharing a `module` are drawn
|
|
305
|
+
* inside one boundary frame. Prefer this over inventing a module construct:
|
|
306
|
+
* anchor each export as its real construct (`function` / `class` / …) and
|
|
307
|
+
* set `module` so the file reads as a frame, not a node. Orthogonal to
|
|
308
|
+
* `process` (runtime deployment unit).
|
|
309
|
+
*/
|
|
310
|
+
module?: string;
|
|
319
311
|
/** Code identity — real declaration in `file` when set. */
|
|
320
312
|
symbol?: string;
|
|
321
313
|
/**
|