@alavida/agentpack 0.1.2 → 0.1.3
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/README.md +11 -1
- package/bin/intent.js +20 -0
- package/package.json +11 -5
- package/skills/agentpack-cli/SKILL.md +4 -1
- package/skills/authoring-skillgraphs-from-knowledge/SKILL.md +148 -0
- package/skills/authoring-skillgraphs-from-knowledge/references/authored-metadata.md +6 -0
- package/skills/developing-and-testing-skills/SKILL.md +109 -0
- package/skills/developing-and-testing-skills/references/local-workbench.md +7 -0
- package/skills/getting-started-skillgraphs/SKILL.md +115 -0
- package/skills/getting-started-skillgraphs/references/command-routing.md +7 -0
- package/skills/identifying-skill-opportunities/SKILL.md +119 -0
- package/skills/identifying-skill-opportunities/references/capability-boundaries.md +6 -0
- package/skills/maintaining-skillgraph-freshness/SKILL.md +110 -0
- package/skills/repairing-broken-skill-or-plugin-state/SKILL.md +112 -0
- package/skills/repairing-broken-skill-or-plugin-state/references/diagnostic-flows.md +6 -0
- package/skills/shipping-production-plugins-and-packages/SKILL.md +123 -0
- package/skills/shipping-production-plugins-and-packages/references/plugin-delivery.md +6 -0
- package/src/application/skills/build-skill-workbench-model.js +194 -0
- package/src/application/skills/run-skill-workbench-action.js +23 -0
- package/src/application/skills/start-skill-dev-workbench.js +192 -0
- package/src/cli.js +1 -1
- package/src/commands/skills.js +7 -1
- package/src/dashboard/App.jsx +343 -0
- package/src/dashboard/components/Breadcrumbs.jsx +45 -0
- package/src/dashboard/components/ControlStrip.jsx +153 -0
- package/src/dashboard/components/InspectorPanel.jsx +203 -0
- package/src/dashboard/components/SkillGraph.jsx +567 -0
- package/src/dashboard/components/Tooltip.jsx +111 -0
- package/src/dashboard/dist/dashboard.js +26692 -0
- package/src/dashboard/index.html +81 -0
- package/src/dashboard/lib/api.js +19 -0
- package/src/dashboard/lib/router.js +15 -0
- package/src/dashboard/main.jsx +4 -0
- package/src/domain/plugins/load-plugin-definition.js +163 -0
- package/src/domain/plugins/plugin-diagnostic-error.js +18 -0
- package/src/domain/plugins/plugin-requirements.js +15 -0
- package/src/domain/skills/skill-graph.js +1 -0
- package/src/infrastructure/runtime/open-browser.js +20 -0
- package/src/infrastructure/runtime/skill-dev-workbench-server.js +96 -0
- package/src/infrastructure/runtime/watch-skill-workbench.js +68 -0
- package/src/lib/plugins.js +19 -28
- package/src/lib/skills.js +60 -12
- package/src/utils/errors.js +33 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
const BUTTON_STYLE = {
|
|
2
|
+
fontFamily: 'var(--font-mono)',
|
|
3
|
+
fontSize: 11,
|
|
4
|
+
background: 'var(--surface)',
|
|
5
|
+
border: '1px solid var(--border-bright)',
|
|
6
|
+
color: 'var(--text-dim)',
|
|
7
|
+
padding: '8px 16px',
|
|
8
|
+
cursor: 'pointer',
|
|
9
|
+
transition: 'all 200ms ease',
|
|
10
|
+
letterSpacing: '0.04em',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function ControlStrip({ onAction, busyAction, labelsVisible, onToggleLabels, knowledgeVisible, onToggleKnowledge, lightMode, onToggleTheme }) {
|
|
14
|
+
return (
|
|
15
|
+
<div style={{
|
|
16
|
+
position: 'fixed',
|
|
17
|
+
bottom: 28,
|
|
18
|
+
left: 40,
|
|
19
|
+
display: 'flex',
|
|
20
|
+
gap: 8,
|
|
21
|
+
zIndex: 10,
|
|
22
|
+
}}>
|
|
23
|
+
<button
|
|
24
|
+
type="button"
|
|
25
|
+
style={BUTTON_STYLE}
|
|
26
|
+
onClick={() => onAction('reset-zoom')}
|
|
27
|
+
onMouseEnter={(e) => {
|
|
28
|
+
e.target.style.color = 'var(--text)';
|
|
29
|
+
e.target.style.borderColor = 'var(--status-current)';
|
|
30
|
+
}}
|
|
31
|
+
onMouseLeave={(e) => {
|
|
32
|
+
e.target.style.color = 'var(--text-dim)';
|
|
33
|
+
e.target.style.borderColor = 'var(--border-bright)';
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
Reset
|
|
37
|
+
</button>
|
|
38
|
+
<button
|
|
39
|
+
type="button"
|
|
40
|
+
style={BUTTON_STYLE}
|
|
41
|
+
disabled={Boolean(busyAction)}
|
|
42
|
+
onClick={() => onAction('validate-skill')}
|
|
43
|
+
onMouseEnter={(e) => {
|
|
44
|
+
e.target.style.color = 'var(--text)';
|
|
45
|
+
e.target.style.borderColor = 'var(--status-current)';
|
|
46
|
+
}}
|
|
47
|
+
onMouseLeave={(e) => {
|
|
48
|
+
e.target.style.color = 'var(--text-dim)';
|
|
49
|
+
e.target.style.borderColor = 'var(--border-bright)';
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
{busyAction === 'validate-skill' ? 'Validating...' : 'Validate'}
|
|
53
|
+
</button>
|
|
54
|
+
<button
|
|
55
|
+
type="button"
|
|
56
|
+
style={BUTTON_STYLE}
|
|
57
|
+
disabled={Boolean(busyAction)}
|
|
58
|
+
onClick={() => onAction('refresh')}
|
|
59
|
+
onMouseEnter={(e) => {
|
|
60
|
+
e.target.style.color = 'var(--text)';
|
|
61
|
+
e.target.style.borderColor = 'var(--status-current)';
|
|
62
|
+
}}
|
|
63
|
+
onMouseLeave={(e) => {
|
|
64
|
+
e.target.style.color = 'var(--text-dim)';
|
|
65
|
+
e.target.style.borderColor = 'var(--border-bright)';
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
68
|
+
{busyAction === 'refresh' ? 'Refreshing...' : 'Refresh'}
|
|
69
|
+
</button>
|
|
70
|
+
<button
|
|
71
|
+
type="button"
|
|
72
|
+
style={{
|
|
73
|
+
...BUTTON_STYLE,
|
|
74
|
+
...(labelsVisible ? {} : {
|
|
75
|
+
color: 'var(--status-current)',
|
|
76
|
+
borderColor: 'var(--status-current)',
|
|
77
|
+
background: 'rgba(143, 166, 126, 0.08)',
|
|
78
|
+
}),
|
|
79
|
+
}}
|
|
80
|
+
onClick={onToggleLabels}
|
|
81
|
+
onMouseEnter={(e) => {
|
|
82
|
+
e.target.style.color = 'var(--text)';
|
|
83
|
+
e.target.style.borderColor = 'var(--status-current)';
|
|
84
|
+
}}
|
|
85
|
+
onMouseLeave={(e) => {
|
|
86
|
+
if (labelsVisible) {
|
|
87
|
+
e.target.style.color = 'var(--text-dim)';
|
|
88
|
+
e.target.style.borderColor = 'var(--border-bright)';
|
|
89
|
+
} else {
|
|
90
|
+
e.target.style.color = 'var(--status-current)';
|
|
91
|
+
e.target.style.borderColor = 'var(--status-current)';
|
|
92
|
+
}
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
{labelsVisible ? 'Hide labels' : 'Show labels'}
|
|
96
|
+
</button>
|
|
97
|
+
<button
|
|
98
|
+
type="button"
|
|
99
|
+
style={{
|
|
100
|
+
...BUTTON_STYLE,
|
|
101
|
+
...(knowledgeVisible ? {
|
|
102
|
+
color: 'var(--edge-provenance)',
|
|
103
|
+
borderColor: 'var(--edge-provenance)',
|
|
104
|
+
background: 'rgba(122, 154, 187, 0.08)',
|
|
105
|
+
} : {}),
|
|
106
|
+
}}
|
|
107
|
+
onClick={onToggleKnowledge}
|
|
108
|
+
onMouseEnter={(e) => {
|
|
109
|
+
e.target.style.color = 'var(--text)';
|
|
110
|
+
e.target.style.borderColor = 'var(--edge-provenance)';
|
|
111
|
+
}}
|
|
112
|
+
onMouseLeave={(e) => {
|
|
113
|
+
if (knowledgeVisible) {
|
|
114
|
+
e.target.style.color = 'var(--edge-provenance)';
|
|
115
|
+
e.target.style.borderColor = 'var(--edge-provenance)';
|
|
116
|
+
} else {
|
|
117
|
+
e.target.style.color = 'var(--text-dim)';
|
|
118
|
+
e.target.style.borderColor = 'var(--border-bright)';
|
|
119
|
+
}
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
Knowledge
|
|
123
|
+
</button>
|
|
124
|
+
<button
|
|
125
|
+
type="button"
|
|
126
|
+
style={{
|
|
127
|
+
...BUTTON_STYLE,
|
|
128
|
+
...(lightMode ? {
|
|
129
|
+
color: 'var(--accent)',
|
|
130
|
+
borderColor: 'var(--accent)',
|
|
131
|
+
background: 'rgba(196, 138, 32, 0.08)',
|
|
132
|
+
} : {}),
|
|
133
|
+
}}
|
|
134
|
+
onClick={onToggleTheme}
|
|
135
|
+
onMouseEnter={(e) => {
|
|
136
|
+
e.target.style.color = 'var(--text)';
|
|
137
|
+
e.target.style.borderColor = 'var(--accent)';
|
|
138
|
+
}}
|
|
139
|
+
onMouseLeave={(e) => {
|
|
140
|
+
if (lightMode) {
|
|
141
|
+
e.target.style.color = 'var(--accent)';
|
|
142
|
+
e.target.style.borderColor = 'var(--accent)';
|
|
143
|
+
} else {
|
|
144
|
+
e.target.style.color = 'var(--text-dim)';
|
|
145
|
+
e.target.style.borderColor = 'var(--border-bright)';
|
|
146
|
+
}
|
|
147
|
+
}}
|
|
148
|
+
>
|
|
149
|
+
{lightMode ? 'Dark' : 'Light'}
|
|
150
|
+
</button>
|
|
151
|
+
</div>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
const STATUS_COLORS = {
|
|
2
|
+
current: 'var(--status-current)',
|
|
3
|
+
stale: 'var(--status-stale)',
|
|
4
|
+
affected: 'var(--status-affected)',
|
|
5
|
+
changed: 'var(--status-stale)',
|
|
6
|
+
unknown: 'var(--status-unknown)',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
function StatusPill({ status }) {
|
|
10
|
+
const color = STATUS_COLORS[status] || STATUS_COLORS.unknown;
|
|
11
|
+
return (
|
|
12
|
+
<span style={{
|
|
13
|
+
fontFamily: 'var(--font-mono)',
|
|
14
|
+
fontSize: 10,
|
|
15
|
+
padding: '3px 10px',
|
|
16
|
+
letterSpacing: '0.04em',
|
|
17
|
+
background: `color-mix(in srgb, ${color} 12%, transparent)`,
|
|
18
|
+
color,
|
|
19
|
+
textTransform: 'uppercase',
|
|
20
|
+
}}>
|
|
21
|
+
{status}
|
|
22
|
+
</span>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function MetaRow({ label, children }) {
|
|
27
|
+
return (
|
|
28
|
+
<div style={{ marginTop: 16 }}>
|
|
29
|
+
<div style={{
|
|
30
|
+
fontFamily: 'var(--font-mono)',
|
|
31
|
+
fontVariant: 'small-caps',
|
|
32
|
+
textTransform: 'uppercase',
|
|
33
|
+
letterSpacing: 3,
|
|
34
|
+
fontSize: 9,
|
|
35
|
+
color: 'var(--text-faint)',
|
|
36
|
+
marginBottom: 6,
|
|
37
|
+
}}>
|
|
38
|
+
{label}
|
|
39
|
+
</div>
|
|
40
|
+
<div style={{ fontSize: 14, color: 'var(--text-dim)', lineHeight: 1.6 }}>
|
|
41
|
+
{children}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function InspectorPanel({ node, onClose, onNavigate }) {
|
|
48
|
+
return (
|
|
49
|
+
<aside style={{
|
|
50
|
+
position: 'fixed',
|
|
51
|
+
top: 0,
|
|
52
|
+
right: 0,
|
|
53
|
+
width: node ? 340 : 0,
|
|
54
|
+
height: '100vh',
|
|
55
|
+
background: 'var(--surface)',
|
|
56
|
+
borderLeft: '1px solid var(--border)',
|
|
57
|
+
transition: 'width 300ms ease',
|
|
58
|
+
overflow: 'hidden',
|
|
59
|
+
zIndex: 20,
|
|
60
|
+
display: 'flex',
|
|
61
|
+
flexDirection: 'column',
|
|
62
|
+
}}>
|
|
63
|
+
{node && (
|
|
64
|
+
<div style={{ padding: '28px 24px', overflowY: 'auto', flex: 1 }}>
|
|
65
|
+
{/* Close button */}
|
|
66
|
+
<button
|
|
67
|
+
type="button"
|
|
68
|
+
onClick={onClose}
|
|
69
|
+
style={{
|
|
70
|
+
position: 'absolute',
|
|
71
|
+
top: 16,
|
|
72
|
+
right: 16,
|
|
73
|
+
background: 'none',
|
|
74
|
+
border: 'none',
|
|
75
|
+
color: 'var(--text-dim)',
|
|
76
|
+
cursor: 'pointer',
|
|
77
|
+
fontFamily: 'var(--font-mono)',
|
|
78
|
+
fontSize: 16,
|
|
79
|
+
padding: 4,
|
|
80
|
+
lineHeight: 1,
|
|
81
|
+
transition: 'color 200ms ease',
|
|
82
|
+
}}
|
|
83
|
+
onMouseEnter={(e) => { e.target.style.color = 'var(--text)'; }}
|
|
84
|
+
onMouseLeave={(e) => { e.target.style.color = 'var(--text-dim)'; }}
|
|
85
|
+
>
|
|
86
|
+
×
|
|
87
|
+
</button>
|
|
88
|
+
|
|
89
|
+
{/* Type label */}
|
|
90
|
+
<div style={{
|
|
91
|
+
fontFamily: 'var(--font-mono)',
|
|
92
|
+
fontVariant: 'small-caps',
|
|
93
|
+
textTransform: 'uppercase',
|
|
94
|
+
letterSpacing: 3,
|
|
95
|
+
fontSize: 9,
|
|
96
|
+
color: 'var(--text-dim)',
|
|
97
|
+
marginBottom: 6,
|
|
98
|
+
}}>
|
|
99
|
+
{node.type}
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
{/* Name */}
|
|
103
|
+
<h2 style={{
|
|
104
|
+
fontFamily: 'var(--font-body)',
|
|
105
|
+
fontSize: 24,
|
|
106
|
+
fontWeight: 400,
|
|
107
|
+
fontStyle: 'italic',
|
|
108
|
+
color: 'var(--text)',
|
|
109
|
+
margin: '0 0 12px 0',
|
|
110
|
+
lineHeight: 1.3,
|
|
111
|
+
paddingRight: 24,
|
|
112
|
+
}}>
|
|
113
|
+
{node.name || node.path?.split('/').slice(-1)[0] || node.id}
|
|
114
|
+
</h2>
|
|
115
|
+
|
|
116
|
+
{/* Status */}
|
|
117
|
+
<StatusPill status={node.status} />
|
|
118
|
+
|
|
119
|
+
{/* Description */}
|
|
120
|
+
{node.description && (
|
|
121
|
+
<MetaRow label="Description">
|
|
122
|
+
{node.description}
|
|
123
|
+
</MetaRow>
|
|
124
|
+
)}
|
|
125
|
+
|
|
126
|
+
{/* Source-specific fields */}
|
|
127
|
+
{node.type === 'source' && (
|
|
128
|
+
<>
|
|
129
|
+
<MetaRow label="Path">
|
|
130
|
+
<span style={{ fontFamily: 'var(--font-mono)', fontSize: 12 }}>
|
|
131
|
+
{node.path}
|
|
132
|
+
</span>
|
|
133
|
+
</MetaRow>
|
|
134
|
+
{node.usedBy && node.usedBy.length > 0 && (
|
|
135
|
+
<MetaRow label="Used by">
|
|
136
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
137
|
+
{node.usedBy.map((skillName) => (
|
|
138
|
+
<span key={skillName} style={{
|
|
139
|
+
fontFamily: 'var(--font-mono)',
|
|
140
|
+
fontSize: 11,
|
|
141
|
+
color: 'var(--edge-provenance)',
|
|
142
|
+
}}>
|
|
143
|
+
{skillName}
|
|
144
|
+
</span>
|
|
145
|
+
))}
|
|
146
|
+
</div>
|
|
147
|
+
</MetaRow>
|
|
148
|
+
)}
|
|
149
|
+
</>
|
|
150
|
+
)}
|
|
151
|
+
|
|
152
|
+
{/* Skill/Dependency fields */}
|
|
153
|
+
{(node.type === 'skill' || node.type === 'dependency') && (
|
|
154
|
+
<>
|
|
155
|
+
{node.version && (
|
|
156
|
+
<MetaRow label="Version">
|
|
157
|
+
<span style={{ fontFamily: 'var(--font-mono)', fontSize: 12 }}>
|
|
158
|
+
{node.version}
|
|
159
|
+
</span>
|
|
160
|
+
</MetaRow>
|
|
161
|
+
)}
|
|
162
|
+
<MetaRow label="Explanation">
|
|
163
|
+
{node.explanation}
|
|
164
|
+
</MetaRow>
|
|
165
|
+
</>
|
|
166
|
+
)}
|
|
167
|
+
|
|
168
|
+
{/* Navigate into dependency */}
|
|
169
|
+
{node.type === 'dependency' && onNavigate && (
|
|
170
|
+
<button
|
|
171
|
+
type="button"
|
|
172
|
+
onClick={() => onNavigate(node.packageName)}
|
|
173
|
+
style={{
|
|
174
|
+
marginTop: 24,
|
|
175
|
+
width: '100%',
|
|
176
|
+
fontFamily: 'var(--font-mono)',
|
|
177
|
+
fontSize: 11,
|
|
178
|
+
background: 'transparent',
|
|
179
|
+
border: '1px solid var(--border-bright)',
|
|
180
|
+
color: 'var(--text-dim)',
|
|
181
|
+
padding: '10px 16px',
|
|
182
|
+
cursor: 'pointer',
|
|
183
|
+
transition: 'all 200ms ease',
|
|
184
|
+
letterSpacing: '0.04em',
|
|
185
|
+
textAlign: 'left',
|
|
186
|
+
}}
|
|
187
|
+
onMouseEnter={(e) => {
|
|
188
|
+
e.target.style.color = 'var(--text)';
|
|
189
|
+
e.target.style.borderColor = 'var(--status-current)';
|
|
190
|
+
}}
|
|
191
|
+
onMouseLeave={(e) => {
|
|
192
|
+
e.target.style.color = 'var(--text-dim)';
|
|
193
|
+
e.target.style.borderColor = 'var(--border-bright)';
|
|
194
|
+
}}
|
|
195
|
+
>
|
|
196
|
+
View skill graph →
|
|
197
|
+
</button>
|
|
198
|
+
)}
|
|
199
|
+
</div>
|
|
200
|
+
)}
|
|
201
|
+
</aside>
|
|
202
|
+
);
|
|
203
|
+
}
|