@fugood/buttress-server 2.24.11 → 2.24.13
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 +31 -9
- package/config/sample.toml +9 -0
- package/lib/autodiscover/index.d.ts +20 -0
- package/lib/autodiscover/types.d.ts +32 -0
- package/lib/autodiscover/udp.d.ts +27 -0
- package/lib/cli.d.ts +3 -0
- package/lib/index.d.ts +29 -0
- package/lib/index.mjs +30 -30
- package/lib/package.d.ts +7 -0
- package/lib/routes/anthropic-messages.d.ts +55 -0
- package/lib/routes/file.d.ts +10 -0
- package/lib/routes/index.d.ts +5 -0
- package/lib/routes/info.d.ts +3 -0
- package/lib/routes/llm-shared.d.ts +54 -0
- package/lib/routes/openai-compat.d.ts +17 -0
- package/lib/routes/status.d.ts +4 -0
- package/lib/services/common.d.ts +29 -0
- package/lib/services/create-llm-service.d.ts +24 -0
- package/lib/services/ggml-llm.d.ts +5 -0
- package/lib/services/ggml-stt.d.ts +29 -0
- package/lib/services/index.d.ts +36 -0
- package/lib/services/mlx-llm.d.ts +5 -0
- package/lib/types.d.ts +156 -0
- package/lib/utils/buttressAuth.d.ts +25 -0
- package/lib/utils/config.d.ts +21 -0
- package/lib/utils/httpAuthGuard.d.ts +16 -0
- package/lib/utils/net.d.ts +6 -0
- package/lib/utils/router.d.ts +2 -0
- package/lib/utils/serialize.d.ts +2 -0
- package/lib/utils/serverCaps.d.ts +4 -0
- package/lib/utils/sessionFilePath.d.ts +17 -0
- package/lib/utils/sessionGuard.d.ts +46 -0
- package/lib/utils/test-caps.d.ts +61 -0
- package/lib/utils/workspaceState.d.ts +21 -0
- package/package.json +3 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display model capabilities in a Markdown table format
|
|
3
|
+
* @param {Object} options - Display options
|
|
4
|
+
* @param {Array<string>} options.modelIds - Array of model repository IDs
|
|
5
|
+
* @param {Object|null} options.defaultConfig - Default configuration from TOML
|
|
6
|
+
* @returns {Promise<void>}
|
|
7
|
+
*/
|
|
8
|
+
export declare function showModelsTable({ modelIds, defaultConfig, }?: {
|
|
9
|
+
modelIds?: string[];
|
|
10
|
+
defaultConfig?: any;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Test ggml-llm capabilities for a backend type with optional model configuration
|
|
14
|
+
* @param {Object} options - Test options
|
|
15
|
+
* @param {string|null} options.modelId - Model repository ID
|
|
16
|
+
* @param {Object|null} options.defaultConfig - Default configuration from TOML
|
|
17
|
+
* @returns {Promise<void>}
|
|
18
|
+
*/
|
|
19
|
+
export declare function testGgmlLlmCapabilities({ modelId, defaultConfig, }?: {
|
|
20
|
+
modelId?: string | null;
|
|
21
|
+
defaultConfig?: any;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Display STT model capabilities in a Markdown table format
|
|
25
|
+
* @param {Object} options - Display options
|
|
26
|
+
* @param {Array<string>} options.modelIds - Array of model IDs (format: repo_id:filename)
|
|
27
|
+
* @param {Object|null} options.defaultConfig - Default configuration from TOML
|
|
28
|
+
* @returns {Promise<void>}
|
|
29
|
+
*/
|
|
30
|
+
export declare function showSttModelsTable({ modelIds, defaultConfig, }?: {
|
|
31
|
+
modelIds?: string[];
|
|
32
|
+
defaultConfig?: any;
|
|
33
|
+
}): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Test ggml-stt capabilities for a backend type with optional model configuration
|
|
36
|
+
* @param {Object} options - Test options
|
|
37
|
+
* @param {string|null} options.modelId - Model ID (format: repo_id:filename)
|
|
38
|
+
* @param {Object|null} options.defaultConfig - Default configuration from TOML
|
|
39
|
+
* @returns {Promise<void>}
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Display MLX model capabilities in a Markdown table format.
|
|
43
|
+
*
|
|
44
|
+
* MLX getCapabilities is a platform/python check (no per-model GGUF metadata),
|
|
45
|
+
* so the table shows hardware fit based on unified memory and model repo IDs.
|
|
46
|
+
*/
|
|
47
|
+
export declare function showMlxModelsTable({ modelIds, defaultConfig, }?: {
|
|
48
|
+
modelIds?: string[];
|
|
49
|
+
defaultConfig?: any;
|
|
50
|
+
}): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Test MLX LLM capabilities for a single model with detailed output
|
|
53
|
+
*/
|
|
54
|
+
export declare function testMlxLlmCapabilities({ modelId, defaultConfig, }?: {
|
|
55
|
+
modelId?: string | null;
|
|
56
|
+
defaultConfig?: any;
|
|
57
|
+
}): Promise<void>;
|
|
58
|
+
export declare function testGgmlSttCapabilities({ modelId, defaultConfig, }?: {
|
|
59
|
+
modelId?: string | null;
|
|
60
|
+
defaultConfig?: any;
|
|
61
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface WorkspaceBinding {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
serverId: string;
|
|
5
|
+
issuerPublicKey: string;
|
|
6
|
+
kid: string;
|
|
7
|
+
boundAt: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ServerKeyPair {
|
|
10
|
+
publicKeySpki: string;
|
|
11
|
+
privateKeyPkcs8: string;
|
|
12
|
+
kid: string;
|
|
13
|
+
}
|
|
14
|
+
export interface WorkspaceState {
|
|
15
|
+
workspace: WorkspaceBinding | null;
|
|
16
|
+
serverKeyPair: ServerKeyPair | null;
|
|
17
|
+
}
|
|
18
|
+
export declare const resolveStateDir: () => string;
|
|
19
|
+
export declare const resolveStatePath: () => string;
|
|
20
|
+
export declare const loadWorkspaceState: () => WorkspaceState;
|
|
21
|
+
export declare const saveWorkspaceState: (state: WorkspaceState) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/buttress-server",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.13",
|
|
4
4
|
"main": "lib/index.mjs",
|
|
5
5
|
"types": "lib/index.d.mts",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"typecheck": "tsc --noEmit",
|
|
18
|
-
"build": "tsdown -c rolldown.config.js",
|
|
18
|
+
"build": "tsdown -c rolldown.config.js --config-loader native && tsc --noCheck --emitDeclarationOnly",
|
|
19
19
|
"prepublish": "bun run build",
|
|
20
20
|
"dev": "bun src/index.ts",
|
|
21
21
|
"start": "bun lib/index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@elysiajs/cors": "^1.1.1",
|
|
32
32
|
"@elysiajs/node": "^1.4.2",
|
|
33
|
-
"@fugood/llama.node": "1.7.
|
|
33
|
+
"@fugood/llama.node": "1.7.11",
|
|
34
34
|
"@fugood/whisper.node": "^1.0.22",
|
|
35
35
|
"@huggingface/gguf": "^0.3.2",
|
|
36
36
|
"@iarna/toml": "^3.0.0",
|