@openclawcity/become 0.1.0
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/LICENSE +21 -0
- package/README.md +133 -0
- package/dist/cli.cjs +113 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +89 -0
- package/dist/cli.js.map +1 -0
- package/dist/dashboard.cjs +806 -0
- package/dist/dashboard.cjs.map +1 -0
- package/dist/dashboard.d.cts +92 -0
- package/dist/dashboard.d.ts +92 -0
- package/dist/dashboard.js +767 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/index.cjs +2760 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +670 -0
- package/dist/index.d.ts +670 -0
- package/dist/index.js +2696 -0
- package/dist/index.js.map +1 -0
- package/dist/types-DzOc15AL.d.cts +273 -0
- package/dist/types-DzOc15AL.d.ts +273 -0
- package/migrations/001_initial.sql +128 -0
- package/package.json +85 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/dashboard/index.ts","../src/dashboard/theme.ts","../src/dashboard/components/SkillRing.tsx","../src/dashboard/components/Sparkline.tsx","../src/core/validation.ts","../src/core/milestones.ts","../src/dashboard/components/MilestoneTimeline.tsx","../src/dashboard/components/GrowthCard.tsx","../src/dashboard/components/PeerGraph.tsx","../src/dashboard/components/PopulationView.tsx"],"sourcesContent":["// Components\nexport { SkillRing } from './components/SkillRing.js';\nexport type { SkillRingProps } from './components/SkillRing.js';\n\nexport { Sparkline } from './components/Sparkline.js';\nexport type { SparklineProps, SparklinePoint } from './components/Sparkline.js';\n\nexport { MilestoneTimeline } from './components/MilestoneTimeline.js';\nexport type { MilestoneTimelineProps } from './components/MilestoneTimeline.js';\n\nexport { GrowthCard } from './components/GrowthCard.js';\nexport type { GrowthCardProps } from './components/GrowthCard.js';\n\nexport { PeerGraph } from './components/PeerGraph.js';\nexport type { PeerGraphProps, PeerGraphNode } from './components/PeerGraph.js';\n\nexport { PopulationView } from './components/PopulationView.js';\nexport type { PopulationViewProps, PopulationAgent } from './components/PopulationView.js';\n\n// Theme\nexport {\n STAGE_COLORS,\n STAGE_LABELS,\n BACKGROUND,\n BORDER,\n ACCENT,\n GOLD,\n CELEBRATION_CONFIG,\n} from './theme.js';\n","import type { CelebrationTier, DreyfusStage } from '../core/types.js';\n\nexport const STAGE_COLORS: Record<DreyfusStage, string> = {\n novice: '#64748b',\n beginner: '#22d3ee',\n competent: '#34d399',\n proficient: '#a78bfa',\n expert: '#fbbf24',\n};\n\nexport const STAGE_LABELS: Record<DreyfusStage, string> = {\n novice: 'Novice',\n beginner: 'Beginner',\n competent: 'Competent',\n proficient: 'Proficient',\n expert: 'Expert',\n};\n\nexport const BACKGROUND = {\n panel: 'rgba(10, 12, 20, 0.94)',\n card: 'rgba(255, 255, 255, 0.03)',\n hover: 'rgba(255, 255, 255, 0.06)',\n};\n\nexport const BORDER = {\n subtle: 'rgba(0, 212, 255, 0.15)',\n accent: 'rgba(0, 212, 255, 0.3)',\n};\n\nexport const ACCENT = '#00d4ff';\nexport const GOLD = 'rgba(255, 215, 0, 0.8)';\n\nexport const CELEBRATION_CONFIG: Record<CelebrationTier, { particles: number; spread: number; duration: number }> = {\n micro: { particles: 0, spread: 0, duration: 0 },\n small: { particles: 20, spread: 50, duration: 1000 },\n medium: { particles: 60, spread: 70, duration: 1500 },\n large: { particles: 80, spread: 90, duration: 2000 },\n epic: { particles: 120, spread: 120, duration: 4000 },\n};\n","import React from 'react';\nimport type { DreyfusStage } from '../../core/types.js';\nimport { STAGE_COLORS, STAGE_LABELS } from '../theme.js';\n\nexport interface SkillRingProps {\n skill: string;\n score: number;\n stage: DreyfusStage;\n size?: number;\n showLabel?: boolean;\n className?: string;\n}\n\nexport function SkillRing({\n skill,\n score,\n stage,\n size = 80,\n showLabel = true,\n className,\n}: SkillRingProps) {\n const safeSize = Math.max(24, size); // Minimum 24px to avoid negative radius\n const strokeWidth = Math.max(4, safeSize * 0.08);\n const radius = (safeSize - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const progress = Math.min(100, Math.max(0, score)) / 100;\n const offset = circumference * (1 - progress);\n const color = STAGE_COLORS[stage];\n const center = safeSize / 2;\n\n return (\n <div\n className={className}\n style={{\n display: 'inline-flex',\n flexDirection: 'column',\n alignItems: 'center',\n gap: 4,\n }}\n >\n <svg\n width={safeSize}\n height={safeSize}\n viewBox={`0 0 ${safeSize} ${safeSize}`}\n role=\"img\"\n aria-label={`${skill}: ${score}/100, ${STAGE_LABELS[stage]}`}\n >\n {/* Background track */}\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke=\"rgba(255,255,255,0.08)\"\n strokeWidth={strokeWidth}\n />\n {/* Progress arc */}\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${center} ${center})`}\n style={{ transition: 'stroke-dashoffset 0.6s ease' }}\n />\n {/* Score text */}\n <text\n x={center}\n y={center}\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fill=\"white\"\n fontSize={safeSize * 0.28}\n fontWeight=\"bold\"\n fontFamily=\"system-ui, sans-serif\"\n >\n {score}\n </text>\n </svg>\n {showLabel && (\n <div style={{ textAlign: 'center' }}>\n <div\n style={{\n color: 'rgba(255,255,255,0.9)',\n fontSize: Math.max(10, safeSize * 0.14),\n fontWeight: 500,\n fontFamily: 'system-ui, sans-serif',\n }}\n >\n {skill}\n </div>\n <div\n style={{\n color,\n fontSize: Math.max(9, safeSize * 0.12),\n fontFamily: 'system-ui, sans-serif',\n textTransform: 'uppercase',\n letterSpacing: '0.05em',\n }}\n >\n {STAGE_LABELS[stage]}\n </div>\n </div>\n )}\n </div>\n );\n}\n","import React, { useId } from 'react';\nimport type { DreyfusStage } from '../../core/types.js';\nimport { STAGE_COLORS } from '../theme.js';\n\nexport interface SparklinePoint {\n score: number;\n timestamp: string;\n}\n\nexport interface SparklineProps {\n data: SparklinePoint[];\n width?: number;\n height?: number;\n color?: DreyfusStage | string;\n showDots?: boolean;\n className?: string;\n}\n\nexport function Sparkline({\n data,\n width = 300,\n height = 40,\n color = '#22d3ee',\n showDots = false,\n className,\n}: SparklineProps) {\n if (data.length < 2) {\n return (\n <svg width={width} height={height} className={className} role=\"img\" aria-label=\"Insufficient data\">\n <text x={width / 2} y={height / 2} textAnchor=\"middle\" dominantBaseline=\"central\" fill=\"rgba(255,255,255,0.3)\" fontSize={10}>\n Not enough data\n </text>\n </svg>\n );\n }\n\n // Resolve color — use hasOwnProperty to avoid prototype key collisions\n const strokeColor = Object.prototype.hasOwnProperty.call(STAGE_COLORS, color)\n ? STAGE_COLORS[color as DreyfusStage]\n : color;\n\n // Compute points\n const padding = 4;\n const chartWidth = width - padding * 2;\n const chartHeight = height - padding * 2;\n\n const scores = data.map((d) => d.score);\n let minScore = scores[0];\n let maxScore = scores[0];\n for (let i = 1; i < scores.length; i++) {\n if (scores[i] < minScore) minScore = scores[i];\n if (scores[i] > maxScore) maxScore = scores[i];\n }\n const range = maxScore - minScore || 1;\n\n const points = data.map((d, i) => {\n const x = padding + (i / (data.length - 1)) * chartWidth;\n const y = padding + chartHeight - ((d.score - minScore) / range) * chartHeight;\n return { x, y };\n });\n\n const polyline = points.map((p) => `${p.x},${p.y}`).join(' ');\n\n // Gradient fill under the line\n const fillPoints = [\n ...points.map((p) => `${p.x},${p.y}`),\n `${points[points.length - 1].x},${height - padding}`,\n `${points[0].x},${height - padding}`,\n ].join(' ');\n\n const reactId = useId();\n const gradientId = `sparkline-grad-${reactId.replace(/:/g, '')}`;\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n className={className}\n role=\"img\"\n aria-label={`Trend: ${scores[0]} to ${scores[scores.length - 1]}`}\n >\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor={strokeColor} stopOpacity=\"0.2\" />\n <stop offset=\"100%\" stopColor={strokeColor} stopOpacity=\"0\" />\n </linearGradient>\n </defs>\n {/* Fill area */}\n <polygon points={fillPoints} fill={`url(#${gradientId})`} />\n {/* Line */}\n <polyline\n points={polyline}\n fill=\"none\"\n stroke={strokeColor}\n strokeWidth={1.5}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n />\n {/* Dots */}\n {showDots &&\n points.map((p, i) => (\n <circle\n key={i}\n cx={p.x}\n cy={p.y}\n r={2}\n fill={strokeColor}\n />\n ))}\n {/* End dot (always shown) */}\n <circle\n cx={points[points.length - 1].x}\n cy={points[points.length - 1].y}\n r={2.5}\n fill={strokeColor}\n />\n </svg>\n );\n}\n","const MAX_AGENT_ID_LENGTH = 200;\nconst AGENT_ID_REGEX = /^[a-zA-Z0-9_.:@/-]+$/;\n\nexport function validateAgentId(agentId: string): void {\n if (!agentId || typeof agentId !== 'string') {\n throw new Error('agentId is required and must be a non-empty string');\n }\n if (agentId.length > MAX_AGENT_ID_LENGTH) {\n throw new Error(`agentId too long (max ${MAX_AGENT_ID_LENGTH} chars)`);\n }\n if (!AGENT_ID_REGEX.test(agentId)) {\n throw new Error('agentId contains invalid characters (allowed: alphanumeric, _ . : @ / -)');\n }\n}\n","import type { CelebrationTier, Milestone, MilestoneConfig, Score, StorageAdapter } from './types.js';\nimport { validateAgentId } from './validation.js';\n\nconst BUILT_IN: Record<string, MilestoneConfig> = {\n skill_discovered: { threshold: 1, description: 'First score for a skill' },\n skill_competent: { threshold: 36, description: 'Reached competent stage' },\n skill_proficient: { threshold: 56, description: 'Reached proficient stage' },\n skill_expert: { threshold: 76, description: 'Reached expert stage' },\n first_artifact: { threshold: 1, description: 'Created first output' },\n ten_artifacts: { threshold: 10, description: 'Created 10 outputs' },\n first_collab: { threshold: 1, description: 'Completed first collaboration' },\n first_teaching: { threshold: 1, description: 'Taught another agent for the first time' },\n first_peer_review: { threshold: 1, description: 'Gave first peer review' },\n identity_shift: { threshold: 1, description: 'Agent evolved its identity' },\n norm_setter: { threshold: 1, description: 'Started a cultural norm adopted by 3+ agents' },\n};\n\nexport class MilestoneDetector {\n private custom: Record<string, MilestoneConfig> = {};\n\n constructor(private adapter: StorageAdapter) {}\n\n register(type: string, config: MilestoneConfig): void {\n this.custom[type] = config;\n }\n\n async check(agentId: string, scores: Score[]): Promise<Milestone[]> {\n validateAgentId(agentId);\n const awarded: Milestone[] = [];\n const now = new Date().toISOString();\n\n // Track global milestones already checked this call to avoid redundant adapter calls\n const globalChecked = new Set<string>();\n\n for (const score of scores) {\n // Skill discovery (per-skill)\n if (score.score > 0) {\n const type = `skill_discovered:${score.skill}`;\n if (await this.tryAward(agentId, type, 1, score.skill, now)) {\n awarded.push({ agent_id: agentId, milestone_type: type, threshold: 1, skill: score.skill, achieved_at: now });\n }\n }\n\n // Stage transitions (per-skill)\n const stageChecks: [string, number][] = [\n ['skill_competent', 36],\n ['skill_proficient', 56],\n ['skill_expert', 76],\n ];\n\n for (const [prefix, threshold] of stageChecks) {\n if (score.score >= threshold) {\n const type = `${prefix}:${score.skill}`;\n if (await this.tryAward(agentId, type, threshold, score.skill, now)) {\n awarded.push({ agent_id: agentId, milestone_type: type, threshold, skill: score.skill, achieved_at: now });\n }\n }\n }\n\n // Global milestones — only check once across all scores\n const globalMilestones: [string, number, boolean][] = [\n ['first_artifact', 1, score.evidence.artifact_count >= 1],\n ['ten_artifacts', 10, score.evidence.artifact_count >= 10],\n ['first_collab', 1, score.evidence.collab_count >= 1],\n ['first_teaching', 1, score.evidence.teaching_events >= 1],\n ['first_peer_review', 1, score.evidence.peer_reviews_given >= 1],\n ];\n\n for (const [type, threshold, eligible] of globalMilestones) {\n if (eligible && !globalChecked.has(type)) {\n globalChecked.add(type);\n if (await this.tryAward(agentId, type, threshold, undefined, now)) {\n awarded.push({ agent_id: agentId, milestone_type: type, threshold, achieved_at: now });\n }\n }\n }\n }\n\n return awarded;\n }\n\n private async tryAward(\n agentId: string,\n milestoneType: string,\n threshold: number,\n skill: string | undefined,\n now: string,\n ): Promise<boolean> {\n const exists = await this.adapter.hasMilestone(agentId, milestoneType, skill);\n if (exists) return false;\n return this.adapter.saveMilestone({\n agent_id: agentId,\n milestone_type: milestoneType,\n threshold,\n skill,\n achieved_at: now,\n });\n }\n\n static celebrationTier(milestoneType: string, threshold?: number): CelebrationTier {\n if (milestoneType.startsWith('skill_expert')) return 'epic';\n if (milestoneType.startsWith('skill_proficient')) return 'large';\n if (milestoneType.startsWith('skill_competent')) return 'medium';\n if (milestoneType.startsWith('skill_discovered')) return 'small';\n if (threshold !== undefined) {\n if (threshold >= 50) return 'large';\n if (threshold >= 10) return 'medium';\n }\n return 'small';\n }\n\n static getBuiltInMilestones(): Record<string, MilestoneConfig> {\n return { ...BUILT_IN };\n }\n}\n","import React from 'react';\nimport type { CelebrationTier, Milestone } from '../../core/types.js';\nimport { MilestoneDetector } from '../../core/milestones.js';\nimport { STAGE_COLORS, GOLD } from '../theme.js';\n\nexport interface MilestoneTimelineProps {\n milestones: Milestone[];\n limit?: number;\n className?: string;\n}\n\nfunction formatMilestoneLabel(type: string): string {\n // \"skill_expert:debugging\" → \"Expert: debugging\"\n // \"first_artifact\" → \"First Artifact\"\n if (type.includes(':')) {\n const [prefix, skill] = type.split(':');\n const stage = prefix.replace('skill_', '');\n return `${stage.charAt(0).toUpperCase() + stage.slice(1)}: ${skill}`;\n }\n return type\n .replace(/_/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\n\nfunction tierColor(tier: CelebrationTier): string {\n switch (tier) {\n case 'epic': return GOLD;\n case 'large': return STAGE_COLORS.proficient;\n case 'medium': return STAGE_COLORS.competent;\n case 'small': return STAGE_COLORS.beginner;\n default: return 'rgba(255,255,255,0.3)';\n }\n}\n\nfunction formatDate(iso: string): string {\n try {\n const d = new Date(iso);\n return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n } catch {\n return '';\n }\n}\n\nexport function MilestoneTimeline({\n milestones,\n limit = 10,\n className,\n}: MilestoneTimelineProps) {\n const sorted = [...milestones]\n .sort((a, b) => b.achieved_at.localeCompare(a.achieved_at))\n .slice(0, limit);\n\n if (sorted.length === 0) {\n return (\n <div className={className} style={{ color: 'rgba(255,255,255,0.4)', fontSize: 13, fontFamily: 'system-ui, sans-serif', padding: 16 }}>\n No milestones yet\n </div>\n );\n }\n\n return (\n <div className={className} style={{ position: 'relative', paddingLeft: 20 }} role=\"list\" aria-label=\"Milestone timeline\">\n {/* Vertical line */}\n <div\n style={{\n position: 'absolute',\n left: 7,\n top: 4,\n bottom: 4,\n width: 2,\n background: 'rgba(255,255,255,0.1)',\n borderRadius: 1,\n }}\n />\n {sorted.map((m, i) => {\n const tier = MilestoneDetector.celebrationTier(m.milestone_type, m.threshold);\n const color = tierColor(tier);\n return (\n <div\n key={`${m.milestone_type}-${m.achieved_at}-${i}`}\n role=\"listitem\"\n style={{\n display: 'flex',\n alignItems: 'flex-start',\n gap: 10,\n marginBottom: 12,\n position: 'relative',\n }}\n >\n {/* Dot */}\n <div\n style={{\n position: 'absolute',\n left: -16,\n top: 4,\n width: 10,\n height: 10,\n borderRadius: '50%',\n background: color,\n border: `2px solid ${color}`,\n boxShadow: tier === 'epic' ? `0 0 8px ${color}` : undefined,\n }}\n />\n <div style={{ flex: 1 }}>\n <div\n style={{\n color: 'rgba(255,255,255,0.9)',\n fontSize: 13,\n fontWeight: 500,\n fontFamily: 'system-ui, sans-serif',\n }}\n >\n {formatMilestoneLabel(m.milestone_type)}\n </div>\n <div\n style={{\n color: 'rgba(255,255,255,0.4)',\n fontSize: 11,\n fontFamily: 'system-ui, sans-serif',\n marginTop: 2,\n }}\n >\n {formatDate(m.achieved_at)}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n );\n}\n","import React from 'react';\nimport type { Milestone, Score } from '../../core/types.js';\nimport { BACKGROUND, BORDER } from '../theme.js';\nimport { SkillRing } from './SkillRing.js';\nimport { Sparkline } from './Sparkline.js';\nimport { MilestoneTimeline } from './MilestoneTimeline.js';\n\nexport interface GrowthCardProps {\n agentId: string;\n agentName?: string;\n scores: Score[];\n scoreHistory?: Map<string, { score: number; timestamp: string }[]>;\n milestones?: Milestone[];\n className?: string;\n}\n\nexport function GrowthCard({\n agentId,\n agentName,\n scores,\n scoreHistory,\n milestones,\n className,\n}: GrowthCardProps) {\n const sortedScores = [...scores].sort((a, b) => b.score - a.score);\n const avgScore = scores.length > 0\n ? Math.round(scores.reduce((sum, s) => sum + s.score, 0) / scores.length)\n : 0;\n\n return (\n <div\n className={className}\n style={{\n background: BACKGROUND.panel,\n border: `1px solid ${BORDER.subtle}`,\n borderRadius: 12,\n padding: 20,\n fontFamily: 'system-ui, sans-serif',\n color: 'white',\n maxWidth: 380,\n backdropFilter: 'blur(20px) saturate(1.5)',\n }}\n >\n {/* Header */}\n <div style={{ marginBottom: 16 }}>\n <div style={{ fontSize: 16, fontWeight: 600, color: 'rgba(255,255,255,0.95)' }}>\n {agentName ?? agentId}\n </div>\n <div style={{ fontSize: 12, color: 'rgba(255,255,255,0.4)', marginTop: 2 }}>\n {scores.length} skill{scores.length !== 1 ? 's' : ''} · avg score {avgScore}\n </div>\n </div>\n\n {/* Skill rings */}\n {sortedScores.length > 0 && (\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: 16,\n justifyContent: 'center',\n marginBottom: 20,\n padding: '12px 0',\n borderTop: `1px solid ${BORDER.subtle}`,\n borderBottom: `1px solid ${BORDER.subtle}`,\n }}\n >\n {sortedScores.slice(0, 5).map((s) => (\n <SkillRing\n key={s.skill}\n skill={s.skill}\n score={s.score}\n stage={s.dreyfus_stage}\n size={64}\n />\n ))}\n </div>\n )}\n\n {/* Sparklines for top skills */}\n {scoreHistory && sortedScores.length > 0 && (\n <div style={{ marginBottom: 16 }}>\n {sortedScores.slice(0, 3).map((s) => {\n const history = scoreHistory.get(s.skill);\n if (!history || history.length < 2) return null;\n return (\n <div key={s.skill} style={{ marginBottom: 8 }}>\n <div style={{ fontSize: 11, color: 'rgba(255,255,255,0.5)', marginBottom: 2 }}>\n {s.skill}\n </div>\n <Sparkline\n data={history}\n width={340}\n height={32}\n color={s.dreyfus_stage}\n />\n </div>\n );\n })}\n </div>\n )}\n\n {/* Milestones */}\n {milestones && milestones.length > 0 && (\n <div>\n <div style={{ fontSize: 12, color: 'rgba(255,255,255,0.5)', marginBottom: 8, fontWeight: 500 }}>\n Recent Milestones\n </div>\n <MilestoneTimeline milestones={milestones} limit={5} />\n </div>\n )}\n\n {/* Empty state */}\n {scores.length === 0 && (\n <div style={{ textAlign: 'center', padding: 24, color: 'rgba(255,255,255,0.3)', fontSize: 13 }}>\n No skills scored yet\n </div>\n )}\n </div>\n );\n}\n","import React, { useMemo } from 'react';\nimport type { LearningEdge } from '../../core/types.js';\nimport { ACCENT, STAGE_COLORS } from '../theme.js';\n\nexport interface PeerGraphNode {\n id: string;\n label?: string;\n stage?: keyof typeof STAGE_COLORS;\n}\n\nexport interface PeerGraphProps {\n nodes: PeerGraphNode[];\n edges: LearningEdge[];\n width?: number;\n height?: number;\n className?: string;\n}\n\ninterface LayoutNode extends PeerGraphNode {\n x: number;\n y: number;\n}\n\nexport function PeerGraph({\n nodes,\n edges,\n width = 400,\n height = 300,\n className,\n}: PeerGraphProps) {\n // Layout nodes in a circle\n const layout = useMemo((): LayoutNode[] => {\n const cx = width / 2;\n const cy = height / 2;\n const radius = Math.min(cx, cy) - 40;\n\n return nodes.map((node, i) => {\n const angle = (2 * Math.PI * i) / nodes.length - Math.PI / 2;\n return {\n ...node,\n x: cx + radius * Math.cos(angle),\n y: cy + radius * Math.sin(angle),\n };\n });\n }, [nodes, width, height]);\n\n const nodeMap = useMemo(() => {\n const map = new Map<string, LayoutNode>();\n for (const n of layout) map.set(n.id, n);\n return map;\n }, [layout]);\n\n // Pre-compute deduplicated edges and per-node edge counts\n const { edgeCounts, dedupedEdges, nodeEdgeCounts } = useMemo(() => {\n const counts = new Map<string, number>();\n const deduped: { key: string; edge: (typeof edges)[0]; count: number }[] = [];\n const seen = new Set<string>();\n const nodeCounts = new Map<string, number>();\n\n for (const e of edges) {\n const key = [e.from_agent, e.to_agent].sort().join('\\u2194');\n counts.set(key, (counts.get(key) ?? 0) + 1);\n nodeCounts.set(e.from_agent, (nodeCounts.get(e.from_agent) ?? 0) + 1);\n nodeCounts.set(e.to_agent, (nodeCounts.get(e.to_agent) ?? 0) + 1);\n }\n\n for (const e of edges) {\n const key = [e.from_agent, e.to_agent].sort().join('\\u2194');\n if (!seen.has(key)) {\n seen.add(key);\n deduped.push({ key, edge: e, count: counts.get(key) ?? 1 });\n }\n }\n\n return { edgeCounts: counts, dedupedEdges: deduped, nodeEdgeCounts: nodeCounts };\n }, [edges]);\n\n if (nodes.length === 0) {\n return (\n <svg width={width} height={height} className={className}>\n <text x={width / 2} y={height / 2} textAnchor=\"middle\" fill=\"rgba(255,255,255,0.3)\" fontSize={13}>\n No agents to display\n </text>\n </svg>\n );\n }\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n className={className}\n role=\"img\"\n aria-label={`Learning network: ${nodes.length} agents, ${edges.length} connections`}\n >\n {/* Edges (pre-deduplicated) */}\n {dedupedEdges.map(({ key, edge, count }) => {\n const from = nodeMap.get(edge.from_agent);\n const to = nodeMap.get(edge.to_agent);\n if (!from || !to) return null;\n\n const strokeWidth = Math.min(4, 0.5 + count * 0.5);\n\n return (\n <line\n key={`edge-${key}`}\n x1={from.x}\n y1={from.y}\n x2={to.x}\n y2={to.y}\n stroke={ACCENT}\n strokeWidth={strokeWidth}\n strokeOpacity={0.3 + Math.min(0.4, count * 0.1)}\n />\n );\n })}\n\n {/* Nodes (edge counts pre-computed) */}\n {layout.map((node) => {\n const color = node.stage ? STAGE_COLORS[node.stage] : ACCENT;\n const edgeCount = nodeEdgeCounts.get(node.id) ?? 0;\n const radius = Math.min(20, 8 + edgeCount * 1.5);\n\n return (\n <g key={node.id}>\n {/* Glow */}\n <circle cx={node.x} cy={node.y} r={radius + 4} fill={color} opacity={0.1} />\n {/* Node */}\n <circle cx={node.x} cy={node.y} r={radius} fill={color} opacity={0.8} />\n {/* Label */}\n <text\n x={node.x}\n y={node.y + radius + 14}\n textAnchor=\"middle\"\n fill=\"rgba(255,255,255,0.7)\"\n fontSize={10}\n fontFamily=\"system-ui, sans-serif\"\n >\n {node.label ?? node.id}\n </text>\n </g>\n );\n })}\n </svg>\n );\n}\n","import React, { useMemo } from 'react';\nimport type { DreyfusStage, Score } from '../../core/types.js';\nimport { BACKGROUND, BORDER, STAGE_COLORS, STAGE_LABELS } from '../theme.js';\n\nexport interface PopulationAgent {\n agent_id: string;\n agent_name?: string;\n scores: Score[];\n}\n\nexport interface PopulationViewProps {\n agents: PopulationAgent[];\n className?: string;\n}\n\nexport function PopulationView({ agents, className }: PopulationViewProps) {\n const { allScores, avgScore, stageDist, totalSkills, topSkills } = useMemo(() => {\n const scores = agents.flatMap((a) => a.scores);\n const avg = scores.length > 0\n ? Math.round(scores.reduce((s, sc) => s + sc.score, 0) / scores.length)\n : 0;\n\n const dist: Record<DreyfusStage, number> = {\n novice: 0, beginner: 0, competent: 0, proficient: 0, expert: 0,\n };\n for (const s of scores) {\n dist[s.dreyfus_stage]++;\n }\n\n const skillCounts = new Map<string, number>();\n for (const s of scores) {\n skillCounts.set(s.skill, (skillCounts.get(s.skill) ?? 0) + 1);\n }\n const top = [...skillCounts.entries()]\n .sort((a, b) => b[1] - a[1])\n .slice(0, 8);\n\n return { allScores: scores, avgScore: avg, stageDist: dist, totalSkills: scores.length, topSkills: top };\n }, [agents]);\n\n return (\n <div\n className={className}\n style={{\n background: BACKGROUND.panel,\n border: `1px solid ${BORDER.subtle}`,\n borderRadius: 12,\n padding: 20,\n fontFamily: 'system-ui, sans-serif',\n color: 'white',\n maxWidth: 500,\n backdropFilter: 'blur(20px) saturate(1.5)',\n }}\n >\n {/* Header */}\n <div style={{ fontSize: 16, fontWeight: 600, marginBottom: 16 }}>\n Population Overview\n </div>\n\n {/* Summary stats */}\n <div style={{ display: 'flex', gap: 24, marginBottom: 20 }}>\n <Stat label=\"Agents\" value={agents.length} />\n <Stat label=\"Skills tracked\" value={totalSkills} />\n <Stat label=\"Avg score\" value={avgScore} />\n </div>\n\n {/* Stage distribution bar */}\n <div style={{ marginBottom: 20 }}>\n <div style={{ fontSize: 12, color: 'rgba(255,255,255,0.5)', marginBottom: 8 }}>\n Stage Distribution\n </div>\n {totalSkills > 0 ? (\n <>\n <div style={{ display: 'flex', height: 20, borderRadius: 4, overflow: 'hidden' }}>\n {(Object.entries(stageDist) as [DreyfusStage, number][])\n .filter(([, count]) => count > 0)\n .map(([stage, count]) => (\n <div\n key={stage}\n style={{\n width: `${(count / totalSkills) * 100}%`,\n background: STAGE_COLORS[stage],\n minWidth: 2,\n }}\n title={`${STAGE_LABELS[stage]}: ${count}`}\n />\n ))}\n </div>\n <div style={{ display: 'flex', gap: 12, marginTop: 6, flexWrap: 'wrap' }}>\n {(Object.entries(stageDist) as [DreyfusStage, number][])\n .filter(([, count]) => count > 0)\n .map(([stage, count]) => (\n <div key={stage} style={{ display: 'flex', alignItems: 'center', gap: 4 }}>\n <div style={{ width: 8, height: 8, borderRadius: 2, background: STAGE_COLORS[stage] }} />\n <span style={{ fontSize: 11, color: 'rgba(255,255,255,0.6)' }}>\n {STAGE_LABELS[stage]} ({count})\n </span>\n </div>\n ))}\n </div>\n </>\n ) : (\n <div style={{ color: 'rgba(255,255,255,0.3)', fontSize: 12 }}>No data</div>\n )}\n </div>\n\n {/* Top skills */}\n {topSkills.length > 0 && (\n <div>\n <div style={{ fontSize: 12, color: 'rgba(255,255,255,0.5)', marginBottom: 8 }}>\n Most Popular Skills\n </div>\n {topSkills.map(([skill, count]) => {\n const pct = totalSkills > 0 ? (count / totalSkills) * 100 : 0;\n return (\n <div key={skill} style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 6 }}>\n <div style={{ width: 80, fontSize: 12, color: 'rgba(255,255,255,0.7)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>\n {skill}\n </div>\n <div style={{ flex: 1, height: 6, background: 'rgba(255,255,255,0.06)', borderRadius: 3 }}>\n <div style={{ width: `${pct}%`, height: '100%', background: '#22d3ee', borderRadius: 3, minWidth: 2 }} />\n </div>\n <div style={{ width: 24, fontSize: 11, color: 'rgba(255,255,255,0.4)', textAlign: 'right' }}>\n {count}\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n}\n\nfunction Stat({ label, value }: { label: string; value: number }) {\n return (\n <div>\n <div style={{ fontSize: 22, fontWeight: 700, color: 'rgba(255,255,255,0.95)' }}>{value}</div>\n <div style={{ fontSize: 11, color: 'rgba(255,255,255,0.4)' }}>{label}</div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,eAA6C;AAAA,EACxD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AACV;AAEO,IAAM,eAA6C;AAAA,EACxD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AACV;AAEO,IAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AACT;AAEO,IAAM,SAAS;AAAA,EACpB,QAAQ;AAAA,EACR,QAAQ;AACV;AAEO,IAAM,SAAS;AACf,IAAM,OAAO;AAEb,IAAM,qBAAuG;AAAA,EAClH,OAAO,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,EAAE;AAAA,EAC9C,OAAO,EAAE,WAAW,IAAI,QAAQ,IAAI,UAAU,IAAK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ACzG;AAAA,cACA,6CAAC,SAAI,OAAO,EAAE,OAAO,IAAI,UAAU,IAAI,OAAO,yBAAyB,WAAW,QAAQ,GACvF,iBACH;AAAA,iBATQ,KAUV;AAAA,UAEJ,CAAC;AAAA,WACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,SAAS,KAAK,EAAE,OAAO,MAAM,GAAqC;AAChE,SACE,8CAAC,SACC;AAAA,iDAAC,SAAI,OAAO,EAAE,UAAU,IAAI,YAAY,KAAK,OAAO,yBAAyB,GAAI,iBAAM;AAAA,IACvF,6CAAC,SAAI,OAAO,EAAE,UAAU,IAAI,OAAO,wBAAwB,GAAI,iBAAM;AAAA,KACvE;AAEJ;","names":["import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { D as DreyfusStage, M as Milestone, S as Score, C as CelebrationTier, L as LearningEdge } from './types-DzOc15AL.cjs';
|
|
3
|
+
|
|
4
|
+
interface SkillRingProps {
|
|
5
|
+
skill: string;
|
|
6
|
+
score: number;
|
|
7
|
+
stage: DreyfusStage;
|
|
8
|
+
size?: number;
|
|
9
|
+
showLabel?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function SkillRing({ skill, score, stage, size, showLabel, className, }: SkillRingProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
interface SparklinePoint {
|
|
15
|
+
score: number;
|
|
16
|
+
timestamp: string;
|
|
17
|
+
}
|
|
18
|
+
interface SparklineProps {
|
|
19
|
+
data: SparklinePoint[];
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
color?: DreyfusStage | string;
|
|
23
|
+
showDots?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function Sparkline({ data, width, height, color, showDots, className, }: SparklineProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
interface MilestoneTimelineProps {
|
|
29
|
+
milestones: Milestone[];
|
|
30
|
+
limit?: number;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
declare function MilestoneTimeline({ milestones, limit, className, }: MilestoneTimelineProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
interface GrowthCardProps {
|
|
36
|
+
agentId: string;
|
|
37
|
+
agentName?: string;
|
|
38
|
+
scores: Score[];
|
|
39
|
+
scoreHistory?: Map<string, {
|
|
40
|
+
score: number;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
}[]>;
|
|
43
|
+
milestones?: Milestone[];
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
declare function GrowthCard({ agentId, agentName, scores, scoreHistory, milestones, className, }: GrowthCardProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare const STAGE_COLORS: Record<DreyfusStage, string>;
|
|
49
|
+
declare const STAGE_LABELS: Record<DreyfusStage, string>;
|
|
50
|
+
declare const BACKGROUND: {
|
|
51
|
+
panel: string;
|
|
52
|
+
card: string;
|
|
53
|
+
hover: string;
|
|
54
|
+
};
|
|
55
|
+
declare const BORDER: {
|
|
56
|
+
subtle: string;
|
|
57
|
+
accent: string;
|
|
58
|
+
};
|
|
59
|
+
declare const ACCENT = "#00d4ff";
|
|
60
|
+
declare const GOLD = "rgba(255, 215, 0, 0.8)";
|
|
61
|
+
declare const CELEBRATION_CONFIG: Record<CelebrationTier, {
|
|
62
|
+
particles: number;
|
|
63
|
+
spread: number;
|
|
64
|
+
duration: number;
|
|
65
|
+
}>;
|
|
66
|
+
|
|
67
|
+
interface PeerGraphNode {
|
|
68
|
+
id: string;
|
|
69
|
+
label?: string;
|
|
70
|
+
stage?: keyof typeof STAGE_COLORS;
|
|
71
|
+
}
|
|
72
|
+
interface PeerGraphProps {
|
|
73
|
+
nodes: PeerGraphNode[];
|
|
74
|
+
edges: LearningEdge[];
|
|
75
|
+
width?: number;
|
|
76
|
+
height?: number;
|
|
77
|
+
className?: string;
|
|
78
|
+
}
|
|
79
|
+
declare function PeerGraph({ nodes, edges, width, height, className, }: PeerGraphProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
interface PopulationAgent {
|
|
82
|
+
agent_id: string;
|
|
83
|
+
agent_name?: string;
|
|
84
|
+
scores: Score[];
|
|
85
|
+
}
|
|
86
|
+
interface PopulationViewProps {
|
|
87
|
+
agents: PopulationAgent[];
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
declare function PopulationView({ agents, className }: PopulationViewProps): react_jsx_runtime.JSX.Element;
|
|
91
|
+
|
|
92
|
+
export { ACCENT, BACKGROUND, BORDER, CELEBRATION_CONFIG, GOLD, GrowthCard, type GrowthCardProps, MilestoneTimeline, type MilestoneTimelineProps, PeerGraph, type PeerGraphNode, type PeerGraphProps, type PopulationAgent, PopulationView, type PopulationViewProps, STAGE_COLORS, STAGE_LABELS, SkillRing, type SkillRingProps, Sparkline, type SparklinePoint, type SparklineProps };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { D as DreyfusStage, M as Milestone, S as Score, C as CelebrationTier, L as LearningEdge } from './types-DzOc15AL.js';
|
|
3
|
+
|
|
4
|
+
interface SkillRingProps {
|
|
5
|
+
skill: string;
|
|
6
|
+
score: number;
|
|
7
|
+
stage: DreyfusStage;
|
|
8
|
+
size?: number;
|
|
9
|
+
showLabel?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function SkillRing({ skill, score, stage, size, showLabel, className, }: SkillRingProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
interface SparklinePoint {
|
|
15
|
+
score: number;
|
|
16
|
+
timestamp: string;
|
|
17
|
+
}
|
|
18
|
+
interface SparklineProps {
|
|
19
|
+
data: SparklinePoint[];
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
color?: DreyfusStage | string;
|
|
23
|
+
showDots?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function Sparkline({ data, width, height, color, showDots, className, }: SparklineProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
interface MilestoneTimelineProps {
|
|
29
|
+
milestones: Milestone[];
|
|
30
|
+
limit?: number;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
declare function MilestoneTimeline({ milestones, limit, className, }: MilestoneTimelineProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
interface GrowthCardProps {
|
|
36
|
+
agentId: string;
|
|
37
|
+
agentName?: string;
|
|
38
|
+
scores: Score[];
|
|
39
|
+
scoreHistory?: Map<string, {
|
|
40
|
+
score: number;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
}[]>;
|
|
43
|
+
milestones?: Milestone[];
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
declare function GrowthCard({ agentId, agentName, scores, scoreHistory, milestones, className, }: GrowthCardProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare const STAGE_COLORS: Record<DreyfusStage, string>;
|
|
49
|
+
declare const STAGE_LABELS: Record<DreyfusStage, string>;
|
|
50
|
+
declare const BACKGROUND: {
|
|
51
|
+
panel: string;
|
|
52
|
+
card: string;
|
|
53
|
+
hover: string;
|
|
54
|
+
};
|
|
55
|
+
declare const BORDER: {
|
|
56
|
+
subtle: string;
|
|
57
|
+
accent: string;
|
|
58
|
+
};
|
|
59
|
+
declare const ACCENT = "#00d4ff";
|
|
60
|
+
declare const GOLD = "rgba(255, 215, 0, 0.8)";
|
|
61
|
+
declare const CELEBRATION_CONFIG: Record<CelebrationTier, {
|
|
62
|
+
particles: number;
|
|
63
|
+
spread: number;
|
|
64
|
+
duration: number;
|
|
65
|
+
}>;
|
|
66
|
+
|
|
67
|
+
interface PeerGraphNode {
|
|
68
|
+
id: string;
|
|
69
|
+
label?: string;
|
|
70
|
+
stage?: keyof typeof STAGE_COLORS;
|
|
71
|
+
}
|
|
72
|
+
interface PeerGraphProps {
|
|
73
|
+
nodes: PeerGraphNode[];
|
|
74
|
+
edges: LearningEdge[];
|
|
75
|
+
width?: number;
|
|
76
|
+
height?: number;
|
|
77
|
+
className?: string;
|
|
78
|
+
}
|
|
79
|
+
declare function PeerGraph({ nodes, edges, width, height, className, }: PeerGraphProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
interface PopulationAgent {
|
|
82
|
+
agent_id: string;
|
|
83
|
+
agent_name?: string;
|
|
84
|
+
scores: Score[];
|
|
85
|
+
}
|
|
86
|
+
interface PopulationViewProps {
|
|
87
|
+
agents: PopulationAgent[];
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
declare function PopulationView({ agents, className }: PopulationViewProps): react_jsx_runtime.JSX.Element;
|
|
91
|
+
|
|
92
|
+
export { ACCENT, BACKGROUND, BORDER, CELEBRATION_CONFIG, GOLD, GrowthCard, type GrowthCardProps, MilestoneTimeline, type MilestoneTimelineProps, PeerGraph, type PeerGraphNode, type PeerGraphProps, type PopulationAgent, PopulationView, type PopulationViewProps, STAGE_COLORS, STAGE_LABELS, SkillRing, type SkillRingProps, Sparkline, type SparklinePoint, type SparklineProps };
|