@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.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.d.ts +5 -0
- package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.d.ts.map +1 -0
- package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.js +4 -0
- package/dist/stories/Subsystem/ComponentGraph/aggregateFixture.js.map +1 -0
- package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.d.ts +5 -0
- package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.d.ts.map +1 -0
- package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.js +4 -0
- package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.js.map +1 -0
- package/dist/stories/Subsystem/ComponentGraph/composedFixture.d.ts +5 -0
- package/dist/stories/Subsystem/ComponentGraph/composedFixture.d.ts.map +1 -0
- package/dist/stories/Subsystem/ComponentGraph/composedFixture.js +4 -0
- package/dist/stories/Subsystem/ComponentGraph/composedFixture.js.map +1 -0
- package/dist/subsystem/SubsystemAggregateGraph.d.ts +70 -0
- package/dist/subsystem/SubsystemAggregateGraph.d.ts.map +1 -0
- package/dist/subsystem/SubsystemAggregateGraph.js +385 -0
- package/dist/subsystem/SubsystemAggregateGraph.js.map +1 -0
- package/dist/subsystem/model.d.ts +7 -0
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js +65 -1
- package/dist/subsystem/model.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/stories/Subsystem/ComponentDeclarationAudit.stories.tsx +13 -13
- package/src/stories/Subsystem/ComponentGraph/AggregateFrameGraph.stories.tsx +61 -0
- package/src/stories/Subsystem/ComponentGraph/AggregateGraph.stories.tsx +61 -0
- package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +17 -17
- package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +2 -2
- package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +3 -3
- package/src/stories/Subsystem/ComponentGraph/ComposedGraph.stories.tsx +73 -0
- package/src/stories/Subsystem/ComponentGraph/Constructs.stories.tsx +6 -6
- package/src/stories/Subsystem/ComponentGraph/CustomEntities.stories.tsx +8 -8
- package/src/stories/Subsystem/ComponentGraph/DetailPanel.stories.tsx +11 -11
- package/src/stories/Subsystem/ComponentGraph/Flows.stories.tsx +6 -6
- package/src/stories/Subsystem/ComponentGraph/FrameworkStereotype.stories.tsx +10 -10
- package/src/stories/Subsystem/ComponentGraph/ModuleBadges.stories.tsx +6 -6
- package/src/stories/Subsystem/ComponentGraph/Modules.stories.tsx +17 -17
- package/src/stories/Subsystem/ComponentGraph/NodeAnatomy.stories.tsx +16 -16
- package/src/stories/Subsystem/ComponentGraph/Packages.stories.tsx +12 -12
- package/src/stories/Subsystem/ComponentGraph/Processes.stories.tsx +1 -1
- package/src/stories/Subsystem/ComponentGraph/Proposed.stories.tsx +10 -10
- package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +69 -69
- package/src/stories/Subsystem/ComponentGraph/Spotlights.stories.tsx +27 -27
- package/src/stories/Subsystem/ComponentGraph/aggregateFixture.ts +8 -0
- package/src/stories/Subsystem/ComponentGraph/aggregateViewFixture.ts +8 -0
- package/src/stories/Subsystem/ComponentGraph/composedFixture.ts +9 -0
- package/src/subsystem/SubsystemAggregateGraph.tsx +607 -0
- package/src/subsystem/model.test.ts +63 -0
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
217
|
+
alias: 'cli',
|
|
218
218
|
name: '@opencode-ai/cli',
|
|
219
219
|
construct: 'external',
|
|
220
220
|
file: '',
|