@principal-ai/subsystems-react 0.56.32 → 0.56.33

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 (47) hide show
  1. package/dist/graphify/anchor.d.ts +1 -44
  2. package/dist/graphify/anchor.d.ts.map +1 -1
  3. package/dist/graphify/anchor.js +1 -172
  4. package/dist/graphify/anchor.js.map +1 -1
  5. package/dist/graphify/consolidated.d.ts +1 -258
  6. package/dist/graphify/consolidated.d.ts.map +1 -1
  7. package/dist/graphify/consolidated.js +1 -10
  8. package/dist/graphify/consolidated.js.map +1 -1
  9. package/dist/graphify/construct.d.ts +1 -40
  10. package/dist/graphify/construct.d.ts.map +1 -1
  11. package/dist/graphify/construct.js +1 -99
  12. package/dist/graphify/construct.js.map +1 -1
  13. package/dist/graphify/ids.d.ts +1 -18
  14. package/dist/graphify/ids.d.ts.map +1 -1
  15. package/dist/graphify/ids.js +1 -45
  16. package/dist/graphify/ids.js.map +1 -1
  17. package/dist/graphify/resolve.d.ts +1 -47
  18. package/dist/graphify/resolve.d.ts.map +1 -1
  19. package/dist/graphify/resolve.js +1 -82
  20. package/dist/graphify/resolve.js.map +1 -1
  21. package/dist/graphify/signature.d.ts +1 -86
  22. package/dist/graphify/signature.d.ts.map +1 -1
  23. package/dist/graphify/signature.js +1 -275
  24. package/dist/graphify/signature.js.map +1 -1
  25. package/dist/graphify/types.d.ts +1 -140
  26. package/dist/graphify/types.d.ts.map +1 -1
  27. package/dist/graphify/types.js +1 -7
  28. package/dist/graphify/types.js.map +1 -1
  29. package/dist/subsystem/IssueList.d.ts.map +1 -1
  30. package/dist/subsystem/IssueList.js +4 -1
  31. package/dist/subsystem/IssueList.js.map +1 -1
  32. package/dist/subsystem/containerCard.d.ts +6 -0
  33. package/dist/subsystem/containerCard.d.ts.map +1 -1
  34. package/dist/subsystem/containerCard.js +16 -1
  35. package/dist/subsystem/containerCard.js.map +1 -1
  36. package/package.json +3 -3
  37. package/src/graphify/anchor.ts +1 -206
  38. package/src/graphify/consolidated.ts +1 -298
  39. package/src/graphify/construct.ts +1 -153
  40. package/src/graphify/ids.ts +1 -48
  41. package/src/graphify/resolve.ts +1 -115
  42. package/src/graphify/signature.ts +1 -354
  43. package/src/graphify/types.ts +1 -164
  44. package/src/subsystem/IssueList.category.test.ts +11 -0
  45. package/src/subsystem/IssueList.tsx +4 -1
  46. package/src/subsystem/containerCard.test.ts +30 -0
  47. package/src/subsystem/containerCard.tsx +34 -1
@@ -1,45 +1,2 @@
1
- /**
2
- * Resolve a subsystem component (file + symbol) to a graphify definition node.
3
- *
4
- * This is component *anchoring*, not type-ref stub rewiring (`resolve.ts`).
5
- * Conservative: never bind via corpus-wide same-name alone.
6
- */
7
- import type { GraphifyNode } from './types';
8
- import type { GraphifyAnchorResolution } from './consolidated';
9
- export interface ComponentAnchorInput {
10
- file?: string;
11
- symbol?: string;
12
- kind?: string;
13
- purl?: string;
14
- }
15
- export interface ComponentAnchorResult {
16
- resolution: GraphifyAnchorResolution;
17
- node: GraphifyNode | null;
18
- candidates: GraphifyNode[];
19
- /** make_id strings attempted on the fast path. */
20
- triedIds: string[];
21
- }
22
- /** Label forms that might match a subsystem symbol on a graphify node. */
23
- export declare function symbolLabelVariants(symbol: string): string[];
24
- /**
25
- * Anchor a subsystem component onto a graphify definition node.
26
- */
27
- export declare function resolveComponentAnchor(nodes: readonly GraphifyNode[], input: ComponentAnchorInput): ComponentAnchorResult;
28
- export type UniqueDefinitionBySymbolResult = {
29
- status: 'unique';
30
- node: GraphifyNode;
31
- } | {
32
- status: 'ambiguous';
33
- candidates: GraphifyNode[];
34
- } | {
35
- status: 'none';
36
- };
37
- /**
38
- * Corpus-wide definition lookup by symbol label only (no claimed file).
39
- * Used when the model’s file path is missing and we want a deterministic
40
- * relocate if exactly one defining file still declares the symbol.
41
- *
42
- * Unique means a single `source_file` among matching definition nodes.
43
- */
44
- export declare function findUniqueDefinitionBySymbol(nodes: readonly GraphifyNode[], symbol: string): UniqueDefinitionBySymbolResult;
1
+ export * from '@principal-ai/subsystems-core/graphify/anchor';
45
2
  //# sourceMappingURL=anchor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/graphify/anchor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAQ/D,MAAM,WAAW,oBAAoB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACrC,UAAU,EAAE,wBAAwB,CAAC;IACrC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,kDAAkD;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAaD,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAa5D;AAwBD;;GAEG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,KAAK,EAAE,oBAAoB,GACzB,qBAAqB,CAyEvB;AAED,MAAM,MAAM,8BAA8B,GACvC;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GACxC;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,UAAU,EAAE,YAAY,EAAE,CAAA;CAAE,GACnD;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtB;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC3C,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,MAAM,EAAE,MAAM,GACZ,8BAA8B,CA6BhC"}
1
+ {"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/graphify/anchor.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
@@ -1,173 +1,2 @@
1
- /**
2
- * Resolve a subsystem component (file + symbol) to a graphify definition node.
3
- *
4
- * This is component *anchoring*, not type-ref stub rewiring (`resolve.ts`).
5
- * Conservative: never bind via corpus-wide same-name alone.
6
- */
7
- import { normalizeGraphifyLabel } from './resolve';
8
- import { graphifyFileStem, makeGraphifyId, normalizeSourcePath, } from './ids';
9
- const FILE_SUFFIX_RE = /\.(py|js|jsx|ts|tsx|mjs|cjs|java|go|rs|rb|php|cs|cpp|cc|c|h|hpp|pas|pp|dpr|swift|kt|scala|dart|lua|pl|pm|ex|exs|zig|vue|svelte)$/i;
10
- function isDefinition(node) {
11
- if (node.file_type !== 'code')
12
- return false;
13
- const file = typeof node.source_file === 'string' ? node.source_file : '';
14
- if (!file)
15
- return false;
16
- const label = typeof node.label === 'string' ? node.label.trim() : '';
17
- return !!label && !FILE_SUFFIX_RE.test(label);
18
- }
19
- /** Label forms that might match a subsystem symbol on a graphify node. */
20
- export function symbolLabelVariants(symbol) {
21
- const raw = symbol.trim();
22
- if (!raw)
23
- return [];
24
- const last = raw.includes('.') ? (raw.split('.').pop() ?? raw) : raw;
25
- const variants = new Set([
26
- raw,
27
- last,
28
- `${raw}()`,
29
- `${last}()`,
30
- `.${last}()`,
31
- `.${last}`,
32
- ]);
33
- return [...variants];
34
- }
35
- function labelMatchesSymbol(label, symbol) {
36
- const variants = symbolLabelVariants(symbol);
37
- const trimmed = label.trim();
38
- if (variants.includes(trimmed))
39
- return true;
40
- const foldedLabel = normalizeGraphifyLabel(trimmed);
41
- return variants.some((v) => normalizeGraphifyLabel(v) === foldedLabel);
42
- }
43
- function candidateIdsFor(file, symbol) {
44
- const stem = graphifyFileStem(file);
45
- if (!stem)
46
- return [];
47
- const parts = symbol.split('.').map((p) => p.trim()).filter(Boolean);
48
- const ids = new Set();
49
- ids.add(makeGraphifyId(stem, symbol));
50
- if (parts.length > 0)
51
- ids.add(makeGraphifyId(stem, ...parts));
52
- if (parts.length === 2) {
53
- // Class method: make_id(class_id, method) ≈ make_id(stem, Class, method)
54
- ids.add(makeGraphifyId(stem, parts[0], parts[1]));
55
- }
56
- return [...ids];
57
- }
58
- /**
59
- * Anchor a subsystem component onto a graphify definition node.
60
- */
61
- export function resolveComponentAnchor(nodes, input) {
62
- const file = input.file?.trim() ? normalizeSourcePath(input.file) : '';
63
- const symbol = input.symbol?.trim() ?? '';
64
- if (!file || !symbol) {
65
- return { resolution: 'missing', node: null, candidates: [], triedIds: [] };
66
- }
67
- const byId = new Map();
68
- const inFile = [];
69
- for (const node of nodes) {
70
- byId.set(String(node.id), node);
71
- if (!isDefinition(node))
72
- continue;
73
- const sf = normalizeSourcePath(String(node.source_file ?? ''));
74
- if (sf === file)
75
- inFile.push(node);
76
- }
77
- const triedIds = candidateIdsFor(file, symbol);
78
- const idHits = [];
79
- for (const id of triedIds) {
80
- const hit = byId.get(id);
81
- if (!hit || !isDefinition(hit))
82
- continue;
83
- const sf = normalizeSourcePath(String(hit.source_file ?? ''));
84
- if (sf === file)
85
- idHits.push(hit);
86
- }
87
- const uniqueIdHits = [...new Map(idHits.map((n) => [String(n.id), n])).values()];
88
- if (uniqueIdHits.length === 1) {
89
- return {
90
- resolution: 'exact',
91
- node: uniqueIdHits[0],
92
- candidates: [],
93
- triedIds,
94
- };
95
- }
96
- if (uniqueIdHits.length > 1) {
97
- return {
98
- resolution: 'ambiguous',
99
- node: null,
100
- candidates: uniqueIdHits,
101
- triedIds,
102
- };
103
- }
104
- if (inFile.length === 0) {
105
- return { resolution: 'missing', node: null, candidates: [], triedIds };
106
- }
107
- const labelHits = inFile.filter((n) => labelMatchesSymbol(String(n.label ?? ''), symbol));
108
- if (labelHits.length === 1) {
109
- return {
110
- resolution: 'exact',
111
- node: labelHits[0],
112
- candidates: [],
113
- triedIds,
114
- };
115
- }
116
- if (labelHits.length > 1) {
117
- return {
118
- resolution: 'ambiguous',
119
- node: null,
120
- candidates: labelHits,
121
- triedIds,
122
- };
123
- }
124
- // File has code nodes but none matched the symbol.
125
- return {
126
- resolution: 'file-only',
127
- node: null,
128
- candidates: inFile.slice(0, 8),
129
- triedIds,
130
- };
131
- }
132
- /**
133
- * Corpus-wide definition lookup by symbol label only (no claimed file).
134
- * Used when the model’s file path is missing and we want a deterministic
135
- * relocate if exactly one defining file still declares the symbol.
136
- *
137
- * Unique means a single `source_file` among matching definition nodes.
138
- */
139
- export function findUniqueDefinitionBySymbol(nodes, symbol) {
140
- const trimmed = symbol.trim();
141
- if (!trimmed)
142
- return { status: 'none' };
143
- const hits = [];
144
- for (const node of nodes) {
145
- if (!isDefinition(node))
146
- continue;
147
- if (!labelMatchesSymbol(String(node.label ?? ''), trimmed))
148
- continue;
149
- hits.push(node);
150
- }
151
- if (hits.length === 0)
152
- return { status: 'none' };
153
- const byFile = new Map();
154
- for (const n of hits) {
155
- const sf = normalizeSourcePath(String(n.source_file ?? ''));
156
- if (!sf)
157
- continue;
158
- const list = byFile.get(sf) ?? [];
159
- list.push(n);
160
- byFile.set(sf, list);
161
- }
162
- if (byFile.size === 0)
163
- return { status: 'none' };
164
- if (byFile.size > 1) {
165
- return {
166
- status: 'ambiguous',
167
- candidates: hits.slice(0, 12),
168
- };
169
- }
170
- const only = [...byFile.values()][0];
171
- return { status: 'unique', node: only[0] };
172
- }
1
+ export * from '@principal-ai/subsystems-core/graphify/anchor';
173
2
  //# sourceMappingURL=anchor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/graphify/anchor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EACN,gBAAgB,EAChB,cAAc,EACd,mBAAmB,GACnB,MAAM,OAAO,CAAC;AAiBf,MAAM,cAAc,GACnB,mIAAmI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I,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjD,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,EAAE;QACpB,OAAO;YACN,MAAM,EAAE,WAAW;YACnB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;SAC7B,CAAC;KACF;IACD,MAAM,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC;IACtC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAE,EAAE,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/graphify/anchor.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
@@ -1,259 +1,2 @@
1
- /**
2
- * Graphify consolidated / drill-down types.
3
- *
4
- * graphify stores the graph in flat, normalized form — class vs function vs
5
- * type is NOT a node attribute (every code node is `file_type: "code"`); it is
6
- * derived from graph structure. These types rebuild that structure from the raw
7
- * edges so a UI can show a drill-down modal for a subsystem component or jump
8
- * to its definition file.
9
- */
10
- import type { GraphifyConfidence, GraphifyFileType, GraphifyRelation } from './types';
11
- /** How a subsystem component resolved to a graphify node. */
12
- export type GraphifyAnchorResolution = 'exact' | 'file-only' | 'ambiguous' | 'missing';
13
- /**
14
- * The bridge between a facet component and the graphify graph.
15
- *
16
- * `nodeId` is reconstructed from the component's `file` + `symbol` via the id
17
- * slug scheme; `resolution` says how confident that reconstruction is.
18
- * `source_file` + `source_location` are the "open the definition" primitive.
19
- */
20
- export interface SubsystemGraphifyAnchor {
21
- /** Resolved graphify node id. */
22
- nodeId: string;
23
- /** PURL of the repo the node lives in (pkg:github/owner/repo). */
24
- purl: string;
25
- /** How the anchor resolved — the honesty signal for verification. */
26
- resolution: GraphifyAnchorResolution;
27
- /** Human-readable node label from the graph. */
28
- label: string;
29
- /** Repo-relative path of the node's source file. */
30
- source_file: string;
31
- /** `L<line>` — the line of the definition for a file-open jump. */
32
- source_location?: string;
33
- /** Node classification from the graph. */
34
- file_type: GraphifyFileType;
35
- /** Leiden community id. */
36
- community?: number | null;
37
- /** Human-readable community label. */
38
- community_name?: string;
39
- }
40
- /** A method on a class-like node (`method` edge from the class). */
41
- export interface GraphifyMethodInfo {
42
- /** The method's own node id. */
43
- nodeId: string;
44
- /** Display name from the label (`.get()` → `get`). */
45
- name: string;
46
- /** Typed parameters from `references` edges with context `parameter_type`. */
47
- parameters?: GraphifyParamInfo[];
48
- /** Return type from a `references` edge with context `return_type`. */
49
- returnType?: string;
50
- /** Backing edge target for `returnType`, when the graph had one. */
51
- returnTypeRef?: GraphifyReferenceInfo;
52
- }
53
- /** A property/field on a class- or type-like node. */
54
- export interface GraphifyPropertyInfo {
55
- /** Field name — present when graphify emits a `defines` node (C++). */
56
- name: string;
57
- /** Field type from a `references` edge with context `field`. */
58
- type?: string;
59
- /** Backing edge target for `type`, when the graph had one. */
60
- typeRef?: GraphifyReferenceInfo;
61
- /** The field's own node id when it exists (e.g. C++ `defines` nodes). */
62
- nodeId?: string;
63
- }
64
- /**
65
- * A single typed parameter of a function (`references` context `parameter_type`).
66
- *
67
- * `ref.nodeId` is the resolvable half: it targets the type's definition node
68
- * when graphify resolved the reference, or a sourceless stub node when the
69
- * name was ambiguous / external (see `resolveGraphifyTypeRef`).
70
- */
71
- export interface GraphifyParamInfo {
72
- /** Parameter name — not captured by graphify; left undefined. */
73
- name?: string;
74
- /** Parameter type. */
75
- type: string;
76
- /** Backing `references[parameter_type|generic_arg]` edge target. */
77
- ref?: GraphifyReferenceInfo;
78
- }
79
- /** One call relationship, in either direction. */
80
- export interface GraphifyCallInfo {
81
- /** The other endpoint's node id (caller for `callers`, callee for `callees`). */
82
- nodeId: string;
83
- /** The other endpoint's display label. */
84
- name: string;
85
- /** `L<line>` of the call site. */
86
- source_location?: string;
87
- }
88
- /** A type-name reference to a node (`references` edge with a context). */
89
- export interface GraphifyReferenceInfo {
90
- /** The referenced node id. */
91
- nodeId: string;
92
- /** The referenced node's display label. */
93
- name: string;
94
- /** Reference context (e.g. `type`, `field`, `generic_arg`, `attribute`). */
95
- context?: string;
96
- /** `L<line>` of the reference site. */
97
- source_location?: string;
98
- }
99
- /** A class-like node: owns outgoing `method` edges. */
100
- export interface GraphifyClassDetail {
101
- kind: 'class';
102
- /** Methods connected via `method` edges. */
103
- methods: GraphifyMethodInfo[];
104
- /** Fields from `defines`/`references` context `field`. */
105
- properties: GraphifyPropertyInfo[];
106
- /** `inherits` edge targets. */
107
- extends: string[];
108
- /** `implements` edge targets. */
109
- implements: string[];
110
- /** Incoming `calls` — graphify models constructor calls as calls into the class. */
111
- instantiations: GraphifyCallInfo[];
112
- /** Everywhere the type name is referenced (`references` edges). */
113
- references: GraphifyReferenceInfo[];
114
- }
115
- /** A function-like node: label ends `name()` with no `method` edges. */
116
- export interface GraphifyFunctionDetail {
117
- kind: 'function';
118
- /** Parameter types from `references` context `parameter_type`. */
119
- parameters: GraphifyParamInfo[];
120
- /** Return type from `references` context `return_type`. */
121
- returnType?: string;
122
- /** Backing edge target for `returnType`, when the graph had one. */
123
- returnTypeRef?: GraphifyReferenceInfo;
124
- /** Incoming `calls` edges. */
125
- callers: GraphifyCallInfo[];
126
- /** Outgoing `calls` edges. */
127
- callees: GraphifyCallInfo[];
128
- }
129
- /** One generic type parameter, e.g. `T` or `K extends keyof StudioMessages`. */
130
- export interface GraphifyTypeParamInfo {
131
- name: string;
132
- /** Constraint written after `extends` (or language equivalent). */
133
- constraint?: string;
134
- }
135
- /** A callable/function type: `(params) => returnType`. */
136
- export interface GraphifyCallableTypeInfo {
137
- parameters?: GraphifyParamInfo[];
138
- returnType?: string;
139
- }
140
- /** One enum member, with its optional literal value. */
141
- export interface GraphifyEnumMemberInfo {
142
- name: string;
143
- value?: string;
144
- }
145
- /** A type-like node (interface/struct): revealed by incoming `implements` edges. */
146
- export interface GraphifyTypeDetail {
147
- kind: 'type';
148
- /** Struct/interface fields. */
149
- properties: GraphifyPropertyInfo[];
150
- /** Nodes referencing this type name. */
151
- usedBy: GraphifyReferenceInfo[];
152
- /** Nodes that `inherits`/`implements` this type. */
153
- implementors: string[];
154
- /** Generic type parameters, e.g. `<K extends keyof StudioMessages>`. */
155
- generics?: GraphifyTypeParamInfo[];
156
- /** Callable type — `(params) => returnType` (TS/Go/Rust fn, Java lambda). */
157
- signature?: GraphifyCallableTypeInfo;
158
- /** Enum members (name, optional literal value). */
159
- enumMembers?: GraphifyEnumMemberInfo[];
160
- /** Alias whose RHS is a plain reference, e.g. `StudioMessages[K]`. */
161
- aliasOf?: string;
162
- /** Simple union of alternatives, e.g. `'started' | 'stopped'`. */
163
- unionOf?: string[];
164
- /**
165
- * Verbatim RHS — the escape hatch for shapes the structured fields can't
166
- * express (mapped/conditional/template-literal/infer types, `typeof`/utility
167
- * compositions, C pointers, Rust trait objects). Wins over every shape above.
168
- */
169
- rhs?: string;
170
- }
171
- /** A facet-only component with no graphify node (external consumer stub). */
172
- export interface GraphifyExternalDetail {
173
- kind: 'external';
174
- /** Facet-only label; there is no backing graph data. */
175
- label?: string;
176
- /**
177
- * Authored key/value facts about the dependency (endpoints, install command,
178
- * db path). Mirrors the model document's `external.attributes`; graphify never
179
- * populates it, it is authored alongside the facet.
180
- */
181
- attributes?: GraphifyCustomEntityAttribute[];
182
- }
183
- /** A single authored attribute on a custom entity — free-form key/value. */
184
- export interface GraphifyCustomEntityAttribute {
185
- key: string;
186
- value: string;
187
- }
188
- /**
189
- * A custom-entity (actor — Person/agent/queue) declaration. Authored, never
190
- * extracted: there is no graphify node for a Person. `attributes` are
191
- * free-form key/value pairs surfaced in the declaration panel; the base
192
- * component fields carry the node identity (`entityKind`, `color`, `purpose`).
193
- */
194
- export interface GraphifyCustomEntityDetail {
195
- kind: 'custom_entity';
196
- attributes: GraphifyCustomEntityAttribute[];
197
- }
198
- /**
199
- * A retained-state node (`kind: 'store'`): state and its contract, no
200
- * behavior. `kind` is the node's verifiable anchor — a store anchors to a
201
- * *state location* (module consts, a file or db), not to a declaration.
202
- * When a class manages the store's access, that is a SEPARATE node
203
- * (`kind: 'class'`, methods = the access mechanism) joined by
204
- * `writes`/`reads` — never merged into one hybrid node. This payload
205
- * renders as state declarations (`declare const …`), never as a class
206
- * stub.
207
- */
208
- export interface GraphifyStoreDetail {
209
- kind: 'store';
210
- /** The retained state members (module-level consts or class fields). */
211
- properties: GraphifyPropertyInfo[];
212
- /**
213
- * Where the retained state physically lives / who mediates access. Authored
214
- * — graphify cannot infer it: `memory` = process-lifetime RAM, `disk` =
215
- * this process reads/writes the filesystem, `external` = mediated by another
216
- * system (db/service; carries no `process`).
217
- */
218
- storage?: 'memory' | 'disk' | 'external';
219
- /**
220
- * The type of the retained state itself — a store declares its type the way
221
- * every other declaration does (`Map<string, FeedState>`, `Set<Listener>`,
222
- * a table's row type). Orthogonal to `storage`.
223
- */
224
- valueType?: string;
225
- /** Backing edge target for `valueType`, when the graph has one. */
226
- valueTypeRef?: GraphifyReferenceInfo;
227
- }
228
- /** A standalone method selected from its owning class. */
229
- export interface GraphifyMethodDetail {
230
- kind: 'method';
231
- /** The class that owns this method. */
232
- hostClass: string;
233
- /** Parameter types from `references` context `parameter_type`. */
234
- parameters?: GraphifyParamInfo[];
235
- /** Return type from `references` context `return_type`. */
236
- returnType?: string;
237
- }
238
- /**
239
- * The structured declaration payload for a subsystem component (click panel).
240
- *
241
- * The discriminant is derived from graph structure, not read off the node:
242
- * method edges → class; `()` label + no method edges → function; incoming
243
- * `implements` → type. File/module Graphify nodes are not subsystem
244
- * declaration kinds — anchor to a concrete export instead. `external`
245
- * covers consumer stubs. `method` covers standalone method components
246
- * selected from a class.
247
- */
248
- export type GraphifyComponentDetail = GraphifyClassDetail | GraphifyFunctionDetail | GraphifyMethodDetail | GraphifyTypeDetail | GraphifyExternalDetail | GraphifyCustomEntityDetail | GraphifyStoreDetail;
249
- /** A raw graphify edge backing a facet claim (verification + provenance). */
250
- export interface GraphifyEdgeRef {
251
- source: string;
252
- target: string;
253
- relation: GraphifyRelation;
254
- confidence: GraphifyConfidence;
255
- confidence_score?: number;
256
- source_file: string;
257
- source_location?: string;
258
- }
1
+ export * from '@principal-ai/subsystems-core/graphify/consolidated';
259
2
  //# sourceMappingURL=consolidated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consolidated.d.ts","sourceRoot":"","sources":["../../src/graphify/consolidated.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,6DAA6D;AAC7D,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,UAAU,EAAE,wBAAwB,CAAC;IACrC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,SAAS,EAAE,gBAAgB,CAAC;IAC5B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,sCAAsC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM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CAAC;AAExB,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
1
+ {"version":3,"file":"consolidated.d.ts","sourceRoot":"","sources":["../../src/graphify/consolidated.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC"}
@@ -1,11 +1,2 @@
1
- /**
2
- * Graphify consolidated / drill-down types.
3
- *
4
- * graphify stores the graph in flat, normalized form — class vs function vs
5
- * type is NOT a node attribute (every code node is `file_type: "code"`); it is
6
- * derived from graph structure. These types rebuild that structure from the raw
7
- * edges so a UI can show a drill-down modal for a subsystem component or jump
8
- * to its definition file.
9
- */
10
- export {};
1
+ export * from '@principal-ai/subsystems-core/graphify/consolidated';
11
2
  //# sourceMappingURL=consolidated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consolidated.js","sourceRoot":"","sources":["../../src/graphify/consolidated.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
1
+ {"version":3,"file":"consolidated.js","sourceRoot":"","sources":["../../src/graphify/consolidated.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC"}
@@ -1,41 +1,2 @@
1
- /**
2
- * Infer a subsystem-style construct from a graphify node + edges.
3
- *
4
- * Graphify does not store construct on nodes (everything is `file_type: "code"`).
5
- * Class vs function vs type is derived from structure — same rules as
6
- * `GraphifyComponentDetail` in consolidated.ts.
7
- */
8
- import type { GraphifyEdge, GraphifyNode } from './types';
9
- /** Construct inferred from graph structure (never read off the node). */
10
- export type InferredGraphifyConstruct = 'class' | 'function' | 'method' | 'type' | 'module' | 'unknown';
11
- export interface InferConstructFromGraphifyResult {
12
- construct: InferredGraphifyConstruct;
13
- evidence: string[];
14
- }
15
- /**
16
- * Infer construct for a definition node from its label and incident edges.
17
- *
18
- * Priority: class → method → function → type → module → unknown.
19
- */
20
- export declare function inferConstructFromGraphify(node: GraphifyNode, edges: readonly GraphifyEdge[]): InferConstructFromGraphifyResult;
21
- /** Strict claimed-vs-inferred check, with type-family compatibility. */
22
- export declare function constructsMatch(claimed: string | undefined, inferred: InferredGraphifyConstruct): boolean;
23
- export interface ConstructCheckOutcome {
24
- /** true = confirmed, false = known mismatch, null = unconfirmed (needs agent). */
25
- match: boolean | null;
26
- /** Confirming construct from an accepted augmentation, when that is what confirmed it. */
27
- augmentedBy?: string;
28
- }
29
- /**
30
- * Resolve a claimed construct against Graphify's inferred construct, allowing an
31
- * accepted, agent-confirmed augmentation to stand in for Graphify when it is
32
- * silent (`unknown`) or when it disagrees.
33
- *
34
- * Graphify's inferred construct is a *structural hint*, never ground truth: its
35
- * vocabulary (`class | function | method | type | module | unknown`) has no
36
- * `store` or `custom_entity`, and a call-style accessor label biases it to
37
- * `function`. When source-reading confirms the model's claim, that confirmation
38
- * (recorded as an accepted augmentation) wins over the hint.
39
- */
40
- export declare function resolveConstructMatch(claimed: string | undefined, inferred: InferredGraphifyConstruct, augmentedConstruct?: string | null): ConstructCheckOutcome;
1
+ export * from '@principal-ai/subsystems-core/graphify/construct';
41
2
  //# sourceMappingURL=construct.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"construct.d.ts","sourceRoot":"","sources":["../../src/graphify/construct.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D,yEAAyE;AACzE,MAAM,MAAM,yBAAyB,GAClC,OAAO,GACP,UAAU,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,SAAS,CAAC;AAEb,MAAM,WAAW,gCAAgC;IAChD,SAAS,EAAE,yBAAyB,CAAC;IACrC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAqBD;;;;GAIG;AACH,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,SAAS,YAAY,EAAE,GAC5B,gCAAgC,CAqDlC;AAOD,wEAAwE;AACxE,wBAAgB,eAAe,CAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,yBAAyB,GACjC,OAAO,CAIT;AAED,MAAM,WAAW,qBAAqB;IACrC,kFAAkF;IAClF,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,yBAAyB,EACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAChC,qBAAqB,CASvB"}
1
+ {"version":3,"file":"construct.d.ts","sourceRoot":"","sources":["../../src/graphify/construct.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC"}