Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(teammates): bind complete risk decisions to execution scope
Chrisb187d09536aa
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.tsindex a9d0b04e96..be6fa277d6 100644--- a/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.ts+++ b/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.ts@@ -955,7 +955,7 @@ describe('teammate turn principal', () => {'waits for an exact decision before autonomous %s can execute shell commands', async tool => {const h = desktopFixture('automatic');live(h);- const definition = { id: 'script', name: 'Command check', prompt: '', executionMode: 'script' as const,+ const definition = { id: 'script', name: 'Command check', prompt: '', useWorktree: false, executionMode: 'script' as const,workingDir: '/tmp/check', scriptConfig: { command: 'printf reviewed', capabilities: [] } };h.schedules.set('script', definition);const args = tool === 'schedule_run_now' ? { id: 'script' } : definition;@@ -985,7 +985,7 @@ describe('teammate turn principal', () => {'requires the exact command-capable decision for autonomous Agent schedule %s', async variant => {const h = desktopFixture('automatic');live(h);- const definition = { id: 'agent', name: 'Agent work', prompt: 'Run the saved work',+ const definition = { id: 'agent', name: 'Agent work', useWorktree: false, prompt: 'Run the saved work',workingDir: '/work', executionMode: 'agent' as const,...(variant === 'detach' ? { targetSessionId: 'companion' } : {}) };h.schedules.set('agent', definition);@@ -1012,10 +1012,101 @@ describe('teammate turn principal', () => {},);+ // r4409663577: helper create starts Full Access without a directory override.+ // Unit, real admission/effect: ordinary task sends must not mint silent authority.+ it('confirms a new Full Access handoff without changing existing sends or inherited-permission creates', async () => {+ const h = desktopFixture('automatic');+ live(h, 'auto');+ const request = helper('send_to_session', { message: 'Only reply to the test' });+ const create = vi.fn(async () => 'created');+ h.confirm.mockResolvedValue(false);+ expect(JSON.stringify(await withToolCallAuthority(h.authorize, request, create))).toContain('USER_CANCELLED');+ expect(create).not.toHaveBeenCalled();+ expect(h.confirm).toHaveBeenCalledWith('companion', request.tool, request.args,+ { server: 'cindy_helper', risk: 'command', details: { execution: {+ mode: 'agent', newTaskPermissionMode: 'bypassPermissions', workingDir: '/companion',+ } } });+ h.confirm.mockResolvedValue(true);+ expect(await withToolCallAuthority(h.authorize, request, create)).toBe('created');+ expect(create).toHaveBeenCalledTimes(1);+ h.confirm.mockClear();+ for (const args of [{ target_session_id: 'existing', message: 'Reply' },+ { working_dir: '/other', message: 'Reply' }])+ expect(await withToolCallAuthority(h.authorize, helper('send_to_session', args), create)).toBe('created');+ expect(h.confirm).not.toHaveBeenCalled();+ h.activeInput.ownerInput = true;+ expect(await withToolCallAuthority(h.authorize, request, create)).toBe('created');+ expect(h.confirm).not.toHaveBeenCalled();+ });++ // r4409987073: turning off isolation changes where a Full Access Agent writes.+ // Unit, production admission: deny that change and expire a previously reviewed run.+ it('confirms changed worktree isolation and expires a run when isolation changes', async () => {+ const h = desktopFixture('automatic');+ live(h);+ const definition = { id: 'agent', name: 'Isolated', prompt: 'Owner work',+ executionMode: 'agent' as const, workingDir: '/work', useWorktree: true };+ h.schedules.set('agent', definition);+ const request = { sessionId: 'companion', server: 'cindy_scheduler' as const, tool: 'schedule_update',+ args: { id: 'agent', useWorktree: false } };+ const effect = vi.fn(async () => 'changed');+ h.confirm.mockResolvedValue(false);+ expect(JSON.stringify(await withToolCallAuthority(h.authorize, request, effect))).toContain('USER_CANCELLED');+ expect(effect).not.toHaveBeenCalled();+ expect(h.confirm).toHaveBeenCalledWith('companion', request.tool, request.args,+ expect.objectContaining({ risk: 'command', details: expect.objectContaining({+ schedule: expect.objectContaining({ useWorktree: true }),+ }) }));+ h.confirm.mockImplementation(async () => { definition.useWorktree = false; return true; });+ expect(JSON.stringify(await withToolCallAuthority(h.authorize,+ { ...request, tool: 'schedule_run_now', args: { id: 'agent' } }, effect))).toContain('AUTHORIZATION_EXPIRED');+ expect(effect).not.toHaveBeenCalled();+ });++ // r4409828449: resume previously displayed only an ID, not the saved command.+ // Unit, production admission/effect: show the definition and reject replacement.+ it('shows and binds the saved script before resuming a paused schedule', async () => {+ const h = desktopFixture('automatic');+ live(h);+ const definition = { id: 'paused', name: 'Paused command', useWorktree: false, prompt: '', executionMode: 'script' as const,+ workingDir: '/work', scriptConfig: { command: 'printf reviewed', capabilities: [] } };+ h.schedules.set('paused', definition);+ const request = { sessionId: 'companion', server: 'cindy_scheduler' as const, tool: 'schedule_resume', args: { id: 'paused' } };+ const resume = vi.fn(async () => 'resumed');+ h.confirm.mockImplementation(async () => { definition.scriptConfig.command = 'printf replacement'; return true; });+ expect(JSON.stringify(await withToolCallAuthority(h.authorize, request, resume))).toContain('AUTHORIZATION_EXPIRED');+ expect(resume).not.toHaveBeenCalled();+ expect(h.confirm).toHaveBeenCalledWith('companion', request.tool, request.args,+ { server: 'cindy_scheduler', risk: 'resume', details: { schedule: expect.objectContaining({+ workingDir: '/work', scriptConfig: { command: 'printf reviewed', capabilities: [] },+ }) } });+ h.confirm.mockResolvedValue(true);+ expect(await withToolCallAuthority(h.authorize, request, resume)).toBe('resumed');+ expect(resume).toHaveBeenCalledTimes(1);+ });++ // r4409808139: the runner inherits the bound session's current hook directory.+ // Unit, production admission: changing that effective directory invalidates approval.+ it('binds manual hook execution to its resolved directory', async () => {+ const h = desktopFixture('automatic');+ live(h);+ const definition = { id: 'bound', name: 'Bound hook', useWorktree: false, prompt: 'Owner work', executionMode: 'agent' as const,+ targetSessionId: 'existing', workingDir: '/stale', preRunWorkingDir: '/actual',+ preRunHook: { command: 'node relative.mjs' } };+ h.schedules.set('bound', definition);+ h.confirm.mockImplementation(async () => { definition.preRunWorkingDir = '/replacement'; return true; });+ const execute = vi.fn(async () => 'executed');+ const request = { sessionId: 'companion', server: 'cindy_scheduler' as const, tool: 'schedule_run_now', args: { id: 'bound' } };+ expect(JSON.stringify(await withToolCallAuthority(h.authorize, request, execute))).toContain('AUTHORIZATION_EXPIRED');+ expect(execute).not.toHaveBeenCalled();+ expect(h.confirm).toHaveBeenCalledWith('companion', request.tool, request.args,+ expect.objectContaining({ details: { schedule: expect.objectContaining({ preRunWorkingDir: '/actual' }) } }));+ });+it('keeps an approved independent Agent schedule metadata edit ordinary', async () => {const h = desktopFixture('automatic');live(h);- h.schedules.set('agent', { id: 'agent', name: 'Agent work', prompt: 'Saved owner instruction',+ h.schedules.set('agent', { id: 'agent', name: 'Agent work', useWorktree: false, prompt: 'Saved owner instruction',executionMode: 'agent', workingDir: '/work' });const request = { sessionId: 'companion', server: 'cindy_scheduler' as const, tool: 'schedule_update',args: { id: 'agent', name: 'Renamed', cronExpr: '0 9 * * *' } };@@ -1026,7 +1117,7 @@ describe('teammate turn principal', () => {it.each(['script', 'agent'] as const)('expires a %s command decision when the saved schedule changes', async mode => {const h = desktopFixture('automatic');live(h);- h.schedules.set('script', { id: 'script', name: 'Command check', prompt: '', executionMode: mode,+ h.schedules.set('script', { id: 'script', name: 'Command check', prompt: '', useWorktree: false, executionMode: mode,...(mode === 'script' ? { scriptConfig: { command: 'printf reviewed', capabilities: [] } } : { prompt: 'Reviewed prompt' }) });h.confirm.mockImplementation(async () => {if (mode === 'script') h.schedules.get('script')!.scriptConfig!.command = 'printf replacement';@@ -1050,7 +1141,7 @@ describe('teammate turn principal', () => {expect(h.confirm).toHaveBeenCalledTimes(2);h.confirm.mockClear();await call('schedule_create', { prompt: 'Remind me tomorrow', bindToCurrentSession: true });- h.schedules.set('prompt', { id: 'prompt', name: 'Reminder', prompt: 'Remind me tomorrow', executionMode: 'agent', targetSessionId: 'companion' });+ h.schedules.set('prompt', { id: 'prompt', name: 'Reminder', useWorktree: false, prompt: 'Remind me tomorrow', executionMode: 'agent', targetSessionId: 'companion' });await call('schedule_update', { id: 'prompt', name: 'Updated reminder' });await call('schedule_run_now', { id: 'prompt' });expect(h.confirm).not.toHaveBeenCalled();@@ -1082,7 +1173,7 @@ describe('teammate turn principal', () => {it('binds the scheduler hook installer decision to its actual schedule target', async () => {const h = desktopFixture('automatic');live(h);- const target = { id: 'bound', name: 'Bound check', prompt: 'Bound owner instruction', executionMode: 'agent' as const,+ const target = { id: 'bound', name: 'Bound check', useWorktree: false, prompt: 'Bound owner instruction', executionMode: 'agent' as const,targetSessionId: 'child', workingDir: '/schedule', preRunHook: { command: 'node old.mjs' },hookInstallation: { workingDir: '/session', fallbackDir: '/fallback' } };h.schedules.set('bound', target);diff --git a/apps/desktop/src/main/maker-ipc/register.ts b/apps/desktop/src/main/maker-ipc/register.tsindex 3a6dbfccb0..033ff7c1cd 100644--- a/apps/desktop/src/main/maker-ipc/register.ts+++ b/apps/desktop/src/main/maker-ipc/register.ts@@ -3375,9 +3375,8 @@ export async function confirmTaskAction(kind: 'permission', requestId: randomUUID(),title: t('taskActionConfirmation.title'),// Generic tool previews are shortened. The owner must see the complete- // command or standing instructions here, including on remote permission cards.- description: context?.risk === 'command' || context?.risk === 'authority' ||- (tool === 'routine_run_now' && context?.risk === 'resume')+ // command, child request or standing instructions here, including on remote cards.+ description: context?.risk? `${description}\n\n${JSON.stringify(input, null, 2)}` : description,toolName: `mcp__${context?.server ?? 'cindy_helper'}__${tool}`,input,diff --git a/apps/desktop/src/main/maker-ipc/taskActionAuthorization.ts b/apps/desktop/src/main/maker-ipc/taskActionAuthorization.tsindex 7f057d9e13..857180f5fd 100644--- a/apps/desktop/src/main/maker-ipc/taskActionAuthorization.ts+++ b/apps/desktop/src/main/maker-ipc/taskActionAuthorization.ts@@ -116,8 +116,9 @@ export const SCHEDULER_TASK_ACTION_TOOLS: ReadonlySet<string> = new Set([export type TaskActionRisk = 'remove' | 'permission' | 'resume' | 'command' | 'authority';export type TaskActionScheduleDefinition = Pick<Schedule,- 'id' | 'name' | 'prompt' | 'persistentSession' | 'executionMode' | 'scriptConfig' | 'preRunHook' | 'workingDir' | 'targetSessionId'> & {+ 'id' | 'name' | 'prompt' | 'persistentSession' | 'useWorktree' | 'executionMode' | 'scriptConfig' | 'preRunHook' | 'workingDir' | 'targetSessionId'> & {hookInstallation?: { workingDir?: string; fallbackDir: string };+ preRunWorkingDir?: string;};export interface TaskActionConfirmation {server: string;@@ -157,11 +158,20 @@ export function taskActionStartsIndependentAgent(call: Pick<Call, 'server' | 'to(!(typeof definition.targetSessionId === 'string' && definition.targetSessionId.trim()) && !bindsCurrent));}+/** This existing helper creation path starts Full Access; directory overrides inherit+ * the caller's permissions and existing-target sends keep their normal flow. */+export function taskActionCreatesFullAccessTask(call: Pick<Call, 'server' | 'tool' | 'args'>): boolean {+ const args = call.args as Record<string, unknown> | undefined;+ return call.server === 'cindy_helper' && call.tool === 'send_to_session' &&+ !args?.target_session_id && args?.working_dir === undefined;+}+/** A small, explicit risk list. Everything else follows the task's normal permissions. */export function taskActionRisk(call: Pick<Call, 'server' | 'tool' | 'args'>,facts?: { routineEnabled?: boolean; routinePrompt?: string; routineBuiltin?: boolean; routinePreRunCommand?: string; schedule?: TaskActionScheduleDefinition | null }): TaskActionRisk | undefined {const args = call.args && typeof call.args === 'object' && !Array.isArray(call.args)? call.args as Record<string, unknown> : {};+ if (taskActionCreatesFullAccessTask(call)) return 'command';// The local scheduler is a trusted MCP, but its script runner bypasses the// harness's shell approval. Classify the command effect, not all scheduler writes.if ((call.server === 'cindy_helper' || call.server === 'cindy_scheduler') &&@@ -180,7 +190,7 @@ export function taskActionRisk(call: Pick<Call, 'server' | 'tool' | 'args'>,}if (taskActionStartsIndependentAgent(call, facts?.schedule) &&(call.tool !== 'schedule_update' ||- (['prompt', 'workingDir', 'executionMode', 'targetSessionId', 'persistentSession'] as const)+ (['prompt', 'workingDir', 'useWorktree', 'executionMode', 'targetSessionId', 'persistentSession'] as const).some(key => key in args && args[key] !== facts?.schedule?.[key]))) return 'command';if (call.tool === 'routine_run_now' && facts?.routinePreRunCommand?.trim()) return 'command';const routineHook = args.preRunHook;diff --git a/apps/desktop/src/main/maker-ipc/taskActionHost.ts b/apps/desktop/src/main/maker-ipc/taskActionHost.tsindex ff84baaf12..5863563c91 100644--- a/apps/desktop/src/main/maker-ipc/taskActionHost.ts+++ b/apps/desktop/src/main/maker-ipc/taskActionHost.ts@@ -21,6 +21,7 @@ import {DELEGATED_TASK_ACTIONS,taskActionRisk,taskActionStartsIndependentAgent,+ taskActionCreatesFullAccessTask,type TaskActionConfirmation,type TaskActionTarget,type TaskActionRoutineSnapshot,@@ -230,13 +231,14 @@ export function createDesktopTaskActionAuthorizer(deps: {// what a bare schedule ID will run, and a changed definition expires it.const helperInstallation = principal === 'autonomous' && runtimePermissionApplies &&call.server === 'cindy_helper' && call.tool === 'schedule_set_pre_run_hook';- const helperInstallDir = helperInstallation ? await deps.getSessionWorkDir(sessionId) : undefined;+ const helperCreation = principal === 'autonomous' && runtimePermissionApplies && taskActionCreatesFullAccessTask(call);+ const helperWorkDir = helperInstallation || helperCreation ? await deps.getSessionWorkDir(sessionId) : undefined;const hookInstallation = call.server === 'cindy_scheduler' && call.tool === 'schedule_set_pre_run_hook'? { workingDir: typeof args.workingDir === 'string' ? args.workingDir : undefined } : undefined;const scheduleIdArg = hookInstallation ? args.scheduleId : args.id;const scheduleId = principal === 'autonomous' && runtimePermissionApplies &&(hookInstallation || call.server === 'cindy_scheduler' && (!args.device || args.device === 'local') &&- ['schedule_update', 'schedule_run_now'].includes(call.tool)) && typeof scheduleIdArg === 'string'+ ['schedule_update', 'schedule_run_now', 'schedule_resume'].includes(call.tool)) && typeof scheduleIdArg === 'string'? scheduleIdArg : undefined;const schedule = scheduleId ? await deps.getScheduleDefinition(scheduleId, hookInstallation) : undefined;const scheduleSignature = JSON.stringify(schedule);@@ -369,7 +371,7 @@ export function createDesktopTaskActionAuthorizer(deps: {if (fingerprint !== taskActionFingerprint(call))throw new Error('TASK_ACTION_AUTHORIZATION_EXPIRED');await assertDeliveryCurrent();- if (helperInstallation && await deps.getSessionWorkDir(sessionId) !== helperInstallDir)+ if ((helperInstallation || helperCreation) && await deps.getSessionWorkDir(sessionId) !== helperWorkDir)throw new Error('TASK_ACTION_AUTHORIZATION_EXPIRED');if (scheduleId && JSON.stringify(await deps.getScheduleDefinition(scheduleId, hookInstallation)) !== scheduleSignature)throw new Error('TASK_ACTION_AUTHORIZATION_EXPIRED');@@ -386,10 +388,11 @@ export function createDesktopTaskActionAuthorizer(deps: {await scope.assertCurrent();const confirmed = await deps.confirm(sessionId, call.tool, structuredClone(call.args),{ server: call.server, risk, ...(permissionTarget ? { details: permissionTarget.details }- : helperInstallation ? { details: { installation: { workingDir: helperInstallDir ?? null } } }+ : helperInstallation ? { details: { installation: { workingDir: helperWorkDir ?? null } } }+ : helperCreation ? { details: { execution: { mode: 'agent', newTaskPermissionMode: 'bypassPermissions', workingDir: helperWorkDir ?? null } } }: risk === 'command' && taskActionStartsIndependentAgent(call, schedule)? { details: { ...(schedule ? { schedule } : {}), execution: { mode: 'agent', newTaskPermissionMode: 'bypassPermissions' } } }- : risk === 'command' && schedule ? { details: { schedule } }+ : schedule ? { details: { schedule } }: call.tool === 'routine_run_now' && routine?.details ? { details: routine.details } : {}) });if (!confirmed) {rejectedDecision = { ok: false, errorCode: 'USER_CANCELLED',diff --git a/apps/desktop/src/main/mcp-integrations/mcp-providers.ts b/apps/desktop/src/main/mcp-integrations/mcp-providers.tsindex 99db82f70a..773cd84620 100644--- a/apps/desktop/src/main/mcp-integrations/mcp-providers.ts+++ b/apps/desktop/src/main/mcp-integrations/mcp-providers.ts@@ -16,6 +16,7 @@ import type { createBotCapabilityService } from '../maker-ipc/botCapabilityServiimport { getRoutineEngine, routineTools } from '../routines/service.js';import { taskActionRoutineRevision } from '../maker-ipc/taskActionAuthorization.js';import { join as pathJoin } from 'node:path';+import { homedir } from 'node:os';import { and, eq, inArray } from 'drizzle-orm';import {@@ -330,8 +331,12 @@ export function createDesktopMcpProviders(deps: DesktopMcpProvidersDeps): LiziMcgetScheduleDefinition: async (id, hookInstallation) => {const schedule = await getScheduler().get(id);if (!schedule) return null;- const { name, prompt, persistentSession, executionMode, scriptConfig, preRunHook, workingDir, targetSessionId } = schedule;- const definition = { id, name, prompt, persistentSession, executionMode, scriptConfig, preRunHook, workingDir, targetSessionId };+ const { name, prompt, persistentSession, useWorktree, executionMode, scriptConfig, preRunHook, workingDir, targetSessionId } = schedule;+ const preRunWorkingDir = preRunHook?.command?.trim()+ ? (targetSessionId ? await resolveHookSessionWorkDir(targetSessionId) : undefined) ?? workingDir+ : undefined;+ const definition = { id, name, prompt, persistentSession, useWorktree, executionMode, scriptConfig, preRunHook, workingDir, targetSessionId,+ ...(preRunHook?.command?.trim() ? { preRunWorkingDir: preRunWorkingDir?.trim() ? preRunWorkingDir : homedir() } : {}) };if (!hookInstallation) return definition;let installWorkingDir = hookInstallation.workingDir;if (!installWorkingDir && executionMode !== 'script' && targetSessionId)diff --git a/docs/product-rules/teammate-authority.md b/docs/product-rules/teammate-authority.mdindex be36c1d61a..c47b7fc4fb 100644--- a/docs/product-rules/teammate-authority.md+++ b/docs/product-rules/teammate-authority.md@@ -20,7 +20,7 @@| 风险 | 实际入口 || --- | --- || 本机调度命令 | `schedule_create` / `schedule_update` 保存脚本执行或命令前置检查、`schedule_run_now` 执行含此类命令的已存定义、`cindy_helper` 和 `cindy_scheduler` 两个入口的 `schedule_set_pre_run_hook` 安装并自测脚本,以及 `routine_save` 保存新命令前置检查(沿用同一命令不追加确认)、`routine_run_now` 手动执行含前置命令的已存规则 |-| 新建完全访问 Agent | 本机 `schedule_create` 创建未绑定任务的 Agent 调度、`schedule_update` 改写其指令/目录或解除绑定/改成可重建的持续模式、`schedule_run_now` 手动执行;包含持续模式丢失目标后新建任务的分支 |+| 新建完全访问 Agent | `send_to_session` 不带目标任务与目录覆盖时新建完全访问任务,以及本机 `schedule_create` 创建未绑定任务的 Agent 调度、`schedule_update` 改写其指令/目录/worktree 隔离或解除绑定/改成可重建的持续模式、`schedule_run_now` 手动执行;包含持续模式丢失目标后新建任务的分支 || 授予常驻指令 | `routine_save` 新建启用的自定义规则或改写启用规则的指令;禁用草稿和不改指令的编辑沿原权限 || 删除自动化 | `routine_delete`、`schedule_delete` || 代用户回答权限请求 | `message_session_task` 携带 `decision` |@@ -31,7 +31,7 @@风险表不是平台权限、账号访问或消息来源认证的替代品。本机调度的脚本及前置检查由宿主直接执行,不经过 Agent 的 Bash 审批;自主调用须展示命令、工作目录及准确动作,由主人决定。绑定已有任务并继承其权限的无命令跟进、提醒与只读工具不追加此类确认。独立 Agent 调度沿用调度器既有的新任务完全访问默认值,不得由自主轮静默创建更高权限的执行。卡片展示完整指令、目录与新任务权限默认值;已有独立调度只改名称/时间等元数据不追加确认。此处不修改调度器、普通任务权限档或全局自动审核器。-按 ID 执行或修改时,卡片展示已存命令定义;脚本安装按 `scheduleId` 展示目标、旧命令及绑定任务解析出的目录与后备落盘目录,并绑定同一快照;helper 安装器保持不接受 `scheduleId` 或外部目录,只展示并绑定调用伙伴自身的任务目录。确认期间定义或解析目录变化使旧许可失效,安装前再次复核。跨电脑调度仍沿已有逐次任务权限流程。+按 ID 执行、修改或恢复暂停时,卡片展示并绑定已存定义(含 worktree 隔离);前置命令展示绑定任务解析出的实际执行目录,目录改变使旧许可失效;脚本安装按 `scheduleId` 展示目标、旧命令及绑定任务解析出的目录与后备落盘目录,并绑定同一快照;helper 安装器保持不接受 `scheduleId` 或外部目录,只展示并绑定调用伙伴自身的任务目录。确认期间定义或解析目录变化使旧许可失效,安装前再次复核。跨电脑调度仍沿已有逐次任务权限流程。禁用草稿、重命名、改时间等不改常驻指令和命令的保存不追加授权;主人输入和受托指令仍沿原权限。自主创建启用的自定义指令或改写启用规则指令,必须经一次性本人确认才可作为后续 entrusted 执行的常驻授权,不能靠保存制造主人授权。停用草稿可普通保存;启用或手动执行前须确认完整指令。手动执行许可仅限这一次,不改变规则的停用状态。@@ -42,7 +42,7 @@- 风险确认进入普通 `Session.runHostInteraction` 和 `requestHostInteraction`,发布等待授权状态,桌面、同账号手机/远控与已绑定 IM 共用同一请求。卡片说明目标、动作和本次影响,只允许这一次。- 执行调用等待决定;允许后在原调用继续,无需 Agent 重发。同一次放行只能消费一次。-- 代答许可展示子任务当前请求的工具、参数(或计划)与请求 ID,绑定该实际请求;+- 代答许可在确认正文完整展示子任务当前请求的工具、参数(或计划)与请求 ID,不依赖截短的工具预览,绑定该实际请求;原请求已处理或被新请求替换时,旧卡不能批准新请求。- 拒绝、取消、停止或任务关闭不执行;晚到回答不恢复旧操作。断线重连读取既有待处理请求,不重新派发操作。- 同意到执行及延迟投递仍校验账号、实例、输入、权限与 Plan 代次;变更使旧放行失效。