@principal-ai/subsystems-react 0.20.4 → 0.20.6
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/graphify/construct.d.ts +23 -0
- package/dist/graphify/construct.d.ts.map +1 -0
- package/dist/graphify/construct.js +77 -0
- package/dist/graphify/construct.js.map +1 -0
- package/dist/graphify/index.d.ts +2 -2
- package/dist/graphify/index.d.ts.map +1 -1
- package/dist/graphify/index.js +1 -1
- package/dist/graphify/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/subsystem/ComponentDeclaration.js +1 -1
- package/dist/subsystem/ComponentDeclaration.js.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +87 -21
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/model.d.ts +24 -7
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js +25 -2
- package/dist/subsystem/model.js.map +1 -1
- package/dist/subsystem/nodes.d.ts.map +1 -1
- package/dist/subsystem/nodes.js +18 -10
- package/dist/subsystem/nodes.js.map +1 -1
- package/package.json +1 -1
- package/src/graphify/{kind.test.ts → construct.test.ts} +20 -20
- package/src/graphify/{kind.ts → construct.ts} +17 -17
- package/src/graphify/index.ts +5 -2
- package/src/index.ts +7 -4
- package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +2 -6
- package/src/stories/Subsystem/ComponentGraph/Proposed.stories.tsx +254 -0
- package/src/subsystem/ComponentDeclaration.tsx +1 -1
- package/src/subsystem/SubsystemComponentGraph.tsx +90 -24
- package/src/subsystem/model.test.ts +22 -0
- package/src/subsystem/model.ts +38 -9
- package/src/subsystem/nodes.tsx +21 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/subsystem/nodes.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,MAAM,EACN,QAAQ,GAIT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EACL,eAAe,EACf,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/subsystem/nodes.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,MAAM,EACN,QAAQ,GAIT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,GAIb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAE3E,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,QAAQ;CACxB,CAAC;AAEF;;6EAE6E;AAC7E,SAAS,UAAU,CAAC,CAAS;IAC3B,MAAM,IAAI,GAAG,QAAQ,CAAC;IACtB,OAAO,CAAC;QACN,qEAAqE;SACpE,OAAO,CAAC,oBAAoB,EAAE,KAAK,IAA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,MAAM,SAAS,GAAG,IAAI,EAAE,SAAS,IAAI,SAAS,CAAC;IAC/C,MAAM,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC;IACnD,0EAA0E;IAC1E,kEAAkE;IAClE,MAAM,QAAQ,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC;IACzD,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,4EAA4E;IAC5E,0EAA0E;IAC1E,yDAAyD;IACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEpE,OAAO,CACL,8BAIE,eACE,CAAC,EAAE,IAAI,EACP,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,aAAa,EACpB,WAAW,EAAE,EAAE,EACf,SAAS,EAAC,8BAA8B,GACxC,EAGF,eACE,CAAC,EAAE,IAAI,EACP,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,GAAG,EAChB,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAC7C,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,GAChC,IACD,CACJ,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test';
|
|
2
2
|
import type { GraphifyEdge, GraphifyNode } from './types';
|
|
3
|
-
import {
|
|
3
|
+
import { inferConstructFromGraphify, constructsMatch } from './construct';
|
|
4
4
|
|
|
5
5
|
function node(
|
|
6
6
|
id: string,
|
|
@@ -32,38 +32,38 @@ function edge(
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
describe('
|
|
35
|
+
describe('inferConstructFromGraphify', () => {
|
|
36
36
|
test('outgoing method edges → class', () => {
|
|
37
37
|
const n = node('cls', 'SessionReader');
|
|
38
38
|
const edges = [edge('cls', 'cls_get', 'method')];
|
|
39
|
-
const r =
|
|
40
|
-
expect(r.
|
|
39
|
+
const r = inferConstructFromGraphify(n, edges);
|
|
40
|
+
expect(r.construct).toBe('class');
|
|
41
41
|
expect(r.evidence[0]).toContain('outgoing method');
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
test('call-style label + no methods → function', () => {
|
|
45
45
|
const n = node('fn', 'SubsystemModelView()');
|
|
46
|
-
const r =
|
|
47
|
-
expect(r.
|
|
46
|
+
const r = inferConstructFromGraphify(n, []);
|
|
47
|
+
expect(r.construct).toBe('function');
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
test('method-style label + incoming method → method', () => {
|
|
51
51
|
const n = node('m', '.validate()');
|
|
52
52
|
const edges = [edge('cls', 'm', 'method')];
|
|
53
|
-
const r =
|
|
54
|
-
expect(r.
|
|
53
|
+
const r = inferConstructFromGraphify(n, edges);
|
|
54
|
+
expect(r.construct).toBe('method');
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
test('method takes priority over call-style function', () => {
|
|
58
58
|
const n = node('m', '.generate()');
|
|
59
59
|
const edges = [edge('CodeGenerator', 'm', 'method')];
|
|
60
|
-
expect(
|
|
60
|
+
expect(inferConstructFromGraphify(n, edges).construct).toBe('method');
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
test('incoming implements → type', () => {
|
|
64
64
|
const n = node('iface', 'StoryboardRegistryInterface');
|
|
65
65
|
const edges = [edge('MockRegistry', 'iface', 'implements')];
|
|
66
|
-
expect(
|
|
66
|
+
expect(inferConstructFromGraphify(n, edges).construct).toBe('type');
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
test('filename label → module', () => {
|
|
@@ -72,12 +72,12 @@ describe('inferGraphifyKind', () => {
|
|
|
72
72
|
'SubsystemModelView.tsx',
|
|
73
73
|
'packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx',
|
|
74
74
|
);
|
|
75
|
-
expect(
|
|
75
|
+
expect(inferConstructFromGraphify(n, []).construct).toBe('module');
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
test('bare symbol with no edges → unknown', () => {
|
|
79
79
|
const n = node('x', 'INSPECTOR_KEYS');
|
|
80
|
-
expect(
|
|
80
|
+
expect(inferConstructFromGraphify(n, []).construct).toBe('unknown');
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
test('class wins over implements on same node', () => {
|
|
@@ -86,23 +86,23 @@ describe('inferGraphifyKind', () => {
|
|
|
86
86
|
edge('cls', 'cls_gen', 'method'),
|
|
87
87
|
edge('Other', 'cls', 'implements'),
|
|
88
88
|
];
|
|
89
|
-
expect(
|
|
89
|
+
expect(inferConstructFromGraphify(n, edges).construct).toBe('class');
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
describe('
|
|
93
|
+
describe('constructsMatch', () => {
|
|
94
94
|
test('exact string equality', () => {
|
|
95
|
-
expect(
|
|
96
|
-
expect(
|
|
95
|
+
expect(constructsMatch('function', 'function')).toBe(true);
|
|
96
|
+
expect(constructsMatch('class', 'function')).toBe(false);
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
test('external / missing claimed skips', () => {
|
|
100
|
-
expect(
|
|
101
|
-
expect(
|
|
100
|
+
expect(constructsMatch('external', 'function')).toBe(true);
|
|
101
|
+
expect(constructsMatch(undefined, 'unknown')).toBe(true);
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
test('no class≈function alias', () => {
|
|
105
|
-
expect(
|
|
106
|
-
expect(
|
|
105
|
+
expect(constructsMatch('class', 'function')).toBe(false);
|
|
106
|
+
expect(constructsMatch('function', 'class')).toBe(false);
|
|
107
107
|
});
|
|
108
108
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Infer a subsystem-style
|
|
2
|
+
* Infer a subsystem-style construct from a graphify node + edges.
|
|
3
3
|
*
|
|
4
|
-
* Graphify does not store
|
|
4
|
+
* Graphify does not store construct on nodes (everything is `file_type: "code"`).
|
|
5
5
|
* Class vs function vs type is derived from structure — same rules as
|
|
6
6
|
* `GraphifyComponentDetail` in consolidated.ts.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { GraphifyEdge, GraphifyNode } from './types';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
export type
|
|
11
|
+
/** Construct inferred from graph structure (never read off the node). */
|
|
12
|
+
export type InferredGraphifyConstruct =
|
|
13
13
|
| 'class'
|
|
14
14
|
| 'function'
|
|
15
15
|
| 'method'
|
|
@@ -17,8 +17,8 @@ export type InferredGraphifyKind =
|
|
|
17
17
|
| 'module'
|
|
18
18
|
| 'unknown';
|
|
19
19
|
|
|
20
|
-
export interface
|
|
21
|
-
|
|
20
|
+
export interface InferConstructFromGraphifyResult {
|
|
21
|
+
construct: InferredGraphifyConstruct;
|
|
22
22
|
evidence: string[];
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -42,14 +42,14 @@ function isFilenameLabel(label: string, sourceFile: string): boolean {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Infer
|
|
45
|
+
* Infer construct for a definition node from its label and incident edges.
|
|
46
46
|
*
|
|
47
47
|
* Priority: class → method → function → type → module → unknown.
|
|
48
48
|
*/
|
|
49
|
-
export function
|
|
49
|
+
export function inferConstructFromGraphify(
|
|
50
50
|
node: GraphifyNode,
|
|
51
51
|
edges: readonly GraphifyEdge[],
|
|
52
|
-
):
|
|
52
|
+
): InferConstructFromGraphifyResult {
|
|
53
53
|
const id = String(node.id);
|
|
54
54
|
const label = String(node.label ?? '').trim();
|
|
55
55
|
const sourceFile =
|
|
@@ -61,7 +61,7 @@ export function inferGraphifyKind(
|
|
|
61
61
|
);
|
|
62
62
|
if (outgoingMethod.length > 0) {
|
|
63
63
|
evidence.push(`${outgoingMethod.length} outgoing method edge(s)`);
|
|
64
|
-
return {
|
|
64
|
+
return { construct: 'class', evidence };
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const incomingMethod = edges.filter(
|
|
@@ -72,12 +72,12 @@ export function inferGraphifyKind(
|
|
|
72
72
|
`incoming method edge from ${String(incomingMethod[0]!.source)}`,
|
|
73
73
|
`label ${label}`,
|
|
74
74
|
);
|
|
75
|
-
return {
|
|
75
|
+
return { construct: 'method', evidence };
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (isCallStyleLabel(label)) {
|
|
79
79
|
evidence.push(`call-style label ${label}`);
|
|
80
|
-
return {
|
|
80
|
+
return { construct: 'function', evidence };
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const incomingImplements = edges.filter(
|
|
@@ -87,7 +87,7 @@ export function inferGraphifyKind(
|
|
|
87
87
|
evidence.push(
|
|
88
88
|
`${incomingImplements.length} incoming implements edge(s)`,
|
|
89
89
|
);
|
|
90
|
-
return {
|
|
90
|
+
return { construct: 'type', evidence };
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
if (node.type === 'module' || isFilenameLabel(label, sourceFile)) {
|
|
@@ -96,12 +96,12 @@ export function inferGraphifyKind(
|
|
|
96
96
|
? 'node.type=module'
|
|
97
97
|
: `filename label ${label}`,
|
|
98
98
|
);
|
|
99
|
-
return {
|
|
99
|
+
return { construct: 'module', evidence };
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
if (label) evidence.push(`unclassified label ${label}`);
|
|
103
103
|
else evidence.push('no classifying signals');
|
|
104
|
-
return {
|
|
104
|
+
return { construct: 'unknown', evidence };
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
/** Type-family constructs all infer as the coarse 'type' — graph structure
|
|
@@ -110,9 +110,9 @@ export function inferGraphifyKind(
|
|
|
110
110
|
const TYPE_FAMILY: ReadonlySet<string> = new Set(['interface', 'type_alias', 'enum']);
|
|
111
111
|
|
|
112
112
|
/** Strict claimed-vs-inferred check, with type-family compatibility. */
|
|
113
|
-
export function
|
|
113
|
+
export function constructsMatch(
|
|
114
114
|
claimed: string | undefined,
|
|
115
|
-
inferred:
|
|
115
|
+
inferred: InferredGraphifyConstruct,
|
|
116
116
|
): boolean {
|
|
117
117
|
if (!claimed || claimed === 'external') return true;
|
|
118
118
|
if (TYPE_FAMILY.has(claimed)) return inferred === 'type';
|
package/src/graphify/index.ts
CHANGED
|
@@ -60,8 +60,11 @@ export {
|
|
|
60
60
|
resolveComponentAnchor,
|
|
61
61
|
symbolLabelVariants,
|
|
62
62
|
} from './anchor';
|
|
63
|
-
export type {
|
|
64
|
-
|
|
63
|
+
export type {
|
|
64
|
+
InferredGraphifyConstruct,
|
|
65
|
+
InferConstructFromGraphifyResult,
|
|
66
|
+
} from './construct';
|
|
67
|
+
export { inferConstructFromGraphify, constructsMatch } from './construct';
|
|
65
68
|
export type {
|
|
66
69
|
GraphifyInferredSignature,
|
|
67
70
|
ClaimedSignature,
|
package/src/index.ts
CHANGED
|
@@ -62,8 +62,8 @@ export {
|
|
|
62
62
|
normalizeSourcePath,
|
|
63
63
|
resolveComponentAnchor,
|
|
64
64
|
symbolLabelVariants,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
inferConstructFromGraphify,
|
|
66
|
+
constructsMatch,
|
|
67
67
|
extractNamedTypes,
|
|
68
68
|
extractGraphifySignature,
|
|
69
69
|
compareSignatures,
|
|
@@ -71,8 +71,8 @@ export {
|
|
|
71
71
|
export type {
|
|
72
72
|
ComponentAnchorInput,
|
|
73
73
|
ComponentAnchorResult,
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
InferredGraphifyConstruct,
|
|
75
|
+
InferConstructFromGraphifyResult,
|
|
76
76
|
GraphifyInferredSignature,
|
|
77
77
|
ClaimedSignature,
|
|
78
78
|
SignatureCompareResult,
|
|
@@ -125,10 +125,13 @@ export type {
|
|
|
125
125
|
} from './subsystem/model';
|
|
126
126
|
export {
|
|
127
127
|
constructBadgeLabel,
|
|
128
|
+
rightBadgeLabel,
|
|
129
|
+
rightBadgeColor,
|
|
128
130
|
deriveNameFromSymbol,
|
|
129
131
|
nodeMinWidthForBadges,
|
|
130
132
|
ROLE_COLOR,
|
|
131
133
|
ROLE_LABEL,
|
|
134
|
+
PROPOSED_COLOR,
|
|
132
135
|
} from './subsystem/model';
|
|
133
136
|
export type {
|
|
134
137
|
SubsystemDeclarationRef,
|
|
@@ -168,8 +168,7 @@ export const ResolvedPostGraphify: Story = {
|
|
|
168
168
|
|
|
169
169
|
// ---------------------------------------------------------------------------
|
|
170
170
|
// Investigation-derived subsystem — grok session 019fd2a9 (t3code)
|
|
171
|
-
// Read-only analysis of "provider / event threading".
|
|
172
|
-
// (analyzed, not edited) — no code touched, but a coherent concept was worked.
|
|
171
|
+
// Read-only analysis of "provider / event threading".
|
|
173
172
|
// ---------------------------------------------------------------------------
|
|
174
173
|
const investigationComponents: SubsystemComponent[] = [
|
|
175
174
|
{
|
|
@@ -180,7 +179,6 @@ const investigationComponents: SubsystemComponent[] = [
|
|
|
180
179
|
purl: 'pkg:github/t3code/t3code',
|
|
181
180
|
purpose: 'adapts opencode session/threads + events to the t3 runtime',
|
|
182
181
|
symbol: 'makeOpenCodeAdapter',
|
|
183
|
-
capture: 'analyzed',
|
|
184
182
|
detail: {
|
|
185
183
|
kind: 'module',
|
|
186
184
|
exports: ['makeOpenCodeAdapter', 'OpenCodeAdapterLiveOptions'],
|
|
@@ -196,7 +194,6 @@ const investigationComponents: SubsystemComponent[] = [
|
|
|
196
194
|
purl: 'pkg:github/t3code/t3code',
|
|
197
195
|
purpose: 'ingests provider events into the runtime',
|
|
198
196
|
symbol: 'ProviderRuntimeIngestion',
|
|
199
|
-
capture: 'analyzed',
|
|
200
197
|
},
|
|
201
198
|
{
|
|
202
199
|
id: 'contracts',
|
|
@@ -206,7 +203,6 @@ const investigationComponents: SubsystemComponent[] = [
|
|
|
206
203
|
purl: 'pkg:github/t3code/t3code',
|
|
207
204
|
purpose: 'contracts for orchestration/providers',
|
|
208
205
|
symbol: 'ORCHESTRATION_WS_METHODS',
|
|
209
|
-
capture: 'analyzed',
|
|
210
206
|
},
|
|
211
207
|
];
|
|
212
208
|
|
|
@@ -226,7 +222,7 @@ function InvestigationDemo() {
|
|
|
226
222
|
onSelect={(id) => setSelected(id)}
|
|
227
223
|
/>
|
|
228
224
|
<div style={{ marginTop: 8, fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
|
|
229
|
-
read-only investigation snapshot (grok 019fd2a9)
|
|
225
|
+
read-only investigation snapshot (grok 019fd2a9)
|
|
230
226
|
{selected ? ` · selected: ${selected}` : ''}
|
|
231
227
|
</div>
|
|
232
228
|
</div>
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import '@xyflow/react/dist/style.css';
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
import { ReactFlowProvider, type NodeProps } from '@xyflow/react';
|
|
5
|
+
import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
|
|
6
|
+
import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
|
|
7
|
+
import { SubsystemComponentNode } from '../../../subsystem/nodes';
|
|
8
|
+
import type {
|
|
9
|
+
SubsystemComponent,
|
|
10
|
+
SubsystemComponentEdge,
|
|
11
|
+
SubsystemGraphNode,
|
|
12
|
+
} from '../../../subsystem/model';
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: 'Subsystem/ComponentGraph/Proposed',
|
|
16
|
+
parameters: { layout: 'fullscreen' },
|
|
17
|
+
tags: ['autodocs'],
|
|
18
|
+
decorators: [
|
|
19
|
+
(Story) => (
|
|
20
|
+
<ThemeProvider theme={defaultEditorTheme}>
|
|
21
|
+
<ReactFlowProvider>
|
|
22
|
+
<Story />
|
|
23
|
+
</ReactFlowProvider>
|
|
24
|
+
</ThemeProvider>
|
|
25
|
+
),
|
|
26
|
+
],
|
|
27
|
+
} satisfies Meta;
|
|
28
|
+
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
|
|
32
|
+
const PURL = 'pkg:github/principal-ai/subsystem-modeling';
|
|
33
|
+
|
|
34
|
+
function nodeProps(c: SubsystemComponent): NodeProps<SubsystemGraphNode> {
|
|
35
|
+
return {
|
|
36
|
+
data: { component: c },
|
|
37
|
+
selected: false,
|
|
38
|
+
width: 230,
|
|
39
|
+
height: 84,
|
|
40
|
+
} as unknown as NodeProps<SubsystemGraphNode>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Side-by-side single-node spotlights — proposed vs normal vs role combos. */
|
|
44
|
+
function NodeSpotlight({
|
|
45
|
+
label,
|
|
46
|
+
component,
|
|
47
|
+
}: {
|
|
48
|
+
label: string;
|
|
49
|
+
component: SubsystemComponent;
|
|
50
|
+
}) {
|
|
51
|
+
return (
|
|
52
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 8, width: 260 }}>
|
|
53
|
+
<div
|
|
54
|
+
style={{
|
|
55
|
+
fontFamily: 'ui-monospace, monospace',
|
|
56
|
+
fontSize: 11,
|
|
57
|
+
color: '#888',
|
|
58
|
+
minHeight: 32,
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
{label}
|
|
62
|
+
</div>
|
|
63
|
+
<div style={{ position: 'relative', height: 110, width: 240 }}>
|
|
64
|
+
<SubsystemComponentNode {...nodeProps(component)} />
|
|
65
|
+
</div>
|
|
66
|
+
<pre
|
|
67
|
+
style={{
|
|
68
|
+
margin: 0,
|
|
69
|
+
fontSize: 10,
|
|
70
|
+
fontFamily: 'ui-monospace, monospace',
|
|
71
|
+
background: '#1a1a1a',
|
|
72
|
+
color: '#ccc',
|
|
73
|
+
padding: 8,
|
|
74
|
+
borderRadius: 4,
|
|
75
|
+
overflow: 'auto',
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
{JSON.stringify(
|
|
79
|
+
{
|
|
80
|
+
construct: component.construct,
|
|
81
|
+
proposed: component.proposed || undefined,
|
|
82
|
+
role: component.role,
|
|
83
|
+
symbol: component.symbol || undefined,
|
|
84
|
+
file: component.file || undefined,
|
|
85
|
+
},
|
|
86
|
+
null,
|
|
87
|
+
2,
|
|
88
|
+
)}
|
|
89
|
+
</pre>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const spotlightRows: Array<{ label: string; component: SubsystemComponent }> = [
|
|
95
|
+
{
|
|
96
|
+
label: 'normal function (baseline)',
|
|
97
|
+
component: {
|
|
98
|
+
id: 'live-fn',
|
|
99
|
+
name: 'ensureOpencode',
|
|
100
|
+
construct: 'function',
|
|
101
|
+
file: 'src/bun/opencode-v2.ts',
|
|
102
|
+
purl: PURL,
|
|
103
|
+
symbol: 'ensureOpencode',
|
|
104
|
+
purpose: 'Detect / install / update the OpenCode CLI',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: 'proposed function — dashed border + right badge',
|
|
109
|
+
component: {
|
|
110
|
+
id: 'prop-fn',
|
|
111
|
+
name: 'OpenCodeV2Lifecycle',
|
|
112
|
+
construct: 'function',
|
|
113
|
+
file: '',
|
|
114
|
+
purl: PURL,
|
|
115
|
+
symbol: 'OpenCodeV2Lifecycle',
|
|
116
|
+
purpose: 'Studio-managed OpenCode V2 detect / install / update',
|
|
117
|
+
proposed: true,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: 'proposed class',
|
|
122
|
+
component: {
|
|
123
|
+
id: 'prop-class',
|
|
124
|
+
name: 'MaintainModelAgent',
|
|
125
|
+
construct: 'class',
|
|
126
|
+
file: 'src/bun/maintain-model-agent.ts',
|
|
127
|
+
purl: PURL,
|
|
128
|
+
symbol: 'MaintainModelAgent',
|
|
129
|
+
purpose: 'Planned host agent that drives model maintenance',
|
|
130
|
+
proposed: true,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: 'proposed + role: entry (badge shows proposed only)',
|
|
135
|
+
component: {
|
|
136
|
+
id: 'prop-entry',
|
|
137
|
+
name: 'startMaintainFlow',
|
|
138
|
+
construct: 'function',
|
|
139
|
+
file: '',
|
|
140
|
+
purl: PURL,
|
|
141
|
+
symbol: 'startMaintainFlow',
|
|
142
|
+
purpose: 'Planned RPC entry for maintain',
|
|
143
|
+
proposed: true,
|
|
144
|
+
role: 'entry',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
label: 'external (contrast — real outside system)',
|
|
149
|
+
component: {
|
|
150
|
+
id: 'ext',
|
|
151
|
+
name: 'OpenCode CLI',
|
|
152
|
+
construct: 'external',
|
|
153
|
+
file: '',
|
|
154
|
+
purl: 'pkg:npm/@opencode-ai/cli',
|
|
155
|
+
symbol: '',
|
|
156
|
+
purpose: 'External OpenCode product',
|
|
157
|
+
role: 'service',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
];
|
|
161
|
+
|
|
162
|
+
/** Spotlights: proposed badge + dashed border vs normal and external. */
|
|
163
|
+
export const Spotlights: Story = {
|
|
164
|
+
render: () => (
|
|
165
|
+
<div
|
|
166
|
+
style={{
|
|
167
|
+
padding: 24,
|
|
168
|
+
display: 'flex',
|
|
169
|
+
flexWrap: 'wrap',
|
|
170
|
+
gap: 28,
|
|
171
|
+
alignItems: 'flex-start',
|
|
172
|
+
minHeight: '100vh',
|
|
173
|
+
boxSizing: 'border-box',
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
{spotlightRows.map((row) => (
|
|
177
|
+
<NodeSpotlight key={row.component.id} {...row} />
|
|
178
|
+
))}
|
|
179
|
+
</div>
|
|
180
|
+
),
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// Full graph: live seam calling a proposed host lifecycle + real external
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
const migrationComponents: SubsystemComponent[] = [
|
|
187
|
+
{
|
|
188
|
+
id: 'audit',
|
|
189
|
+
name: 'auditSubsystemModel',
|
|
190
|
+
construct: 'function',
|
|
191
|
+
file: 'src/bun/verify-subsystem-component.ts',
|
|
192
|
+
purl: PURL,
|
|
193
|
+
symbol: 'auditSubsystemModel',
|
|
194
|
+
purpose: 'Deterministic dry-run audit of a stored model',
|
|
195
|
+
role: 'entry',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 'lifecycle',
|
|
199
|
+
name: 'OpenCodeV2Lifecycle',
|
|
200
|
+
construct: 'function',
|
|
201
|
+
file: '',
|
|
202
|
+
purl: PURL,
|
|
203
|
+
symbol: 'OpenCodeV2Lifecycle',
|
|
204
|
+
purpose: 'Proposed Studio host: detect / install / update / Service.ensure',
|
|
205
|
+
proposed: true,
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: 'maintain',
|
|
209
|
+
name: 'runMaintainModel',
|
|
210
|
+
construct: 'function',
|
|
211
|
+
file: 'src/bun/maintain-model.ts',
|
|
212
|
+
purl: PURL,
|
|
213
|
+
symbol: 'runMaintainModel',
|
|
214
|
+
purpose: 'Existing maintain agent runner',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: 'cli',
|
|
218
|
+
name: '@opencode-ai/cli',
|
|
219
|
+
construct: 'external',
|
|
220
|
+
file: '',
|
|
221
|
+
purl: 'pkg:npm/@opencode-ai/cli@beta',
|
|
222
|
+
symbol: '',
|
|
223
|
+
purpose: 'Real external OpenCode CLI',
|
|
224
|
+
role: 'service',
|
|
225
|
+
},
|
|
226
|
+
];
|
|
227
|
+
|
|
228
|
+
const migrationEdges: SubsystemComponentEdge[] = [
|
|
229
|
+
{ id: 'e0', from: 'audit', to: 'maintain', mechanism: 'calls' },
|
|
230
|
+
{ id: 'e1', from: 'maintain', to: 'lifecycle', mechanism: 'uses' },
|
|
231
|
+
{ id: 'e2', from: 'lifecycle', to: 'cli', mechanism: 'calls' },
|
|
232
|
+
];
|
|
233
|
+
|
|
234
|
+
function MigrationDemo() {
|
|
235
|
+
const [selected, setSelected] = useState<string | null>(null);
|
|
236
|
+
return (
|
|
237
|
+
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
238
|
+
<SubsystemComponentGraph
|
|
239
|
+
components={migrationComponents}
|
|
240
|
+
edges={migrationEdges}
|
|
241
|
+
onSelect={(id) => setSelected(id)}
|
|
242
|
+
/>
|
|
243
|
+
<div style={{ marginTop: 8, padding: '0 12px', fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
|
|
244
|
+
proposed OpenCodeV2Lifecycle between live maintain code and real external CLI
|
|
245
|
+
{selected ? ` · selected: ${selected}` : ''}
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** Full graph: proposed node between live code and a true external. */
|
|
252
|
+
export const MigrationPlaceholder: Story = {
|
|
253
|
+
render: () => <MigrationDemo />,
|
|
254
|
+
};
|
|
@@ -138,7 +138,7 @@ function verificationSummary(
|
|
|
138
138
|
const bits: string[] = [];
|
|
139
139
|
if (v.file) {
|
|
140
140
|
if (!v.file.exists) bits.push('file missing');
|
|
141
|
-
else if (v.file.symbolDeclared === false) bits.push('symbol not
|
|
141
|
+
else if (v.file.symbolDeclared === false) bits.push('symbol not in graphify');
|
|
142
142
|
else if (v.file.symbolDeclared === true) bits.push('file+symbol ok');
|
|
143
143
|
else bits.push('file exists');
|
|
144
144
|
}
|