selftune 0.2.9 → 0.2.12
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 +35 -35
- package/apps/local-dashboard/dist/assets/index-4_dAY17K.js +16 -0
- package/apps/local-dashboard/dist/assets/index-BxV5WZHc.css +2 -0
- package/apps/local-dashboard/dist/assets/rolldown-runtime-Dw2cE7zH.js +1 -0
- package/apps/local-dashboard/dist/assets/vendor-react-CKkiCskZ.js +11 -0
- package/apps/local-dashboard/dist/assets/vendor-table-pHbDxq36.js +8 -0
- package/apps/local-dashboard/dist/assets/vendor-ui-7xD7fNEU.js +12 -0
- package/apps/local-dashboard/dist/index.html +16 -15
- package/bin/selftune.cjs +1 -1
- package/cli/selftune/activation-rules.ts +1 -0
- package/cli/selftune/alpha-upload/build-payloads.ts +18 -2
- package/cli/selftune/alpha-upload/stage-canonical.ts +94 -0
- package/cli/selftune/auth/device-code.ts +32 -0
- package/cli/selftune/auto-update.ts +12 -0
- package/cli/selftune/badge/badge.ts +1 -0
- package/cli/selftune/canonical-export.ts +5 -0
- package/cli/selftune/claude-agents.ts +154 -0
- package/cli/selftune/contribute/bundle.ts +1 -0
- package/cli/selftune/contribute/contribute.ts +1 -0
- package/cli/selftune/cron/setup.ts +2 -2
- package/cli/selftune/dashboard-server.ts +1 -0
- package/cli/selftune/eval/hooks-to-evals.ts +1 -0
- package/cli/selftune/eval/import-skillsbench.ts +1 -0
- package/cli/selftune/eval/synthetic-evals.ts +2 -3
- package/cli/selftune/eval/unit-test.ts +1 -0
- package/cli/selftune/evolution/deploy-proposal.ts +9 -238
- package/cli/selftune/evolution/evolve-body.ts +93 -6
- package/cli/selftune/evolution/evolve.ts +3 -7
- package/cli/selftune/evolution/propose-body.ts +3 -2
- package/cli/selftune/evolution/propose-routing.ts +3 -2
- package/cli/selftune/evolution/refine-body.ts +3 -2
- package/cli/selftune/evolution/rollback.ts +1 -1
- package/cli/selftune/export.ts +1 -0
- package/cli/selftune/grading/grade-session.ts +8 -0
- package/cli/selftune/hooks/auto-activate.ts +1 -0
- package/cli/selftune/hooks/evolution-guard.ts +1 -1
- package/cli/selftune/hooks/prompt-log.ts +1 -0
- package/cli/selftune/hooks/session-stop.ts +34 -40
- package/cli/selftune/hooks/skill-change-guard.ts +1 -0
- package/cli/selftune/hooks/skill-eval.ts +1 -1
- package/cli/selftune/index.ts +23 -14
- package/cli/selftune/ingestors/claude-replay.ts +1 -0
- package/cli/selftune/ingestors/codex-rollout.ts +1 -0
- package/cli/selftune/ingestors/codex-wrapper.ts +1 -0
- package/cli/selftune/ingestors/openclaw-ingest.ts +1 -0
- package/cli/selftune/ingestors/opencode-ingest.ts +1 -0
- package/cli/selftune/init.ts +121 -29
- package/cli/selftune/localdb/db.ts +1 -0
- package/cli/selftune/localdb/direct-write.ts +39 -0
- package/cli/selftune/localdb/materialize.ts +2 -0
- package/cli/selftune/localdb/queries.ts +53 -0
- package/cli/selftune/localdb/schema.ts +28 -0
- package/cli/selftune/normalization.ts +1 -0
- package/cli/selftune/observability.ts +1 -0
- package/cli/selftune/repair/skill-usage.ts +1 -0
- package/cli/selftune/routes/orchestrate-runs.ts +1 -0
- package/cli/selftune/routes/overview.ts +1 -0
- package/cli/selftune/routes/report.ts +1 -1
- package/cli/selftune/routes/skill-report.ts +2 -1
- package/cli/selftune/status.ts +1 -1
- package/cli/selftune/sync.ts +30 -1
- package/cli/selftune/uninstall.ts +412 -0
- package/cli/selftune/utils/canonical-log.ts +2 -0
- package/cli/selftune/utils/frontmatter.ts +50 -7
- package/cli/selftune/utils/jsonl.ts +1 -0
- package/cli/selftune/utils/llm-call.ts +131 -3
- package/cli/selftune/utils/skill-log.ts +1 -0
- package/cli/selftune/utils/transcript.ts +1 -0
- package/cli/selftune/utils/trigger-check.ts +1 -1
- package/cli/selftune/workflows/skill-md-writer.ts +5 -5
- package/cli/selftune/workflows/workflows.ts +1 -0
- package/package.json +37 -33
- package/packages/telemetry-contract/fixtures/golden.test.ts +1 -0
- package/packages/telemetry-contract/package.json +1 -1
- package/packages/telemetry-contract/src/schemas.ts +1 -0
- package/packages/telemetry-contract/tests/compatibility.test.ts +1 -0
- package/packages/ui/README.md +35 -34
- package/packages/ui/package.json +3 -3
- package/packages/ui/src/components/ActivityTimeline.tsx +50 -43
- package/packages/ui/src/components/EvidenceViewer.tsx +306 -182
- package/packages/ui/src/components/EvolutionTimeline.tsx +83 -72
- package/packages/ui/src/components/InfoTip.tsx +4 -3
- package/packages/ui/src/components/OrchestrateRunsPanel.tsx +60 -53
- package/packages/ui/src/components/section-cards.tsx +20 -25
- package/packages/ui/src/components/skill-health-grid.tsx +213 -193
- package/packages/ui/src/lib/constants.tsx +1 -0
- package/packages/ui/src/primitives/badge.tsx +12 -15
- package/packages/ui/src/primitives/button.tsx +7 -7
- package/packages/ui/src/primitives/card.tsx +15 -26
- package/packages/ui/src/primitives/checkbox.tsx +7 -8
- package/packages/ui/src/primitives/collapsible.tsx +5 -5
- package/packages/ui/src/primitives/dropdown-menu.tsx +45 -55
- package/packages/ui/src/primitives/label.tsx +6 -6
- package/packages/ui/src/primitives/select.tsx +28 -37
- package/packages/ui/src/primitives/table.tsx +17 -44
- package/packages/ui/src/primitives/tabs.tsx +14 -21
- package/packages/ui/src/primitives/tooltip.tsx +10 -22
- package/skill/SKILL.md +70 -57
- package/skill/Workflows/AlphaUpload.md +4 -4
- package/skill/Workflows/AutoActivation.md +11 -6
- package/skill/Workflows/Badge.md +22 -16
- package/skill/Workflows/Baseline.md +34 -36
- package/skill/Workflows/Composability.md +16 -11
- package/skill/Workflows/Contribute.md +26 -21
- package/skill/Workflows/Cron.md +23 -22
- package/skill/Workflows/Dashboard.md +32 -27
- package/skill/Workflows/Doctor.md +33 -27
- package/skill/Workflows/Evals.md +48 -47
- package/skill/Workflows/EvolutionMemory.md +31 -21
- package/skill/Workflows/Evolve.md +84 -82
- package/skill/Workflows/EvolveBody.md +58 -47
- package/skill/Workflows/Grade.md +16 -13
- package/skill/Workflows/ImportSkillsBench.md +9 -6
- package/skill/Workflows/Ingest.md +36 -21
- package/skill/Workflows/Initialize.md +108 -40
- package/skill/Workflows/Orchestrate.md +22 -16
- package/skill/Workflows/Replay.md +12 -7
- package/skill/Workflows/Rollback.md +13 -6
- package/skill/Workflows/Schedule.md +6 -6
- package/skill/Workflows/Sync.md +18 -11
- package/skill/Workflows/UnitTest.md +28 -17
- package/skill/Workflows/Watch.md +28 -21
- package/skill/agents/diagnosis-analyst.md +11 -0
- package/skill/agents/evolution-reviewer.md +15 -1
- package/skill/agents/integration-guide.md +10 -0
- package/skill/agents/pattern-analyst.md +12 -1
- package/skill/references/grading-methodology.md +23 -24
- package/skill/references/interactive-config.md +7 -7
- package/skill/references/invocation-taxonomy.md +22 -20
- package/skill/references/logs.md +14 -6
- package/skill/references/setup-patterns.md +4 -2
- package/.claude/agents/diagnosis-analyst.md +0 -156
- package/.claude/agents/evolution-reviewer.md +0 -180
- package/.claude/agents/integration-guide.md +0 -212
- package/.claude/agents/pattern-analyst.md +0 -160
- package/apps/local-dashboard/dist/assets/index-Bs3Y4ixf.css +0 -1
- package/apps/local-dashboard/dist/assets/index-C4UYGWKr.js +0 -15
- package/apps/local-dashboard/dist/assets/vendor-react-BQH_6WrG.js +0 -60
- package/apps/local-dashboard/dist/assets/vendor-table-dK1QMLq9.js +0 -26
- package/apps/local-dashboard/dist/assets/vendor-ui-CO2mrx6e.js +0 -341
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../
|
|
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 =
|
|
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,13 +69,15 @@ export function ActivityPanel({
|
|
|
80
69
|
<TabsList className="w-full">
|
|
81
70
|
{pendingProposals.length > 0 && (
|
|
82
71
|
<Tooltip>
|
|
83
|
-
<TooltipTrigger
|
|
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}
|
|
87
78
|
</Badge>
|
|
88
79
|
</TooltipTrigger>
|
|
89
|
-
<TooltipContent>
|
|
80
|
+
<TooltipContent>Undeployed proposals</TooltipContent>
|
|
90
81
|
</Tooltip>
|
|
91
82
|
)}
|
|
92
83
|
<Tooltip>
|
|
@@ -97,7 +88,9 @@ export function ActivityPanel({
|
|
|
97
88
|
</Tooltip>
|
|
98
89
|
{unmatchedQueries.length > 0 && (
|
|
99
90
|
<Tooltip>
|
|
100
|
-
<TooltipTrigger
|
|
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)
|
|
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
|
|
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)
|
|
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
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
|
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} · ` : ""}#
|
|
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
|
}
|