@principal-ai/subsystems-react 0.37.12 → 0.39.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.
Files changed (74) hide show
  1. package/dist/graphify/consolidated.d.ts +8 -0
  2. package/dist/graphify/consolidated.d.ts.map +1 -1
  3. package/dist/graphify/construct.d.ts +18 -0
  4. package/dist/graphify/construct.d.ts.map +1 -1
  5. package/dist/graphify/construct.js +23 -0
  6. package/dist/graphify/construct.js.map +1 -1
  7. package/dist/graphify/index.d.ts +2 -2
  8. package/dist/graphify/index.d.ts.map +1 -1
  9. package/dist/graphify/index.js +1 -1
  10. package/dist/graphify/index.js.map +1 -1
  11. package/dist/index.d.ts +3 -3
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +2 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts.map +1 -1
  16. package/dist/stories/Subsystem/ComponentGraph/fixtures.js +0 -1
  17. package/dist/stories/Subsystem/ComponentGraph/fixtures.js.map +1 -1
  18. package/dist/subsystem/IssueList.d.ts +49 -3
  19. package/dist/subsystem/IssueList.d.ts.map +1 -1
  20. package/dist/subsystem/IssueList.js +180 -79
  21. package/dist/subsystem/IssueList.js.map +1 -1
  22. package/dist/subsystem/SubsystemComponentGraph.d.ts +23 -2
  23. package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
  24. package/dist/subsystem/SubsystemComponentGraph.js +492 -23
  25. package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
  26. package/dist/subsystem/formatDeclaration.js +19 -5
  27. package/dist/subsystem/formatDeclaration.js.map +1 -1
  28. package/dist/subsystem/model.d.ts +161 -7
  29. package/dist/subsystem/model.d.ts.map +1 -1
  30. package/dist/subsystem/model.js +91 -12
  31. package/dist/subsystem/model.js.map +1 -1
  32. package/dist/subsystem/nodes.d.ts.map +1 -1
  33. package/dist/subsystem/nodes.js +133 -72
  34. package/dist/subsystem/nodes.js.map +1 -1
  35. package/dist/subsystem/symbolRefs.d.ts.map +1 -1
  36. package/dist/subsystem/symbolRefs.js +2 -0
  37. package/dist/subsystem/symbolRefs.js.map +1 -1
  38. package/dist/utils/elkLayout.d.ts +9 -0
  39. package/dist/utils/elkLayout.d.ts.map +1 -1
  40. package/dist/utils/elkLayout.js +21 -2
  41. package/dist/utils/elkLayout.js.map +1 -1
  42. package/package.json +3 -3
  43. package/src/graphify/__fixtures__/ego-samples.json +545 -0
  44. package/src/graphify/consolidated.ts +8 -0
  45. package/src/graphify/construct.test.ts +61 -1
  46. package/src/graphify/construct.ts +33 -0
  47. package/src/graphify/index.ts +6 -1
  48. package/src/index.ts +13 -1
  49. package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +2 -2
  50. package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +9 -9
  51. package/src/stories/Subsystem/ComponentGraph/EdgeViews.stories.tsx +4 -4
  52. package/src/stories/Subsystem/ComponentGraph/IssueOverlay.stories.tsx +625 -0
  53. package/src/stories/Subsystem/ComponentGraph/Issues.stories.tsx +7 -1
  54. package/src/stories/Subsystem/ComponentGraph/ModuleBadges.stories.tsx +5 -5
  55. package/src/stories/Subsystem/ComponentGraph/Modules.stories.tsx +5 -5
  56. package/src/stories/Subsystem/ComponentGraph/NodeAnatomy.stories.tsx +40 -73
  57. package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +6 -6
  58. package/src/stories/Subsystem/ComponentGraph/StoreValueType.stories.tsx +261 -0
  59. package/src/stories/Subsystem/ComponentGraph/fixtures.ts +0 -1
  60. package/src/stories/Subsystem/EgoGraph/EgoGraph.stories.tsx +354 -0
  61. package/src/stories/Subsystem/StoreValueTypeDeclaration.stories.tsx +182 -0
  62. package/src/subsystem/IssueList.focus.test.tsx +113 -0
  63. package/src/subsystem/IssueList.icon.test.tsx +95 -0
  64. package/src/subsystem/IssueList.tsx +267 -111
  65. package/src/subsystem/SubsystemComponentGraph.tsx +582 -27
  66. package/src/subsystem/formatDeclaration.test.ts +64 -0
  67. package/src/subsystem/formatDeclaration.ts +20 -5
  68. package/src/subsystem/model.test.ts +75 -2
  69. package/src/subsystem/model.ts +247 -17
  70. package/src/subsystem/nodes.group.test.tsx +52 -0
  71. package/src/subsystem/nodes.tsx +112 -8
  72. package/src/subsystem/symbolRefs.ts +2 -0
  73. package/src/subsystem/toC4.test.ts +3 -3
  74. package/src/utils/elkLayout.ts +32 -1
@@ -61,8 +61,13 @@ export {
61
61
  export type {
62
62
  InferredGraphifyConstruct,
63
63
  InferConstructFromGraphifyResult,
64
+ ConstructCheckOutcome,
65
+ } from './construct';
66
+ export {
67
+ inferConstructFromGraphify,
68
+ constructsMatch,
69
+ resolveConstructMatch,
64
70
  } from './construct';
65
- export { inferConstructFromGraphify, constructsMatch } from './construct';
66
71
  export type {
67
72
  GraphifyInferredSignature,
68
73
  ClaimedSignature,
package/src/index.ts CHANGED
@@ -62,6 +62,7 @@ export {
62
62
  symbolLabelVariants,
63
63
  inferConstructFromGraphify,
64
64
  constructsMatch,
65
+ resolveConstructMatch,
65
66
  extractNamedTypes,
66
67
  extractGraphifySignature,
67
68
  compareSignatures,
@@ -157,7 +158,16 @@ export type {
157
158
  SubsystemIssueCardProps,
158
159
  SubsystemIssueListProps,
159
160
  } from './subsystem/IssueList';
160
- export { MECHANISM_COLOR, MECHANISM_STYLE } from './subsystem/model';
161
+ export {
162
+ MECHANISM_COLOR,
163
+ MECHANISM_STYLE,
164
+ MECHANISM_FALLBACK_COLOR,
165
+ GRAPHIFY_RELATION_COLOR,
166
+ GRAPHIFY_RELATION_STYLE,
167
+ GRAPHIFY_RELATION_FALLBACK_COLOR,
168
+ edgeColor,
169
+ edgeStrokeStyle,
170
+ } from './subsystem/model';
161
171
  export { BOUNDARY_COLOR, assignBoundaryColors, boundaryFill } from './subsystem/model';
162
172
  export { CONSTRUCT_COLOR, componentColor, constructColorsFromPierreTheme } from './pierre/constructColors';
163
173
  export {
@@ -204,6 +214,8 @@ export type {
204
214
  SubsystemStereotype,
205
215
  SubsystemEdgeMechanism,
206
216
  SubsystemEdgeView,
217
+ SubsystemEdgeProvenance,
218
+ SubsystemGraphifyRelation,
207
219
  SubsystemConstructDeclaration,
208
220
  SubsystemDeclarationProvenance,
209
221
  SubsystemSignatureClaim,
@@ -34,7 +34,7 @@ const twoNodeComponents = components([
34
34
  ]);
35
35
 
36
36
  const twoNodeEdges = graphSpecFromEdges([
37
- ['src', 'dst', 'references'],
37
+ ['src', 'dst', 'method'],
38
38
  ]);
39
39
 
40
40
  function TwoNodeDemo({ showEdgeLabels = true }: { showEdgeLabels?: boolean }) {
@@ -99,7 +99,7 @@ function PlaygroundDemo({ leftCount, rightCount, showEdgeLabels }: { leftCount:
99
99
 
100
100
  for (let i = 0; i < leftCount; i++) {
101
101
  for (let j = 0; j < rightCount; j++) {
102
- edgeSpec.push([`l${i}`, `r${j}`, 'references']);
102
+ edgeSpec.push([`l${i}`, `r${j}`, 'method']);
103
103
  }
104
104
  }
105
105
  const graph = graphSpecFromEdges(edgeSpec);
@@ -38,14 +38,14 @@ const v2ReaderComponents = components([
38
38
  ]);
39
39
 
40
40
  const v2ReaderEdges = graphSpecFromEdges([
41
- ['transcript', 'reader', 'references'],
42
- ['paths', 'reader', 'references'],
41
+ ['transcript', 'reader', 'method'],
42
+ ['paths', 'reader', 'method'],
43
43
  ['capture', 'reader', 'calls'],
44
44
  ['reader', 'registry', 'registers-into', ['supported-agents.ts']],
45
45
  // Consumer packages - cross-package edges leave the subgraph
46
- ['reader', 'principal-studio-host', 'references'],
47
- ['reader', 'core-sessions', 'references'],
48
- ['reader', 'cli-session', 'references'],
46
+ ['reader', 'principal-studio-host', 'method'],
47
+ ['reader', 'core-sessions', 'method'],
48
+ ['reader', 'cli-session', 'method'],
49
49
  ]);
50
50
 
51
51
  function V2ReaderDemo() {
@@ -99,9 +99,9 @@ const minimalComponents = components([
99
99
  ]);
100
100
 
101
101
  const sharedEdges = graphSpecFromEdges([
102
- ['transcript', 'record', 'references'],
102
+ ['transcript', 'record', 'method'],
103
103
  ['reader', 'normalize', 'method'],
104
- ['normalize', 'record', 'references'],
104
+ ['normalize', 'record', 'method'],
105
105
  ]);
106
106
 
107
107
  /** The same subsystem after `resolveSubsystemToGraphify` populates `detail`. */
@@ -192,9 +192,9 @@ const investigationComponents: SubsystemComponent[] = [
192
192
  ];
193
193
 
194
194
  const investigationEdges = graphSpecFromEdges([
195
- ['adapter', 'contracts', 'references'],
195
+ ['adapter', 'contracts', 'method'],
196
196
  ['ingestion', 'adapter', 'uses'],
197
- ['ingestion', 'contracts', 'references'],
197
+ ['ingestion', 'contracts', 'method'],
198
198
  ]);
199
199
 
200
200
  function InvestigationDemo() {
@@ -43,10 +43,10 @@ const labelViewComponents = components([
43
43
  ]);
44
44
 
45
45
  const labelViewRelations = relations([
46
- ['svc', 'reader', 'references'],
47
- ['svc', 'event', 'references'],
48
- ['store', 'db', 'references'],
49
- ['reader', 'event', 'references'],
46
+ ['svc', 'reader', 'method'],
47
+ ['svc', 'event', 'method'],
48
+ ['store', 'db', 'method'],
49
+ ['reader', 'event', 'method'],
50
50
  ]);
51
51
 
52
52
  const labelViewWalkthroughs = [