selftune 0.2.9 → 0.2.10

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 (130) hide show
  1. package/README.md +35 -35
  2. package/apps/local-dashboard/dist/assets/index-BZVLv70T.js +16 -0
  3. package/apps/local-dashboard/dist/assets/{vendor-react-BQH_6WrG.js → vendor-react-BXP54cYo.js} +4 -4
  4. package/apps/local-dashboard/dist/assets/{vendor-table-dK1QMLq9.js → vendor-table-DTF_SXoy.js} +1 -1
  5. package/apps/local-dashboard/dist/assets/{vendor-ui-CO2mrx6e.js → vendor-ui-CWU0d1wd.js} +66 -66
  6. package/apps/local-dashboard/dist/index.html +15 -15
  7. package/bin/selftune.cjs +1 -1
  8. package/cli/selftune/activation-rules.ts +1 -0
  9. package/cli/selftune/alpha-upload/build-payloads.ts +18 -2
  10. package/cli/selftune/alpha-upload/stage-canonical.ts +94 -0
  11. package/cli/selftune/auth/device-code.ts +32 -0
  12. package/cli/selftune/auto-update.ts +12 -0
  13. package/cli/selftune/badge/badge.ts +1 -0
  14. package/cli/selftune/canonical-export.ts +5 -0
  15. package/cli/selftune/claude-agents.ts +154 -0
  16. package/cli/selftune/contribute/bundle.ts +1 -0
  17. package/cli/selftune/contribute/contribute.ts +1 -0
  18. package/cli/selftune/cron/setup.ts +2 -2
  19. package/cli/selftune/dashboard-server.ts +1 -0
  20. package/cli/selftune/eval/hooks-to-evals.ts +1 -0
  21. package/cli/selftune/eval/import-skillsbench.ts +1 -0
  22. package/cli/selftune/eval/synthetic-evals.ts +2 -3
  23. package/cli/selftune/eval/unit-test.ts +1 -0
  24. package/cli/selftune/evolution/deploy-proposal.ts +1 -0
  25. package/cli/selftune/evolution/evolve-body.ts +93 -6
  26. package/cli/selftune/evolution/evolve.ts +0 -1
  27. package/cli/selftune/evolution/propose-body.ts +3 -2
  28. package/cli/selftune/evolution/propose-routing.ts +3 -2
  29. package/cli/selftune/evolution/refine-body.ts +3 -2
  30. package/cli/selftune/export.ts +1 -0
  31. package/cli/selftune/grading/grade-session.ts +8 -0
  32. package/cli/selftune/hooks/auto-activate.ts +1 -0
  33. package/cli/selftune/hooks/evolution-guard.ts +1 -1
  34. package/cli/selftune/hooks/prompt-log.ts +1 -0
  35. package/cli/selftune/hooks/session-stop.ts +34 -40
  36. package/cli/selftune/hooks/skill-change-guard.ts +1 -0
  37. package/cli/selftune/hooks/skill-eval.ts +1 -1
  38. package/cli/selftune/index.ts +23 -14
  39. package/cli/selftune/ingestors/claude-replay.ts +1 -0
  40. package/cli/selftune/ingestors/codex-rollout.ts +1 -0
  41. package/cli/selftune/ingestors/codex-wrapper.ts +1 -0
  42. package/cli/selftune/ingestors/openclaw-ingest.ts +1 -0
  43. package/cli/selftune/ingestors/opencode-ingest.ts +1 -0
  44. package/cli/selftune/init.ts +121 -29
  45. package/cli/selftune/localdb/db.ts +1 -0
  46. package/cli/selftune/localdb/direct-write.ts +39 -0
  47. package/cli/selftune/localdb/materialize.ts +2 -0
  48. package/cli/selftune/localdb/queries.ts +53 -0
  49. package/cli/selftune/localdb/schema.ts +28 -0
  50. package/cli/selftune/normalization.ts +1 -0
  51. package/cli/selftune/observability.ts +1 -0
  52. package/cli/selftune/repair/skill-usage.ts +1 -0
  53. package/cli/selftune/routes/orchestrate-runs.ts +1 -0
  54. package/cli/selftune/routes/overview.ts +1 -0
  55. package/cli/selftune/routes/skill-report.ts +1 -0
  56. package/cli/selftune/sync.ts +30 -1
  57. package/cli/selftune/uninstall.ts +412 -0
  58. package/cli/selftune/utils/canonical-log.ts +2 -0
  59. package/cli/selftune/utils/jsonl.ts +1 -0
  60. package/cli/selftune/utils/llm-call.ts +131 -3
  61. package/cli/selftune/utils/skill-log.ts +1 -0
  62. package/cli/selftune/utils/transcript.ts +1 -0
  63. package/cli/selftune/utils/trigger-check.ts +1 -1
  64. package/cli/selftune/workflows/skill-md-writer.ts +5 -5
  65. package/cli/selftune/workflows/workflows.ts +1 -0
  66. package/package.json +37 -33
  67. package/packages/telemetry-contract/fixtures/golden.test.ts +1 -0
  68. package/packages/telemetry-contract/package.json +1 -1
  69. package/packages/telemetry-contract/src/schemas.ts +1 -0
  70. package/packages/telemetry-contract/tests/compatibility.test.ts +1 -0
  71. package/packages/ui/README.md +35 -34
  72. package/packages/ui/package.json +3 -3
  73. package/packages/ui/src/components/ActivityTimeline.tsx +49 -42
  74. package/packages/ui/src/components/EvidenceViewer.tsx +306 -182
  75. package/packages/ui/src/components/EvolutionTimeline.tsx +83 -72
  76. package/packages/ui/src/components/InfoTip.tsx +4 -3
  77. package/packages/ui/src/components/OrchestrateRunsPanel.tsx +60 -53
  78. package/packages/ui/src/components/section-cards.tsx +19 -24
  79. package/packages/ui/src/components/skill-health-grid.tsx +213 -193
  80. package/packages/ui/src/lib/constants.tsx +1 -0
  81. package/packages/ui/src/primitives/badge.tsx +12 -15
  82. package/packages/ui/src/primitives/button.tsx +7 -7
  83. package/packages/ui/src/primitives/card.tsx +15 -26
  84. package/packages/ui/src/primitives/checkbox.tsx +7 -8
  85. package/packages/ui/src/primitives/collapsible.tsx +5 -5
  86. package/packages/ui/src/primitives/dropdown-menu.tsx +45 -55
  87. package/packages/ui/src/primitives/label.tsx +6 -6
  88. package/packages/ui/src/primitives/select.tsx +28 -37
  89. package/packages/ui/src/primitives/table.tsx +17 -44
  90. package/packages/ui/src/primitives/tabs.tsx +14 -21
  91. package/packages/ui/src/primitives/tooltip.tsx +10 -22
  92. package/skill/SKILL.md +70 -57
  93. package/skill/Workflows/AlphaUpload.md +4 -4
  94. package/skill/Workflows/AutoActivation.md +11 -6
  95. package/skill/Workflows/Badge.md +22 -16
  96. package/skill/Workflows/Baseline.md +34 -36
  97. package/skill/Workflows/Composability.md +16 -11
  98. package/skill/Workflows/Contribute.md +26 -21
  99. package/skill/Workflows/Cron.md +23 -22
  100. package/skill/Workflows/Dashboard.md +32 -27
  101. package/skill/Workflows/Doctor.md +33 -27
  102. package/skill/Workflows/Evals.md +48 -47
  103. package/skill/Workflows/EvolutionMemory.md +31 -21
  104. package/skill/Workflows/Evolve.md +84 -82
  105. package/skill/Workflows/EvolveBody.md +58 -47
  106. package/skill/Workflows/Grade.md +16 -13
  107. package/skill/Workflows/ImportSkillsBench.md +9 -6
  108. package/skill/Workflows/Ingest.md +36 -21
  109. package/skill/Workflows/Initialize.md +108 -40
  110. package/skill/Workflows/Orchestrate.md +22 -16
  111. package/skill/Workflows/Replay.md +12 -7
  112. package/skill/Workflows/Rollback.md +13 -6
  113. package/skill/Workflows/Schedule.md +6 -6
  114. package/skill/Workflows/Sync.md +18 -11
  115. package/skill/Workflows/UnitTest.md +28 -17
  116. package/skill/Workflows/Watch.md +28 -21
  117. package/skill/agents/diagnosis-analyst.md +11 -0
  118. package/skill/agents/evolution-reviewer.md +15 -1
  119. package/skill/agents/integration-guide.md +10 -0
  120. package/skill/agents/pattern-analyst.md +12 -1
  121. package/skill/references/grading-methodology.md +23 -24
  122. package/skill/references/interactive-config.md +7 -7
  123. package/skill/references/invocation-taxonomy.md +22 -20
  124. package/skill/references/logs.md +14 -6
  125. package/skill/references/setup-patterns.md +4 -2
  126. package/.claude/agents/diagnosis-analyst.md +0 -156
  127. package/.claude/agents/evolution-reviewer.md +0 -180
  128. package/.claude/agents/integration-guide.md +0 -212
  129. package/.claude/agents/pattern-analyst.md +0 -160
  130. package/apps/local-dashboard/dist/assets/index-C4UYGWKr.js +0 -15
package/package.json CHANGED
@@ -1,41 +1,44 @@
1
1
  {
2
2
  "name": "selftune",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Self-improving skills CLI for AI agents",
5
- "type": "module",
5
+ "keywords": [
6
+ "agent",
7
+ "bun",
8
+ "claude-code",
9
+ "cli",
10
+ "codex",
11
+ "eval",
12
+ "evolution",
13
+ "grading",
14
+ "opencode",
15
+ "self-improving",
16
+ "selftune",
17
+ "skill",
18
+ "telemetry",
19
+ "typescript"
20
+ ],
21
+ "homepage": "https://github.com/selftune-dev/selftune#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/selftune-dev/selftune/issues"
24
+ },
6
25
  "license": "MIT",
7
26
  "author": "Daniel Petro",
8
- "homepage": "https://github.com/selftune-dev/selftune#readme",
9
27
  "repository": {
10
28
  "type": "git",
11
29
  "url": "git+https://github.com/selftune-dev/selftune.git"
12
30
  },
13
- "bugs": {
14
- "url": "https://github.com/selftune-dev/selftune/issues"
15
- },
16
31
  "funding": {
17
32
  "type": "github",
18
33
  "url": "https://github.com/sponsors/WellDunDun"
19
34
  },
20
- "keywords": [
21
- "selftune",
22
- "skill",
23
- "self-improving",
24
- "claude-code",
25
- "codex",
26
- "opencode",
27
- "eval",
28
- "grading",
29
- "evolution",
30
- "cli",
31
- "agent",
32
- "telemetry",
33
- "bun",
34
- "typescript"
35
- ],
36
35
  "bin": {
37
36
  "selftune": "bin/selftune.cjs"
38
37
  },
38
+ "workspaces": [
39
+ "packages/*",
40
+ "apps/*"
41
+ ],
39
42
  "files": [
40
43
  "assets/",
41
44
  "bin/",
@@ -44,39 +47,40 @@
44
47
  "packages/telemetry-contract/",
45
48
  "packages/ui/",
46
49
  "templates/",
47
- ".claude/agents/",
48
50
  "skill/",
49
51
  "README.md",
50
52
  "CHANGELOG.md"
51
53
  ],
54
+ "type": "module",
52
55
  "scripts": {
53
- "dev": "sh -c 'if lsof -iTCP:7888 -sTCP:LISTEN >/dev/null 2>&1; then if curl -fsS http://localhost:7888/api/health | grep -q selftune-dashboard; then echo \"Using existing dashboard server on 7888\"; cd apps/local-dashboard && bunx vite --strictPort; else echo \"Port 7888 is occupied by a non-selftune service\"; exit 1; fi; else cd apps/local-dashboard && bun run dev; fi'",
56
+ "dev": "trap 'kill 0' EXIT; bun --watch run cli/selftune/dashboard-server.ts --port 7888 --runtime-mode dev-server & sleep 1 && cd apps/local-dashboard && bunx vite --strictPort",
54
57
  "dev:server": "bun --watch run cli/selftune/dashboard-server.ts --port 7888 --runtime-mode dev-server",
55
58
  "dev:dashboard": "bun run cli/selftune/index.ts dashboard --port 7888 --no-open",
56
- "lint": "bunx @biomejs/biome check .",
57
- "lint:fix": "bunx @biomejs/biome check --write .",
59
+ "lint": "bunx oxlint",
60
+ "lint:fix": "bunx oxlint --fix",
61
+ "format": "bunx oxfmt",
62
+ "format:check": "bunx oxfmt --check",
58
63
  "lint:arch": "bun run lint-architecture.ts",
59
64
  "test": "bun test tests/ packages/telemetry-contract/",
60
65
  "test:fast": "bun test $(find tests -name '*.test.ts' ! -name 'evolve.test.ts' ! -name 'integration.test.ts' ! -name 'dashboard-server.test.ts' ! -path '*/blog-proof/*')",
61
66
  "test:slow": "bun test tests/evolution/evolve.test.ts tests/evolution/integration.test.ts tests/monitoring/integration.test.ts tests/dashboard/dashboard-server.test.ts",
62
67
  "build:dashboard": "cd apps/local-dashboard && bunx vite build",
63
68
  "link:claude-workspace": "bash scripts/link-claude-workspace.sh",
69
+ "prepack": "node scripts/publish-package-json.cjs prepare",
70
+ "postpack": "node scripts/publish-package-json.cjs restore",
64
71
  "sync-version": "bun run scripts/sync-skill-version.ts",
65
72
  "validate:subagents": "bun run scripts/validate-subagent-docs.ts",
66
73
  "prepublishOnly": "bun run sync-version && bun run build:dashboard",
67
74
  "typecheck:dashboard": "cd apps/local-dashboard && bunx tsc --noEmit",
68
- "check": "bun run lint && bun run lint:arch && bun run typecheck:dashboard && bun run test",
75
+ "check": "bun run lint && bun run format:check && bun run lint:arch && bun run typecheck:dashboard && bun run test",
69
76
  "start": "bun run cli/selftune/index.ts --help"
70
77
  },
71
- "workspaces": [
72
- "packages/*",
73
- "apps/*"
74
- ],
75
78
  "dependencies": {
76
79
  "@selftune/telemetry-contract": "file:packages/telemetry-contract"
77
80
  },
78
81
  "devDependencies": {
79
- "@biomejs/biome": "^2.4.7",
80
- "@types/bun": "^1.1.0"
82
+ "@types/bun": "^1.1.0",
83
+ "oxfmt": "^0.41.0",
84
+ "oxlint": "^1.56.0"
81
85
  }
82
86
  }
@@ -1,6 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { join } from "node:path";
4
+
4
5
  import { CANONICAL_SCHEMA_VERSION } from "../src/types.js";
5
6
  import { isCanonicalRecord } from "../src/validators.js";
6
7
 
@@ -3,7 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "description": "Canonical telemetry schema, types, and validators for selftune",
6
- "type": "module",
7
6
  "license": "MIT",
8
7
  "author": "Daniel Petro",
9
8
  "repository": {
@@ -11,6 +10,7 @@
11
10
  "url": "git+https://github.com/selftune-dev/selftune.git",
12
11
  "directory": "packages/telemetry-contract"
13
12
  },
13
+ "type": "module",
14
14
  "exports": {
15
15
  ".": "./index.ts",
16
16
  "./schemas": "./src/schemas.ts",
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+
2
3
  import {
3
4
  CANONICAL_CAPTURE_MODES,
4
5
  CANONICAL_COMPLETION_STATUSES,
@@ -1,4 +1,5 @@
1
1
  import { describe, expect, test } from "bun:test";
2
+
2
3
  import { completePush } from "../fixtures/complete-push.js";
3
4
  import { evidenceOnlyPush } from "../fixtures/evidence-only-push.js";
4
5
  import { partialPushNoSessions } from "../fixtures/partial-push-no-sessions.js";
@@ -17,16 +17,16 @@ Add as a workspace dependency:
17
17
  Import from subpath exports:
18
18
 
19
19
  ```tsx
20
- import { Badge, Button, Card } from "@selftune/ui/primitives"
21
- import { SkillHealthGrid, EvolutionTimeline } from "@selftune/ui/components"
22
- import { cn, timeAgo, deriveStatus, STATUS_CONFIG } from "@selftune/ui/lib"
23
- import type { SkillCard, EvolutionEntry } from "@selftune/ui/types"
20
+ import { Badge, Button, Card } from "@selftune/ui/primitives";
21
+ import { SkillHealthGrid, EvolutionTimeline } from "@selftune/ui/components";
22
+ import { cn, timeAgo, deriveStatus, STATUS_CONFIG } from "@selftune/ui/lib";
23
+ import type { SkillCard, EvolutionEntry } from "@selftune/ui/types";
24
24
  ```
25
25
 
26
26
  Or import everything from the root:
27
27
 
28
28
  ```tsx
29
- import { Badge, SkillHealthGrid, cn, type SkillCard } from "@selftune/ui"
29
+ import { Badge, SkillHealthGrid, cn, type SkillCard } from "@selftune/ui";
30
30
  ```
31
31
 
32
32
  ## Exports
@@ -35,44 +35,44 @@ import { Badge, SkillHealthGrid, cn, type SkillCard } from "@selftune/ui"
35
35
 
36
36
  shadcn/ui components built on [@base-ui/react](https://base-ui.com/):
37
37
 
38
- | Component | Source |
39
- |-----------|--------|
40
- | `Badge`, `badgeVariants` | badge.tsx |
41
- | `Button`, `buttonVariants` | button.tsx |
42
- | `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardAction`, `CardContent`, `CardFooter` | card.tsx |
43
- | `Checkbox` | checkbox.tsx |
44
- | `Collapsible`, `CollapsibleTrigger`, `CollapsibleContent` | collapsible.tsx |
45
- | `DropdownMenu`, `DropdownMenuTrigger`, `DropdownMenuContent`, `DropdownMenuItem`, ... | dropdown-menu.tsx |
46
- | `Label` | label.tsx |
47
- | `Select`, `SelectTrigger`, `SelectContent`, `SelectItem`, ... | select.tsx |
48
- | `Table`, `TableHeader`, `TableBody`, `TableRow`, `TableHead`, `TableCell`, ... | table.tsx |
49
- | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` | tabs.tsx |
50
- | `Tooltip`, `TooltipTrigger`, `TooltipContent`, `TooltipProvider` | tooltip.tsx |
38
+ | Component | Source |
39
+ | ----------------------------------------------------------------------------------------------- | ----------------- |
40
+ | `Badge`, `badgeVariants` | badge.tsx |
41
+ | `Button`, `buttonVariants` | button.tsx |
42
+ | `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardAction`, `CardContent`, `CardFooter` | card.tsx |
43
+ | `Checkbox` | checkbox.tsx |
44
+ | `Collapsible`, `CollapsibleTrigger`, `CollapsibleContent` | collapsible.tsx |
45
+ | `DropdownMenu`, `DropdownMenuTrigger`, `DropdownMenuContent`, `DropdownMenuItem`, ... | dropdown-menu.tsx |
46
+ | `Label` | label.tsx |
47
+ | `Select`, `SelectTrigger`, `SelectContent`, `SelectItem`, ... | select.tsx |
48
+ | `Table`, `TableHeader`, `TableBody`, `TableRow`, `TableHead`, `TableCell`, ... | table.tsx |
49
+ | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` | tabs.tsx |
50
+ | `Tooltip`, `TooltipTrigger`, `TooltipContent`, `TooltipProvider` | tooltip.tsx |
51
51
 
52
52
  ### Domain Components (`@selftune/ui/components`)
53
53
 
54
54
  Presentational components for selftune dashboard views. No data fetching, no routing — pass data and callbacks as props.
55
55
 
56
- | Component | Description |
57
- |-----------|-------------|
58
- | `SkillHealthGrid` | Sortable/filterable data table with drag-and-drop, pagination, and view tabs. Accepts `renderSkillName` prop for custom routing. |
59
- | `EvolutionTimeline` | Proposal lifecycle timeline grouped by proposal ID, with pass rate deltas. |
60
- | `ActivityPanel` | Tabbed activity feed (pending proposals, timeline events, unmatched queries). |
61
- | `EvidenceViewer` | Full evidence trail for a proposal — side-by-side diffs, validation results, iteration rounds. |
62
- | `SectionCards` | Dashboard metric stat cards (skills count, pass rate, unmatched, sessions, etc.). |
63
- | `OrchestrateRunsPanel` | Collapsible orchestrate run reports with per-skill action details. |
64
- | `InfoTip` | Small info icon with tooltip, used to explain metrics. |
56
+ | Component | Description |
57
+ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
58
+ | `SkillHealthGrid` | Sortable/filterable data table with drag-and-drop, pagination, and view tabs. Accepts `renderSkillName` prop for custom routing. |
59
+ | `EvolutionTimeline` | Proposal lifecycle timeline grouped by proposal ID, with pass rate deltas. |
60
+ | `ActivityPanel` | Tabbed activity feed (pending proposals, timeline events, unmatched queries). |
61
+ | `EvidenceViewer` | Full evidence trail for a proposal — side-by-side diffs, validation results, iteration rounds. |
62
+ | `SectionCards` | Dashboard metric stat cards (skills count, pass rate, unmatched, sessions, etc.). |
63
+ | `OrchestrateRunsPanel` | Collapsible orchestrate run reports with per-skill action details. |
64
+ | `InfoTip` | Small info icon with tooltip, used to explain metrics. |
65
65
 
66
66
  ### Utilities (`@selftune/ui/lib`)
67
67
 
68
- | Export | Description |
69
- |--------|-------------|
70
- | `cn(...inputs)` | Tailwind class merge utility (clsx + tailwind-merge) |
71
- | `timeAgo(timestamp)` | Relative time string ("3h ago", "2d ago") |
72
- | `formatRate(rate)` | Format 0-1 rate as percentage string ("85%") |
73
- | `deriveStatus(passRate, checks)` | Derive `SkillHealthStatus` from pass rate and check count |
68
+ | Export | Description |
69
+ | -------------------------------- | --------------------------------------------------------------- |
70
+ | `cn(...inputs)` | Tailwind class merge utility (clsx + tailwind-merge) |
71
+ | `timeAgo(timestamp)` | Relative time string ("3h ago", "2d ago") |
72
+ | `formatRate(rate)` | Format 0-1 rate as percentage string ("85%") |
73
+ | `deriveStatus(passRate, checks)` | Derive `SkillHealthStatus` from pass rate and check count |
74
74
  | `sortByPassRateAndChecks(items)` | Sort skill cards by pass rate ascending, then checks descending |
75
- | `STATUS_CONFIG` | Icon, variant, and label for each `SkillHealthStatus` value |
75
+ | `STATUS_CONFIG` | Icon, variant, and label for each `SkillHealthStatus` value |
76
76
 
77
77
  ### Types (`@selftune/ui/types`)
78
78
 
@@ -107,6 +107,7 @@ This package uses Tailwind v4. The Vite plugin auto-scans imported workspace pac
107
107
  Required: `react`, `react-dom`
108
108
 
109
109
  Optional (only needed by specific components):
110
+
110
111
  - `@dnd-kit/*` — SkillHealthGrid drag-and-drop
111
112
  - `@tanstack/react-table` — SkillHealthGrid table
112
113
  - `react-markdown` — EvidenceViewer markdown rendering
@@ -3,7 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "description": "Shared UI components for selftune dashboards",
6
- "type": "module",
7
6
  "license": "MIT",
8
7
  "author": "Daniel Petro",
9
8
  "repository": {
@@ -11,6 +10,7 @@
11
10
  "url": "git+https://github.com/selftune-dev/selftune.git",
12
11
  "directory": "packages/ui"
13
12
  },
13
+ "type": "module",
14
14
  "exports": {
15
15
  ".": "./index.ts",
16
16
  "./primitives": "./src/primitives/index.ts",
@@ -30,13 +30,13 @@
30
30
  "@types/react-dom": "^19.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "react": "^19.0.0",
34
- "react-dom": "^19.0.0",
35
33
  "@dnd-kit/core": "^6.0.0",
36
34
  "@dnd-kit/modifiers": "^9.0.0",
37
35
  "@dnd-kit/sortable": "^10.0.0",
38
36
  "@dnd-kit/utilities": "^3.0.0",
39
37
  "@tanstack/react-table": "^8.0.0",
38
+ "react": "^19.0.0",
39
+ "react-dom": "^19.0.0",
40
40
  "react-markdown": "^10.0.0",
41
41
  "recharts": "^2.0.0"
42
42
  },
@@ -1,21 +1,11 @@
1
- import { Badge } from "../primitives/badge"
2
- import {
3
- Card,
4
- CardContent,
5
- CardDescription,
6
- CardHeader,
7
- CardTitle,
8
- } from "../primitives/card"
9
- import { Tabs, TabsContent, TabsList, TabsTrigger } from "../primitives/tabs"
10
- import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../primitives/tooltip"
11
- import type { EvolutionEntry, PendingProposal, UnmatchedQuery } from "../types"
12
- import { timeAgo } from "../lib/format"
13
- import {
14
- ClockIcon,
15
- GitPullRequestArrowIcon,
16
- SearchXIcon,
17
- ActivityIcon,
18
- } from "lucide-react"
1
+ import { ClockIcon, GitPullRequestArrowIcon, SearchXIcon, ActivityIcon } from "lucide-react";
2
+
3
+ import { timeAgo } from "../lib/format";
4
+ import { Badge } from "../primitives/badge";
5
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../primitives/card";
6
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "../primitives/tabs";
7
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../primitives/tooltip";
8
+ import type { EvolutionEntry, PendingProposal, UnmatchedQuery } from "../types";
19
9
 
20
10
  const ACTION_VARIANT: Record<string, "default" | "secondary" | "destructive" | "outline"> = {
21
11
  created: "outline",
@@ -24,7 +14,7 @@ const ACTION_VARIANT: Record<string, "default" | "secondary" | "destructive" | "
24
14
  rejected: "destructive",
25
15
  rolled_back: "destructive",
26
16
  pending: "secondary",
27
- }
17
+ };
28
18
 
29
19
  export function ActivityPanel({
30
20
  evolution,
@@ -32,12 +22,13 @@ export function ActivityPanel({
32
22
  unmatchedQueries,
33
23
  onSelectProposal,
34
24
  }: {
35
- evolution: EvolutionEntry[]
36
- pendingProposals: PendingProposal[]
37
- unmatchedQueries: UnmatchedQuery[]
38
- onSelectProposal?: (skillName: string, proposalId: string) => void
25
+ evolution: EvolutionEntry[];
26
+ pendingProposals: PendingProposal[];
27
+ unmatchedQueries: UnmatchedQuery[];
28
+ onSelectProposal?: (skillName: string, proposalId: string) => void;
39
29
  }) {
40
- const hasActivity = evolution.length > 0 || pendingProposals.length > 0 || unmatchedQueries.length > 0
30
+ const hasActivity =
31
+ evolution.length > 0 || pendingProposals.length > 0 || unmatchedQueries.length > 0;
41
32
 
42
33
  if (!hasActivity) {
43
34
  return (
@@ -49,12 +40,10 @@ export function ActivityPanel({
49
40
  </CardTitle>
50
41
  </CardHeader>
51
42
  <CardContent>
52
- <p className="text-sm text-muted-foreground text-center py-8">
53
- No recent activity
54
- </p>
43
+ <p className="text-sm text-muted-foreground text-center py-8">No recent activity</p>
55
44
  </CardContent>
56
45
  </Card>
57
- )
46
+ );
58
47
  }
59
48
 
60
49
  return (
@@ -80,7 +69,9 @@ export function ActivityPanel({
80
69
  <TabsList className="w-full">
81
70
  {pendingProposals.length > 0 && (
82
71
  <Tooltip>
83
- <TooltipTrigger render={<TabsTrigger value="pending" className="flex-1 gap-1.5" />}>
72
+ <TooltipTrigger
73
+ render={<TabsTrigger value="pending" className="flex-1 gap-1.5" />}
74
+ >
84
75
  <GitPullRequestArrowIcon className="size-3.5" />
85
76
  <Badge variant="secondary" className="h-4 px-1 text-[10px]">
86
77
  {pendingProposals.length}
@@ -97,7 +88,9 @@ export function ActivityPanel({
97
88
  </Tooltip>
98
89
  {unmatchedQueries.length > 0 && (
99
90
  <Tooltip>
100
- <TooltipTrigger render={<TabsTrigger value="unmatched" className="flex-1 gap-1.5" />}>
91
+ <TooltipTrigger
92
+ render={<TabsTrigger value="unmatched" className="flex-1 gap-1.5" />}
93
+ >
101
94
  <SearchXIcon className="size-3.5" />
102
95
  <Badge variant="destructive" className="h-4 px-1 text-[10px]">
103
96
  {unmatchedQueries.length}
@@ -116,7 +109,8 @@ export function ActivityPanel({
116
109
  key={p.proposal_id}
117
110
  type="button"
118
111
  onClick={() => {
119
- if (p.skill_name && onSelectProposal) onSelectProposal(p.skill_name, p.proposal_id)
112
+ if (p.skill_name && onSelectProposal)
113
+ onSelectProposal(p.skill_name, p.proposal_id);
120
114
  }}
121
115
  disabled={!p.skill_name || !onSelectProposal}
122
116
  className="flex w-full gap-3 rounded-md p-1.5 text-left transition-colors enabled:hover:bg-accent/40 disabled:cursor-default"
@@ -124,7 +118,10 @@ export function ActivityPanel({
124
118
  <div className="mt-1 size-2 shrink-0 rounded-full bg-amber-400" />
125
119
  <div className="flex-1 min-w-0 space-y-1">
126
120
  <div className="flex items-center gap-2">
127
- <Badge variant={ACTION_VARIANT[p.action] ?? "secondary"} className="text-[10px]">
121
+ <Badge
122
+ variant={ACTION_VARIANT[p.action] ?? "secondary"}
123
+ className="text-[10px]"
124
+ >
128
125
  {p.action}
129
126
  </Badge>
130
127
  <span className="text-xs text-muted-foreground font-mono">
@@ -149,20 +146,29 @@ export function ActivityPanel({
149
146
  key={`${entry.proposal_id}-${i}`}
150
147
  type="button"
151
148
  onClick={() => {
152
- if (entry.skill_name && onSelectProposal) onSelectProposal(entry.skill_name, entry.proposal_id)
149
+ if (entry.skill_name && onSelectProposal)
150
+ onSelectProposal(entry.skill_name, entry.proposal_id);
153
151
  }}
154
152
  disabled={!entry.skill_name || !onSelectProposal}
155
153
  className="flex w-full gap-3 rounded-md p-1.5 text-left transition-colors enabled:hover:bg-accent/40 disabled:cursor-default"
156
154
  >
157
- <div className={`mt-1 size-2 shrink-0 rounded-full ${
158
- entry.action === "deployed" ? "bg-emerald-500"
159
- : entry.action === "rejected" || entry.action === "rolled_back" ? "bg-red-500"
160
- : entry.action === "validated" ? "bg-amber-400"
161
- : "bg-primary-accent"
162
- }`} />
155
+ <div
156
+ className={`mt-1 size-2 shrink-0 rounded-full ${
157
+ entry.action === "deployed"
158
+ ? "bg-emerald-500"
159
+ : entry.action === "rejected" || entry.action === "rolled_back"
160
+ ? "bg-red-500"
161
+ : entry.action === "validated"
162
+ ? "bg-amber-400"
163
+ : "bg-primary-accent"
164
+ }`}
165
+ />
163
166
  <div className="flex-1 min-w-0 space-y-1">
164
167
  <div className="flex items-center gap-2">
165
- <Badge variant={ACTION_VARIANT[entry.action] ?? "secondary"} className="text-[10px]">
168
+ <Badge
169
+ variant={ACTION_VARIANT[entry.action] ?? "secondary"}
170
+ className="text-[10px]"
171
+ >
166
172
  {entry.action}
167
173
  </Badge>
168
174
  <span className="text-xs text-muted-foreground font-mono">
@@ -171,7 +177,8 @@ export function ActivityPanel({
171
177
  </div>
172
178
  <p className="text-xs text-muted-foreground line-clamp-2">{entry.details}</p>
173
179
  <span className="text-[10px] text-muted-foreground/60 font-mono">
174
- {entry.skill_name ? `${entry.skill_name} · ` : ""}#{entry.proposal_id.slice(0, 8)}
180
+ {entry.skill_name ? `${entry.skill_name} · ` : ""}#
181
+ {entry.proposal_id.slice(0, 8)}
175
182
  </span>
176
183
  </div>
177
184
  </button>
@@ -199,5 +206,5 @@ export function ActivityPanel({
199
206
  </Tabs>
200
207
  </CardContent>
201
208
  </Card>
202
- )
209
+ );
203
210
  }