fix(goal): close human command surface gaps

This commit is contained in:
Tianyi Cui
2026-07-20 12:11:06 +08:00
parent 79d41dfaa9
commit 491dafc785
12 changed files with 47 additions and 28 deletions

View File

@@ -101,7 +101,7 @@ export interface Config {
toolBash?: NonNullable<agentCore.Config['toolBash']>
/** Generic background-task controls forwarded through agent-core; set false to omit their tool surface. */
toolTasks?: NonNullable<agentCore.Config['toolTasks']>
/** Persisted same-session goals; owner defaults enable them, or false disables the stack and command. */
/** Persisted same-session goals; owner defaults enable them, or false disables the stack and TUI command. */
goals?: agentCore.GoalConfig | false
/**
* If set, the pre-created agent RESUMES this persisted session id instead of
@@ -152,7 +152,7 @@ export function composeTerminalApp(ctx: Context, config: Config, isTTY: boolean)
const goals = config.goals ?? {}
if (mode === 'readline') ctx.plugin(ConsoleExporter)
ctx.plugin(CommandService)
if (goals !== false) ctx.plugin(commandGoal)
if (mode === 'tui' && goals !== false) ctx.plugin(commandGoal)
ctx.plugin(SessionPersistenceJsonl, { root: config.persistenceRoot ?? DEFAULT_PERSISTENCE_ROOT })
ctx.plugin(UserInteractionService)
if (mode === 'tui') {