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(bots): settle queued Todo receipts and project safe records

zqchris74dc0ae960b7
diff --git a/apps/desktop/src/main/localDb/ipc/__tests__/botRemoteResourceTodos.test.ts b/apps/desktop/src/main/localDb/ipc/__tests__/botRemoteResourceTodos.test.ts
index 12f0669171..7f69473c60 100644
--- a/apps/desktop/src/main/localDb/ipc/__tests__/botRemoteResourceTodos.test.ts
+++ b/apps/desktop/src/main/localDb/ipc/__tests__/botRemoteResourceTodos.test.ts
@@ -139,3 +139,22 @@ it('bounds text fallback independently of legitimate long-page data', async () =
expect(resource.blocks?.[0].fallbackMarkdown.length).toBeLessThanOrEqual(8000);
expect((resource.blocks?.[0].data as { items: unknown[] }).items).toHaveLength(25);
});
+
+it('projects host-only paths and metadata out of both reads and update responses while keeping the host record', async () => {
+ const access = await env.access();
+ const todo = await access.patch({ key: '/host/private/project:bug', title: '反馈', outcome: '验收',
+ sources: [{ kind: 'github', id: '/host/private/project:issue', project: '/host/private/project', label: 'Issue', ref: 'https://example.com/issue' }],
+ associations: [{ kind: 'pr', id: '/host/private/project:pr', label: 'PR' }],
+ next: { kind: 'advance', label: '继续', instruction: 'Read /host/private/project' } });
+ const resource = await remoteResourceRegistry.get(context, { client, ref });
+ expect(JSON.stringify(resource)).not.toContain('/host/private');
+ const items = (resource.blocks?.[0].data as { items: Array<{ id: string; sources: Array<{ project?: string; ref?: string }> }> }).items;
+ expect(items[0].id).toBe(todo.id);
+ expect(items[0].sources[0].project).toBeUndefined();
+ expect(items[0].sources[0].ref).toBe('https://example.com/issue');
+ const updated = await remoteResourceRegistry.invoke(context, { client, collectionId: 'teammates', resourceRef: ref,
+ actionId: 'todo-update', input: { id: todo.id, expectedRevision: todo.revision, progress: '手机修改' } });
+ expect(JSON.stringify(updated)).not.toContain('/host/private');
+ expect((await access.list()).items[0].sources[0].project).toBe('/host/private/project');
+ expect((await access.list()).items[0].next.instruction).toBe('Read /host/private/project');
+});
diff --git a/apps/desktop/src/main/localDb/ipc/botRemoteResourceProvider.ts b/apps/desktop/src/main/localDb/ipc/botRemoteResourceProvider.ts
index bc96e904fc..98732b117e 100644
--- a/apps/desktop/src/main/localDb/ipc/botRemoteResourceProvider.ts
+++ b/apps/desktop/src/main/localDb/ipc/botRemoteResourceProvider.ts
@@ -1,4 +1,5 @@
import { createHash } from 'node:crypto';
+import { botTodoRemoteProjection } from './botTodoRemoteProjection.js';
import { todoAccess } from '../../maker-ipc/botTodoAccess.js';
import { queryTodoItems, type TodoListQuery, type TodoPatch } from '@cindy/maker-shared/teammate-todo';
import { and, desc, inArray, isNull } from 'drizzle-orm';
@@ -98,6 +99,7 @@ export function registerBotRemoteResourceProvider(management?: typeof botRemoteM
const all = await (await todoAccess(botId)).list();
if (!isDataOwnerBroadcastScopeCurrent(scope)) throw new RemoteResourceRegistryError('NOT_FOUND', 'Account changed');
const page = queryTodoItems(all.items, request.query ? JSON.parse(request.query) as TodoListQuery : {});
+ page.items = page.items.map(botTodoRemoteProjection);
return {ref:request.ref,revision:createHash('sha256').update(JSON.stringify(all.items)).digest('hex'),display:{title:source.name},links:[],
blocks:[{id:'todos',primitive:'teammate-todos',fallbackMarkdown:page.items.map(t=>t.title+' — '+t.progress).join('\n').slice(0,8000),data:page}]};
}
@@ -157,7 +159,7 @@ export function registerBotRemoteResourceProvider(management?: typeof botRemoteM
const input = request.input ?? {};
const result = request.actionId === 'todo-update' ? await access.patch(input as TodoPatch) : await access.act(input.id as string,input.revision as number,input.requestId as string,request.client.locale);
if (!isDataOwnerBroadcastScopeCurrent(scope)) throw new RemoteResourceRegistryError('NOT_FOUND', 'Account changed');
- return {effects:[],todo:result};
+ return {effects:[],todo:result ? botTodoRemoteProjection(result) : null};
}
if (management && request.actionId === 'open-agent-import' && request.resourceRef?.id === 'create') return {
diff --git a/apps/desktop/src/main/localDb/ipc/botTodoRemoteProjection.ts b/apps/desktop/src/main/localDb/ipc/botTodoRemoteProjection.ts
new file mode 100644
index 0000000000..aff1d796aa
--- /dev/null
+++ b/apps/desktop/src/main/localDb/ipc/botTodoRemoteProjection.ts
@@ -0,0 +1,32 @@
+import { createHash } from 'node:crypto';
+import type { TeammateTodo, TodoDeadline } from '@cindy/maker-shared/teammate-todo';
+
+const opaque = (id: string) => createHash('sha256').update(id).digest('hex');
+const publicRef = (ref?: string) => ref?.startsWith('https://') ? { ref } : {};
+const deadline = (value: TodoDeadline | null): TodoDeadline | null =>
+ value ? { ...value, ...(value.sourceId ? { sourceId: opaque(value.sourceId) } : {}) } : null;
+
+/** User-visible resource fields only; never send host paths, dedupe keys or model instructions. */
+export function botTodoRemoteProjection(t: TeammateTodo): TeammateTodo {
+ return {
+ id: t.id, revision: t.revision, key: t.id,
+ origin: t.origin, title: t.title, progress: t.progress, outcome: t.outcome, value: t.value,
+ next: t.next ? { label: t.next.label, kind: t.next.kind, instruction: '' } : null,
+ sources: t.sources.map(s => ({
+ kind: s.kind, id: opaque(s.id), label: s.label, ...publicRef(s.ref),
+ ...(s.version !== undefined ? { version: s.version } : {}),
+ ...(s.observedAt ? { observedAt: s.observedAt } : {}),
+ })),
+ associations: t.associations.map(a => ({ kind: a.kind, id: opaque(a.id), label: a.label })),
+ status: t.status, createdAt: t.createdAt, updatedAt: t.updatedAt,
+ sourceDeadline: deadline(t.sourceDeadline),
+ ...(t.deadlineOverride ? { deadlineOverride: { value: deadline(t.deadlineOverride.value) } } : {}),
+ deadlineCandidate: t.deadlineCandidate
+ ? { value: deadline(t.deadlineCandidate.value)!, reason: t.deadlineCandidate.reason } : null,
+ suggestedDate: t.suggestedDate, decision: t.decision,
+ history: t.history.map(h => ({ summary: h.summary, at: h.at, ...publicRef(h.ref) })),
+ action: t.action ? { requestId: t.action.requestId, revision: t.action.revision, state: t.action.state } : null,
+ // A presentation marker localizes the legacy Continue label without forwarding its host ID.
+ ...(t.legacyId ? { legacyId: 'legacy' } : {}),
+ };
+}
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/botTodoAccess.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/botTodoAccess.test.ts
index b116165cc8..6e148ec586 100644
--- a/apps/desktop/src/main/maker-ipc/__tests__/botTodoAccess.test.ts
+++ b/apps/desktop/src/main/maker-ipc/__tests__/botTodoAccess.test.ts
@@ -48,6 +48,7 @@ vi.mock('../botWorkbenchTools.js', () => ({
: { ok: false, errorCode: 'NOT_A_BOT_SESSION' },
}));
import { configureBotTodoDispatch, todoAccess, todoForCaller } from '../botTodoAccess';
+import { createBotTodoDispatch } from '../botTodoDispatch';
let root = '';
beforeEach(async () => {
root = await mkdtemp(path.join(os.tmpdir(), 'todo-owner-'));
@@ -138,6 +139,36 @@ describe('Todo public access', () => {
await access.act(todo.id, todo.revision, 'request-retry');
expect(send).toHaveBeenCalledOnce();
});
+ it('keeps queued receipt distinct from dispatch, retries discarded input and ignores duplicate or stale receipts', async () => {
+ const send = vi.fn(async () => ({ ok: true, queued: true }));
+ const bridge = createBotTodoDispatch(send);
+ configureBotTodoDispatch(bridge.dispatch);
+ const access = await todoAccess('bot-one'), todo = await access.patch(patch);
+ const queued = await access.act(todo.id, todo.revision, 'queued-one');
+ expect(queued?.action?.state).toBe('received');
+ await bridge.settle('different-session', 'queued-one', false);
+ expect((await access.list()).items[0].action?.state).toBe('received');
+ await bridge.settle('canonical-one', 'queued-one', false);
+ expect((await access.list()).items[0].action?.state).toBe('failed');
+ await access.act(todo.id, todo.revision, 'queued-two');
+ await bridge.settle('canonical-one', 'queued-one', true);
+ expect((await access.list()).items[0].action?.state).toBe('received');
+ await bridge.settle('canonical-one', 'queued-two', true);
+ await bridge.settle('canonical-one', 'queued-two', false);
+ expect((await access.list()).items[0].action?.state).toBe('accepted');
+ expect((await access.list()).items[0].status).toBe('open');
+ expect(send).toHaveBeenCalledTimes(2);
+ });
+ it('rejects an old-owner queue receipt without writing to either account', async () => {
+ const bridge = createBotTodoDispatch(async () => ({ ok: true, queued: true }));
+ configureBotTodoDispatch(bridge.dispatch);
+ const access = await todoAccess('bot-one'), todo = await access.patch(patch);
+ await access.act(todo.id, todo.revision, 'old-owner');
+ env.owner = 'owner-two';
+ await expect(bridge.settle('canonical-one', 'old-owner', false)).rejects.toMatchObject({ code: 'OWNER_SCOPE_CHANGED' });
+ env.owner = 'owner-one';
+ expect((await access.list()).items[0].action?.state).toBe('received');
+ });
});
it('successful no-action acknowledgement advances only its source cursor without requiring a Todo', async () => {
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/botTodoStore.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/botTodoStore.test.ts
index 4816671fda..2cbd7046d9 100644
--- a/apps/desktop/src/main/maker-ipc/__tests__/botTodoStore.test.ts
+++ b/apps/desktop/src/main/maker-ipc/__tests__/botTodoStore.test.ts
@@ -277,6 +277,9 @@ it('rejects valid JSON with corrupt or overlong text without rewriting the file'
{ outcome: [] },
{ title: 'x'.repeat(301) },
{ progress: 'x'.repeat(4001) },
+ { deadlineCandidate: { value: { kind: 'date', date: '2026-10-13', timeZone: 'Asia/Shanghai' }, reason: {} } },
+ { deadlineCandidate: { value: { kind: 'date', date: '2026-10-13', timeZone: 'Asia/Shanghai' }, reason: 'x'.repeat(2001) } },
+ { deadlineCandidate: { value: { kind: 'date', date: '2026-10-13', timeZone: 'Asia/Shanghai' }, reason: ' ' } },
]) {
const corrupt = structuredClone(clean);
Object.assign(corrupt.items[0], fields);
diff --git a/apps/desktop/src/main/maker-ipc/botTodoAccess.ts b/apps/desktop/src/main/maker-ipc/botTodoAccess.ts
index 485d741494..c7aea05cb6 100644
--- a/apps/desktop/src/main/maker-ipc/botTodoAccess.ts
+++ b/apps/desktop/src/main/maker-ipc/botTodoAccess.ts
@@ -34,13 +34,16 @@ export interface BotTodoAccess {
locale?: string,
): Promise<TeammateTodo | null>;
}
-type Dispatch = (p: {
+export type TodoDispatchResult = { ok: boolean; queued?: boolean; error?: string };
+export type TodoDispatchInput = {
sessionId: string;
message: string;
displayText: string;
requestId: string;
assertCurrent: () => void;
-}) => Promise<{ ok: boolean; error?: string }>;
+ onSettled: (result: { ok: boolean; error?: string }) => Promise<void>;
+};
+type Dispatch = (p: TodoDispatchInput) => Promise<TodoDispatchResult>;
let dispatch: Dispatch | null = null;
export function configureBotTodoDispatch(value: Dispatch) {
dispatch = value;
@@ -126,7 +129,15 @@ export async function todoAccess(botId: string): Promise<BotTodoAccess> {
'Advance only this agreed next step under existing permissions. Read the same Todo, preserve sources, and update it after a real receipt. Recording or reading external messages does not authorize sending, spending or broader access.',
}),
assertCurrent,
+ onSettled: async (result) => {
+ assertCurrent();
+ await store.settleAction(id, requestId, result);
+ changed();
+ },
});
+ // Enqueue success is only receipt. Coordinator dispatch/discard settles it later.
+ if (result.ok && result.queued)
+ return (await store.read()).items.find((item) => item.id === id) ?? null;
const settled = await store.settleAction(id, requestId, result);
changed();
return settled;
diff --git a/apps/desktop/src/main/maker-ipc/botTodoDispatch.ts b/apps/desktop/src/main/maker-ipc/botTodoDispatch.ts
new file mode 100644
index 0000000000..5b9a7c3b1a
--- /dev/null
+++ b/apps/desktop/src/main/maker-ipc/botTodoDispatch.ts
@@ -0,0 +1,31 @@
+import type { TodoDispatchInput, TodoDispatchResult } from './botTodoAccess.js';
+
+/** Consume the existing coordinator's dispatch/discard receipts; enqueue is not dispatch. */
+export function createBotTodoDispatch(
+ send: (input: TodoDispatchInput) => Promise<TodoDispatchResult>,
+) {
+ const pending = new Map<string, TodoDispatchInput>();
+ const key = (sessionId: string, requestId: string) => sessionId + '\0' + requestId;
+ return {
+ async dispatch(input: TodoDispatchInput): Promise<TodoDispatchResult> {
+ const id = key(input.sessionId, input.requestId);
+ pending.set(id, input);
+ try {
+ const result = await send(input);
+ if (!result.ok || !result.queued) pending.delete(id);
+ return result;
+ } catch (error) {
+ pending.delete(id);
+ throw error;
+ }
+ },
+ async settle(sessionId: string, requestId: string, dispatched: boolean): Promise<void> {
+ const id = key(sessionId, requestId);
+ const input = pending.get(id);
+ if (!input || input.sessionId !== sessionId) return;
+ pending.delete(id);
+ input.assertCurrent();
+ await input.onSettled({ ok: dispatched, ...(!dispatched ? { error: 'CANCELLED' } : {}) });
+ },
+ };
+}
diff --git a/apps/desktop/src/main/maker-ipc/botTodoStore.ts b/apps/desktop/src/main/maker-ipc/botTodoStore.ts
index 22efd25793..7b4efea57b 100644
--- a/apps/desktop/src/main/maker-ipc/botTodoStore.ts
+++ b/apps/desktop/src/main/maker-ipc/botTodoStore.ts
@@ -208,7 +208,14 @@ export function createBotTodoStore(
try {
validateTodoDeadline(t.sourceDeadline);
if (t.deadlineOverride) validateTodoDeadline(t.deadlineOverride.value);
- if (t.deadlineCandidate) validateTodoDeadline(t.deadlineCandidate.value);
+ if (t.deadlineCandidate) {
+ validateTodoDeadline(t.deadlineCandidate.value);
+ if (
+ typeof t.deadlineCandidate.reason !== 'string' ||
+ !t.deadlineCandidate.reason.trim() ||
+ t.deadlineCandidate.reason.length > 2000
+ ) throw new TodoError('CORRUPT_STORE');
+ }
} catch {
throw new TodoError('CORRUPT_STORE');
}
diff --git a/apps/desktop/src/main/maker-ipc/register.ts b/apps/desktop/src/main/maker-ipc/register.ts
index 0889e142fe..96aa2ae63e 100644
--- a/apps/desktop/src/main/maker-ipc/register.ts
+++ b/apps/desktop/src/main/maker-ipc/register.ts
@@ -1,4 +1,5 @@
import { configureBotTodoDispatch } from './botTodoAccess.js';
+import { createBotTodoDispatch } from './botTodoDispatch.js';
import { assertBotTaskCoordination, classifySessionMessagePurpose, coordinationInput } from './botTaskCoordination.js';
import type { BotTaskCoordination, SessionMessagePurpose } from '../../shared/botTaskCoordination.js';
import { openSession, setSessionOpeningModelAdmission } from '../localDb/sessionOpening.js';
@@ -9889,12 +9890,17 @@ export function registerMakerIpc(maker: Maker, options: RegisterMakerIpcOptions)
}
}
- configureBotTodoDispatch(async ({sessionId,message,displayText,requestId,assertCurrent}) => {
+ const todoDispatch = createBotTodoDispatch(async ({sessionId,message,displayText,requestId,assertCurrent}) => {
assertCurrent();
const result = await sendToSessionInternal({targetSessionId:sessionId,message,persistedContent:displayText,clientId:requestId,onAccepted:assertCurrent,
autoReviewUserText:{kind:'delegated-continuation'}});
- assertCurrent();return {ok:result.ok, ...(!result.ok ? {error:result.message} : {})};
+ assertCurrent();return {ok:result.ok, queued:result.ok && result.wakeKind === 'queued', ...(!result.ok ? {error:result.message} : {})};
});
+ configureBotTodoDispatch(todoDispatch.dispatch);
+ const settleTodoDispatch = (sessionId: string, clientId: string, dispatched: boolean) =>
+ todoDispatch.settle(sessionId, clientId, dispatched).catch(() => {
+ log.warn('Todo input receipt could not be saved');
+ });
async function sendToSessionInternal(params: {
botTaskCoordination?: BotTaskCoordination;
@@ -16657,7 +16663,8 @@ export function registerMakerIpc(maker: Maker, options: RegisterMakerIpcOptions)
getLastAssistantTranscriptUuid,
// 插话并入正在运行的 turn,不开启新 turn:排队时登记的「新 turn 接管」回调不再适用,
// 只释放登记(不运行),否则会给已在跑的 worker 另建一份 running/auto-bridge 身份。
- onSteerAccepted: (_sessionId, item) => {
+ onSteerAccepted: async (sessionId, item) => {
+ await settleTodoDispatch(sessionId, item.clientId, true);
orcaInterAgentDispatcher.discardQueuedOrcaInterAgentAcceptedCallback(item.clientId);
},
onAcceptedQueuedMessage: async (sessionId, item, restoredFromSnapshot): Promise<void> => {
@@ -16694,6 +16701,7 @@ export function registerMakerIpc(maker: Maker, options: RegisterMakerIpcOptions)
settleQueuedAttachmentPersistenceFailure(sessionId, item.clientId, opts.retainForRetry);
},
onDispatchedUserTurn: async (sessionId, item, preVendorDispatchAt): Promise<void> => {
+ await settleTodoDispatch(sessionId, item.clientId, true);
botDelegationServiceHolder?.confirmQueuedSessionInputDispatched(sessionId, item.clientId);
welcomeDispatchReceipts.settle(sessionId, item.clientId, true);
const attemptToken = autoResumeAttemptToken(item);
@@ -16835,6 +16843,7 @@ export function registerMakerIpc(maker: Maker, options: RegisterMakerIpcOptions)
},
// 队列项未派发即被丢弃(stop/remove/clearSession) → 释放暂存的 accepted 副作用, 防回调表泄漏。
onDiscardedQueuedMessage: (sessionId, item) => {
+ void settleTodoDispatch(sessionId, item.clientId, false);
notePluginTaskLifecycle(service => service.discard(sessionId, item, 'cancelled'));
if (item.durableDelivery === true) {
void saveCancelledInputDelivery(sessionId, item.clientId).catch((error) => {
diff --git a/apps/desktop/src/renderer/features/bots/BotTodoList.tsx b/apps/desktop/src/renderer/features/bots/BotTodoList.tsx
index dd2ff9bada..e91293b9da 100644
--- a/apps/desktop/src/renderer/features/bots/BotTodoList.tsx
+++ b/apps/desktop/src/renderer/features/bots/BotTodoList.tsx
@@ -88,7 +88,7 @@ export function TodoPanel({ transport, botId }: { transport: TodoTransport; botI
const scope = useRef(getDataOwnerGeneration()),
epoch = useRef(0),
mounted = useRef(true),
- initialOrder = useRef<string[]>([]),
+ initialOrder = useRef(new Map<string, number>()),
api = useRef(transport);
api.current = transport;
const current = () => mounted.current && isDataOwnerGenerationCurrent(scope.current);
@@ -108,12 +108,10 @@ export function TodoPanel({ transport, botId }: { transport: TodoTransport; botI
const data = await api.current.list();
if (!current() || request !== epoch.current) return;
setItems(data.items);
- initialOrder.current = [
- ...initialOrder.current,
- ...sorted(data.items, 'dueOrder')
- .map((x) => x.id)
- .filter((id) => !initialOrder.current.includes(id)),
- ];
+ for (const x of sorted(data.items, 'dueOrder')) {
+ if (!initialOrder.current.has(x.id))
+ initialOrder.current.set(x.id, initialOrder.current.size);
+ }
setError('');
} catch {
if (current()) setError('error');
@@ -146,11 +144,11 @@ export function TodoPanel({ transport, botId }: { transport: TodoTransport; botI
const rows = items
.filter((x) => (view === 'hidden' ? !todoVisible(x) : x.status === 'open' && todoVisible(x)))
.filter(matches)
- .sort((a, b) => initialOrder.current.indexOf(a.id) - initialOrder.current.indexOf(b.id));
+ .sort((a, b) => (initialOrder.current.get(a.id) ?? 0) - (initialOrder.current.get(b.id) ?? 0));
const completed = items
.filter((x) => x.status === 'done' && todoVisible(x))
.filter(matches)
- .sort((a, b) => initialOrder.current.indexOf(a.id) - initialOrder.current.indexOf(b.id));
+ .sort((a, b) => (initialOrder.current.get(a.id) ?? 0) - (initialOrder.current.get(b.id) ?? 0));
const visibleDonePage = Math.min(donePage, Math.max(0, Math.ceil(completed.length / 25) - 1));
const visiblePage = Math.min(page, Math.max(0, Math.ceil(rows.length / 25) - 1));
const run = async (fn: () => Promise<unknown>, close = false) => {
@@ -510,7 +508,7 @@ export function TodoPanel({ transport, botId }: { transport: TodoTransport; botI
value={order}
onChange={(e) => {
setOrder(e.target.value);
- initialOrder.current = sorted(items, e.target.value).map((x) => x.id);
+ initialOrder.current = new Map(sorted(items, e.target.value).map((x, rank) => [x.id, rank]));
setPage(0);
setDonePage(0);
}}
diff --git a/apps/mobile/src/session/CompanionTodos.tsx b/apps/mobile/src/session/CompanionTodos.tsx
index 5b93801f30..879deddbce 100644
--- a/apps/mobile/src/session/CompanionTodos.tsx
+++ b/apps/mobile/src/session/CompanionTodos.tsx
@@ -492,7 +492,7 @@ function CompanionTodosContent({ visible, onClose, deviceId, deviceName, botId,
{info('progress', detail.progress)}
{info('outcome', detail.outcome)}
{info('value', detail.value)}
- {info('next', detail.next?.instruction)}
+ {info('next', detail.next?.label)}
{detail.next &&
detail.next.kind !== 'view' &&
(!detail.action || detail.action.state === 'failed') &&
@@ -530,7 +530,7 @@ function CompanionTodosContent({ visible, onClose, deviceId, deviceName, botId,
{!!detail.associations.length &&
info(
'associations',
- detail.associations.map((a) => a.label + ' · ' + a.id).join('\n'),
+ detail.associations.map((a) => a.label).join('\n'),
)}
{detail.history.map((h, n) => (
<View key={n}>
diff --git a/docs/product-rules/cindy-bots-runtime.md b/docs/product-rules/cindy-bots-runtime.md
index 55db2d7b79..b7546b08ee 100644
--- a/docs/product-rules/cindy-bots-runtime.md
+++ b/docs/product-rules/cindy-bots-runtime.md
@@ -465,9 +465,9 @@ Todo 是伙伴维护的事务清单:既包含用户交办,也允许从已授
`list_teammate_todos`、`update_teammate_todo` 是与任务调用并列的伙伴公共能力,调用者由本机在用伙伴主任务反查。更新是部分合并,旧来源/引用默认保留;已有记录必须带修订号,冲突重新读取。完成必须记录依据,重开保留历史。到期支持日期/确切时刻及来源时区,模糊日期先待确认,用户覆盖/清除不被新来源替换;稍后只暂缓呈现,不延长真实期限。删除/不再提示保留同一问题的抑制记录,跨来源去重也遵守它,恢复不影响整个项目或来源。
-桌面右侧工作台与手机版伙伴 Todo 入口共享同一宿主记录。远程通过已有受信 device-link resource get/invoke 路径和账号/可见伙伴边界,不新增广域 IPC 权限。旧客户端有只读文本回退;新客户端专用组件按25条翻页并展示总数,搜索在完整记录中进行;桌面折叠完成区展开后也按25条翻页,不一次挂载全部历史。
+桌面右侧工作台与手机版伙伴 Todo 入口共享同一宿主记录。远程通过已有受信 device-link resource get/invoke 路径和账号/可见伙伴边界,不新增广域 IPC 权限。读取与写入回执只返回可展示的投影,不发送宿主目录、去重键、旧记录内部标识或模型执行指令;来源与关联在手机显示可读名称,来源引用保留 HTTPS 链接。旧客户端有只读文本回退;新客户端专用组件按25条翻页并展示总数,搜索在完整记录中进行;桌面折叠完成区展开后也按25条翻页,不一次挂载全部历史,稳定顺序使用 ID 索引而不在比较器中扫描整个清单。
-具体动作通过既有伙伴输入路径推进,接收/排队与真实开始/完成各自独立;重复请求不重复投递,未知回执不能盲重试。邮件等来源正文不自动授予外发或费用授权,原授权流程仍适用。原普通任务组件、归档和引擎状态不变。
+具体动作通过既有伙伴输入路径推进,接收/排队与真实开始/完成各自独立;入队成功只显示已收到,既有输入协调器确认实际派发或插话后才显示已接受。未派发的排队项被移除、Stop 或清空时,同条 Todo 记录失败并可重试;重复请求不重复投递,未知回执不能盲重试。邮件等来源正文不自动授予外发或费用授权,原授权流程仍适用。原普通任务组件、归档和引擎状态不变。
共用 `teammate-guide` 要求对话变化、任务结果和已授权跟进维护同条;纯进度询问可读取,无变化不写。`preflight_teammate_todo_events` 先按职责、稳定来源游标、同问题 key 与忽略记录做确定性过滤,`record_teammate_todo_event` 原子提交成功处理结果。仅复用实际可用的连接与现有事件/routine;这些接口不提供全邮箱/飞书扫描器,也不新建定时器。失败不推进游标;无唤醒不承诺后台实时运行,预算沿用既有配置,不拍脑袋设固定模型阈值。