codefree-proxy 0.1.2 → 0.1.3
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 +32 -3
- package/dist/cli.d.ts +33 -1
- package/dist/cli.js +55 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,17 +4,23 @@ OpenAI-compatible local proxy for SRD Cloud CodeFree.
|
|
|
4
4
|
|
|
5
5
|
## Quick start
|
|
6
6
|
|
|
7
|
-
Run
|
|
7
|
+
Run in the background:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx codefree-proxy --port 8788 --host 127.0.0.1
|
|
10
|
+
npx codefree-proxy start --port 8788 --host 127.0.0.1
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Or install globally:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npm install -g codefree-proxy
|
|
17
|
-
codefree-proxy --port 8788 --host 127.0.0.1
|
|
17
|
+
codefree-proxy start --port 8788 --host 127.0.0.1
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Foreground mode is also available when you want logs printed in the current terminal:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx codefree-proxy --port 8788 --host 127.0.0.1
|
|
18
24
|
```
|
|
19
25
|
|
|
20
26
|
The server prints the local base URL and endpoints after it starts.
|
|
@@ -58,6 +64,27 @@ Remove saved credentials:
|
|
|
58
64
|
npx codefree-proxy logout
|
|
59
65
|
```
|
|
60
66
|
|
|
67
|
+
## Background mode
|
|
68
|
+
|
|
69
|
+
Start the server in the background:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx codefree-proxy start
|
|
73
|
+
npx codefree-proxy start --port 8788 --host 127.0.0.1
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Background logs are written to:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
~/.codefree-proxy/logs/proxy.log
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The process id is written to:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
~/.codefree-proxy/proxy.pid
|
|
86
|
+
```
|
|
87
|
+
|
|
61
88
|
## Stop the server
|
|
62
89
|
|
|
63
90
|
Default port:
|
|
@@ -76,6 +103,8 @@ npx codefree-proxy stop --port 8788
|
|
|
76
103
|
|
|
77
104
|
```bash
|
|
78
105
|
codefree-proxy --port 8788 --host 127.0.0.1
|
|
106
|
+
codefree-proxy start
|
|
107
|
+
codefree-proxy start --port 8788 --host 127.0.0.1
|
|
79
108
|
codefree-proxy login
|
|
80
109
|
codefree-proxy logout
|
|
81
110
|
codefree-proxy status
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,7 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
type Platform = NodeJS.Platform;
|
|
3
|
-
export type CliCommand = 'serve' | 'login' | 'logout' | 'status' | 'stop';
|
|
3
|
+
export type CliCommand = 'serve' | 'start' | 'login' | 'logout' | 'status' | 'stop';
|
|
4
4
|
export type CommandRunner = (command: string, args: string[]) => Promise<string>;
|
|
5
|
+
type DaemonSpawnOptions = {
|
|
6
|
+
detached: true;
|
|
7
|
+
stdio: ['ignore', number, number];
|
|
8
|
+
};
|
|
9
|
+
type DaemonChild = {
|
|
10
|
+
pid?: number;
|
|
11
|
+
unref(): void;
|
|
12
|
+
};
|
|
13
|
+
export interface DaemonPaths {
|
|
14
|
+
dir: string;
|
|
15
|
+
logDir: string;
|
|
16
|
+
logFile: string;
|
|
17
|
+
pidFile: string;
|
|
18
|
+
}
|
|
19
|
+
export interface StartResult {
|
|
20
|
+
pid: number;
|
|
21
|
+
pidFile: string;
|
|
22
|
+
logFile: string;
|
|
23
|
+
}
|
|
24
|
+
export interface StartDaemonDeps {
|
|
25
|
+
nodePath?: string;
|
|
26
|
+
entryPath?: string;
|
|
27
|
+
homeDir?: string;
|
|
28
|
+
spawnDaemon?: (command: string, args: string[], options: DaemonSpawnOptions) => DaemonChild;
|
|
29
|
+
mkdirp?: (path: string) => void;
|
|
30
|
+
writeFile?: (path: string, value: string) => void;
|
|
31
|
+
openLog?: (path: string) => number;
|
|
32
|
+
closeLog?: (fd: number) => void;
|
|
33
|
+
}
|
|
5
34
|
export interface CliOptions {
|
|
6
35
|
command: CliCommand;
|
|
7
36
|
host: string;
|
|
@@ -19,7 +48,10 @@ export interface StartupInfoOptions {
|
|
|
19
48
|
userId: string;
|
|
20
49
|
models: readonly string[];
|
|
21
50
|
}
|
|
51
|
+
export declare function daemonPaths(homeDir?: string): DaemonPaths;
|
|
52
|
+
export declare function startDaemon(options: CliOptions, deps?: StartDaemonDeps): Promise<StartResult>;
|
|
22
53
|
export declare function formatStartupInfo(options: StartupInfoOptions): string;
|
|
54
|
+
export declare function formatDaemonStartedInfo(options: StartupInfoOptions, result: StartResult): string;
|
|
23
55
|
export declare function parseArgs(argv: string[]): CliOptions;
|
|
24
56
|
export declare function findListeningPids(port: number, platform?: Platform, run?: CommandRunner): Promise<number[]>;
|
|
25
57
|
export declare function stopByPort(port: number, platform?: Platform, run?: CommandRunner): Promise<StopResult>;
|
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { execFile } from 'node:child_process';
|
|
3
|
-
import { realpathSync } from 'node:fs';
|
|
2
|
+
import { execFile, spawn } from 'node:child_process';
|
|
3
|
+
import { closeSync, mkdirSync, openSync, realpathSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
4
6
|
import { promisify } from 'node:util';
|
|
5
7
|
import { fileURLToPath } from 'node:url';
|
|
6
8
|
import { buildServer } from './server.js';
|
|
7
9
|
import { AuthManager } from './auth/auth-manager.js';
|
|
8
10
|
import { SUPPORTED_MODELS } from './proxy/model-map.js';
|
|
9
11
|
const execFileAsync = promisify(execFile);
|
|
12
|
+
export function daemonPaths(homeDir = homedir()) {
|
|
13
|
+
const dir = join(homeDir, '.codefree-proxy');
|
|
14
|
+
const logDir = join(dir, 'logs');
|
|
15
|
+
return {
|
|
16
|
+
dir,
|
|
17
|
+
logDir,
|
|
18
|
+
logFile: join(logDir, 'proxy.log'),
|
|
19
|
+
pidFile: join(dir, 'proxy.pid')
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export async function startDaemon(options, deps = {}) {
|
|
23
|
+
const paths = daemonPaths(deps.homeDir);
|
|
24
|
+
const entryPath = deps.entryPath ?? process.argv[1];
|
|
25
|
+
if (!entryPath)
|
|
26
|
+
throw new Error('Cannot resolve CLI entry path');
|
|
27
|
+
const nodePath = deps.nodePath ?? process.execPath;
|
|
28
|
+
const mkdirp = deps.mkdirp ?? ((path) => mkdirSync(path, { recursive: true }));
|
|
29
|
+
const writeFile = deps.writeFile ?? writeFileSync;
|
|
30
|
+
const openLog = deps.openLog ?? ((path) => openSync(path, 'a'));
|
|
31
|
+
const closeLog = deps.closeLog ?? closeSync;
|
|
32
|
+
const spawnDaemon = deps.spawnDaemon ?? ((command, args, spawnOptions) => spawn(command, args, spawnOptions));
|
|
33
|
+
mkdirp(paths.logDir);
|
|
34
|
+
const logFd = openLog(paths.logFile);
|
|
35
|
+
try {
|
|
36
|
+
const child = spawnDaemon(nodePath, [entryPath, 'serve', '--host', options.host, '--port', String(options.port), '--timeout', String(options.timeoutMs / 1000)], { detached: true, stdio: ['ignore', logFd, logFd] });
|
|
37
|
+
if (!child.pid)
|
|
38
|
+
throw new Error('Failed to start daemon process');
|
|
39
|
+
child.unref();
|
|
40
|
+
writeFile(paths.pidFile, String(child.pid));
|
|
41
|
+
return { pid: child.pid, pidFile: paths.pidFile, logFile: paths.logFile };
|
|
42
|
+
}
|
|
43
|
+
finally {
|
|
44
|
+
closeLog(logFd);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
10
47
|
export function formatStartupInfo(options) {
|
|
11
48
|
const origin = `http://${options.host}:${options.port}`;
|
|
12
49
|
return [
|
|
@@ -23,10 +60,18 @@ export function formatStartupInfo(options) {
|
|
|
23
60
|
`Models: ${options.models.join(', ')}`
|
|
24
61
|
].join('\n');
|
|
25
62
|
}
|
|
63
|
+
export function formatDaemonStartedInfo(options, result) {
|
|
64
|
+
return [
|
|
65
|
+
`Started codefree-proxy in background: ${result.pid}`,
|
|
66
|
+
formatStartupInfo(options),
|
|
67
|
+
`Log file: ${result.logFile}`,
|
|
68
|
+
`PID file: ${result.pidFile}`
|
|
69
|
+
].join('\n');
|
|
70
|
+
}
|
|
26
71
|
export function parseArgs(argv) {
|
|
27
72
|
const options = { command: 'serve', host: '127.0.0.1', port: 8788, timeoutMs: 120_000 };
|
|
28
73
|
const args = [...argv];
|
|
29
|
-
if (args[0] === 'login' || args[0] === 'logout' || args[0] === 'status' || args[0] === 'stop') {
|
|
74
|
+
if (args[0] === 'serve' || args[0] === 'start' || args[0] === 'login' || args[0] === 'logout' || args[0] === 'status' || args[0] === 'stop') {
|
|
30
75
|
options.command = args.shift();
|
|
31
76
|
}
|
|
32
77
|
while (args.length > 0) {
|
|
@@ -85,6 +130,13 @@ async function main() {
|
|
|
85
130
|
console.log(`No codefree-proxy process listening on port ${result.port}`);
|
|
86
131
|
return;
|
|
87
132
|
}
|
|
133
|
+
if (options.command === 'start') {
|
|
134
|
+
const auth = new AuthManager();
|
|
135
|
+
const credentials = await auth.getCredentials();
|
|
136
|
+
const result = await startDaemon(options);
|
|
137
|
+
console.log(formatDaemonStartedInfo({ host: options.host, port: options.port, userId: credentials.userId, models: SUPPORTED_MODELS }, result));
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
88
140
|
const auth = new AuthManager();
|
|
89
141
|
if (options.command === 'login') {
|
|
90
142
|
const credentials = await auth.login();
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,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