@modelzen/feishu-codex-bridge 0.5.0 → 0.6.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/dist/cli.js +2500 -871
- package/dist/index.d.ts +9 -0
- package/dist/index.js +16 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,15 @@ declare const paths: {
|
|
|
26
26
|
readonly projectsFile: string;
|
|
27
27
|
/** 在跑的 start 进程注册中心(同 App 冲突检测;当前 bot) */
|
|
28
28
|
readonly processesFile: string;
|
|
29
|
+
/**
|
|
30
|
+
* Local CLI hook IPC endpoint for the current bot. macOS/Linux use a Unix
|
|
31
|
+
* domain socket file; Windows has none, so Node maps a `\\.\pipe\…` path to a
|
|
32
|
+
* named pipe. The pipe name is hashed from the per-bot dir so the daemon and
|
|
33
|
+
* the hook subprocess (both pointed at the same bot) derive the same name,
|
|
34
|
+
* while distinct bots/users on one machine can't collide in the global pipe
|
|
35
|
+
* namespace.
|
|
36
|
+
*/
|
|
37
|
+
readonly cliBridgeSocket: string;
|
|
29
38
|
secretsFile: string;
|
|
30
39
|
keystoreSaltFile: string;
|
|
31
40
|
npmCacheDir: string;
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { tmpdir } from "os";
|
|
|
6
6
|
import { join as join2 } from "path";
|
|
7
7
|
|
|
8
8
|
// src/config/paths.ts
|
|
9
|
+
import { createHash } from "crypto";
|
|
9
10
|
import { homedir } from "os";
|
|
10
11
|
import { join } from "path";
|
|
11
12
|
var appDir = join(homedir(), ".feishu-codex-bridge");
|
|
@@ -33,6 +34,21 @@ var paths = {
|
|
|
33
34
|
get processesFile() {
|
|
34
35
|
return join(currentBotDir, "processes.json");
|
|
35
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* Local CLI hook IPC endpoint for the current bot. macOS/Linux use a Unix
|
|
39
|
+
* domain socket file; Windows has none, so Node maps a `\\.\pipe\…` path to a
|
|
40
|
+
* named pipe. The pipe name is hashed from the per-bot dir so the daemon and
|
|
41
|
+
* the hook subprocess (both pointed at the same bot) derive the same name,
|
|
42
|
+
* while distinct bots/users on one machine can't collide in the global pipe
|
|
43
|
+
* namespace.
|
|
44
|
+
*/
|
|
45
|
+
get cliBridgeSocket() {
|
|
46
|
+
if (process.platform === "win32") {
|
|
47
|
+
const tag = createHash("sha1").update(currentBotDir).digest("hex").slice(0, 16);
|
|
48
|
+
return `\\\\.\\pipe\\feishu-cli-bridge-${tag}`;
|
|
49
|
+
}
|
|
50
|
+
return join(currentBotDir, "cli-bridge.sock");
|
|
51
|
+
},
|
|
36
52
|
secretsFile: join(appDir, "secrets.enc"),
|
|
37
53
|
keystoreSaltFile: join(appDir, ".keystore.salt"),
|
|
38
54
|
npmCacheDir: join(appDir, "npm-cache"),
|