@klhapp/skillmux 1.1.0 → 1.3.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/src/server.ts CHANGED
@@ -4,7 +4,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
  import { z } from "zod";
6
6
  import { createClients } from "./clients";
7
- import { expandHome, loadConfig, rerankerFingerprint, resolveConfigPath } from "./config";
7
+ import { loadConfig, resolveConfigPath } from "./config";
8
8
  import { ConfigWatcher, type ReloadStatus } from "./config-watcher";
9
9
  import { RuntimeSnapshotManager } from "./snapshot";
10
10
  import {
@@ -28,11 +28,6 @@ import {
28
28
  RELOADABLE_KEYS,
29
29
  RESTART_REQUIRED_KEYS,
30
30
  } from "./config-service";
31
- import {
32
- applyCalibrationRun,
33
- getCalibrationRun,
34
- listCalibrationRuns,
35
- } from "./calibrate";
36
31
 
37
32
  export const metricsRegistry = new MetricsRegistry();
38
33
  export const readinessState = new ReadinessState();
@@ -381,7 +376,7 @@ export async function startServer(opts?: {
381
376
  JSON.stringify({
382
377
  config_read: true,
383
378
  config_write: !isExternallyManaged,
384
- calibration: true,
379
+ calibration: false,
385
380
  persistence: isExternallyManaged
386
381
  ? "externally_managed"
387
382
  : "writable",
@@ -465,70 +460,15 @@ export async function startServer(opts?: {
465
460
  }
466
461
 
467
462
  if (url.pathname.startsWith("/admin/v1/calibrations")) {
468
- const { db } = await getRuntime();
469
- if (
470
- req.method === "GET" &&
471
- url.pathname === "/admin/v1/calibrations"
472
- ) {
473
- const runs = listCalibrationRuns(db);
474
- return new Response(JSON.stringify(runs), {
475
- status: 200,
476
- headers,
477
- });
478
- }
479
- const runIdMatch = url.pathname.match(
480
- /^\/admin\/v1\/calibrations\/([^\/]+)$/,
481
- );
482
- if (req.method === "GET" && runIdMatch && runIdMatch[1]) {
483
- const runId = runIdMatch[1];
484
- const run = getCalibrationRun(db, runId);
485
- if (!run)
486
- return new Response(
487
- JSON.stringify({ error: "Calibration run not found" }),
488
- { status: 404, headers },
489
- );
490
- return new Response(JSON.stringify(run), {
491
- status: 200,
492
- headers,
493
- });
494
- }
495
- if (
496
- req.method === "POST" &&
497
- url.pathname === "/admin/v1/calibrations"
498
- ) {
499
- const runId = "run_" + Math.random().toString(36).slice(2, 10);
500
- return new Response(
501
- JSON.stringify({ run_id: runId, status: "running" }),
502
- { status: 202, headers },
503
- );
504
- }
505
- const applyMatch = url.pathname.match(
506
- /^\/admin\/v1\/calibrations\/([^\/]+)\/apply$/,
463
+ return new Response(
464
+ JSON.stringify({
465
+ error: "not_implemented",
466
+ message:
467
+ "Remote calibration is not implemented in this release. " +
468
+ "Run `skillmux calibrate` against a local target.",
469
+ }),
470
+ { status: 501, headers },
507
471
  );
508
- if (req.method === "POST" && applyMatch && applyMatch[1]) {
509
- const runId = applyMatch[1];
510
- const run = getCalibrationRun(db, runId);
511
- if (!run)
512
- return new Response(
513
- JSON.stringify({ error: "Calibration run not found" }),
514
- { status: 404, headers },
515
- );
516
- const active = snapshots.acquire();
517
- const currentRerankerFingerprint = rerankerFingerprint(
518
- active.snapshot.config,
519
- );
520
- active.release();
521
- await applyCalibrationRun(
522
- db,
523
- runId,
524
- expandHome(configPath),
525
- { currentRerankerFingerprint },
526
- );
527
- return new Response(JSON.stringify({ ok: true, run_id: runId }), {
528
- status: 200,
529
- headers,
530
- });
531
- }
532
472
  }
533
473
 
534
474
  return new Response("Not Found", { status: 404, headers });