selftune 0.2.22 → 0.2.24
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/CHANGELOG.md +6 -0
- package/README.md +95 -15
- package/apps/local-dashboard/dist/assets/index-DgY2KGP-.css +1 -0
- package/apps/local-dashboard/dist/assets/index-Dmx7LPVX.js +15 -0
- package/apps/local-dashboard/dist/assets/vendor-react-C5oyHiV1.js +11 -0
- package/apps/local-dashboard/dist/assets/{vendor-table-BIiI3YhS.js → vendor-table-Bc_bbKd8.js} +1 -1
- package/apps/local-dashboard/dist/assets/vendor-ui-B3BPIYy7.js +1 -0
- package/apps/local-dashboard/dist/index.html +5 -5
- package/cli/selftune/adapters/codex/install.ts +310 -78
- package/cli/selftune/adapters/opencode/install.ts +3 -4
- package/cli/selftune/adapters/pi/hook.ts +273 -0
- package/cli/selftune/adapters/pi/install.ts +207 -0
- package/cli/selftune/alpha-upload/build-payloads.ts +3 -3
- package/cli/selftune/alpha-upload/stage-canonical.ts +17 -11
- package/cli/selftune/auto-update.ts +200 -8
- package/cli/selftune/canonical-export.ts +55 -25
- package/cli/selftune/command-surface.ts +397 -0
- package/cli/selftune/constants.ts +10 -1
- package/cli/selftune/contribute/contribute.ts +64 -13
- package/cli/selftune/contribution-config.ts +57 -3
- package/cli/selftune/contribution-preferences.ts +117 -0
- package/cli/selftune/contribution-signals.ts +8 -4
- package/cli/selftune/contribution-staging.ts +13 -2
- package/cli/selftune/contributions.ts +55 -121
- package/cli/selftune/creator-contributions.ts +29 -10
- package/cli/selftune/cron/setup.ts +7 -3
- package/cli/selftune/dashboard-contract.ts +87 -0
- package/cli/selftune/dashboard-server.ts +168 -17
- package/cli/selftune/dashboard.ts +350 -17
- package/cli/selftune/eval/baseline.ts +21 -5
- package/cli/selftune/eval/execution-eval.ts +170 -0
- package/cli/selftune/eval/family-overlap.ts +2 -2
- package/cli/selftune/eval/hooks-to-evals.ts +228 -82
- package/cli/selftune/eval/import-skillsbench.ts +2 -2
- package/cli/selftune/eval/invocation-classifier.ts +56 -0
- package/cli/selftune/eval/synthetic-evals.ts +5 -3
- package/cli/selftune/eval/unit-test-cli.ts +7 -4
- package/cli/selftune/evolution/apply-proposal.ts +295 -0
- package/cli/selftune/evolution/engines/judge-engine.ts +96 -0
- package/cli/selftune/evolution/engines/replay-engine.ts +180 -0
- package/cli/selftune/evolution/evidence.ts +2 -6
- package/cli/selftune/evolution/evolve-body.ts +152 -38
- package/cli/selftune/evolution/evolve.ts +244 -52
- package/cli/selftune/evolution/rollback.ts +0 -1
- package/cli/selftune/evolution/validate-body.ts +111 -49
- package/cli/selftune/evolution/validate-host-replay.ts +510 -60
- package/cli/selftune/evolution/validate-proposal.ts +11 -150
- package/cli/selftune/evolution/validate-routing.ts +51 -108
- package/cli/selftune/evolution/validation-contract.ts +91 -0
- package/cli/selftune/grading/auto-grade.ts +11 -7
- package/cli/selftune/grading/grade-session.ts +10 -16
- package/cli/selftune/hooks/skill-eval.ts +2 -1
- package/cli/selftune/hooks-shared/types.ts +1 -0
- package/cli/selftune/index.ts +58 -15
- package/cli/selftune/ingestors/claude-replay.ts +15 -10
- package/cli/selftune/ingestors/codex-wrapper.ts +3 -3
- package/cli/selftune/ingestors/opencode-ingest.ts +2 -2
- package/cli/selftune/ingestors/pi-ingest.ts +727 -0
- package/cli/selftune/init.ts +38 -4
- package/cli/selftune/localdb/direct-write.ts +120 -1
- package/cli/selftune/localdb/materialize.ts +6 -7
- package/cli/selftune/localdb/queries/cron.ts +34 -0
- package/cli/selftune/localdb/queries/dashboard.ts +834 -0
- package/cli/selftune/localdb/queries/evolution.ts +158 -0
- package/cli/selftune/localdb/queries/execution.ts +133 -0
- package/cli/selftune/localdb/queries/json.ts +18 -0
- package/cli/selftune/localdb/queries/monitoring.ts +263 -0
- package/cli/selftune/localdb/queries/raw.ts +95 -0
- package/cli/selftune/localdb/queries/staging.ts +270 -0
- package/cli/selftune/localdb/queries/trust.ts +392 -0
- package/cli/selftune/localdb/queries.ts +60 -2162
- package/cli/selftune/localdb/schema.ts +59 -0
- package/cli/selftune/monitoring/watch.ts +96 -29
- package/cli/selftune/normalization.ts +3 -0
- package/cli/selftune/observability.ts +12 -3
- package/cli/selftune/orchestrate/cli.ts +161 -0
- package/cli/selftune/orchestrate/execute.ts +295 -0
- package/cli/selftune/orchestrate/finalize.ts +157 -0
- package/cli/selftune/orchestrate/locks.ts +40 -0
- package/cli/selftune/orchestrate/plan.ts +131 -0
- package/cli/selftune/orchestrate/post-run.ts +59 -0
- package/cli/selftune/orchestrate/prepare.ts +334 -0
- package/cli/selftune/orchestrate/report.ts +182 -0
- package/cli/selftune/orchestrate/runtime.ts +120 -0
- package/cli/selftune/orchestrate/signals.ts +48 -0
- package/cli/selftune/orchestrate.ts +162 -1142
- package/cli/selftune/registry/client.ts +74 -0
- package/cli/selftune/registry/history.ts +54 -0
- package/cli/selftune/registry/index.ts +90 -0
- package/cli/selftune/registry/install.ts +141 -0
- package/cli/selftune/registry/list.ts +44 -0
- package/cli/selftune/registry/push.ts +171 -0
- package/cli/selftune/registry/rollback.ts +49 -0
- package/cli/selftune/registry/status.ts +62 -0
- package/cli/selftune/registry/sync.ts +125 -0
- package/cli/selftune/repair/skill-usage.ts +9 -3
- package/cli/selftune/routes/overview.ts +5 -2
- package/cli/selftune/routes/skill-report.ts +15 -2
- package/cli/selftune/schedule.ts +5 -5
- package/cli/selftune/status.ts +70 -2
- package/cli/selftune/sync.ts +127 -23
- package/cli/selftune/testing-readiness.ts +597 -0
- package/cli/selftune/types.ts +46 -5
- package/cli/selftune/uninstall.ts +2 -1
- package/cli/selftune/utils/canonical-log.ts +1 -9
- package/cli/selftune/utils/cli-error.ts +9 -0
- package/cli/selftune/utils/jsonl.ts +1 -30
- package/cli/selftune/utils/llm-call.ts +126 -6
- package/cli/selftune/utils/skill-discovery.ts +24 -0
- package/cli/selftune/workflows/proposals.ts +184 -0
- package/cli/selftune/workflows/skill-scaffold.ts +241 -0
- package/cli/selftune/workflows/workflows.ts +100 -26
- package/node_modules/@selftune/telemetry-contract/fixtures/complete-push.ts +1 -1
- package/node_modules/@selftune/telemetry-contract/fixtures/evidence-only-push.ts +2 -2
- package/node_modules/@selftune/telemetry-contract/fixtures/golden.test.ts +0 -1
- package/node_modules/@selftune/telemetry-contract/fixtures/partial-push-no-sessions.ts +1 -1
- package/node_modules/@selftune/telemetry-contract/fixtures/partial-push-unresolved-parents.ts +2 -2
- package/node_modules/@selftune/telemetry-contract/package.json +1 -1
- package/node_modules/@selftune/telemetry-contract/src/index.ts +1 -0
- package/node_modules/@selftune/telemetry-contract/src/schemas.ts +63 -5
- package/node_modules/@selftune/telemetry-contract/src/types.ts +97 -7
- package/node_modules/@selftune/telemetry-contract/tests/compatibility.test.ts +0 -1
- package/package.json +25 -9
- package/packages/dashboard-core/AGENTS.md +18 -0
- package/packages/dashboard-core/README.md +30 -0
- package/packages/dashboard-core/index.ts +3 -0
- package/packages/dashboard-core/package.json +39 -0
- package/packages/dashboard-core/src/chrome/DashboardChrome.tsx +74 -0
- package/packages/dashboard-core/src/chrome/DashboardHeader.tsx +200 -0
- package/packages/dashboard-core/src/chrome/DashboardSidebar.tsx +219 -0
- package/packages/dashboard-core/src/chrome/RuntimeBadge.tsx +46 -0
- package/packages/dashboard-core/src/chrome/index.ts +14 -0
- package/packages/dashboard-core/src/chrome/types.ts +81 -0
- package/packages/dashboard-core/src/chrome/utils.ts +23 -0
- package/packages/dashboard-core/src/gates/FeatureGate.tsx +11 -0
- package/packages/dashboard-core/src/gates/LockedRoute.tsx +29 -0
- package/packages/dashboard-core/src/gates/UpgradeCard.tsx +89 -0
- package/packages/dashboard-core/src/gates/index.ts +3 -0
- package/packages/dashboard-core/src/host/DashboardHostProvider.tsx +62 -0
- package/packages/dashboard-core/src/host/adapter.ts +47 -0
- package/packages/dashboard-core/src/host/capabilities.ts +55 -0
- package/packages/dashboard-core/src/host/index.ts +3 -0
- package/packages/dashboard-core/src/models/analytics.ts +39 -0
- package/packages/dashboard-core/src/models/index.ts +4 -0
- package/packages/dashboard-core/src/models/overview.ts +98 -0
- package/packages/dashboard-core/src/models/runtime.ts +7 -0
- package/packages/dashboard-core/src/models/skills.ts +34 -0
- package/packages/dashboard-core/src/routes/index.ts +2 -0
- package/packages/dashboard-core/src/routes/manifest.test.ts +70 -0
- package/packages/dashboard-core/src/routes/manifest.ts +451 -0
- package/packages/dashboard-core/src/routes/types.ts +39 -0
- package/packages/dashboard-core/src/screens/analytics/AnalyticsScreen.tsx +278 -0
- package/packages/dashboard-core/src/screens/analytics/index.ts +1 -0
- package/packages/dashboard-core/src/screens/index.ts +37 -0
- package/packages/dashboard-core/src/screens/overview/OverviewComparisonSurface.test.ts +101 -0
- package/packages/dashboard-core/src/screens/overview/OverviewComparisonSurface.tsx +393 -0
- package/packages/dashboard-core/src/screens/overview/OverviewCompositionSurface.test.tsx +113 -0
- package/packages/dashboard-core/src/screens/overview/OverviewCompositionSurface.tsx +72 -0
- package/packages/dashboard-core/src/screens/overview/OverviewCoreSurface.tsx +71 -0
- package/packages/dashboard-core/src/screens/overview/OverviewOnboardingBanner.tsx +90 -0
- package/packages/dashboard-core/src/screens/overview/OverviewRunSummary.tsx +40 -0
- package/packages/dashboard-core/src/screens/overview/index.ts +16 -0
- package/packages/dashboard-core/src/screens/overview/types.ts +13 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportDailyBreakdownSection.tsx +99 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportDataQualityTabContent.tsx +35 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportEvidenceRail.tsx +71 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportEvidenceSection.tsx +63 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportEvidenceTabContent.tsx +25 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportInvocationsSection.tsx +24 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportMissedQueriesSection.tsx +79 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportScaffold.tsx +150 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportSections.test.tsx +224 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportTabs.test.tsx +76 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportTabs.tsx +88 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportTrendSection.tsx +33 -0
- package/packages/dashboard-core/src/screens/skill-report/SkillReportTrustBadge.tsx +67 -0
- package/packages/dashboard-core/src/screens/skill-report/index.ts +45 -0
- package/packages/dashboard-core/src/screens/skills/SkillsLibraryScreen.tsx +162 -0
- package/packages/dashboard-core/src/screens/skills/index.ts +6 -0
- package/packages/telemetry-contract/fixtures/complete-push.ts +1 -1
- package/packages/telemetry-contract/fixtures/evidence-only-push.ts +2 -2
- package/packages/telemetry-contract/fixtures/golden.test.ts +0 -1
- package/packages/telemetry-contract/fixtures/partial-push-no-sessions.ts +1 -1
- package/packages/telemetry-contract/fixtures/partial-push-unresolved-parents.ts +2 -2
- package/packages/telemetry-contract/package.json +1 -1
- package/packages/telemetry-contract/src/index.ts +1 -0
- package/packages/telemetry-contract/src/schemas.ts +63 -5
- package/packages/telemetry-contract/src/types.ts +97 -7
- package/packages/telemetry-contract/tests/compatibility.test.ts +0 -1
- package/packages/ui/AGENTS.md +16 -0
- package/packages/ui/README.md +1 -1
- package/packages/ui/package.json +1 -1
- package/packages/ui/src/components/ActivityTimeline.tsx +152 -168
- package/packages/ui/src/components/AnalyticsCharts.tsx +344 -0
- package/packages/ui/src/components/EvidenceViewer.tsx +229 -464
- package/packages/ui/src/components/EvolutionTimeline.tsx +34 -87
- package/packages/ui/src/components/InfoTip.tsx +1 -2
- package/packages/ui/src/components/InvocationsPanel.tsx +413 -0
- package/packages/ui/src/components/JobHistoryTimeline.tsx +156 -0
- package/packages/ui/src/components/OrchestrateRunsPanel.tsx +18 -36
- package/packages/ui/src/components/OverviewPanels.tsx +693 -0
- package/packages/ui/src/components/PipelineStatusBar.tsx +65 -0
- package/packages/ui/src/components/SkillReportGuide.tsx +215 -0
- package/packages/ui/src/components/SkillReportPanels.tsx +919 -0
- package/packages/ui/src/components/SkillsLibrary.tsx +437 -0
- package/packages/ui/src/components/index.ts +56 -1
- package/packages/ui/src/components/section-cards.tsx +18 -35
- package/packages/ui/src/components/skill-health-grid.tsx +47 -37
- package/packages/ui/src/lib/constants.tsx +0 -1
- package/packages/ui/src/primitives/card.tsx +1 -1
- package/packages/ui/src/primitives/checkbox.tsx +1 -1
- package/packages/ui/src/primitives/dropdown-menu.tsx +2 -2
- package/packages/ui/src/primitives/select.tsx +2 -2
- package/packages/ui/src/primitives/tabs.tsx +7 -6
- package/packages/ui/src/types.ts +182 -4
- package/skill/SKILL.md +130 -318
- package/skill/agents/diagnosis-analyst.md +3 -3
- package/skill/agents/evolution-reviewer.md +3 -3
- package/skill/agents/integration-guide.md +3 -3
- package/skill/agents/pattern-analyst.md +2 -2
- package/skill/references/cli-quick-reference.md +89 -0
- package/skill/references/creator-playbook.md +131 -0
- package/skill/references/examples.md +48 -0
- package/skill/references/troubleshooting.md +47 -0
- package/skill/references/version-history.md +1 -1
- package/skill/selftune.contribute.json +11 -0
- package/skill/{Workflows → workflows}/Baseline.md +20 -1
- package/skill/{Workflows → workflows}/Contribute.md +23 -10
- package/skill/{Workflows → workflows}/Contributions.md +13 -5
- package/skill/workflows/CreateTestDeploy.md +170 -0
- package/skill/{Workflows → workflows}/CreatorContributions.md +18 -6
- package/skill/{Workflows → workflows}/Cron.md +1 -1
- package/skill/{Workflows → workflows}/Dashboard.md +20 -0
- package/skill/{Workflows → workflows}/Doctor.md +1 -1
- package/skill/{Workflows → workflows}/Evals.md +67 -2
- package/skill/{Workflows → workflows}/Evolve.md +119 -30
- package/skill/{Workflows → workflows}/EvolveBody.md +41 -1
- package/skill/{Workflows → workflows}/Grade.md +1 -1
- package/skill/{Workflows → workflows}/Ingest.md +60 -2
- package/skill/{Workflows → workflows}/Initialize.md +16 -9
- package/skill/{Workflows → workflows}/Orchestrate.md +13 -3
- package/skill/{Workflows → workflows}/PlatformHooks.md +19 -3
- package/skill/workflows/Registry.md +99 -0
- package/skill/{Workflows → workflows}/Schedule.md +3 -3
- package/skill/workflows/SignalsDashboard.md +87 -0
- package/skill/{Workflows → workflows}/Sync.md +3 -1
- package/skill/{Workflows → workflows}/UnitTest.md +19 -0
- package/skill/{Workflows → workflows}/Watch.md +42 -2
- package/skill/{Workflows → workflows}/Workflows.md +39 -2
- package/apps/local-dashboard/dist/assets/index-D8O-RG1I.js +0 -60
- package/apps/local-dashboard/dist/assets/index-_EcLywDg.css +0 -1
- package/apps/local-dashboard/dist/assets/vendor-react-CKkiCskZ.js +0 -11
- package/apps/local-dashboard/dist/assets/vendor-ui-CGEmUayx.js +0 -12
- package/cli/selftune/utils/html.ts +0 -27
- package/packages/ui/src/components/RecentActivityFeed.tsx +0 -117
- /package/skill/{Workflows → workflows}/AlphaUpload.md +0 -0
- /package/skill/{Workflows → workflows}/AutoActivation.md +0 -0
- /package/skill/{Workflows → workflows}/Badge.md +0 -0
- /package/skill/{Workflows → workflows}/Composability.md +0 -0
- /package/skill/{Workflows → workflows}/EvolutionMemory.md +0 -0
- /package/skill/{Workflows → workflows}/ExportCanonical.md +0 -0
- /package/skill/{Workflows → workflows}/Hook.md +0 -0
- /package/skill/{Workflows → workflows}/ImportSkillsBench.md +0 -0
- /package/skill/{Workflows → workflows}/Quickstart.md +0 -0
- /package/skill/{Workflows → workflows}/Recover.md +0 -0
- /package/skill/{Workflows → workflows}/RepairSkillUsage.md +0 -0
- /package/skill/{Workflows → workflows}/Replay.md +0 -0
- /package/skill/{Workflows → workflows}/Rollback.md +0 -0
- /package/skill/{Workflows → workflows}/Telemetry.md +0 -0
- /package/skill/{Workflows → workflows}/Uninstall.md +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import {
|
|
2
3
|
closestCenter,
|
|
3
4
|
DndContext,
|
|
@@ -33,27 +34,7 @@ import {
|
|
|
33
34
|
type SortingState,
|
|
34
35
|
type VisibilityState,
|
|
35
36
|
} from "@tanstack/react-table";
|
|
36
|
-
import {
|
|
37
|
-
GripVerticalIcon,
|
|
38
|
-
Columns3Icon,
|
|
39
|
-
ChevronDownIcon,
|
|
40
|
-
ChevronsLeftIcon,
|
|
41
|
-
ChevronLeftIcon,
|
|
42
|
-
ChevronRightIcon,
|
|
43
|
-
ChevronsRightIcon,
|
|
44
|
-
ClockIcon,
|
|
45
|
-
LayersIcon,
|
|
46
|
-
FilterIcon,
|
|
47
|
-
CheckCircleIcon,
|
|
48
|
-
AlertTriangleIcon,
|
|
49
|
-
XCircleIcon,
|
|
50
|
-
CircleDotIcon,
|
|
51
|
-
HelpCircleIcon,
|
|
52
|
-
} from "lucide-react";
|
|
53
|
-
import * as React from "react";
|
|
54
37
|
|
|
55
|
-
import { STATUS_CONFIG } from "../lib/constants";
|
|
56
|
-
import { formatRate, timeAgo } from "../lib/format";
|
|
57
38
|
import { Badge } from "../primitives/badge";
|
|
58
39
|
import { Button } from "../primitives/button";
|
|
59
40
|
import { Checkbox } from "../primitives/checkbox";
|
|
@@ -76,7 +57,26 @@ import {
|
|
|
76
57
|
} from "../primitives/select";
|
|
77
58
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../primitives/table";
|
|
78
59
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../primitives/tabs";
|
|
60
|
+
import { STATUS_CONFIG } from "../lib/constants";
|
|
79
61
|
import type { SkillCard, SkillHealthStatus } from "../types";
|
|
62
|
+
import { formatRate, timeAgo } from "../lib/format";
|
|
63
|
+
import {
|
|
64
|
+
GripVerticalIcon,
|
|
65
|
+
Columns3Icon,
|
|
66
|
+
ChevronDownIcon,
|
|
67
|
+
ChevronsLeftIcon,
|
|
68
|
+
ChevronLeftIcon,
|
|
69
|
+
ChevronRightIcon,
|
|
70
|
+
ChevronsRightIcon,
|
|
71
|
+
ClockIcon,
|
|
72
|
+
LayersIcon,
|
|
73
|
+
FilterIcon,
|
|
74
|
+
CheckCircleIcon,
|
|
75
|
+
AlertTriangleIcon,
|
|
76
|
+
XCircleIcon,
|
|
77
|
+
CircleDotIcon,
|
|
78
|
+
HelpCircleIcon,
|
|
79
|
+
} from "lucide-react";
|
|
80
80
|
|
|
81
81
|
// ---------- Drag handle ----------
|
|
82
82
|
|
|
@@ -152,15 +152,27 @@ function createColumns(
|
|
|
152
152
|
enableHiding: false,
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
|
-
accessorKey: "
|
|
156
|
-
header: "
|
|
155
|
+
accessorKey: "platforms",
|
|
156
|
+
header: "Platforms",
|
|
157
157
|
cell: ({ row }) => {
|
|
158
|
-
const
|
|
159
|
-
if (!
|
|
158
|
+
const platforms = row.original.platforms;
|
|
159
|
+
if (!platforms || platforms.length === 0) {
|
|
160
|
+
const scope = row.original.scope;
|
|
161
|
+
if (!scope) return <span className="text-xs text-muted-foreground">--</span>;
|
|
162
|
+
return (
|
|
163
|
+
<Badge variant="secondary" className="text-[10px]">
|
|
164
|
+
{scope}
|
|
165
|
+
</Badge>
|
|
166
|
+
);
|
|
167
|
+
}
|
|
160
168
|
return (
|
|
161
|
-
<
|
|
162
|
-
{
|
|
163
|
-
|
|
169
|
+
<div className="flex flex-wrap gap-1">
|
|
170
|
+
{platforms.map((p) => (
|
|
171
|
+
<Badge key={p} variant="secondary" className="text-[10px]">
|
|
172
|
+
{p}
|
|
173
|
+
</Badge>
|
|
174
|
+
))}
|
|
175
|
+
</div>
|
|
164
176
|
);
|
|
165
177
|
},
|
|
166
178
|
},
|
|
@@ -349,7 +361,7 @@ export function SkillHealthGrid({
|
|
|
349
361
|
} else if (activeView === "recent") {
|
|
350
362
|
filtered = cards
|
|
351
363
|
.filter((c) => c.lastSeen !== null)
|
|
352
|
-
.sort((a
|
|
364
|
+
.sort((a, b) => {
|
|
353
365
|
const aTime = a.lastSeen ? new Date(a.lastSeen).getTime() : 0;
|
|
354
366
|
const bTime = b.lastSeen ? new Date(b.lastSeen).getTime() : 0;
|
|
355
367
|
return bTime - aTime;
|
|
@@ -380,7 +392,7 @@ export function SkillHealthGrid({
|
|
|
380
392
|
columnFilters,
|
|
381
393
|
pagination,
|
|
382
394
|
},
|
|
383
|
-
getRowId: (row) => row.name,
|
|
395
|
+
getRowId: (row) => row.id ?? row.name,
|
|
384
396
|
enableRowSelection: true,
|
|
385
397
|
onRowSelectionChange: setRowSelection,
|
|
386
398
|
onSortingChange: setSorting,
|
|
@@ -395,10 +407,8 @@ export function SkillHealthGrid({
|
|
|
395
407
|
getFacetedUniqueValues: getFacetedUniqueValues(),
|
|
396
408
|
});
|
|
397
409
|
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
[table.getRowModel().rows],
|
|
401
|
-
);
|
|
410
|
+
const rows = table.getRowModel().rows;
|
|
411
|
+
const dataIds = React.useMemo<UniqueIdentifier[]>(() => rows.map((r) => r.id), [rows]);
|
|
402
412
|
|
|
403
413
|
const isSorted = sorting.length > 0;
|
|
404
414
|
|
|
@@ -407,7 +417,7 @@ export function SkillHealthGrid({
|
|
|
407
417
|
const { active, over } = event;
|
|
408
418
|
if (active && over && active.id !== over.id) {
|
|
409
419
|
setData((prev) => {
|
|
410
|
-
const ids = prev.map((d) => d.name);
|
|
420
|
+
const ids = prev.map((d) => d.id ?? d.name);
|
|
411
421
|
const oldIndex = ids.indexOf(active.id as string);
|
|
412
422
|
const newIndex = ids.indexOf(over.id as string);
|
|
413
423
|
if (oldIndex === -1 || newIndex === -1) return prev;
|
|
@@ -537,8 +547,8 @@ export function SkillHealthGrid({
|
|
|
537
547
|
checked={column.getIsVisible()}
|
|
538
548
|
onCheckedChange={(value) => column.toggleVisibility(!!value)}
|
|
539
549
|
>
|
|
540
|
-
{column.id === "
|
|
541
|
-
? "
|
|
550
|
+
{column.id === "platforms"
|
|
551
|
+
? "Platforms"
|
|
542
552
|
: column.id === "passRate"
|
|
543
553
|
? "Pass Rate"
|
|
544
554
|
: column.id === "uniqueSessions"
|
|
@@ -559,7 +569,7 @@ export function SkillHealthGrid({
|
|
|
559
569
|
value={activeView}
|
|
560
570
|
className="relative flex flex-col gap-4 overflow-auto px-4 lg:px-6"
|
|
561
571
|
>
|
|
562
|
-
<div className="overflow-hidden rounded-lg border">
|
|
572
|
+
<div className="overflow-hidden rounded-lg border border-border/15">
|
|
563
573
|
<DndContext
|
|
564
574
|
collisionDetection={closestCenter}
|
|
565
575
|
modifiers={[restrictToVerticalAxis]}
|
|
@@ -12,7 +12,7 @@ function Card({
|
|
|
12
12
|
data-slot="card"
|
|
13
13
|
data-size={size}
|
|
14
14
|
className={cn(
|
|
15
|
-
"group/card flex flex-col gap-4 overflow-hidden rounded-
|
|
15
|
+
"group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-muted py-4 text-sm text-card-foreground border border-border/15 shadow-none has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
2
|
-
import { CheckIcon } from "lucide-react";
|
|
3
2
|
|
|
4
3
|
import { cn } from "../lib/utils";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
5
|
|
|
6
6
|
function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
|
7
7
|
return (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
2
|
-
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
3
1
|
import * as React from "react";
|
|
2
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
4
3
|
|
|
5
4
|
import { cn } from "../lib/utils";
|
|
5
|
+
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
6
6
|
|
|
7
7
|
function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
|
|
8
8
|
return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
2
|
-
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
3
1
|
import * as React from "react";
|
|
2
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
4
3
|
|
|
5
4
|
import { cn } from "../lib/utils";
|
|
5
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
6
6
|
|
|
7
7
|
const Select = SelectPrimitive.Root;
|
|
8
8
|
|
|
@@ -17,12 +17,12 @@ function Tabs({ className, orientation = "horizontal", ...props }: TabsPrimitive
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const tabsListVariants = cva(
|
|
20
|
-
"group/tabs-list inline-flex w-fit items-center justify-center
|
|
20
|
+
"group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col",
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
23
23
|
variant: {
|
|
24
|
-
default: "bg-muted",
|
|
25
|
-
line: "gap-1 bg-transparent",
|
|
24
|
+
default: "rounded-lg bg-muted p-[3px]",
|
|
25
|
+
line: "gap-1 bg-transparent p-0 data-[variant=line]:h-auto",
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: {
|
|
@@ -51,9 +51,10 @@ function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
|
|
|
51
51
|
<TabsPrimitive.Tab
|
|
52
52
|
data-slot="tabs-trigger"
|
|
53
53
|
className={cn(
|
|
54
|
-
"relative inline-flex
|
|
55
|
-
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
56
|
-
"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30
|
|
54
|
+
"relative inline-flex flex-1 items-center justify-center gap-1.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-horizontal/tabs:h-[calc(100%-1px)] group-data-horizontal/tabs:px-1.5 group-data-horizontal/tabs:py-0.5 group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:px-1.5 group-data-vertical/tabs:py-0.5 hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:rounded-md group-data-[variant=default]/tabs-list:border group-data-[variant=default]/tabs-list:border-transparent group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
55
|
+
"group-data-[variant=line]/tabs-list:h-auto group-data-[variant=line]/tabs-list:flex-none group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:border-0 group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:px-2 group-data-[variant=line]/tabs-list:py-1 group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
56
|
+
"group-data-[variant=default]/tabs-list:data-active:bg-background group-data-[variant=default]/tabs-list:data-active:text-foreground dark:group-data-[variant=default]/tabs-list:data-active:border-input dark:group-data-[variant=default]/tabs-list:data-active:bg-input/30",
|
|
57
|
+
"group-data-[variant=line]/tabs-list:data-active:text-foreground",
|
|
57
58
|
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
58
59
|
className,
|
|
59
60
|
)}
|
package/packages/ui/src/types.ts
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
export type SkillHealthStatus = "HEALTHY" | "WARNING" | "CRITICAL" | "UNGRADED" | "UNKNOWN";
|
|
4
4
|
|
|
5
5
|
export interface SkillCard {
|
|
6
|
+
id?: string;
|
|
6
7
|
name: string;
|
|
7
8
|
scope: string | null;
|
|
9
|
+
platforms: string[];
|
|
8
10
|
passRate: number | null;
|
|
9
11
|
checks: number;
|
|
10
12
|
status: SkillHealthStatus;
|
|
@@ -13,6 +15,32 @@ export interface SkillCard {
|
|
|
13
15
|
lastSeen: string | null;
|
|
14
16
|
}
|
|
15
17
|
|
|
18
|
+
// -- Job execution types (re-declared for package independence) ---------------
|
|
19
|
+
|
|
20
|
+
export interface JobExecution {
|
|
21
|
+
id: string;
|
|
22
|
+
jobName: string;
|
|
23
|
+
status: "success" | "error";
|
|
24
|
+
startedAt: string;
|
|
25
|
+
durationMs: number;
|
|
26
|
+
metrics: Record<string, unknown>;
|
|
27
|
+
error?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface JobScheduleEntry {
|
|
31
|
+
name: string;
|
|
32
|
+
schedule: string;
|
|
33
|
+
cronExpression: string;
|
|
34
|
+
lastRunAt: string | null;
|
|
35
|
+
lastRunStatus: "success" | "error" | null;
|
|
36
|
+
lastRunDurationMs: number | null;
|
|
37
|
+
nextRunAt: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface JobScheduleState {
|
|
41
|
+
jobs: JobScheduleEntry[];
|
|
42
|
+
}
|
|
43
|
+
|
|
16
44
|
// -- Dashboard contract types (re-declared for package independence) ----------
|
|
17
45
|
|
|
18
46
|
export interface EvalSnapshot {
|
|
@@ -22,6 +50,16 @@ export interface EvalSnapshot {
|
|
|
22
50
|
improved?: boolean;
|
|
23
51
|
regressions?: Array<Record<string, unknown>>;
|
|
24
52
|
new_passes?: Array<Record<string, unknown>>;
|
|
53
|
+
per_entry_results?: Array<Record<string, unknown>>;
|
|
54
|
+
before_entry_results?: Array<Record<string, unknown>>;
|
|
55
|
+
gates_passed?: number;
|
|
56
|
+
gates_total?: number;
|
|
57
|
+
gate_results?: Array<Record<string, unknown>>;
|
|
58
|
+
validation_mode?: string;
|
|
59
|
+
validation_agent?: string;
|
|
60
|
+
validation_fixture_id?: string;
|
|
61
|
+
validation_fallback_reason?: string;
|
|
62
|
+
validation_evidence_ref?: string;
|
|
25
63
|
}
|
|
26
64
|
|
|
27
65
|
export interface EvolutionEntry {
|
|
@@ -31,10 +69,6 @@ export interface EvolutionEntry {
|
|
|
31
69
|
action: string;
|
|
32
70
|
details: string;
|
|
33
71
|
eval_snapshot?: EvalSnapshot | null;
|
|
34
|
-
validation_mode?: "structural_guard" | "host_replay" | "llm_judge" | null;
|
|
35
|
-
validation_agent?: string | null;
|
|
36
|
-
validation_fixture_id?: string | null;
|
|
37
|
-
validation_evidence_ref?: string | null;
|
|
38
72
|
}
|
|
39
73
|
|
|
40
74
|
export interface UnmatchedQuery {
|
|
@@ -90,3 +124,147 @@ export interface OrchestrateRunReport {
|
|
|
90
124
|
skipped: number;
|
|
91
125
|
skill_actions: OrchestrateRunSkillAction[];
|
|
92
126
|
}
|
|
127
|
+
|
|
128
|
+
// -- Overview panel types (shared between local & cloud dashboards) ----------
|
|
129
|
+
|
|
130
|
+
export type AutonomyStatusLevel = "healthy" | "watching" | "needs_review" | "blocked";
|
|
131
|
+
|
|
132
|
+
export interface AutonomyStatus {
|
|
133
|
+
level: AutonomyStatusLevel;
|
|
134
|
+
summary: string;
|
|
135
|
+
skills_observed: number;
|
|
136
|
+
attention_required: number;
|
|
137
|
+
pending_reviews: number;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type TrustBucket = "at_risk" | "improving" | "uncertain" | "stable";
|
|
141
|
+
|
|
142
|
+
export interface TrustWatchlistEntry {
|
|
143
|
+
skill_name: string;
|
|
144
|
+
bucket: TrustBucket;
|
|
145
|
+
pass_rate: number | null;
|
|
146
|
+
reason: string;
|
|
147
|
+
last_seen: string | null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export type AttentionSeverity = "critical" | "warning" | "info";
|
|
151
|
+
|
|
152
|
+
export interface AttentionItem {
|
|
153
|
+
skill_name: string;
|
|
154
|
+
category: string;
|
|
155
|
+
severity: AttentionSeverity;
|
|
156
|
+
reason: string;
|
|
157
|
+
recommended_action: string;
|
|
158
|
+
timestamp: string | null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type DecisionKind =
|
|
162
|
+
| "proposal_created"
|
|
163
|
+
| "proposal_rejected"
|
|
164
|
+
| "validation_failed"
|
|
165
|
+
| "proposal_deployed"
|
|
166
|
+
| "rollback_triggered"
|
|
167
|
+
| "regression_found";
|
|
168
|
+
|
|
169
|
+
export interface AutonomousDecision {
|
|
170
|
+
skill_name: string;
|
|
171
|
+
kind: DecisionKind;
|
|
172
|
+
summary: string;
|
|
173
|
+
timestamp: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// -- Trust / skill report types (shared between local & cloud dashboards) ----
|
|
177
|
+
|
|
178
|
+
export type TrustState =
|
|
179
|
+
| "low_sample"
|
|
180
|
+
| "observed"
|
|
181
|
+
| "watch"
|
|
182
|
+
| "validated"
|
|
183
|
+
| "deployed"
|
|
184
|
+
| "rolled_back";
|
|
185
|
+
|
|
186
|
+
export type ObservationKind =
|
|
187
|
+
| "canonical"
|
|
188
|
+
| "repaired_trigger"
|
|
189
|
+
| "repaired_contextual_miss"
|
|
190
|
+
| "legacy_materialized";
|
|
191
|
+
|
|
192
|
+
export type HistoricalContext = "previously_missed";
|
|
193
|
+
|
|
194
|
+
export interface ExampleRow {
|
|
195
|
+
timestamp: string | null;
|
|
196
|
+
session_id: string;
|
|
197
|
+
query_text: string;
|
|
198
|
+
triggered: boolean;
|
|
199
|
+
confidence: number | null;
|
|
200
|
+
invocation_mode: string | null;
|
|
201
|
+
prompt_kind: string | null;
|
|
202
|
+
source: string | null;
|
|
203
|
+
platform: string | null;
|
|
204
|
+
workspace_path: string | null;
|
|
205
|
+
query_origin: "inline_query" | "matched_prompt" | "missing";
|
|
206
|
+
is_system_like: boolean;
|
|
207
|
+
observation_kind: ObservationKind;
|
|
208
|
+
historical_context?: HistoricalContext | null;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface TrustFields {
|
|
212
|
+
trust: {
|
|
213
|
+
state: TrustState;
|
|
214
|
+
summary: string;
|
|
215
|
+
};
|
|
216
|
+
coverage: {
|
|
217
|
+
checks: number;
|
|
218
|
+
sessions: number;
|
|
219
|
+
workspaces: number;
|
|
220
|
+
first_seen: string | null;
|
|
221
|
+
last_seen: string | null;
|
|
222
|
+
};
|
|
223
|
+
evidence_quality: {
|
|
224
|
+
prompt_link_rate: number;
|
|
225
|
+
inline_query_rate: number;
|
|
226
|
+
user_prompt_rate: number;
|
|
227
|
+
meta_prompt_rate: number;
|
|
228
|
+
internal_prompt_rate: number;
|
|
229
|
+
no_prompt_rate: number;
|
|
230
|
+
system_like_rate: number;
|
|
231
|
+
invocation_mode_coverage: number;
|
|
232
|
+
confidence_coverage: number;
|
|
233
|
+
source_coverage: number;
|
|
234
|
+
scope_coverage: number;
|
|
235
|
+
};
|
|
236
|
+
routing_quality: {
|
|
237
|
+
missed_triggers: number;
|
|
238
|
+
miss_rate: number;
|
|
239
|
+
avg_confidence: number | null;
|
|
240
|
+
confidence_coverage: number;
|
|
241
|
+
low_confidence_rate: number | null;
|
|
242
|
+
};
|
|
243
|
+
evolution_state: {
|
|
244
|
+
has_evidence: boolean;
|
|
245
|
+
has_pending_proposals: boolean;
|
|
246
|
+
latest_action: string | null;
|
|
247
|
+
latest_timestamp: string | null;
|
|
248
|
+
evidence_rows: number;
|
|
249
|
+
evolution_rows: number;
|
|
250
|
+
};
|
|
251
|
+
data_hygiene: {
|
|
252
|
+
naming_variants: string[];
|
|
253
|
+
source_breakdown: Array<{ source: string; count: number }>;
|
|
254
|
+
prompt_kind_breakdown: Array<{ kind: string; count: number }>;
|
|
255
|
+
observation_breakdown: Array<{ kind: ObservationKind; count: number }>;
|
|
256
|
+
raw_checks: number;
|
|
257
|
+
operational_checks: number;
|
|
258
|
+
internal_prompt_rows: number;
|
|
259
|
+
internal_prompt_rate: number;
|
|
260
|
+
legacy_rows: number;
|
|
261
|
+
legacy_rate: number;
|
|
262
|
+
repaired_rows: number;
|
|
263
|
+
repaired_rate: number;
|
|
264
|
+
};
|
|
265
|
+
examples: {
|
|
266
|
+
good: ExampleRow[];
|
|
267
|
+
missed: ExampleRow[];
|
|
268
|
+
noisy: ExampleRow[];
|
|
269
|
+
};
|
|
270
|
+
}
|