bingocode 1.0.35 → 1.0.37
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/bin/bingo +27 -27
- package/bin/bingocode-win.cjs +3 -2
- package/bin/claude-win.cjs +3 -2
- package/config/bingo-defaults/settings.json +6 -7
- package/package.json +1 -1
- package/src/entrypoints/cli.tsx +4 -2
- package/src/server/ensureSingletonLocalServer.ts +1 -1
- package/src/utils/config.ts +15 -0
- package/bingocode-1.0.33.tgz +0 -0
package/bin/bingo
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
-
export CALLER_DIR="${CALLER_DIR:-$(pwd -W 2>/dev/null || pwd)}"
|
|
6
|
-
|
|
7
|
-
# ── 首次部署:将默认 bingo 配置复制到 ~/.claude/bingo/ ──
|
|
8
|
-
_BINGO_CONFIG_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
9
|
-
_BINGO_DIR="$_BINGO_CONFIG_DIR/bingo"
|
|
10
|
-
_BINGO_TARGET="$_BINGO_DIR/settings.json"
|
|
11
|
-
_BINGO_SRC="$ROOT_DIR/config/bingo-defaults/settings.json"
|
|
12
|
-
|
|
13
|
-
if [ ! -f "$_BINGO_TARGET" ] && [ -f "$_BINGO_SRC" ]; then
|
|
14
|
-
mkdir -p "$_BINGO_DIR"
|
|
15
|
-
cp "$_BINGO_SRC" "$_BINGO_TARGET" 2>/dev/null && \
|
|
16
|
-
echo "[bingo] 首次启动:已部署默认配置到 $_BINGO_TARGET" || true
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
cd "$ROOT_DIR"
|
|
20
|
-
|
|
21
|
-
if [[ -f .env ]]; then
|
|
22
|
-
ENV_FILE_FLAG="--env-file=.env"
|
|
23
|
-
else
|
|
24
|
-
ENV_FILE_FLAG=""
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
exec bun --preload ./preload.ts $ENV_FILE_FLAG ./src/entrypoints/manager.tsx "$@"
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
+
export CALLER_DIR="${CALLER_DIR:-$(pwd -W 2>/dev/null || pwd)}"
|
|
6
|
+
|
|
7
|
+
# ── 首次部署:将默认 bingo 配置复制到 ~/.claude/bingo/ ──
|
|
8
|
+
_BINGO_CONFIG_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
9
|
+
_BINGO_DIR="$_BINGO_CONFIG_DIR/bingo"
|
|
10
|
+
_BINGO_TARGET="$_BINGO_DIR/settings.json"
|
|
11
|
+
_BINGO_SRC="$ROOT_DIR/config/bingo-defaults/settings.json"
|
|
12
|
+
|
|
13
|
+
if [ ! -f "$_BINGO_TARGET" ] && [ -f "$_BINGO_SRC" ]; then
|
|
14
|
+
mkdir -p "$_BINGO_DIR"
|
|
15
|
+
cp "$_BINGO_SRC" "$_BINGO_TARGET" 2>/dev/null && \
|
|
16
|
+
echo "[bingo] 首次启动:已部署默认配置到 $_BINGO_TARGET" || true
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
cd "$ROOT_DIR"
|
|
20
|
+
|
|
21
|
+
if [[ -f .env ]]; then
|
|
22
|
+
ENV_FILE_FLAG="--env-file=.env"
|
|
23
|
+
else
|
|
24
|
+
ENV_FILE_FLAG=""
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
exec bun --preload ./preload.ts $ENV_FILE_FLAG ./src/entrypoints/manager.tsx "$@"
|
package/bin/bingocode-win.cjs
CHANGED
|
@@ -33,10 +33,11 @@ process.env.NoDefaultCurrentDirectoryInExePath = '1';
|
|
|
33
33
|
}
|
|
34
34
|
})();
|
|
35
35
|
|
|
36
|
-
// 自动定位 bun
|
|
37
|
-
const
|
|
36
|
+
// 自动定位 bun 路径(优先用环境变量,再检查默认安装位置,最后 fallback 到 PATH)
|
|
37
|
+
const bunPath =
|
|
38
38
|
process.env.BUN_PATH ||
|
|
39
39
|
path.join(os.homedir(), '.bun', 'bin', 'bun.exe');
|
|
40
|
+
const bun = fs.existsSync(bunPath) ? bunPath : 'bun';
|
|
40
41
|
|
|
41
42
|
// 主 CLI 入口
|
|
42
43
|
const entry = path.join(__dirname, '..', 'src', 'entrypoints', 'cli.tsx');
|
package/bin/claude-win.cjs
CHANGED
|
@@ -32,10 +32,11 @@ process.env.NoDefaultCurrentDirectoryInExePath = '1';
|
|
|
32
32
|
}
|
|
33
33
|
})();
|
|
34
34
|
|
|
35
|
-
// 自动定位 bun
|
|
36
|
-
const
|
|
35
|
+
// 自动定位 bun 路径(优先用环境变量,再检查默认安装位置,最后 fallback 到 PATH)
|
|
36
|
+
const bunPath =
|
|
37
37
|
process.env.BUN_PATH ||
|
|
38
38
|
path.join(os.homedir(), '.bun', 'bin', 'bun.exe');
|
|
39
|
+
const bun = fs.existsSync(bunPath) ? bunPath : 'bun';
|
|
39
40
|
|
|
40
41
|
// 主 CLI 入口
|
|
41
42
|
const entry = path.join(__dirname, '..', 'src', 'entrypoints', 'cli.tsx');
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"ANTHROPIC_AUTH_TOKEN": "pending-provider-setup",
|
|
4
|
-
"ANTHROPIC_BASE_URL": "http://127.0.0.1:3456"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"ANTHROPIC_AUTH_TOKEN": "pending-provider-setup",
|
|
4
|
+
"ANTHROPIC_BASE_URL": "http://127.0.0.1:3456"
|
|
5
|
+
}
|
|
6
|
+
}
|
package/package.json
CHANGED
package/src/entrypoints/cli.tsx
CHANGED
|
@@ -30,13 +30,15 @@ if (feature('ABLATION_BASELINE') && process.env.CLAUDE_CODE_ABLATION_BASELINE) {
|
|
|
30
30
|
* All imports are dynamic to minimize module evaluation for fast paths.
|
|
31
31
|
* Fast-path for --version has zero imports beyond this file.
|
|
32
32
|
*/
|
|
33
|
-
import { CliMenuManager } from '../manager/CliMenuManager';
|
|
34
|
-
import { render } from 'ink';
|
|
35
33
|
|
|
36
34
|
async function main(): Promise<void> {
|
|
37
35
|
const args = process.argv.slice(2);
|
|
38
36
|
// 兼容demo参数:只渲染CLI新主菜单管理器,不影响原有逻辑
|
|
37
|
+
// CliMenuManager 和 ink 改为动态 import,避免顶层 import 导致模块副作用
|
|
38
|
+
// 抢占 stdin,使新电脑首次启动时 TrustDialog 卡死
|
|
39
39
|
if (args.includes('--cli-menu-demo')) {
|
|
40
|
+
const { CliMenuManager } = await import('../manager/CliMenuManager');
|
|
41
|
+
const { render } = await import('ink');
|
|
40
42
|
render(<CliMenuManager />);
|
|
41
43
|
return;
|
|
42
44
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
const DEFAULT_HOST = '127.0.0.1';
|
|
21
21
|
const DEFAULT_PORT = Number(process.env.SERVER_PORT || 3456);
|
|
22
|
-
const HEALTH_TIMEOUT_MS =
|
|
22
|
+
const HEALTH_TIMEOUT_MS = Number(process.env.HEALTH_TIMEOUT_MS || 20000);
|
|
23
23
|
const HEALTH_RETRY_MS = 300;
|
|
24
24
|
|
|
25
25
|
function mkdirp(p: string) { fs.mkdirSync(p, { recursive: true }); }
|
package/src/utils/config.ts
CHANGED
|
@@ -720,6 +720,21 @@ function computeTrustDialogAccepted(): boolean {
|
|
|
720
720
|
return true
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
+
// Fallback: also check the raw original CWD path directly.
|
|
724
|
+
// This handles the case where trust was saved under CWD (no .git at the time),
|
|
725
|
+
// but now .git exists so getProjectPathForConfig() returns the git root instead.
|
|
726
|
+
// Without this fallback the old trust entry would never be found, causing the
|
|
727
|
+
// trust dialog to reappear after `git init` / `git clone`.
|
|
728
|
+
const normalizedOriginalCwd = normalizePathForConfigKey(
|
|
729
|
+
resolve(getOriginalCwd()),
|
|
730
|
+
)
|
|
731
|
+
if (normalizedOriginalCwd !== projectPath) {
|
|
732
|
+
const cwdConfig = config.projects?.[normalizedOriginalCwd]
|
|
733
|
+
if (cwdConfig?.hasTrustDialogAccepted) {
|
|
734
|
+
return true
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
723
738
|
// Now check from current working directory and its parents
|
|
724
739
|
// Normalize paths for consistent JSON key lookup
|
|
725
740
|
let currentPath = normalizePathForConfigKey(getCwd())
|
package/bingocode-1.0.33.tgz
DELETED
|
Binary file
|