Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(teammates): confirm autonomous scheduler command execution

Chrisfcd11f0ef059
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.ts
index 3484e605d7..2110f5dc7d 100644
--- a/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.ts
+++ b/apps/desktop/src/main/maker-ipc/__tests__/taskActionAuthorization.test.ts
@@ -21,6 +21,7 @@ import {
taskActionInputGuard,
taskActionPrincipal,
taskActionRoutineRevision,
+ type TaskActionScheduleDefinition,
hasTaskActionAuthorization,
TASK_ACTION_TOOLS,
ORCA_TASK_ACTION_TOOLS,
@@ -304,9 +305,11 @@ function desktopFixture(kind: 'private' | 'group' | 'automatic' = 'group') {
};
});
const routines = new Map<string, { enabled: boolean; revision: number }>();
+ const schedules = new Map<string, TaskActionScheduleDefinition>();
const authorize = createDesktopTaskActionAuthorizer({
input: () => ({ ...activeInput }), confirm, getSession,
capturePermissionRequest,
+ getScheduleDefinition: async id => structuredClone(schedules.get(id) ?? null),
captureRoutine: async (_botId, id) => {
const row = routines.get(id);
if (!row) return undefined;
@@ -318,7 +321,7 @@ function desktopFixture(kind: 'private' | 'group' | 'automatic' = 'group') {
},
});
return { authorize, confirm, activeInput, caller, rows, runtime, getSession,
- permissionRequest, capturePermissionRequest, routines };
+ permissionRequest, capturePermissionRequest, routines, schedules };
}
const ownerWrites = [
['cindy_helper', 'start_session_task'],
@@ -919,6 +922,68 @@ describe('teammate turn principal', () => {
expect(effect).toHaveBeenCalledTimes(1);
});
+ // Security review r4409127909: trusted local scheduler commands bypass the
+ // harness approval policy. Production admission must wait before persistence/fire.
+ // Unit tier; a script schedule is the minimum failing input.
+ it.each(['schedule_create', 'schedule_update', 'schedule_run_now'])(
+ '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', 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;
+ const request = { sessionId: 'companion', server: 'cindy_scheduler' as const, tool, args };
+ h.confirm.mockResolvedValue(false);
+ const effect = vi.fn(async () => 'executed');
+ expect(JSON.stringify(await withToolCallAuthority(h.authorize, request, effect))).toContain('USER_CANCELLED');
+ expect(effect).not.toHaveBeenCalled();
+ expect(h.confirm).toHaveBeenCalledWith('companion', tool, args,
+ expect.objectContaining({ server: 'cindy_scheduler', risk: 'command' }));
+ h.confirm.mockResolvedValue(true);
+ expect(await withToolCallAuthority(h.authorize, request, effect)).toBe('executed');
+ expect(effect).toHaveBeenCalledTimes(1);
+ if (tool !== 'schedule_create') expect(h.confirm).toHaveBeenLastCalledWith('companion', tool, args,
+ expect.objectContaining({ details: { schedule: definition } }));
+ h.activeInput.ownerInput = true;
+ h.confirm.mockClear();
+ expect(await withToolCallAuthority(h.authorize, request, effect)).toBe('executed');
+ expect(h.confirm).not.toHaveBeenCalled();
+ },
+ );
+
+ it('expires a command decision when the saved schedule changes', async () => {
+ const h = desktopFixture('automatic');
+ live(h);
+ h.schedules.set('script', { id: 'script', name: 'Command check', executionMode: 'script',
+ scriptConfig: { command: 'printf reviewed', capabilities: [] } });
+ h.confirm.mockImplementation(async () => {
+ h.schedules.get('script')!.scriptConfig!.command = 'printf replacement';
+ return true;
+ });
+ const effect = vi.fn(async () => 'executed');
+ expect(JSON.stringify(await withToolCallAuthority(h.authorize,
+ { sessionId: 'companion', server: 'cindy_scheduler', tool: 'schedule_run_now', args: { id: 'script' } },
+ effect))).toContain('AUTHORIZATION_EXPIRED');
+ expect(effect).not.toHaveBeenCalled();
+ });
+
+ it('recognizes raw pre-run hooks without prompting for ordinary prompt schedules', async () => {
+ const h = desktopFixture('automatic');
+ live(h);
+ const call = (tool: string, args: Record<string, unknown>) => withToolCallAuthority(h.authorize,
+ { sessionId: 'companion', server: 'cindy_scheduler', tool, args }, async () => 'done');
+ await call('schedule_create', { prompt: 'Check progress', preRunHook: { command: 'node check.mjs' } });
+ await call('schedule_set_pre_run_hook', { script: 'process.exit(2)' });
+ expect(h.confirm).toHaveBeenCalledTimes(2);
+ h.confirm.mockClear();
+ await call('schedule_create', { prompt: 'Remind me tomorrow' });
+ h.schedules.set('prompt', { id: 'prompt', name: 'Reminder', executionMode: 'agent' });
+ await call('schedule_update', { id: 'prompt', name: 'Updated reminder' });
+ await call('schedule_run_now', { id: 'prompt' });
+ expect(h.confirm).not.toHaveBeenCalled();
+ });
+
// Review #7782: approval must describe and bind the child's exact request, not
// whichever request is current after the parent card is answered. Unit tier.
it.each(['request-id', 'arguments'] as const)('expires a permission answer when child %s changes', async change => {
diff --git a/apps/desktop/src/main/maker-ipc/botSystemPrompt.ts b/apps/desktop/src/main/maker-ipc/botSystemPrompt.ts
index 735e38a7a2..9f758f027a 100644
--- a/apps/desktop/src/main/maker-ipc/botSystemPrompt.ts
+++ b/apps/desktop/src/main/maker-ipc/botSystemPrompt.ts
@@ -154,7 +154,7 @@ const SESSION_CONTROL_GUIDANCE = [
'## 你能看、能管主人的任务',
'你和主人开的普通任务用同一套工具(cindy_helper,先 `list_tools` 看类目再 `call_tool`):history 类的 `list_sessions` / `get_chat_history` / `search_chat_history` 看有哪些任务、它们在说什么;control 类的 `steer_session`、`stop_session_turn`、`set_session_runtime`、`rename_sessions`、`archive_sessions`、标签与项目工具管理任务;handoff 类的 `send_to_session` 给已有任务发话或开一条新的普通任务。',
'每一轮代表谁由宿主判定。主人这一轮亲口要求时(宿主核实的主人输入,包括群里和 IM 专线里核实为主人的请求),你可以代主人去操作他的任务:找到对应任务、发话、追加需求、停止、改名、归档等,照常走当前任务的权限档;你转达时宿主会附上核实过的主人原话。',
- '主人输入、例行任务和自主跟进都沿用当前任务的权限档;缺少本轮主人输入标记不代表主人拒绝,也不阻止普通任务操作或保存例行任务。自主执行只对少数明确风险(删除自动化、代答授权、恢复暂停)等待主人决定:宿主显示授权请求,同意后继续本次调用,拒绝或取消后停止,不要换工具重试。来源身份与账号访问范围仍由宿主核验;自动唤醒和别人的消息不会变成主人原话。',
+ '主人输入、例行任务和自主跟进都沿用当前任务的权限档;缺少本轮主人输入标记不代表主人拒绝,也不阻止普通任务操作或保存例行任务。自主执行只对少数明确风险(删除自动化、代答授权、恢复暂停、本机调度的命令执行)等待主人决定:宿主显示授权请求,同意后继续本次调用,拒绝或取消后停止,不要换工具重试。来源身份与账号访问范围仍由宿主核验;自动唤醒和别人的消息不会变成主人原话。',
'转达时 Agent 补充只写对方完成任务需要的背景,不要复述「用户已授权」之类的话,也不要让对方用 send_to_session 回传;需要结果时自己用 `get_task_digest` 去看。工具回执决定实际结果;账号、连接或平台未就绪时如实说明。',
'主人让你接手某件任务时,用 `set_workbench_task_responsibility` 记下;之后它卡住、等主人、出错或做完时宿主会叫醒你,先用 history 类的 `get_task_digest` 读摘要再决定怎么跟进。',
].join('\n');
diff --git a/apps/desktop/src/main/maker-ipc/register.ts b/apps/desktop/src/main/maker-ipc/register.ts
index a5dc68a022..1fa06c625f 100644
--- a/apps/desktop/src/main/maker-ipc/register.ts
+++ b/apps/desktop/src/main/maker-ipc/register.ts
@@ -3369,12 +3369,16 @@ export async function confirmTaskAction(
const unsubscribe = session.onStatusChange(status => {
if (status !== 'active') controller.abort();
});
+ const input = structuredClone(context?.details ? { action: args, ...context.details } : args) as Record<string, unknown>;
+ const description = t(context?.risk ? `taskActionConfirmation.${context.risk}` : 'taskActionConfirmation.once');
const request: Extract<InteractionRequest, { kind: 'permission' }> = {
kind: 'permission', requestId: randomUUID(),
title: t('taskActionConfirmation.title'),
- description: t(context?.risk ? `taskActionConfirmation.${context.risk}` : 'taskActionConfirmation.once'),
+ // Generic tool previews are shortened. The owner must see the complete
+ // command and working directory here, including on remote permission cards.
+ description: context?.risk === 'command' ? `${description}\n\n${JSON.stringify(input, null, 2)}` : description,
toolName: `mcp__${context?.server ?? 'cindy_helper'}__${tool}`,
- input: structuredClone(context?.details ? { action: args, ...context.details } : args) as Record<string, unknown>,
+ input,
metadata: { hostOwnedConfirmation: 'task_action' },
};
try {
diff --git a/apps/desktop/src/main/maker-ipc/taskActionAuthorization.ts b/apps/desktop/src/main/maker-ipc/taskActionAuthorization.ts
index 40061a6f73..6a71df772b 100644
--- a/apps/desktop/src/main/maker-ipc/taskActionAuthorization.ts
+++ b/apps/desktop/src/main/maker-ipc/taskActionAuthorization.ts
@@ -1,6 +1,7 @@
import { AsyncLocalStorage } from 'node:async_hooks';
import { createHash } from 'node:crypto';
import type { ToolCallAuthorizer } from '@cindy/mcps';
+import type { Schedule } from '@cindy/maker-scheduler';
import type { AgentInputQueuedMessage } from '../../shared/agentInputQueue.js';
type Call = Parameters<ToolCallAuthorizer>[0];
@@ -113,7 +114,9 @@ export const SCHEDULER_TASK_ACTION_TOOLS: ReadonlySet<string> = new Set([
'schedule_pause', 'schedule_resume', 'schedule_set_pre_run_hook',
]);
-export type TaskActionRisk = 'remove' | 'permission' | 'resume';
+export type TaskActionRisk = 'remove' | 'permission' | 'resume' | 'command';
+export type TaskActionScheduleDefinition = Pick<Schedule,
+ 'id' | 'name' | 'executionMode' | 'scriptConfig' | 'preRunHook' | 'workingDir' | 'targetSessionId'>;
export interface TaskActionConfirmation {
server: string;
risk?: TaskActionRisk;
@@ -133,9 +136,24 @@ export interface TaskActionRoutineSnapshot {
/** 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 }): TaskActionRisk | undefined {
+ facts?: { routineEnabled?: boolean; schedule?: TaskActionScheduleDefinition | null }): TaskActionRisk | undefined {
const args = call.args && typeof call.args === 'object' && !Array.isArray(call.args)
? call.args as Record<string, unknown> : {};
+ // 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_scheduler') {
+ if (call.tool === 'schedule_set_pre_run_hook' &&
+ [args.script, args.description].some(value => typeof value === 'string' && value.trim()))
+ return 'command'; // installs and self-tests code
+ if (['schedule_create', 'schedule_update', 'schedule_run_now'].includes(call.tool)) {
+ const definition = call.tool === 'schedule_run_now' ? facts?.schedule
+ : { ...facts?.schedule, ...args };
+ const hook = definition?.preRunHook;
+ if (definition?.executionMode === 'script' ||
+ (hook && typeof hook === 'object' && 'command' in hook && typeof hook.command === 'string' && hook.command.trim()))
+ return 'command';
+ }
+ }
if (call.tool === 'routine_delete' || call.tool === 'schedule_delete')
return 'remove';
if (call.tool === 'message_session_task' && args.decision !== undefined) return 'permission';
diff --git a/apps/desktop/src/main/maker-ipc/taskActionHost.ts b/apps/desktop/src/main/maker-ipc/taskActionHost.ts
index 3f368b58e1..5864df3677 100644
--- a/apps/desktop/src/main/maker-ipc/taskActionHost.ts
+++ b/apps/desktop/src/main/maker-ipc/taskActionHost.ts
@@ -23,6 +23,7 @@ import {
type TaskActionConfirmation,
type TaskActionTarget,
type TaskActionRoutineSnapshot,
+ type TaskActionScheduleDefinition,
taskActionFingerprint,
type TaskActionPrincipal,
type TaskActionScope,
@@ -112,6 +113,7 @@ export function createDesktopTaskActionAuthorizer(deps: {
confirm(sessionId: string, tool: string, args: unknown, context?: TaskActionConfirmation): Promise<boolean>;
capturePermissionRequest(sessionId: string, taskId: string): Promise<TaskActionTarget | null>;
captureRoutine(botId: string, id: string): Promise<TaskActionRoutineSnapshot | undefined>;
+ getScheduleDefinition(id: string): Promise<TaskActionScheduleDefinition | null>;
}): ToolCallAuthorizer {
return isolateTaskActionAuthorizer(async (call) => {
// Per invocation: a concurrent automatic call must never inherit owner evidence.
@@ -222,6 +224,14 @@ export function createDesktopTaskActionAuthorizer(deps: {
const routine = principal === 'autonomous' && runtimePermissionApplies &&
call.tool === 'routine_save' && args.enabled === true && routineBotId && routineId
? await deps.captureRoutine(routineBotId, routineId) : undefined;
+ // Read saved commands for execution/partial updates; the card must show
+ // what a bare schedule ID will run, and a changed definition expires it.
+ const scheduleId = principal === 'autonomous' && runtimePermissionApplies &&
+ call.server === 'cindy_scheduler' && (!args.device || args.device === 'local') &&
+ ['schedule_update', 'schedule_run_now'].includes(call.tool) && typeof args.id === 'string'
+ ? args.id : undefined;
+ const schedule = scheduleId ? await deps.getScheduleDefinition(scheduleId) : undefined;
+ const scheduleSignature = JSON.stringify(schedule);
const readDelegation = async (rechecking = false) => {
if (
!taskId ||
@@ -351,17 +361,20 @@ export function createDesktopTaskActionAuthorizer(deps: {
if (fingerprint !== taskActionFingerprint(call))
throw new Error('TASK_ACTION_AUTHORIZATION_EXPIRED');
await assertDeliveryCurrent();
+ if (scheduleId && JSON.stringify(await deps.getScheduleDefinition(scheduleId)) !== scheduleSignature)
+ throw new Error('TASK_ACTION_AUTHORIZATION_EXPIRED');
assertCurrentSync();
},
};
// Missing owner provenance no longer disables ordinary work. Only explicit
// risks on autonomous turns need an exact, visible owner decision. The decision
// does not change the principal or grant future calls; admission stays single-use.
- const risk = principal === 'autonomous' ? taskActionRisk(call, { routineEnabled: routine?.enabled }) : undefined;
+ const risk = principal === 'autonomous' ? taskActionRisk(call, { routineEnabled: routine?.enabled, schedule }) : undefined;
if (risk && runtimePermissionApplies) {
await scope.assertCurrent();
const confirmed = await deps.confirm(sessionId, call.tool, structuredClone(call.args),
- { server: call.server, risk, ...(permissionTarget ? { details: permissionTarget.details } : {}) });
+ { server: call.server, risk, ...(permissionTarget ? { details: permissionTarget.details }
+ : risk === 'command' && schedule ? { details: { schedule } } : {}) });
if (!confirmed) {
rejectedDecision = { ok: false, errorCode: 'USER_CANCELLED',
message: 'The action was not approved. Do not execute or retry it without a new request.' };
diff --git a/apps/desktop/src/main/mcp-integrations/mcp-providers.ts b/apps/desktop/src/main/mcp-integrations/mcp-providers.ts
index c7c0f26097..be40f7fe3a 100644
--- a/apps/desktop/src/main/mcp-integrations/mcp-providers.ts
+++ b/apps/desktop/src/main/mcp-integrations/mcp-providers.ts
@@ -315,6 +315,12 @@ export function createDesktopMcpProviders(deps: DesktopMcpProvidersDeps): LiziMc
authorizeAction: createDesktopTaskActionAuthorizer({
input: getTaskActionInputState, getSession: getTaskActionSession, confirm: confirmTaskAction,
capturePermissionRequest: captureTaskActionPermissionRequest,
+ getScheduleDefinition: async id => {
+ const schedule = await getScheduler().get(id);
+ if (!schedule) return null;
+ const { name, executionMode, scriptConfig, preRunHook, workingDir, targetSessionId } = schedule;
+ return { id, name, executionMode, scriptConfig, preRunHook, workingDir, targetSessionId };
+ },
captureRoutine: async (botId, id) => {
const engine = await getRoutineEngine();
const routine = (await routineTools.list(botId)).find(row => row.id === id);
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index 82e4aa0ef3..b92bc4a920 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -115,7 +115,8 @@
"once": "Review the target, action and full content below. Allow applies to this action once.",
"remove": "This deletes automation. Review the target; approval applies only once.",
"permission": "This answers a permission request in another task on your behalf. Review the action; approval applies only once.",
- "resume": "This resumes paused execution. Review the target; approval applies only once."
+ "resume": "This resumes paused execution. Review the target; approval applies only once.",
+ "command": "This saves or runs a command on your computer outside the agent’s tool approval. Review the command and working folder; approval applies only once."
},
"logSupport": {
"title": "Logs and Feedback",
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 240ffad7b5..7b161faad5 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -115,7 +115,8 @@
"once": "以下の対象、操作、全文を確認してください。許可は今回の操作にのみ適用されます。",
"remove": "自動化を削除します。対象を確認してください。許可は今回のみ有効です。",
"permission": "別のタスクの権限リクエストに、あなたに代わって回答します。操作を確認してください。許可は今回のみ有効です。",
- "resume": "一時停止中の実行を再開します。対象を確認してください。許可は今回のみ有効です。"
+ "resume": "一時停止中の実行を再開します。対象を確認してください。許可は今回のみ有効です。",
+ "command": "エージェントのツール承認を経ずに、コンピューター上でコマンドを保存または実行します。コマンドと作業フォルダーを確認してください。許可は今回のみ有効です。"
},
"logSupport": {
"title": "ログとフィードバック",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 75a4a37194..eb305ae1ff 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -115,7 +115,8 @@
"once": "아래 대상, 작업과 전체 내용을 확인하세요. 허용은 이번 작업에 한 번만 적용됩니다.",
"remove": "자동화를 삭제합니다. 대상을 확인하세요. 허용은 이번 작업에만 적용됩니다.",
"permission": "다른 작업의 권한 요청에 사용자를 대신해 답합니다. 내용을 확인하세요. 허용은 이번 작업에만 적용됩니다.",
- "resume": "일시 중지된 실행을 재개합니다. 대상을 확인하세요. 허용은 이번 작업에만 적용됩니다."
+ "resume": "일시 중지된 실행을 재개합니다. 대상을 확인하세요. 허용은 이번 작업에만 적용됩니다.",
+ "command": "에이전트의 도구 승인 없이 컴퓨터에서 명령을 저장하거나 실행합니다. 명령과 작업 폴더를 확인하세요. 승인은 이번 한 번만 적용됩니다."
},
"logSupport": {
"title": "로그 및 피드백",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index aace0dabf2..17ab760e60 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -115,7 +115,8 @@
"once": "请核对下面的目标、动作和完整内容。允许仅对本次操作生效。",
"remove": "这会删除自动化。请核对目标,仅允许这一次。",
"permission": "这会代你回答另一个任务的授权请求。请核对操作,仅允许这一次。",
- "resume": "这会恢复已暂停的执行。请核对目标,仅允许这一次。"
+ "resume": "这会恢复已暂停的执行。请核对目标,仅允许这一次。",
+ "command": "这会在电脑上保存或运行命令,执行时不经过 Agent 的工具审批。请核对命令和工作目录,仅允许这一次。"
},
"logSupport": {
"title": "日志与反馈",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
index 7efe16e087..bdc2c07ec6 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
@@ -115,7 +115,8 @@
"once": "請核對下方的目標、動作與完整內容。允許僅對本次操作生效。",
"remove": "這會刪除自動化。請核對目標,僅允許這一次。",
"permission": "這會代你回答另一個任務的授權請求。請核對操作,僅允許這一次。",
- "resume": "這會恢復已暫停的執行。請核對目標,僅允許這一次。"
+ "resume": "這會恢復已暫停的執行。請核對目標,僅允許這一次。",
+ "command": "這會在電腦上儲存或執行命令,執行時不經過 Agent 的工具審批。請核對命令與工作目錄,僅允許這一次。"
},
"logSupport": {
"title": "日誌與回饋",
diff --git a/docs/product-rules/agent-user-parity.md b/docs/product-rules/agent-user-parity.md
index f5c6d91b14..80316a5f9d 100644
--- a/docs/product-rules/agent-user-parity.md
+++ b/docs/product-rules/agent-user-parity.md
@@ -134,7 +134,7 @@ Ask 或审核要求确认时复用现有确认入口;Plan 不允许副作用
不得借定时工作扩大原授权范围。
2026-10-29 修订:伙伴的来源记录与访问权限、操作风险分开。移除自主工具白名单与
例行任务的静默 `NEEDS_OWNER_REQUEST`;普通操作沿用任务权限,仅对自主删除自动化、
-代答授权、恢复暂停等明确风险显示可操作的一次性授权请求与等待状态。
+代答授权、恢复暂停、本机调度命令等明确风险显示可操作的一次性授权请求与等待状态。
确认、拒绝与取消共用桌面/手机原交互通道。见 [伙伴操作权限](teammate-authority.md)。
2026-10-22 修订:伙伴、转入消息与定时跟进的任务操作
统一沿用普通任务权限流程:Full Access 免审、Auto 使用原有自动审核、Ask 使用原有确认。
diff --git a/docs/product-rules/cindy-bots-runtime.md b/docs/product-rules/cindy-bots-runtime.md
index 1df67b12c4..ff789152cd 100644
--- a/docs/product-rules/cindy-bots-runtime.md
+++ b/docs/product-rules/cindy-bots-runtime.md
@@ -961,7 +961,7 @@ Host 在直接工具和渐进调用共用的执行入口核验身份与执行范
2026-10-22 修订:所有实时执行权限档覆盖伙伴任务操作;Full Access 免审、Auto 使用原有自动审核、
Ask 使用原有确认,不再因转入、自动唤醒或主人输入标记缺失追加行动同意判定。
2026-10-29 修订:删除自主工具白名单与静默拒绝。来源只决定原话归属,普通工作沿用现有权限。
-自主删除自动化、代答授权、恢复暂停进入普通授权交互,等待状态与操作卡在桌面、手机可见,
+自主删除自动化、代答授权、恢复暂停及本机调度命令进入普通授权交互,等待状态与操作卡在桌面、手机可见,
同意后继续当前调用,拒绝后停止;正本见 [伙伴操作权限](teammate-authority.md)。
helper 与 Orca 的写操作均使用同一逐次审批策略;Orca 的只读操作仍沿用可信查询策略。
权限只读运行中任务的稳定状态;从 Host 接收调用并捕获快照起,权限切换、计划模式、实例变化
diff --git a/docs/product-rules/teammate-authority.md b/docs/product-rules/teammate-authority.md
index b7ca051cd0..f54b066429 100644
--- a/docs/product-rules/teammate-authority.md
+++ b/docs/product-rules/teammate-authority.md
@@ -19,6 +19,7 @@
| 风险 | 实际入口 |
| --- | --- |
+| 本机调度命令 | `schedule_create` / `schedule_update` 保存脚本执行或命令前置检查、`schedule_run_now` 执行含此类命令的已存定义、`schedule_set_pre_run_hook` 安装并自测脚本 |
| 删除自动化 | `routine_delete`、`schedule_delete` |
| 代用户回答权限请求 | `message_session_task` 携带 `decision` |
| 恢复暂停执行 | `message_session_task(mode=resume)`、`schedule_resume`,以及 `routine_save` 将已有停用规则保存为启用(含内置规则) |
@@ -26,6 +27,8 @@
其余操作不命中风险表就继续现有权限流程。新增普通工具不需要另开“自主解锁”例外。
主人输入、已核实的主人转达和受托指令沿正常权限审核,不再加第二张行动确认卡。
风险表不是平台权限、账号访问或消息来源认证的替代品。
+本机调度的脚本及前置检查由宿主直接执行,不经过 Agent 的 Bash 审批;自主调用须展示命令、工作目录及准确动作,由主人决定。普通提示词自动化、提醒与只读工具不追加此类确认。
+按 ID 执行或修改时,卡片展示已存命令定义;确认期间定义变化使旧许可失效。跨电脑调度仍沿已有逐次任务权限流程。
保存新规则、编辑已启用规则和继续保存为停用不追加恢复确认;以宿主读取的现有状态判断,
不把全部保存操作升级成风险。恢复许可同时绑定规则版本,确认期间修改规则会使旧许可失效。
diff --git a/packages/lizi-mcps/src/xdt-helper/bot_capabilities.ts b/packages/lizi-mcps/src/xdt-helper/bot_capabilities.ts
index 96202e3ce3..69adcd0602 100644
--- a/packages/lizi-mcps/src/xdt-helper/bot_capabilities.ts
+++ b/packages/lizi-mcps/src/xdt-helper/bot_capabilities.ts
@@ -77,7 +77,7 @@ export const TEAMMATE_CONTROL_GUIDANCE = [
'For project work, set working_dir to the actual project and use_worktree=true for isolation before starting. check_session_task returns the registered directory. Shell cd/worktree creation does not relocate a Session. timeout_ms defaults to 30 minutes and supports up to 24 hours at creation; terminal follow-up inherits the original budget. Do not claim an existing deadline was extended without a verified host response.',
'message_session_task returns queued_message_id for queued or steered input. check_session_task exposes only your own queue; optionally query queued_message_id for queued/consuming/dispatched/not-found/unavailable; queue restore errors preserve task results and cannot prove a message is missing. Dispatched means accepted into host history, not proof of model action. Use mode=edit with message or mode=withdraw for your own unconsumed item; consuming input cannot be edited or withdrawn.',
'Control your own background tasks with `message_session_task` (mode=queue by default, mode=steer for same-turn input, mode=resume for a reversible pause) and `stop_session_task` (mode=cancel by default, request-stop for a graceful stop request, pause to hold execution and queued input). General control tools are not part of the teammate toolset. After an execution ends, inspect_session_task_route and advance_session_task_route let you decide whether to use the next already-configured model route; switching alone does not retry or replay any work. A successful queue receipt is not a steer, and pausing/requested/unconfirmed is not proof the engine stopped. Check the returned control state; unsupported engines fail explicitly. Pause preserves the same task and Session, holds timers and automatic input, and resumes without replaying completed work. If paused, resume without a message before answering a pending interaction. Only tasks owned by your teammate are controllable.',
- 'Ordinary task operations and routine updates use the current task permissions, including autonomous and scheduled turns. Missing owner-input provenance is not an owner refusal. On autonomous turns the host asks for an exact, one-time decision only for explicit risks: deleting automation, answering permissions, and resuming paused execution. The pending permission is visible; approval continues that invocation, while rejection or cancellation stops it. Do not retry through another tool. Source identity and account access remain separate checks; automation and other speakers never become verified owner words. Relay only necessary background alongside the host-verified request, without inventing authorization. Inspect get_task_digest before intervening; a long-running, paused or already recovered task does not need automatic nudges.',
+ 'Ordinary task operations and routine updates use the current task permissions, including autonomous and scheduled turns. Missing owner-input provenance is not an owner refusal. On autonomous turns the host asks for an exact, one-time decision only for explicit risks: deleting automation, answering permissions, resuming paused execution, and local scheduler commands that run outside agent tool approval. The pending permission is visible; approval continues that invocation, while rejection or cancellation stops it. Do not retry through another tool. Source identity and account access remain separate checks; automation and other speakers never become verified owner words. Relay only necessary background alongside the host-verified request, without inventing authorization. Inspect get_task_digest before intervening; a long-running, paused or already recovered task does not need automatic nudges.',
'Use `get_capabilities` for application features, and `get_capabilities` with scope `help` for where things are in the UI and how to use them. It describes the product, not a permission grant or proof that every feature is available here. Use the matching live tool to act, and verify its result before claiming success.',
].join('\n');