@principal-ai/subsystems-react 0.25.0 → 0.26.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 (52) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.d.ts +5 -0
  6. package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.d.ts.map +1 -0
  7. package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.js +4 -0
  8. package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.js.map +1 -0
  9. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.d.ts +5 -0
  10. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.d.ts.map +1 -0
  11. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.js +4 -0
  12. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.js.map +1 -0
  13. package/dist/stories/Subsystem/ComponentGraph/composedFixture.d.ts +5 -0
  14. package/dist/stories/Subsystem/ComponentGraph/composedFixture.d.ts.map +1 -0
  15. package/dist/stories/Subsystem/ComponentGraph/composedFixture.js +4 -0
  16. package/dist/stories/Subsystem/ComponentGraph/composedFixture.js.map +1 -0
  17. package/dist/subsystem/SubsystemAggregateGraph.d.ts +70 -0
  18. package/dist/subsystem/SubsystemAggregateGraph.d.ts.map +1 -0
  19. package/dist/subsystem/SubsystemAggregateGraph.js +385 -0
  20. package/dist/subsystem/SubsystemAggregateGraph.js.map +1 -0
  21. package/dist/subsystem/model.d.ts +7 -0
  22. package/dist/subsystem/model.d.ts.map +1 -1
  23. package/dist/subsystem/model.js +65 -1
  24. package/dist/subsystem/model.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/index.ts +8 -0
  27. package/src/stories/Subsystem/ComponentDeclarationAudit.stories.tsx +13 -13
  28. package/src/stories/Subsystem/ComponentGraph/AggregateFrameGraph.stories.tsx +61 -0
  29. package/src/stories/Subsystem/ComponentGraph/AggregateGraph.stories.tsx +61 -0
  30. package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +17 -17
  31. package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +2 -2
  32. package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +3 -3
  33. package/src/stories/Subsystem/ComponentGraph/ComposedGraph.stories.tsx +73 -0
  34. package/src/stories/Subsystem/ComponentGraph/Constructs.stories.tsx +6 -6
  35. package/src/stories/Subsystem/ComponentGraph/CustomEntities.stories.tsx +8 -8
  36. package/src/stories/Subsystem/ComponentGraph/DetailPanel.stories.tsx +11 -11
  37. package/src/stories/Subsystem/ComponentGraph/Flows.stories.tsx +6 -6
  38. package/src/stories/Subsystem/ComponentGraph/FrameworkStereotype.stories.tsx +10 -10
  39. package/src/stories/Subsystem/ComponentGraph/ModuleBadges.stories.tsx +6 -6
  40. package/src/stories/Subsystem/ComponentGraph/Modules.stories.tsx +17 -17
  41. package/src/stories/Subsystem/ComponentGraph/NodeAnatomy.stories.tsx +16 -16
  42. package/src/stories/Subsystem/ComponentGraph/Packages.stories.tsx +12 -12
  43. package/src/stories/Subsystem/ComponentGraph/Processes.stories.tsx +1 -1
  44. package/src/stories/Subsystem/ComponentGraph/Proposed.stories.tsx +10 -10
  45. package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +69 -69
  46. package/src/stories/Subsystem/ComponentGraph/Spotlights.stories.tsx +27 -27
  47. package/src/stories/Subsystem/ComponentGraph/aggregateFixture.ts +8 -0
  48. package/src/stories/Subsystem/ComponentGraph/aggregateViewFixture.ts +8 -0
  49. package/src/stories/Subsystem/ComponentGraph/composedFixture.ts +9 -0
  50. package/src/subsystem/SubsystemAggregateGraph.tsx +607 -0
  51. package/src/subsystem/model.test.ts +63 -0
  52. package/src/subsystem/model.ts +65 -1
@@ -73,7 +73,7 @@ const CHANNELS: Channel[] = [
73
73
  label: 'baseline — function',
74
74
  note: 'border color = construct (function-indigo); left badge = construct.',
75
75
  component: {
76
- id: 'fn',
76
+ alias: 'fn',
77
77
  name: 'auditSubsystemModel',
78
78
  construct: 'function',
79
79
  file: 'src/bun/verify-subsystem-component.ts',
@@ -85,7 +85,7 @@ const CHANNELS: Channel[] = [
85
85
  label: 'class',
86
86
  note: 'construct color changes per kind; nothing else moves.',
87
87
  component: {
88
- id: 'cls',
88
+ alias: 'cls',
89
89
  name: 'MaintainModelAgent',
90
90
  construct: 'class',
91
91
  file: 'src/bun/maintain-model.ts',
@@ -97,7 +97,7 @@ const CHANNELS: Channel[] = [
97
97
  label: 'external',
98
98
  note: 'outside the system — square corners, no file.',
99
99
  component: {
100
- id: 'ext',
100
+ alias: 'ext',
101
101
  name: '@opencode-ai/cli',
102
102
  construct: 'external',
103
103
  file: '',
@@ -109,7 +109,7 @@ const CHANNELS: Channel[] = [
109
109
  label: 'role badge',
110
110
  note: 'top-right badge = role.',
111
111
  component: {
112
- id: 'role',
112
+ alias: 'role',
113
113
  name: 'handleRequest',
114
114
  construct: 'function',
115
115
  file: 'src/bun/http-server.ts',
@@ -122,7 +122,7 @@ const CHANNELS: Channel[] = [
122
122
  label: 'store + storage badge',
123
123
  note: 'store backs a storage badge beside the role badge.',
124
124
  component: {
125
- id: 'store',
125
+ alias: 'store',
126
126
  name: 'sessionCache',
127
127
  construct: 'store',
128
128
  file: 'src/bun/session-cache.ts',
@@ -135,7 +135,7 @@ const CHANNELS: Channel[] = [
135
135
  label: 'proposed',
136
136
  note: 'dashed goldenrod border + right badge; fileless.',
137
137
  component: {
138
- id: 'prop',
138
+ alias: 'prop',
139
139
  name: 'OpenCodeV2Lifecycle',
140
140
  construct: 'function',
141
141
  file: '',
@@ -148,7 +148,7 @@ const CHANNELS: Channel[] = [
148
148
  label: 'proposed + role',
149
149
  note: 'proposed wins the right badge; role stays on the model.',
150
150
  component: {
151
- id: 'prop-role',
151
+ alias: 'prop-role',
152
152
  name: 'startMaintainFlow',
153
153
  construct: 'function',
154
154
  file: '',
@@ -162,7 +162,7 @@ const CHANNELS: Channel[] = [
162
162
  label: 'framework stereotype',
163
163
  note: 'left badge prefers "framework · stereotype"; border stays construct.',
164
164
  component: {
165
- id: 'react',
165
+ alias: 'react',
166
166
  name: 'SubsystemComponentNode',
167
167
  construct: 'function',
168
168
  file: 'src/subsystem/nodes.tsx',
@@ -176,7 +176,7 @@ const CHANNELS: Channel[] = [
176
176
  label: 'custom entity',
177
177
  note: 'left badge wears the entityKind.',
178
178
  component: {
179
- id: 'entity',
179
+ alias: 'entity',
180
180
  name: 'WorkRequester',
181
181
  construct: 'custom_entity',
182
182
  file: '',
@@ -188,7 +188,7 @@ const CHANNELS: Channel[] = [
188
188
  label: 'selected',
189
189
  note: 'selection only thickens the border (2 → 4); color stays construct.',
190
190
  component: {
191
- id: 'sel',
191
+ alias: 'sel',
192
192
  name: 'runMaintainModel',
193
193
  construct: 'function',
194
194
  file: 'src/bun/maintain-model.ts',
@@ -246,7 +246,7 @@ export const Channels: Story = {
246
246
  }}
247
247
  >
248
248
  {CHANNELS.map((c) => (
249
- <ChannelCell key={c.component.id} channel={c} />
249
+ <ChannelCell key={c.component.alias} channel={c} />
250
250
  ))}
251
251
  </div>
252
252
  </div>
@@ -423,32 +423,32 @@ const ISSUE_EXAMPLES: Array<{
423
423
  },
424
424
  {
425
425
  caption: 'error · earliest rung is file (declaration file missing)',
426
- component: { ...CHANNELS[0]!.component, id: 'e-file' },
426
+ component: { ...CHANNELS[0]!.component, alias: 'e-file' },
427
427
  severity: 'error',
428
428
  rung: 'file',
429
429
  count: 2,
430
430
  },
431
431
  {
432
432
  caption: 'error · earliest rung is symbol (multiple symbol matches)',
433
- component: { ...CHANNELS[1]!.component, id: 'e-sym' },
433
+ component: { ...CHANNELS[1]!.component, alias: 'e-sym' },
434
434
  severity: 'error',
435
435
  rung: 'symbol',
436
436
  },
437
437
  {
438
438
  caption: 'info/gap · dashed ring · declaration drift',
439
- component: { ...CHANNELS[1]!.component, id: 'e-decl' },
439
+ component: { ...CHANNELS[1]!.component, alias: 'e-decl' },
440
440
  severity: 'info',
441
441
  rung: 'declaration',
442
442
  },
443
443
  {
444
444
  caption: 'error · type mismatch',
445
- component: { ...CHANNELS[7]!.component, id: 'e-type' },
445
+ component: { ...CHANNELS[7]!.component, alias: 'e-type' },
446
446
  severity: 'error',
447
447
  rung: 'type',
448
448
  },
449
449
  {
450
450
  caption: 'error · signature mismatch (deepest rung)',
451
- component: { ...CHANNELS[0]!.component, id: 'e-sig' },
451
+ component: { ...CHANNELS[0]!.component, alias: 'e-sig' },
452
452
  severity: 'error',
453
453
  rung: 'signature',
454
454
  },
@@ -31,7 +31,7 @@ const LIB = 'pkg:github/acme/lib';
31
31
  */
32
32
  const multiRepoComponents: SubsystemComponent[] = [
33
33
  {
34
- id: 'dispatch',
34
+ alias: 'dispatch',
35
35
  name: 'dispatch',
36
36
  construct: 'function',
37
37
  symbol: 'dispatch',
@@ -43,7 +43,7 @@ const multiRepoComponents: SubsystemComponent[] = [
43
43
  layer: 1,
44
44
  },
45
45
  {
46
- id: 'session',
46
+ alias: 'session',
47
47
  name: 'SessionService',
48
48
  construct: 'class',
49
49
  symbol: 'SessionService',
@@ -55,7 +55,7 @@ const multiRepoComponents: SubsystemComponent[] = [
55
55
  layer: 2,
56
56
  },
57
57
  {
58
- id: 'parse',
58
+ alias: 'parse',
59
59
  name: 'parseEvent',
60
60
  construct: 'function',
61
61
  symbol: 'parseEvent',
@@ -67,7 +67,7 @@ const multiRepoComponents: SubsystemComponent[] = [
67
67
  layer: 1,
68
68
  },
69
69
  {
70
- id: 'normalize',
70
+ alias: 'normalize',
71
71
  name: 'normalize',
72
72
  construct: 'function',
73
73
  symbol: 'normalize',
@@ -123,7 +123,7 @@ export const SingleRepoNoPackageFrames: Story = {
123
123
  */
124
124
  const nestedComponents: SubsystemComponent[] = [
125
125
  {
126
- id: 'dispatch',
126
+ alias: 'dispatch',
127
127
  name: 'dispatch',
128
128
  construct: 'function',
129
129
  symbol: 'dispatch',
@@ -135,7 +135,7 @@ const nestedComponents: SubsystemComponent[] = [
135
135
  layer: 1,
136
136
  },
137
137
  {
138
- id: 'boot',
138
+ alias: 'boot',
139
139
  name: 'boot',
140
140
  construct: 'function',
141
141
  symbol: 'boot',
@@ -147,7 +147,7 @@ const nestedComponents: SubsystemComponent[] = [
147
147
  layer: 1,
148
148
  },
149
149
  {
150
- id: 'session',
150
+ alias: 'session',
151
151
  name: 'SessionService',
152
152
  construct: 'class',
153
153
  symbol: 'SessionService',
@@ -159,7 +159,7 @@ const nestedComponents: SubsystemComponent[] = [
159
159
  layer: 2,
160
160
  },
161
161
  {
162
- id: 'session-types',
162
+ alias: 'session-types',
163
163
  name: 'SessionRecord',
164
164
  construct: 'type_alias',
165
165
  symbol: 'SessionRecord',
@@ -171,7 +171,7 @@ const nestedComponents: SubsystemComponent[] = [
171
171
  layer: 2,
172
172
  },
173
173
  {
174
- id: 'parse',
174
+ alias: 'parse',
175
175
  name: 'parseEvent',
176
176
  construct: 'function',
177
177
  symbol: 'parseEvent',
@@ -183,7 +183,7 @@ const nestedComponents: SubsystemComponent[] = [
183
183
  layer: 1,
184
184
  },
185
185
  {
186
- id: 'parse-types',
186
+ alias: 'parse-types',
187
187
  name: 'RawEvent',
188
188
  construct: 'type_alias',
189
189
  symbol: 'RawEvent',
@@ -195,7 +195,7 @@ const nestedComponents: SubsystemComponent[] = [
195
195
  layer: 1,
196
196
  },
197
197
  {
198
- id: 'normalize',
198
+ alias: 'normalize',
199
199
  name: 'normalize',
200
200
  construct: 'function',
201
201
  symbol: 'normalize',
@@ -207,7 +207,7 @@ const nestedComponents: SubsystemComponent[] = [
207
207
  layer: 2,
208
208
  },
209
209
  {
210
- id: 'normalize-types',
210
+ alias: 'normalize-types',
211
211
  name: 'NormalizedEvent',
212
212
  construct: 'type_alias',
213
213
  symbol: 'NormalizedEvent',
@@ -31,7 +31,7 @@ const processComponents = [
31
31
  ['bridge', 'bridge', 'function', 'src/renderer/bridge.ts', 'pkg:github/principal-ai/principal-studio', 'IPC bridge to the host', 'bridge'],
32
32
  ]),
33
33
  {
34
- id: 'svc',
34
+ alias: 'svc',
35
35
  name: 'telemetry',
36
36
  construct: 'external' as const,
37
37
  file: '',
@@ -95,7 +95,7 @@ const spotlightRows: Array<{ label: string; component: SubsystemComponent }> = [
95
95
  {
96
96
  label: 'normal function (baseline)',
97
97
  component: {
98
- id: 'live-fn',
98
+ alias: 'live-fn',
99
99
  name: 'ensureOpencode',
100
100
  construct: 'function',
101
101
  file: 'src/bun/opencode-v2.ts',
@@ -107,7 +107,7 @@ const spotlightRows: Array<{ label: string; component: SubsystemComponent }> = [
107
107
  {
108
108
  label: 'proposed function — dashed border + right badge',
109
109
  component: {
110
- id: 'prop-fn',
110
+ alias: 'prop-fn',
111
111
  name: 'OpenCodeV2Lifecycle',
112
112
  construct: 'function',
113
113
  file: '',
@@ -120,7 +120,7 @@ const spotlightRows: Array<{ label: string; component: SubsystemComponent }> = [
120
120
  {
121
121
  label: 'proposed class',
122
122
  component: {
123
- id: 'prop-class',
123
+ alias: 'prop-class',
124
124
  name: 'MaintainModelAgent',
125
125
  construct: 'class',
126
126
  file: 'src/bun/maintain-model-agent.ts',
@@ -133,7 +133,7 @@ const spotlightRows: Array<{ label: string; component: SubsystemComponent }> = [
133
133
  {
134
134
  label: 'proposed + role: entry (badge shows proposed only)',
135
135
  component: {
136
- id: 'prop-entry',
136
+ alias: 'prop-entry',
137
137
  name: 'startMaintainFlow',
138
138
  construct: 'function',
139
139
  file: '',
@@ -147,7 +147,7 @@ const spotlightRows: Array<{ label: string; component: SubsystemComponent }> = [
147
147
  {
148
148
  label: 'external (contrast — real outside system)',
149
149
  component: {
150
- id: 'ext',
150
+ alias: 'ext',
151
151
  name: 'OpenCode CLI',
152
152
  construct: 'external',
153
153
  file: '',
@@ -174,7 +174,7 @@ export const Spotlights: Story = {
174
174
  }}
175
175
  >
176
176
  {spotlightRows.map((row) => (
177
- <NodeSpotlight key={row.component.id} {...row} />
177
+ <NodeSpotlight key={row.component.alias} {...row} />
178
178
  ))}
179
179
  </div>
180
180
  ),
@@ -185,7 +185,7 @@ export const Spotlights: Story = {
185
185
  // ---------------------------------------------------------------------------
186
186
  const migrationComponents: SubsystemComponent[] = [
187
187
  {
188
- id: 'audit',
188
+ alias: 'audit',
189
189
  name: 'auditSubsystemModel',
190
190
  construct: 'function',
191
191
  file: 'src/bun/verify-subsystem-component.ts',
@@ -195,7 +195,7 @@ const migrationComponents: SubsystemComponent[] = [
195
195
  role: 'entry',
196
196
  },
197
197
  {
198
- id: 'lifecycle',
198
+ alias: 'lifecycle',
199
199
  name: 'OpenCodeV2Lifecycle',
200
200
  construct: 'function',
201
201
  file: '',
@@ -205,7 +205,7 @@ const migrationComponents: SubsystemComponent[] = [
205
205
  proposed: true,
206
206
  },
207
207
  {
208
- id: 'maintain',
208
+ alias: 'maintain',
209
209
  name: 'runMaintainModel',
210
210
  construct: 'function',
211
211
  file: 'src/bun/maintain-model.ts',
@@ -214,7 +214,7 @@ const migrationComponents: SubsystemComponent[] = [
214
214
  purpose: 'Existing maintain agent runner',
215
215
  },
216
216
  {
217
- id: 'cli',
217
+ alias: 'cli',
218
218
  name: '@opencode-ai/cli',
219
219
  construct: 'external',
220
220
  file: '',