@principal-ai/subsystems-react 0.55.3 → 0.56.1

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 (98) hide show
  1. package/dist/index.d.ts +6 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +3 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/pierre/PierreFileView.js +3 -3
  6. package/dist/pierre/PierreFileView.js.map +1 -1
  7. package/dist/pierre/PierreTrailCodeView.d.ts +4 -9
  8. package/dist/pierre/PierreTrailCodeView.d.ts.map +1 -1
  9. package/dist/pierre/PierreTrailCodeView.js +28 -25
  10. package/dist/pierre/PierreTrailCodeView.js.map +1 -1
  11. package/dist/pierre/fileAvailability.d.ts +4 -7
  12. package/dist/pierre/fileAvailability.d.ts.map +1 -1
  13. package/dist/pierre/fileAvailability.js +5 -10
  14. package/dist/pierre/fileAvailability.js.map +1 -1
  15. package/dist/pierre/trailSnippet.d.ts +10 -0
  16. package/dist/pierre/trailSnippet.d.ts.map +1 -0
  17. package/dist/pierre/trailSnippet.js +22 -0
  18. package/dist/pierre/trailSnippet.js.map +1 -0
  19. package/dist/subsystem/C4Graph.d.ts.map +1 -1
  20. package/dist/subsystem/C4Graph.js +1 -1
  21. package/dist/subsystem/C4Graph.js.map +1 -1
  22. package/dist/subsystem/FileDrawer.d.ts +3 -1
  23. package/dist/subsystem/FileDrawer.d.ts.map +1 -1
  24. package/dist/subsystem/FileDrawer.js +2 -2
  25. package/dist/subsystem/FileDrawer.js.map +1 -1
  26. package/dist/subsystem/IssueList.d.ts.map +1 -1
  27. package/dist/subsystem/IssueList.js +26 -0
  28. package/dist/subsystem/IssueList.js.map +1 -1
  29. package/dist/subsystem/SubsystemComponentGraph.d.ts +9 -5
  30. package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
  31. package/dist/subsystem/SubsystemComponentGraph.js +37 -47
  32. package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
  33. package/dist/subsystem/TrailStackBreadcrumb.d.ts +21 -0
  34. package/dist/subsystem/TrailStackBreadcrumb.d.ts.map +1 -0
  35. package/dist/subsystem/TrailStackBreadcrumb.js +77 -0
  36. package/dist/subsystem/TrailStackBreadcrumb.js.map +1 -0
  37. package/dist/subsystem/TrailStepsNav.d.ts +4 -3
  38. package/dist/subsystem/TrailStepsNav.d.ts.map +1 -1
  39. package/dist/subsystem/TrailStepsNav.js +13 -16
  40. package/dist/subsystem/TrailStepsNav.js.map +1 -1
  41. package/dist/subsystem/TrailsPanel.d.ts +9 -7
  42. package/dist/subsystem/TrailsPanel.d.ts.map +1 -1
  43. package/dist/subsystem/TrailsPanel.js +126 -76
  44. package/dist/subsystem/TrailsPanel.js.map +1 -1
  45. package/dist/subsystem/model.d.ts +5 -18
  46. package/dist/subsystem/model.d.ts.map +1 -1
  47. package/dist/subsystem/model.js +3 -11
  48. package/dist/subsystem/model.js.map +1 -1
  49. package/dist/subsystem/nodes.d.ts.map +1 -1
  50. package/dist/subsystem/nodes.js +17 -24
  51. package/dist/subsystem/nodes.js.map +1 -1
  52. package/dist/subsystem/stepEmphasis.d.ts +78 -0
  53. package/dist/subsystem/stepEmphasis.d.ts.map +1 -0
  54. package/dist/subsystem/stepEmphasis.js +89 -0
  55. package/dist/subsystem/stepEmphasis.js.map +1 -0
  56. package/dist/subsystem/trailBrief.d.ts.map +1 -1
  57. package/dist/subsystem/trailBrief.js +20 -0
  58. package/dist/subsystem/trailBrief.js.map +1 -1
  59. package/dist/subsystem/trailStack.d.ts +53 -0
  60. package/dist/subsystem/trailStack.d.ts.map +1 -0
  61. package/dist/subsystem/trailStack.js +154 -0
  62. package/dist/subsystem/trailStack.js.map +1 -0
  63. package/dist/subsystem/trailStepDisplay.d.ts +38 -0
  64. package/dist/subsystem/trailStepDisplay.d.ts.map +1 -0
  65. package/dist/subsystem/trailStepDisplay.js +41 -0
  66. package/dist/subsystem/trailStepDisplay.js.map +1 -0
  67. package/package.json +3 -3
  68. package/src/index.ts +10 -1
  69. package/src/pierre/PierreFileView.tsx +3 -3
  70. package/src/pierre/PierreTrailCodeView.tsx +24 -36
  71. package/src/pierre/fileAvailability.test.ts +0 -6
  72. package/src/pierre/fileAvailability.ts +5 -13
  73. package/src/pierre/trailSnippet.test.ts +74 -0
  74. package/src/pierre/trailSnippet.ts +35 -0
  75. package/src/stories/Canvases/Subsystem/Deprecated.stories.tsx +3 -17
  76. package/src/stories/Canvases/Subsystem/NodeAnatomy.stories.tsx +3 -31
  77. package/src/stories/Canvases/Subsystem/Trails.stories.tsx +0 -187
  78. package/src/subsystem/C4Graph.tsx +0 -1
  79. package/src/subsystem/FileDrawer.tsx +6 -0
  80. package/src/subsystem/IssueList.tsx +26 -0
  81. package/src/subsystem/SubsystemComponentGraph.tsx +68 -65
  82. package/src/subsystem/TrailStackBreadcrumb.test.tsx +109 -0
  83. package/src/subsystem/TrailStackBreadcrumb.tsx +172 -0
  84. package/src/subsystem/TrailStepsNav.test.tsx +35 -0
  85. package/src/subsystem/TrailStepsNav.tsx +18 -19
  86. package/src/subsystem/TrailsPanel.test.tsx +149 -0
  87. package/src/subsystem/TrailsPanel.tsx +165 -39
  88. package/src/subsystem/model.test.ts +7 -22
  89. package/src/subsystem/model.ts +6 -20
  90. package/src/subsystem/nodes.tsx +19 -28
  91. package/src/subsystem/stepEmphasis.ts +151 -0
  92. package/src/subsystem/trailBrief.test.ts +29 -0
  93. package/src/subsystem/trailBrief.ts +20 -0
  94. package/src/subsystem/trailStack.test.ts +133 -0
  95. package/src/subsystem/trailStack.ts +229 -0
  96. package/src/subsystem/trailStepDisplay.ts +68 -0
  97. package/src/stories/Canvases/Subsystem/Proposed.stories.tsx +0 -256
  98. package/src/stories/Canvases/Subsystem/ProposedTrails.stories.tsx +0 -184
@@ -1,184 +0,0 @@
1
- import React from 'react';
2
- import '@xyflow/react/dist/style.css';
3
- import type { Meta, StoryObj } from '@storybook/react';
4
- import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
- import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
- import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
7
-
8
- const meta = {
9
- title: 'Canvases/Subsystem/ProposedTrails',
10
- component: SubsystemComponentGraph,
11
- parameters: {
12
- layout: 'fullscreen',
13
- },
14
- tags: ['autodocs'],
15
- decorators: [
16
- (Story) => (
17
- <ThemeProvider theme={defaultEditorTheme}>
18
- <Story />
19
- </ThemeProvider>
20
- ),
21
- ],
22
- } satisfies Meta<typeof SubsystemComponentGraph>;
23
-
24
- export default meta;
25
- type Story = StoryObj<typeof meta>;
26
-
27
- const PURL = 'pkg:github/principal-ai/subsystem-modeling';
28
-
29
- const components: SubsystemComponent[] = [
30
- {
31
- alias: 'audit',
32
- name: 'auditSubsystemModel',
33
- construct: 'function',
34
- file: 'src/bun/verify-subsystem-component.ts',
35
- purl: PURL,
36
- symbol: 'auditSubsystemModel',
37
- purpose: 'Deterministic dry-run audit of a stored model',
38
- role: 'entry',
39
- process: 'studio/host',
40
- },
41
- {
42
- alias: 'maintain',
43
- name: 'runMaintainModel',
44
- construct: 'function',
45
- file: 'src/bun/maintain-model.ts',
46
- purl: PURL,
47
- symbol: 'runMaintainModel',
48
- purpose: 'Existing maintain agent runner',
49
- process: 'studio/host',
50
- },
51
- {
52
- alias: 'lifecycle',
53
- name: 'OpenCodeV2Lifecycle',
54
- construct: 'function',
55
- file: '',
56
- purl: PURL,
57
- symbol: 'OpenCodeV2Lifecycle',
58
- purpose: 'Proposed Studio host: detect / install / update / ensure',
59
- proposed: true,
60
- process: 'studio/host',
61
- },
62
- {
63
- alias: 'cache',
64
- name: 'LifecycleProbeCache',
65
- construct: 'store',
66
- file: '',
67
- purl: PURL,
68
- symbol: 'LifecycleProbeCache',
69
- purpose: 'Proposed cache of probe results',
70
- proposed: true,
71
- process: 'studio/host',
72
- },
73
- {
74
- alias: 'cli',
75
- name: '@opencode-ai/cli',
76
- construct: 'external',
77
- file: '',
78
- purl: 'pkg:npm/@opencode-ai/cli@beta',
79
- symbol: '',
80
- purpose: 'Real external OpenCode CLI',
81
- role: 'service',
82
- },
83
- ];
84
-
85
- const trails: SubsystemTrail[] = [
86
- {
87
- id: 'wt-audit',
88
- title: 'Audit a model',
89
- steps: [
90
- {
91
- from: 'audit',
92
- to: 'maintain',
93
- mechanism: 'calls',
94
- file: 'src/bun/verify-subsystem-component.ts',
95
- span: { startLine: 1, endLine: 1, contentHash: 'fixture' },
96
- symbol: 'auditSubsystemModel',
97
- annotation: 'Live-only trail — no proposed badge.',
98
- },
99
- ],
100
- },
101
- {
102
- id: 'wt-install',
103
- title: 'Install OpenCode V2',
104
- steps: [
105
- {
106
- from: 'audit',
107
- to: 'maintain',
108
- mechanism: 'calls',
109
- file: 'src/bun/verify-subsystem-component.ts',
110
- span: { startLine: 1, endLine: 1, contentHash: 'fixture' },
111
- symbol: 'auditSubsystemModel',
112
- },
113
- {
114
- from: 'maintain',
115
- to: 'lifecycle',
116
- mechanism: 'uses',
117
- file: 'src/bun/maintain-model.ts',
118
- span: { startLine: 1, endLine: 1, contentHash: 'fixture' },
119
- symbol: 'runMaintainModel',
120
- annotation: 'Step onto the proposed lifecycle — step index is tinted.',
121
- },
122
- {
123
- from: 'lifecycle',
124
- to: 'cli',
125
- mechanism: 'calls',
126
- file: 'src/bun/maintain-model.ts',
127
- span: { startLine: 1, endLine: 1, contentHash: 'fixture' },
128
- symbol: 'OpenCodeV2Lifecycle.ensure',
129
- },
130
- ],
131
- },
132
- {
133
- id: 'wt-warm',
134
- title: 'Warm the probe cache',
135
- steps: [
136
- {
137
- from: 'lifecycle',
138
- to: 'cache',
139
- mechanism: 'writes',
140
- file: 'src/bun/maintain-model.ts',
141
- span: { startLine: 1, endLine: 1, contentHash: 'fixture' },
142
- symbol: 'LifecycleProbeCache.set',
143
- annotation: 'Both endpoints are proposed.',
144
- },
145
- ],
146
- },
147
- {
148
- id: 'wt-planned-seam',
149
- title: 'Planned seam (step-proposed)',
150
- steps: [
151
- {
152
- from: 'audit',
153
- to: 'cli',
154
- mechanism: 'uses',
155
- file: 'src/bun/verify-subsystem-component.ts',
156
- span: { startLine: 1, endLine: 1, contentHash: 'fixture' },
157
- symbol: 'probeCliVersion',
158
- // Step-level proposed: BOTH endpoints are real components — the
159
- // seam itself is what is planned. The edge label draws dashed on
160
- // the canvas; distinct from a proposed endpoint, which dashes the
161
- // node instead. Verification skips the step until promoted.
162
- proposed: true,
163
- annotation: 'The step itself is proposed — edge label is dashed.',
164
- },
165
- ],
166
- },
167
- ];
168
-
169
- function ProposedTrailsDemo() {
170
- return (
171
- <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
172
- <SubsystemComponentGraph
173
- components={components}
174
- trails={trails}
175
- title="proposed-work marker"
176
- description="Trails that touch a **proposed** component get their title tinted darkgoldenrod in the flows panel; expand a row and each step onto a proposed component is tinted too (index and title). Nodes for proposed components draw dashed darkgoldenrod on the canvas. A step that is itself `proposed` — a planned seam between real components — dashes its **edge label** instead."
177
- />
178
- </div>
179
- );
180
- }
181
-
182
- export const ProposedWorkflows: Story = {
183
- render: () => <ProposedTrailsDemo />,
184
- };