fix(build): 修复构建产物 hang 死 + 空 tool name (4 stub NAME="")
Root cause: Bun code splitting + MONITOR_TOOL/WORKFLOW_SCRIPTS stub 触发循环 ESM 死锁; 4 个 prompt.ts stub 的 NAME 常量为空字符串导致 API 400 error. Fix: - build.ts: splitting: false - defines.ts: 禁用 MONITOR_TOOL, WORKFLOW_SCRIPTS - 4 个 prompt.ts: 补全正确 tool name 验证: --version / -p / --print 三种模式全部通过
This commit is contained in:
parent
27682acf63
commit
0e9d6955f0
2
build.ts
2
build.ts
|
|
@ -20,7 +20,7 @@ const result = await Bun.build({
|
||||||
entrypoints: ['src/entrypoints/cli.tsx'],
|
entrypoints: ['src/entrypoints/cli.tsx'],
|
||||||
outdir,
|
outdir,
|
||||||
target: 'bun',
|
target: 'bun',
|
||||||
splitting: true,
|
splitting: false,
|
||||||
define: getMacroDefines(),
|
define: getMacroDefines(),
|
||||||
features,
|
features,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,10 @@ export const DEFAULT_BUILD_FEATURES = [
|
||||||
'PROACTIVE', // 主动自主代理模式(SleepTool 控制 tick 节奏,省 token)
|
'PROACTIVE', // 主动自主代理模式(SleepTool 控制 tick 节奏,省 token)
|
||||||
'DAEMON', // 守护进程模式,长驻 supervisor 管理后台 worker(非 GB 级主因)
|
'DAEMON', // 守护进程模式,长驻 supervisor 管理后台 worker(非 GB 级主因)
|
||||||
'ACP', // ACP 代理协议,支持外部 agent 接入
|
'ACP', // ACP 代理协议,支持外部 agent 接入
|
||||||
'WORKFLOW_SCRIPTS', // 工作流脚本(.claude/workflows/ 中的 YAML/MD)
|
// 'WORKFLOW_SCRIPTS', // 已禁用:stub 空壳,启用后 __esm() 循环初始化导致构建产物 hang
|
||||||
// 'HISTORY_SNIP', // 已禁用:snip 功能暂时关闭
|
// 'HISTORY_SNIP', // 已禁用:snip 功能暂时关闭
|
||||||
// 'CONTEXT_COLLAPSE', // 已禁用:实现是空壳 stub,启用后会抑制 auto compact 导致上下文管理完全失效
|
// 'CONTEXT_COLLAPSE', // 已禁用:实现是空壳 stub,启用后会抑制 auto compact 导致上下文管理完全失效
|
||||||
'MONITOR_TOOL', // Monitor 工具,流式监控后台进程输出
|
// 'MONITOR_TOOL', // 已禁用:stub 空壳,启用后 __esm() 循环初始化导致构建产物 hang
|
||||||
// 'FORK_SUBAGENT', // 已禁用:通过 Agent tool 的特殊方式实现了等效功能,无需再开
|
// 'FORK_SUBAGENT', // 已禁用:通过 Agent tool 的特殊方式实现了等效功能,无需再开
|
||||||
'KAIROS', // Kairos 定时任务系统核心
|
'KAIROS', // Kairos 定时任务系统核心
|
||||||
'COORDINATOR_MODE', // 多 worker 编排模式(AgentSummary 泄露已在 52b61c2c 修复)
|
'COORDINATOR_MODE', // 多 worker 编排模式(AgentSummary 泄露已在 52b61c2c 修复)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
// Auto-generated stub — replace with real implementation
|
// Stub — DiscoverSkills tool name
|
||||||
export {};
|
export {};
|
||||||
export const DISCOVER_SKILLS_TOOL_NAME: string = '';
|
export const DISCOVER_SKILLS_TOOL_NAME: string = 'DiscoverSkills';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
// Auto-generated stub — replace with real implementation
|
// Stub — SendUserFile tool name (KAIROS assistant mode)
|
||||||
export {};
|
export {};
|
||||||
export const SEND_USER_FILE_TOOL_NAME: string = '';
|
export const SEND_USER_FILE_TOOL_NAME: string = 'SendUserFile';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
// Auto-generated stub — replace with real implementation
|
// Stub — Snip tool name
|
||||||
export {};
|
export {};
|
||||||
export const SNIP_TOOL_NAME: string = '';
|
export const SNIP_TOOL_NAME: string = 'Snip';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
// Auto-generated stub — replace with real implementation
|
// Stub — TerminalCapture tool name
|
||||||
export {};
|
export {};
|
||||||
export const TERMINAL_CAPTURE_TOOL_NAME: string = '';
|
export const TERMINAL_CAPTURE_TOOL_NAME: string = 'TerminalCapture';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user