clef-mcp 0.1.6 → 0.2.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/README.md +168 -143
- package/assets/demo.svg +70 -0
- package/dist/cli.js +987 -280
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.js +534 -52
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const DEFAULT_LIMITS: Limits;
|
|
|
19
19
|
declare function limitsFromEnv(env?: NodeJS.ProcessEnv): Limits;
|
|
20
20
|
|
|
21
21
|
type LogLevel = 'error' | 'warn' | 'info' | 'debug';
|
|
22
|
-
type RuntimeId = 'llama-cpp';
|
|
22
|
+
type RuntimeId = 'llama-cpp' | 'mlx';
|
|
23
23
|
interface ClefConfig {
|
|
24
24
|
/** Model id, e.g. "clef-flash". */
|
|
25
25
|
model: string;
|
|
@@ -298,12 +298,12 @@ declare function findInstalledManifest(clefHome: string, spec: ModelSpec): Promi
|
|
|
298
298
|
|
|
299
299
|
interface ProbeResult {
|
|
300
300
|
latencyMs: number;
|
|
301
|
-
binarySource: 'env' | 'managed' | 'path';
|
|
301
|
+
binarySource: 'env' | 'managed' | 'path' | 'uv';
|
|
302
302
|
binaryPath: string;
|
|
303
303
|
}
|
|
304
304
|
/**
|
|
305
|
-
* Full end-to-end check: start
|
|
306
|
-
* tiny decision, shut down. Used by `install` (verification
|
|
305
|
+
* Full end-to-end check: start the runtime with the installed model, run one
|
|
306
|
+
* tiny decision, shut down. Used by `install` (verification) and `doctor`.
|
|
307
307
|
*/
|
|
308
308
|
declare function probeInference(cfg: ClefConfig, manifest: ModelManifest, log?: Logger, loadTimeoutMs?: number): Promise<ProbeResult>;
|
|
309
309
|
|
|
@@ -392,10 +392,12 @@ interface ClefServerDeps {
|
|
|
392
392
|
config?: ClefConfig;
|
|
393
393
|
version?: string;
|
|
394
394
|
log?: Logger;
|
|
395
|
-
/** Test seam: override runtime construction (defaults
|
|
395
|
+
/** Test seam: override runtime construction (defaults per config.runtime). */
|
|
396
396
|
runtimeFactory?: (opts: {
|
|
397
|
-
|
|
398
|
-
|
|
397
|
+
kind: 'llama-cpp' | 'mlx';
|
|
398
|
+
serverBin?: string;
|
|
399
|
+
modelPath?: string;
|
|
400
|
+
snapshotPath?: string;
|
|
399
401
|
alias: string;
|
|
400
402
|
log?: Logger;
|
|
401
403
|
}) => ClefRuntime;
|
|
@@ -433,6 +435,6 @@ declare function clefDecideOutputSchema(): z.ZodObject<{
|
|
|
433
435
|
/** `state` cannot be size-checked inside zod (it is `unknown`), so it is validated separately. */
|
|
434
436
|
declare function validateStateSize(state: unknown, limits: Limits): void;
|
|
435
437
|
|
|
436
|
-
declare const VERSION = "0.
|
|
438
|
+
declare const VERSION = "0.2.0";
|
|
437
439
|
|
|
438
440
|
export { CLEF_FLASH, type ClefConfig, type ClefDecideInput, type ClefDecideOutput, type ClefDecisionAnswer, ClefError, ClefErrorCode, type ClefQuestion, type ClefRuntime, type ClefServerDeps, DEFAULT_LIMITS, type DownloadProgress, type InstallModelResult, type Limits, LlamaCppRuntime, type LlamaCppRuntimeOptions, type LogLevel, type Logger, MODELS, type ModelManifest, type ModelSpec, type PlatformInfo, type ProbeResult, type QuantSpec, type QuestionType, type ResolvedBinary, type RunningClefServer, type RuntimeHealth, SERVER_INSTRUCTIONS, StderrLogger, type SystemOneRequest, type SystemOneResponse, TOOL_NAME, VERSION, assertSupportedPlatform, clefDecideInputSchema, clefDecideOutputSchema, createClefServer, createLogger, deepVerifyChecksum, defaultClefHome, detectPlatform, downloadFile, downloadManagedLlama, ensureLlamaRuntime, errorJson, exitCodeFor, fetchFileInfo, findInstalledManifest, formatBytes, fromSystemOneResponse, getModelSpec, getQuantSpec, installModel, limitsFromEnv, loadConfig, manifestPathFor, modelQuantDir, pathsFor, pickQuant, probeInference, readModelManifest, removeManagedRuntime, resolveLlamaServerBinary, toSystemOneRequest, validateStateSize, verifyModelFiles, writeModelManifest };
|