@fugood/buttress-server 2.26.0-beta.25 → 2.26.0-beta.27
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/lib/{command-DEEKNCpP.mjs → command-DcJp0Euy.mjs} +1 -1
- package/lib/index.mjs +32 -32
- package/lib/{net-u--89HiT.mjs → net-BvSOGnw5.mjs} +21 -21
- package/lib/routes/tts-shared.d.ts +5 -0
- package/lib/services/register-tts-result.d.ts +4 -0
- package/lib/utils/SessionFileManager.d.ts +12 -4
- package/package.json +3 -3
|
@@ -25,6 +25,11 @@ export type SynthesizeBackendResult = {
|
|
|
25
25
|
* — callers that need the audio beyond the immediate request must copy it.
|
|
26
26
|
*/
|
|
27
27
|
cachedFile: string;
|
|
28
|
+
/**
|
|
29
|
+
* The cache did not keep this output: `cachedFile` is a per-synthesis temporary
|
|
30
|
+
* file that the caller owns and must delete.
|
|
31
|
+
*/
|
|
32
|
+
temporary?: boolean;
|
|
28
33
|
sampling_rate: number;
|
|
29
34
|
channels: number;
|
|
30
35
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SessionFileManager } from '../utils/SessionFileManager';
|
|
2
|
+
import type { SynthesizeBackendResult } from '../routes/tts-shared';
|
|
3
|
+
/** Register a backend synthesis result with the session and return its filename. */
|
|
4
|
+
export default function registerTtsResult(fileManager: SessionFileManager, result: SynthesizeBackendResult): string;
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import type { ReadableStream as NodeReadableStream } from 'node:stream/web';
|
|
2
|
+
type RegisterOptions = {
|
|
3
|
+
owned?: boolean;
|
|
4
|
+
ttl?: number;
|
|
5
|
+
group?: {
|
|
6
|
+
name: string;
|
|
7
|
+
limit: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
2
10
|
type UploadData = Buffer | ArrayBuffer | ReadableStream | NodeReadableStream;
|
|
3
11
|
export declare class SessionFileManager {
|
|
4
12
|
sessionId: string;
|
|
5
13
|
private sessionDir;
|
|
6
14
|
private registry;
|
|
7
15
|
private uploadSeq;
|
|
16
|
+
private destroyed;
|
|
8
17
|
constructor(sessionId: string, tempDir: string);
|
|
9
|
-
register(filename: string, realPath: string, opts?:
|
|
10
|
-
owned?: boolean;
|
|
11
|
-
ttl?: number;
|
|
12
|
-
}): void;
|
|
18
|
+
register(filename: string, realPath: string, opts?: RegisterOptions): void;
|
|
13
19
|
resolve(filename: string): string | null;
|
|
20
|
+
private release;
|
|
21
|
+
private trimGroup;
|
|
14
22
|
storeUpload(originalName: string, data: UploadData): Promise<string>;
|
|
15
23
|
destroy(): Promise<void>;
|
|
16
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/buttress-server",
|
|
3
|
-
"version": "2.26.0-beta.
|
|
3
|
+
"version": "2.26.0-beta.27",
|
|
4
4
|
"main": "lib/index.mjs",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@fugood/agent-tool-runtime": "^2.26.0-beta.24",
|
|
73
|
-
"@fugood/bricks-cli": "^2.26.0-beta.
|
|
73
|
+
"@fugood/bricks-cli": "^2.26.0-beta.27",
|
|
74
74
|
"@fugood/bricks-devtools-core": "^2.26.0-beta.24",
|
|
75
75
|
"@fugood/buttress-config": "^2.26.0-beta.20",
|
|
76
76
|
"@fugood/buttress-ui": "^2.26.0-beta.25",
|
|
77
77
|
"tsdown": "^0.22.4",
|
|
78
78
|
"typescript": "^7.0.2"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "4ebffe22afded3c8f37cbc82352a982a37788d84"
|
|
81
81
|
}
|