@alavida/agentpack 0.1.2 → 0.1.4

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 (46) hide show
  1. package/README.md +35 -1
  2. package/bin/intent.js +20 -0
  3. package/package.json +15 -5
  4. package/skills/agentpack-cli/SKILL.md +9 -1
  5. package/skills/authoring-skillgraphs-from-knowledge/SKILL.md +148 -0
  6. package/skills/authoring-skillgraphs-from-knowledge/references/authored-metadata.md +6 -0
  7. package/skills/developing-and-testing-skills/SKILL.md +127 -0
  8. package/skills/developing-and-testing-skills/references/local-workbench.md +7 -0
  9. package/skills/getting-started-skillgraphs/SKILL.md +115 -0
  10. package/skills/getting-started-skillgraphs/references/command-routing.md +7 -0
  11. package/skills/identifying-skill-opportunities/SKILL.md +119 -0
  12. package/skills/identifying-skill-opportunities/references/capability-boundaries.md +6 -0
  13. package/skills/maintaining-skillgraph-freshness/SKILL.md +110 -0
  14. package/skills/repairing-broken-skill-or-plugin-state/SKILL.md +116 -0
  15. package/skills/repairing-broken-skill-or-plugin-state/references/diagnostic-flows.md +6 -0
  16. package/skills/shipping-production-plugins-and-packages/SKILL.md +123 -0
  17. package/skills/shipping-production-plugins-and-packages/references/plugin-delivery.md +6 -0
  18. package/skills/sync-state.json +83 -0
  19. package/src/application/skills/build-skill-workbench-model.js +194 -0
  20. package/src/application/skills/run-skill-workbench-action.js +23 -0
  21. package/src/application/skills/start-skill-dev-workbench.js +192 -0
  22. package/src/cli.js +1 -1
  23. package/src/commands/skills.js +34 -10
  24. package/src/dashboard/App.jsx +343 -0
  25. package/src/dashboard/components/Breadcrumbs.jsx +45 -0
  26. package/src/dashboard/components/ControlStrip.jsx +153 -0
  27. package/src/dashboard/components/InspectorPanel.jsx +203 -0
  28. package/src/dashboard/components/SkillGraph.jsx +567 -0
  29. package/src/dashboard/components/Tooltip.jsx +111 -0
  30. package/src/dashboard/dist/dashboard.js +26692 -0
  31. package/src/dashboard/index.html +81 -0
  32. package/src/dashboard/lib/api.js +19 -0
  33. package/src/dashboard/lib/router.js +15 -0
  34. package/src/dashboard/main.jsx +4 -0
  35. package/src/domain/plugins/load-plugin-definition.js +163 -0
  36. package/src/domain/plugins/plugin-diagnostic-error.js +18 -0
  37. package/src/domain/plugins/plugin-requirements.js +15 -0
  38. package/src/domain/skills/skill-graph.js +1 -0
  39. package/src/infrastructure/fs/dev-session-repository.js +25 -0
  40. package/src/infrastructure/runtime/materialize-skills.js +18 -1
  41. package/src/infrastructure/runtime/open-browser.js +20 -0
  42. package/src/infrastructure/runtime/skill-dev-workbench-server.js +96 -0
  43. package/src/infrastructure/runtime/watch-skill-workbench.js +68 -0
  44. package/src/lib/plugins.js +19 -28
  45. package/src/lib/skills.js +245 -16
  46. package/src/utils/errors.js +33 -1
@@ -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
+ }