selftune 0.2.30 → 0.2.32
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 +83 -56
- package/apps/local-dashboard/dist/assets/index-B-ut4w0B.js +15 -0
- package/apps/local-dashboard/dist/assets/index-BFGfCVrL.css +1 -0
- package/apps/local-dashboard/dist/assets/vendor-ui-DfowE3Hu.js +1 -0
- package/apps/local-dashboard/dist/index.html +3 -3
- package/cli/selftune/command-surface.ts +613 -2
- package/cli/selftune/create/baseline.ts +429 -0
- package/cli/selftune/create/check.ts +35 -0
- package/cli/selftune/create/init.ts +115 -0
- package/cli/selftune/create/package-candidate-state.ts +771 -0
- package/cli/selftune/create/package-evaluator.ts +710 -0
- package/cli/selftune/create/package-fingerprint.ts +142 -0
- package/cli/selftune/create/package-search.ts +377 -0
- package/cli/selftune/create/publish.ts +431 -0
- package/cli/selftune/create/readiness.ts +495 -0
- package/cli/selftune/create/replay.ts +330 -0
- package/cli/selftune/create/report.ts +74 -0
- package/cli/selftune/create/scaffold.ts +121 -0
- package/cli/selftune/create/skills-ref-adapter.ts +177 -0
- package/cli/selftune/create/status.ts +33 -0
- package/cli/selftune/create/templates.ts +249 -0
- package/cli/selftune/cron/setup.ts +1 -1
- package/cli/selftune/dashboard-action-events.ts +4 -1
- package/cli/selftune/dashboard-action-result.ts +789 -24
- package/cli/selftune/dashboard-action-stream.ts +80 -0
- package/cli/selftune/dashboard-contract.ts +146 -3
- package/cli/selftune/dashboard-server.ts +5 -4
- package/cli/selftune/eval/hooks-to-evals.ts +58 -35
- package/cli/selftune/eval/synthetic-evals.ts +145 -17
- package/cli/selftune/evolution/bounded-mutations.ts +1045 -0
- package/cli/selftune/evolution/evolve-body.ts +9 -36
- package/cli/selftune/evolution/evolve.ts +8 -72
- package/cli/selftune/evolution/stopping-criteria.ts +5 -13
- package/cli/selftune/evolution/unblock-suggestions.ts +0 -16
- package/cli/selftune/evolution/validate-host-replay.ts +115 -15
- package/cli/selftune/improve.ts +206 -0
- package/cli/selftune/index.ts +123 -6
- package/cli/selftune/init.ts +1 -1
- package/cli/selftune/localdb/queries/dashboard.ts +30 -0
- package/cli/selftune/localdb/schema.ts +52 -0
- package/cli/selftune/monitoring/watch.ts +257 -23
- package/cli/selftune/orchestrate/execute.ts +300 -1
- package/cli/selftune/orchestrate/finalize.ts +14 -0
- package/cli/selftune/orchestrate/plan.ts +22 -5
- package/cli/selftune/orchestrate/prepare.ts +59 -4
- package/cli/selftune/orchestrate/report.ts +1 -1
- package/cli/selftune/orchestrate.ts +34 -1
- package/cli/selftune/publish.ts +35 -0
- package/cli/selftune/registry/github-install.ts +256 -0
- package/cli/selftune/registry/index.ts +1 -1
- package/cli/selftune/registry/install.ts +58 -7
- package/cli/selftune/routes/actions.ts +81 -15
- package/cli/selftune/routes/overview.ts +1 -1
- package/cli/selftune/routes/skill-report.ts +147 -2
- package/cli/selftune/run.ts +18 -0
- package/cli/selftune/schedule.ts +3 -3
- package/cli/selftune/search-run.ts +703 -0
- package/cli/selftune/status.ts +35 -11
- package/cli/selftune/testing-readiness.ts +431 -40
- package/cli/selftune/types.ts +316 -0
- package/cli/selftune/utils/eval-readiness.ts +1 -0
- package/cli/selftune/utils/json-output.ts +11 -0
- package/cli/selftune/utils/lifecycle-surface.ts +48 -0
- package/cli/selftune/utils/query-filter.ts +82 -1
- package/cli/selftune/utils/tui.ts +85 -2
- package/cli/selftune/verify.ts +205 -0
- package/cli/selftune/workflows/proposals.ts +1 -1
- package/cli/selftune/workflows/skill-scaffold.ts +141 -63
- package/cli/selftune/workflows/workflows.ts +4 -4
- package/package.json +1 -1
- package/packages/dashboard-core/src/routes/manifest.ts +2 -2
- package/packages/ui/src/components/SkillReportPanels.tsx +7 -7
- package/packages/ui/src/primitives/button.tsx +5 -0
- package/skill/SKILL.md +148 -85
- package/skill/references/cli-quick-reference.md +16 -1
- package/skill/references/creator-playbook.md +31 -10
- package/skill/workflows/Baseline.md +8 -9
- package/skill/workflows/Contributions.md +4 -4
- package/skill/workflows/Create.md +173 -0
- package/skill/workflows/CreateTestDeploy.md +34 -30
- package/skill/workflows/Cron.md +2 -2
- package/skill/workflows/Dashboard.md +3 -3
- package/skill/workflows/Evals.md +13 -7
- package/skill/workflows/Evolve.md +75 -32
- package/skill/workflows/EvolveBody.md +22 -15
- package/skill/workflows/Hook.md +1 -1
- package/skill/workflows/Improve.md +168 -0
- package/skill/workflows/Initialize.md +3 -3
- package/skill/workflows/Orchestrate.md +49 -12
- package/skill/workflows/Publish.md +100 -0
- package/skill/workflows/Registry.md +19 -13
- package/skill/workflows/Run.md +72 -0
- package/skill/workflows/Schedule.md +2 -2
- package/skill/workflows/SearchRun.md +89 -0
- package/skill/workflows/SignalsDashboard.md +2 -2
- package/skill/workflows/UnitTest.md +13 -4
- package/skill/workflows/Verify.md +136 -0
- package/skill/workflows/Watch.md +114 -47
- package/skill/workflows/Workflows.md +13 -8
- package/apps/local-dashboard/dist/assets/index-BcXquWFB.css +0 -1
- package/apps/local-dashboard/dist/assets/index-Coq42hE4.js +0 -15
- package/apps/local-dashboard/dist/assets/vendor-ui-B0H8s1mP.js +0 -1
package/cli/selftune/status.ts
CHANGED
|
@@ -16,12 +16,13 @@ import { getAlphaLinkState, readAlphaIdentity } from "./alpha-identity.js";
|
|
|
16
16
|
import { getQueueStats } from "./alpha-upload/queue.js";
|
|
17
17
|
import { getBaseUrl } from "./auth/device-code.js";
|
|
18
18
|
import { SELFTUNE_CONFIG_PATH } from "./constants.js";
|
|
19
|
-
import type {
|
|
19
|
+
import type { CreatorOverviewStep, SkillSummary } from "./dashboard-contract.js";
|
|
20
20
|
import { getDb } from "./localdb/db.js";
|
|
21
21
|
import { writeCronRunToDb } from "./localdb/direct-write.js";
|
|
22
22
|
import {
|
|
23
23
|
getLastUploadError,
|
|
24
24
|
getLastUploadSuccess,
|
|
25
|
+
getSkillsList,
|
|
25
26
|
getSkillTrustSummaries,
|
|
26
27
|
queryEvolutionAudit,
|
|
27
28
|
queryQueryLog,
|
|
@@ -47,6 +48,7 @@ import {
|
|
|
47
48
|
filterActionableQueryRecords,
|
|
48
49
|
filterActionableSkillUsageRecords,
|
|
49
50
|
} from "./utils/query-filter.js";
|
|
51
|
+
import { normalizeLifecycleCommand, normalizeLifecycleText } from "./utils/lifecycle-surface.js";
|
|
50
52
|
|
|
51
53
|
// ---------------------------------------------------------------------------
|
|
52
54
|
// Result types
|
|
@@ -316,23 +318,44 @@ function formatTrustHighlights(trustSummaries: SkillTrustSummary[] | undefined):
|
|
|
316
318
|
return lines;
|
|
317
319
|
}
|
|
318
320
|
|
|
319
|
-
function
|
|
320
|
-
|
|
321
|
+
function formatCreatorOverviewStep(step: CreatorOverviewStep): string {
|
|
322
|
+
switch (step) {
|
|
323
|
+
case "run_create_check":
|
|
324
|
+
return "verify draft";
|
|
325
|
+
case "finish_package":
|
|
326
|
+
return "finish package";
|
|
327
|
+
case "generate_evals":
|
|
328
|
+
return "generate evals";
|
|
329
|
+
case "run_unit_tests":
|
|
330
|
+
return "run unit tests";
|
|
331
|
+
case "run_replay_dry_run":
|
|
332
|
+
return "run replay dry-run";
|
|
333
|
+
case "measure_baseline":
|
|
334
|
+
return "measure baseline";
|
|
335
|
+
case "deploy_candidate":
|
|
336
|
+
return "deploy candidate";
|
|
337
|
+
case "watch_deployment":
|
|
338
|
+
return "watch deployment";
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function formatCreatorLoopLines(creatorLoopSkills: SkillSummary[] | undefined): string[] {
|
|
343
|
+
if (!creatorLoopSkills || creatorLoopSkills.length === 0) return [];
|
|
321
344
|
|
|
322
|
-
const overview = buildCreatorTestingOverview(
|
|
323
|
-
const lines = ["
|
|
324
|
-
lines.push(` ${overview.summary}`);
|
|
345
|
+
const overview = buildCreatorTestingOverview(creatorLoopSkills);
|
|
346
|
+
const lines = ["Package pipeline"];
|
|
347
|
+
lines.push(` ${normalizeLifecycleText(overview.summary)}`);
|
|
325
348
|
|
|
326
349
|
const counts = overview.counts;
|
|
327
350
|
lines.push(
|
|
328
|
-
` Generate evals: ${counts.generate_evals} | Unit tests: ${counts.run_unit_tests} | Replay dry-run: ${counts.run_replay_dry_run} | Baseline: ${counts.measure_baseline} |
|
|
351
|
+
` Verify: ${counts.run_create_check} | Finish package: ${counts.finish_package} | Generate evals: ${counts.generate_evals} | Unit tests: ${counts.run_unit_tests} | Replay dry-run: ${counts.run_replay_dry_run} | Baseline: ${counts.measure_baseline} | Publish: ${counts.deploy_candidate} | Monitoring: ${counts.watch_deployment}`,
|
|
329
352
|
);
|
|
330
353
|
|
|
331
354
|
if (overview.priorities.length > 0) {
|
|
332
355
|
lines.push(" Next:");
|
|
333
356
|
for (const priority of overview.priorities.slice(0, 3)) {
|
|
334
357
|
lines.push(
|
|
335
|
-
` ${priority.skill_name}: ${priority.
|
|
358
|
+
` ${priority.skill_name}: ${formatCreatorOverviewStep(priority.step)} — ${normalizeLifecycleCommand(priority.recommended_command)}`,
|
|
336
359
|
);
|
|
337
360
|
}
|
|
338
361
|
}
|
|
@@ -343,7 +366,7 @@ function formatCreatorLoopLines(readinessRows: SkillTestingReadiness[] | undefin
|
|
|
343
366
|
export function formatStatus(
|
|
344
367
|
result: StatusResult,
|
|
345
368
|
trustSummaries?: SkillTrustSummary[],
|
|
346
|
-
|
|
369
|
+
creatorLoopSkills?: SkillSummary[],
|
|
347
370
|
): string {
|
|
348
371
|
const noColor = !!process.env.NO_COLOR;
|
|
349
372
|
|
|
@@ -364,7 +387,7 @@ export function formatStatus(
|
|
|
364
387
|
lines.push("");
|
|
365
388
|
}
|
|
366
389
|
|
|
367
|
-
const creatorLoopLines = formatCreatorLoopLines(
|
|
390
|
+
const creatorLoopLines = formatCreatorLoopLines(creatorLoopSkills);
|
|
368
391
|
if (creatorLoopLines.length > 0) {
|
|
369
392
|
lines.push(...creatorLoopLines);
|
|
370
393
|
lines.push("");
|
|
@@ -631,7 +654,8 @@ export async function cliMain(): Promise<void> {
|
|
|
631
654
|
const result = computeStatus(telemetry, skillRecords, queryRecords, auditEntries, doctorResult);
|
|
632
655
|
const trustSummaries = getSkillTrustSummaries(db);
|
|
633
656
|
const testingReadiness = listSkillTestingReadiness(db);
|
|
634
|
-
const
|
|
657
|
+
const creatorLoopSkills = getSkillsList(db, testingReadiness);
|
|
658
|
+
const output = formatStatus(result, trustSummaries, creatorLoopSkills);
|
|
635
659
|
console.log(output);
|
|
636
660
|
|
|
637
661
|
// Alpha upload status section
|