@suifei/dsh-ai-team 0.4.145 → 0.4.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -21
- package/README.md +31 -2
- package/client.js +551 -49
- package/cordis.patch.yml +31 -31
- package/icon.svg +12 -12
- package/index.js +105 -25
- package/lib/domain/ids.js +26 -26
- package/lib/domain/inbox.js +93 -93
- package/lib/domain/member-config.js +168 -168
- package/lib/domain/policy.js +8 -1
- package/lib/domain/task.js +2 -0
- package/lib/domain/team-blueprint.js +240 -0
- package/lib/host/decision-report.js +72 -72
- package/lib/host/default-roster.js +18 -0
- package/lib/host/default-workspace.js +69 -69
- package/lib/host/fault-adapter.js +50 -50
- package/lib/host/member-tools.js +6 -1
- package/lib/host/people-view.js +9 -2
- package/lib/host/permission-guard.js +61 -61
- package/lib/host/project-registry.js +104 -104
- package/lib/host/project-runtime.js +2 -2
- package/lib/host/risk-view.js +99 -99
- package/lib/host/service.js +195 -16
- package/lib/host/views.js +42 -1
- package/lib/host/waker.js +38 -8
- package/lib/host/weekly-view.js +86 -86
- package/lib/host/workspace-path.js +94 -94
- package/lib/ledger/checkpoint.js +415 -415
- package/lib/ledger/events.js +398 -398
- package/lib/ledger/fold.js +23 -0
- package/lib/ledger/namespace.js +124 -124
- package/lib/ledger/tools.js +118 -118
- package/lib/ledger/writer.js +1266 -1266
- package/lib/runtime/error-chain.js +31 -31
- package/lib/runtime/shell-guard.js +102 -102
- package/lib/runtime/skill-catalog.js +41 -41
- package/lib/runtime/skill-policy.js +12 -12
- package/lib/runtime/stop-guard.js +17 -2
- package/lib/skillopt/adopt-gate.js +108 -108
- package/lib/skillopt/gate-wiring.js +146 -146
- package/lib/skillopt/jobs.js +135 -135
- package/lib/skillopt/proposal-store.js +33 -33
- package/lib/skillopt/review-runner.js +107 -107
- package/lib/skillopt/rubric.js +189 -189
- package/lib/skillopt/subagent-text.js +101 -101
- package/lib/skillopt/tool-access.js +56 -56
- package/locale/en.json +6 -6
- package/locale/zh.json +6 -6
- package/package.json +1 -1
package/lib/host/service.js
CHANGED
|
@@ -20,15 +20,39 @@ import {
|
|
|
20
20
|
submitTask,
|
|
21
21
|
} from '../domain/task.js';
|
|
22
22
|
import { appendReply, createThread } from '../domain/thread.js';
|
|
23
|
-
import { boardView, quadrantsView, taskCard } from './views.js';
|
|
23
|
+
import { boardView, projectOverview, quadrantsView, taskCard } from './views.js';
|
|
24
24
|
import { applyMemberConfigPatch, normalizeMemberConfig } from '../domain/member-config.js';
|
|
25
25
|
import { parseAvatar } from '../domain/avatar.js';
|
|
26
26
|
import { MEMBER_STATUS, isBoardIdle } from '../ledger/fold.js';
|
|
27
27
|
|
|
28
28
|
const MEMBER_STATUS_VALUES = new Set(Object.values(MEMBER_STATUS));
|
|
29
29
|
import { checkPersonality, isQaMember, unfinishedTasksFor } from '../domain/member-profile.js';
|
|
30
|
-
import {
|
|
30
|
+
import { leadReviewBlocked, reviewPairs } from '../domain/policy.js';
|
|
31
31
|
import { describeAttachments, findMentions, normalizeAttachments, plainMentionLinks } from '../domain/rich-message.js';
|
|
32
|
+
import {
|
|
33
|
+
BLUEPRINT_REWORK_LIMIT, BLUEPRINT_ROLES, BLUEPRINT_SAMPLE_LIMIT, allowsBlueprintAutoAnswer, blocksBlueprintTask,
|
|
34
|
+
blueprintMemberFields, blueprintNumber, blueprintProgress, blueprintText, latestBlueprintTask, planBlueprintAdvance, renderTeamBlueprint,
|
|
35
|
+
} from '../domain/team-blueprint.js';
|
|
36
|
+
|
|
37
|
+
const PMO_ACTOR = Object.freeze({ kind: 'system', memberId: 'mem_pmo' });
|
|
38
|
+
const BLUEPRINT_START_STAGES = ['sample', 'improve', 'rerun'];
|
|
39
|
+
const BLUEPRINT_AGENT_COMMANDS = new Set([
|
|
40
|
+
'stream.post', 'thread.post', 'task.claim', 'task.submit', 'task.accept', 'task.request_changes', 'decision.request',
|
|
41
|
+
]);
|
|
42
|
+
const BLUEPRINT_MANAGED_COMMANDS = new Set([
|
|
43
|
+
'member.add', 'member.leave', 'member.retire', 'member.takeover', 'project.owner.update',
|
|
44
|
+
'task.create', 'task.convert', 'task.assign', 'task.reassign', 'task.release', 'task.reopen', 'task.delete',
|
|
45
|
+
]);
|
|
46
|
+
|
|
47
|
+
function blueprintRunInput(progress, previous, payload) {
|
|
48
|
+
const repeat = progress.repeatsSample;
|
|
49
|
+
return {
|
|
50
|
+
taskId: progress.taskId,
|
|
51
|
+
manualMinutes: repeat ? previous.blueprintRun.manualMinutes : blueprintNumber(payload.manualMinutes, '手工实测分钟数', 0.1, 10_080),
|
|
52
|
+
sample: repeat ? previous.blueprintRun.sample : blueprintText(payload.sample, '样本文字', BLUEPRINT_SAMPLE_LIMIT),
|
|
53
|
+
adjustment: progress.stage === 'improve' || payload.adjustment ? blueprintText(payload.adjustment, '调整说明', 500) : '',
|
|
54
|
+
};
|
|
55
|
+
}
|
|
32
56
|
|
|
33
57
|
/**
|
|
34
58
|
* 主理人只调度交付、不核对产出(用户 2026-11-18):对别人的产出验收或退回都拒绝,并指路给验收人。
|
|
@@ -43,8 +67,8 @@ function memberAvatar(value) {
|
|
|
43
67
|
}
|
|
44
68
|
}
|
|
45
69
|
|
|
46
|
-
function refuseLeadReview(state, reviewer) {
|
|
47
|
-
if (
|
|
70
|
+
function refuseLeadReview(state, reviewer, task) {
|
|
71
|
+
if (!leadReviewBlocked(state, reviewer, task)) return;
|
|
48
72
|
fail(ERRORS.NOT_ELIGIBLE, 'the lead does not review deliverables: only ask the assignee whether it is complete, and leave acceptance to a QA member (or Human)', {
|
|
49
73
|
details: { memberId: reviewer.id, rule: 'lead-delivery-only' },
|
|
50
74
|
});
|
|
@@ -294,6 +318,9 @@ export class TeamService {
|
|
|
294
318
|
const inbox = Object.values(state.inbox ?? {}).filter((item) =>
|
|
295
319
|
(item.memberId === this.humanId())
|
|
296
320
|
&& !isInformationalThreadMention(item));
|
|
321
|
+
const blueprintProject = state.projects?.[selectedProject?.id];
|
|
322
|
+
const progress = blueprintProgress(state, blueprintProject);
|
|
323
|
+
const board = selectedProject === undefined ? null : this.board(selectedProject.id);
|
|
297
324
|
return {
|
|
298
325
|
project: selectedProject ?? null,
|
|
299
326
|
projects,
|
|
@@ -304,7 +331,9 @@ export class TeamService {
|
|
|
304
331
|
thread,
|
|
305
332
|
threads,
|
|
306
333
|
inbox,
|
|
307
|
-
|
|
334
|
+
...(progress ? { blueprint: { ...progress, markdown: renderTeamBlueprint(blueprintProject.blueprint) } } : {}),
|
|
335
|
+
board,
|
|
336
|
+
...(board ? { overview: projectOverview(state, board, this.now()) } : {}),
|
|
308
337
|
quadrants: selectedProject === undefined ? null : this.quadrants(selectedProject.id),
|
|
309
338
|
};
|
|
310
339
|
}
|
|
@@ -318,6 +347,7 @@ export class TeamService {
|
|
|
318
347
|
const humanId = this.humanId();
|
|
319
348
|
if (humanId === null) return 0;
|
|
320
349
|
const projectId = Object.keys(this.state.projects ?? {})[0];
|
|
350
|
+
if (this.state.projects?.[projectId]?.blueprint) return 0;
|
|
321
351
|
// 路径包含性:Thread 正文由 agent 写,正文里的绝对路径不能变成
|
|
322
352
|
// 「读主机任意文件」的通道——只接受项目工作目录内的 .md。
|
|
323
353
|
// 必须按 **realpath** 比较:工作区内的 junction/symlink 指向外部时,
|
|
@@ -448,14 +478,20 @@ export class TeamService {
|
|
|
448
478
|
fail(ERRORS.INVALID_STATE, `agent ${actingMember.name ?? actingMember.id} is retired`);
|
|
449
479
|
}
|
|
450
480
|
}
|
|
481
|
+
this.checkBlueprintCommand(command, payload);
|
|
451
482
|
switch (command.type) {
|
|
452
483
|
case 'project.create': return await this.createProject(command, payload);
|
|
484
|
+
case 'project.blueprint.prepare':
|
|
485
|
+
case 'project.blueprint.recordTime':
|
|
486
|
+
case 'project.blueprint.start':
|
|
487
|
+
case 'project.blueprint.measure':
|
|
488
|
+
case 'project.blueprint.expand': return await this.runExclusive(() => this.advanceBlueprint(command, payload));
|
|
453
489
|
case 'project.owner.update': return await this.changeProjectOwner(command, payload);
|
|
454
490
|
case 'project.workspace.update': return await this.changeProjectWorkspace(command, payload);
|
|
455
491
|
case 'project.repair': return await this.runExclusive(() => this.repairLedger(command));
|
|
456
|
-
case 'project.pmo.update': return await this.setProjectPmo(command, payload);
|
|
457
|
-
case 'project.archive': return await this.setProjectArchive(command, payload);
|
|
458
|
-
case 'project.runState': return await this.setProjectRunState(command, payload);
|
|
492
|
+
case 'project.pmo.update': return await this.runExclusive(() => this.setProjectPmo(command, payload));
|
|
493
|
+
case 'project.archive': return await this.runExclusive(() => this.setProjectArchive(command, payload));
|
|
494
|
+
case 'project.runState': return await this.runExclusive(() => this.setProjectRunState(command, payload));
|
|
459
495
|
case 'project.handoff': return await this.handoffProject(command, payload);
|
|
460
496
|
case 'stream.post': return await this.postStream(command, payload);
|
|
461
497
|
case 'member.add': return await this.addMember(command, payload);
|
|
@@ -512,6 +548,112 @@ export class TeamService {
|
|
|
512
548
|
}
|
|
513
549
|
}
|
|
514
550
|
|
|
551
|
+
checkBlueprintCommand(command, payload) {
|
|
552
|
+
const project = this.state.projects?.[command.projectId];
|
|
553
|
+
if (!project?.blueprint) return;
|
|
554
|
+
const { actor, type } = command;
|
|
555
|
+
if (actor.kind === 'agent') {
|
|
556
|
+
if (project.runState === 'stopped' || project.status === 'archived') fail(ERRORS.INVALID_STATE, '试跑已暂停');
|
|
557
|
+
if (!BLUEPRINT_AGENT_COMMANDS.has(type)) fail(ERRORS.UNAUTHORIZED, '团队成员只协作处理首发样本,阶段推进由用户或项目 PMO 负责');
|
|
558
|
+
if (['stream.post', 'decision.request'].includes(type) && actor.memberId !== project.ownerMemberId) {
|
|
559
|
+
fail(ERRORS.UNAUTHORIZED, '请把内容写入任务讨论,由团队负责人转达给用户');
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
if (BLUEPRINT_MANAGED_COMMANDS.has(type) && command.seedBlueprint !== true) {
|
|
563
|
+
fail(ERRORS.INVALID_STATE, '请通过「首发试跑」确认派发或扩编');
|
|
564
|
+
}
|
|
565
|
+
if (type === 'member.message' && payload.memberId !== project.ownerMemberId) {
|
|
566
|
+
fail(ERRORS.UNAUTHORIZED, '请在项目主对话联系团队负责人');
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
async autoAdvanceBlueprint(projectId) {
|
|
571
|
+
return this.runExclusive(async () => {
|
|
572
|
+
const next = planBlueprintAdvance(this.state, this.state.projects?.[projectId]);
|
|
573
|
+
if (!next) return null;
|
|
574
|
+
return this.advanceBlueprint({ type: next.type, actor: PMO_ACTOR, projectId }, next.payload);
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
async advanceBlueprint(command, payload) {
|
|
579
|
+
const auto = command.actor === PMO_ACTOR;
|
|
580
|
+
if (!auto && command.actor.kind !== 'human') fail(ERRORS.UNAUTHORIZED, '试跑的下一步由用户或项目 PMO 确认');
|
|
581
|
+
const state = this.state;
|
|
582
|
+
const project = state.projects?.[command.projectId];
|
|
583
|
+
const progress = blueprintProgress(state, project);
|
|
584
|
+
if (!progress || project.status === 'archived') fail(ERRORS.INVALID_STATE, '当前项目没有可推进的首发试跑');
|
|
585
|
+
const previous = latestBlueprintTask(state);
|
|
586
|
+
if ((payload.taskId ?? null) !== progress.taskId) fail(ERRORS.REVISION, '试跑任务已变化,请刷新后再确认');
|
|
587
|
+
// 用户可以先登记事实。暂停与待决策只阻断阶段推进,证据留在账本里。
|
|
588
|
+
if (command.type === 'project.blueprint.prepare') {
|
|
589
|
+
if (!BLUEPRINT_START_STAGES.includes(progress.stage)) fail(ERRORS.INVALID_STATE, '当前阶段已有派发记录');
|
|
590
|
+
const evidence = blueprintRunInput(progress, previous, payload);
|
|
591
|
+
await this.append(command, 'project/blueprint-evidence', { kind: 'prepared', evidence });
|
|
592
|
+
this.diag?.append({ ev: 'blueprint.prepared', projectId: project.id, taskId: progress.taskId, manualMinutes: evidence.manualMinutes });
|
|
593
|
+
return { samplePrepared: true };
|
|
594
|
+
}
|
|
595
|
+
if (command.type === 'project.blueprint.recordTime') {
|
|
596
|
+
if (progress.stage !== 'measure') fail(ERRORS.INVALID_STATE, '草稿验收后才能登记本轮实际人工耗时');
|
|
597
|
+
const humanMinutes = blueprintNumber(payload.humanMinutes, '试跑人工分钟数(含准备和审核)', 0, 10_080);
|
|
598
|
+
await this.append(command, 'project/blueprint-evidence', { kind: 'time', evidence: { taskId: previous.id, humanMinutes } });
|
|
599
|
+
this.diag?.append({ ev: 'blueprint.time', projectId: project.id, taskId: previous.id, humanMinutes });
|
|
600
|
+
return { humanMinutes };
|
|
601
|
+
}
|
|
602
|
+
if (blocksBlueprintTask(state, progress.taskId)) fail(ERRORS.INVALID_STATE, '请先在收件箱处理待确认的决策');
|
|
603
|
+
const plan = project.blueprint;
|
|
604
|
+
switch (command.type) {
|
|
605
|
+
case 'project.blueprint.start': {
|
|
606
|
+
if (!BLUEPRINT_START_STAGES.includes(progress.stage) || project.runState === 'stopped') {
|
|
607
|
+
fail(ERRORS.INVALID_STATE, '当前不能派发试跑,请处理已有任务或恢复项目');
|
|
608
|
+
}
|
|
609
|
+
const newInput = ['sample', 'manualMinutes', 'adjustment'].some((key) => Object.hasOwn(payload, key));
|
|
610
|
+
const { manualMinutes, sample, adjustment } = progress.samplePrepared && !newInput
|
|
611
|
+
? project.blueprintPrepared : blueprintRunInput(progress, previous, payload);
|
|
612
|
+
const qaRequired = state.members?.[BLUEPRINT_ROLES.qa]?.kind === 'agent';
|
|
613
|
+
const result = await this.createTask(command, {
|
|
614
|
+
title: `首发试跑 · ${plan.selected.work}`,
|
|
615
|
+
resultDefinition: [
|
|
616
|
+
`仅根据一个真实样本交付${plan.output}。用户保留「${plan.humanWork}」。`,
|
|
617
|
+
...(adjustment ? [`本次按用户确认的「${adjustment}」调整流程。`] : []),
|
|
618
|
+
].join('\n\n'),
|
|
619
|
+
ownerId: BLUEPRINT_ROLES.lead, assigneeId: BLUEPRINT_ROLES.executor,
|
|
620
|
+
qaRequired, qaChecklist: plan.checks,
|
|
621
|
+
}, { blueprintRun: { manualMinutes, sample } });
|
|
622
|
+
this.diag?.append({ ev: 'blueprint.started', projectId: project.id, taskId: result.task.id, qaRequired, auto });
|
|
623
|
+
return result;
|
|
624
|
+
}
|
|
625
|
+
case 'project.blueprint.confirm': {
|
|
626
|
+
if (!auto || progress.stage !== 'measure' || !progress.roleReviewed || progress.confirmation) {
|
|
627
|
+
fail(ERRORS.INVALID_STATE, '草稿需要通过蓝图指定岗位的验收');
|
|
628
|
+
}
|
|
629
|
+
const confirmation = { taskId: previous.id, taskRevision: previous.revision, reviewerId: previous.reviewerId, confirmedAt: this.now() };
|
|
630
|
+
await this.append(command, 'project/blueprint-evidence', { kind: 'confirmation', evidence: confirmation });
|
|
631
|
+
this.diag?.append({ ev: 'blueprint.confirmed', projectId: project.id, ...confirmation });
|
|
632
|
+
return { confirmation };
|
|
633
|
+
}
|
|
634
|
+
case 'project.blueprint.measure': {
|
|
635
|
+
if (progress.stage !== 'measure' || (auto ? !progress.confirmation : payload.confirmed !== true)) {
|
|
636
|
+
fail(ERRORS.INVALID_STATE, '验收完成并确认草稿可用后才能完成测量');
|
|
637
|
+
}
|
|
638
|
+
const humanMinutes = blueprintNumber(auto ? progress.humanMinutes : payload.humanMinutes ?? progress.humanMinutes, '试跑人工分钟数(含审核)', 0, 10_080);
|
|
639
|
+
const manualMinutes = previous.blueprintRun.manualMinutes;
|
|
640
|
+
const savedPerWeek = Math.round((manualMinutes - humanMinutes) * plan.selected.perWeek * 100) / 100;
|
|
641
|
+
const measurement = { taskId: previous.id, manualMinutes, humanMinutes, savedPerWeek, qa: previous.qaRequired, measuredAt: this.now() };
|
|
642
|
+
await this.append(command, 'project/blueprint-measured', { measurement });
|
|
643
|
+
this.diag?.append({ ev: 'blueprint.measured', projectId: project.id, taskId: previous.id, savedPerWeek, auto });
|
|
644
|
+
return { measurement };
|
|
645
|
+
}
|
|
646
|
+
case 'project.blueprint.expand': {
|
|
647
|
+
if (progress.stage !== 'expand' || (!auto && payload.confirmed !== true)) fail(ERRORS.INVALID_STATE, '草稿可用且试跑省时后,才能确认加入独立验收');
|
|
648
|
+
const role = plan.roles.find((entry) => entry.duty === 'qa');
|
|
649
|
+
const result = await this.addMember(command, blueprintMemberFields(role));
|
|
650
|
+
this.diag?.append({ ev: 'blueprint.expanded', projectId: project.id, taskId: previous.id, memberId: role.id, auto });
|
|
651
|
+
return result;
|
|
652
|
+
}
|
|
653
|
+
default: fail(ERRORS.INVALID_ARGUMENT, '未知的试跑操作');
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
515
657
|
async append(command, type, payload) {
|
|
516
658
|
const event = await this.ledger.append({
|
|
517
659
|
type,
|
|
@@ -568,6 +710,7 @@ export class TeamService {
|
|
|
568
710
|
ownerMemberId,
|
|
569
711
|
workspacePath: project.workspacePath,
|
|
570
712
|
pmoAuto: payload.pmoAuto !== false,
|
|
713
|
+
...(payload.blueprint ? { blueprint: payload.blueprint } : {}),
|
|
571
714
|
status: project.status,
|
|
572
715
|
});
|
|
573
716
|
return { project };
|
|
@@ -721,7 +864,8 @@ export class TeamService {
|
|
|
721
864
|
? [...new Set(payload.taskIds.filter((id) => typeof id === 'string' && Object.hasOwn(this.state.tasks ?? {}, id)))]
|
|
722
865
|
: [];
|
|
723
866
|
// @成员只对 Human 的话生效(负责人照常收到,被点名者另行唤醒,见 waker)。
|
|
724
|
-
const mentions = command.actor.kind === 'human'
|
|
867
|
+
const mentions = command.actor.kind === 'human' && !this.state.projects?.[command.projectId]?.blueprint
|
|
868
|
+
? findMentions(typed, this.state.members) : [];
|
|
725
869
|
const entry = {
|
|
726
870
|
kind: command.actor.kind === 'human' ? 'human_message' : 'milestone',
|
|
727
871
|
authorId: author.id,
|
|
@@ -742,7 +886,7 @@ export class TeamService {
|
|
|
742
886
|
}
|
|
743
887
|
|
|
744
888
|
async addMember(command, payload) {
|
|
745
|
-
if (command.actor.kind !== 'human') fail(ERRORS.UNAUTHORIZED, 'only Human may create a member');
|
|
889
|
+
if (command.actor.kind !== 'human' && command.actor !== PMO_ACTOR) fail(ERRORS.UNAUTHORIZED, 'only Human or the pilot PMO may create a member');
|
|
746
890
|
if (typeof payload.name !== 'string' || payload.name.trim() === '') fail(ERRORS.INVALID_ARGUMENT, 'member name is required');
|
|
747
891
|
// id 由调用方给出时必须是非空字符串且未被占用:否则会覆盖既有成员
|
|
748
892
|
// (fold 按 id 合并,sessionId/config 一起丢失),或写入非字符串 id 被
|
|
@@ -1203,7 +1347,7 @@ export class TeamService {
|
|
|
1203
1347
|
return { member: { ...member, status: 'running', lastRecoveredAt: this.now() } };
|
|
1204
1348
|
}
|
|
1205
1349
|
|
|
1206
|
-
async createTask(command, payload) {
|
|
1350
|
+
async createTask(command, payload, { blueprintRun } = {}) {
|
|
1207
1351
|
const state = this.state;
|
|
1208
1352
|
const projectId = command.projectId;
|
|
1209
1353
|
const project = state.projects?.[projectId];
|
|
@@ -1268,6 +1412,7 @@ export class TeamService {
|
|
|
1268
1412
|
qaRequired,
|
|
1269
1413
|
qaChecklist,
|
|
1270
1414
|
originRefs: payload.originRefs,
|
|
1415
|
+
blueprintRun,
|
|
1271
1416
|
at: this.now(),
|
|
1272
1417
|
});
|
|
1273
1418
|
await this.ledger.append({ ...event, actor: command.actor, correlationId: command.correlationId, at: this.now(), projectId });
|
|
@@ -1280,6 +1425,15 @@ export class TeamService {
|
|
|
1280
1425
|
const task = state.tasks?.[taskId];
|
|
1281
1426
|
if (task === undefined) fail(ERRORS.NOT_FOUND, `task ${String(taskId)} not found`);
|
|
1282
1427
|
const expectedRevision = command.payload?.expectedRevision;
|
|
1428
|
+
const blueprint = state.projects?.[command.projectId]?.blueprint;
|
|
1429
|
+
if (blueprint && task.blueprintRun) {
|
|
1430
|
+
if (['claim', 'submit'].includes(action) && (command.actor.kind !== 'agent' || command.actor.memberId !== BLUEPRINT_ROLES.executor)) {
|
|
1431
|
+
fail(ERRORS.NOT_ELIGIBLE, '首发试跑由指定执行者认领和提交');
|
|
1432
|
+
}
|
|
1433
|
+
if (action !== 'cancel' && blocksBlueprintTask(state, task.id)) {
|
|
1434
|
+
fail(ERRORS.INVALID_STATE, '试跑等待用户在收件箱中确认');
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1283
1437
|
// 目标成员必须真实存在且可用:幽灵 id 写进投影后,真实成员 claim 会一直
|
|
1284
1438
|
// 撞 E_ALREADY_CLAIMED,只能由 owner/Human 重新指派才能解锁。
|
|
1285
1439
|
const requireAgentMember = (memberId, field) => requireMemberRef(this.state, memberId, field, { agentOnly: true });
|
|
@@ -1301,7 +1455,7 @@ export class TeamService {
|
|
|
1301
1455
|
if (command.actor.kind === 'agent' && reviewer === undefined) {
|
|
1302
1456
|
fail(ERRORS.UNAUTHORIZED, `agent actor ${String(command.actor.memberId ?? '?')} is not a Team member`);
|
|
1303
1457
|
}
|
|
1304
|
-
refuseLeadReview(
|
|
1458
|
+
refuseLeadReview(state, reviewer, task);
|
|
1305
1459
|
if (task.qaRequired === true && reviewer !== null && !isQaMember(reviewer)) {
|
|
1306
1460
|
fail(ERRORS.INVALID_STATE, 'this task requires a QA reviewer');
|
|
1307
1461
|
}
|
|
@@ -1339,8 +1493,18 @@ export class TeamService {
|
|
|
1339
1493
|
break;
|
|
1340
1494
|
}
|
|
1341
1495
|
case 'request_changes':
|
|
1342
|
-
refuseLeadReview(
|
|
1343
|
-
outcome = requestChangesTask(task, command.actor, { note: command.payload?.note }, { expectedRevision, at: this.now() });
|
|
1496
|
+
refuseLeadReview(state, command.actor.kind === 'agent' ? state.members?.[command.actor.memberId] : null, task);
|
|
1497
|
+
outcome = requestChangesTask(task, command.actor, { note: command.payload?.note }, { expectedRevision, at: this.now() });
|
|
1498
|
+
if (blueprint && task.blueprintRun && command.actor.kind === 'agent' && task.reviewRound >= BLUEPRINT_REWORK_LIMIT) {
|
|
1499
|
+
const previous = Object.values(state.inbox ?? {}).find((item) => item.ref?.taskId === taskId && item.ref.source === 'blueprint-rework-limit');
|
|
1500
|
+
const item = previous ?? (await this.requestDecision(command, {
|
|
1501
|
+
title: `首发任务 #${task.number} 需要你决定`, taskId,
|
|
1502
|
+
source: 'blueprint-rework-limit',
|
|
1503
|
+
questions: [{ text: `已退回 ${BLUEPRINT_REWORK_LIMIT} 轮。最新验收意见为「${command.payload.note}」。请决定是否继续修改、调整标准或结束这次试跑。` }],
|
|
1504
|
+
})).item;
|
|
1505
|
+
return { task, item, escalated: true };
|
|
1506
|
+
}
|
|
1507
|
+
break;
|
|
1344
1508
|
case 'cancel': outcome = cancelTask(task, command.actor, { reason: command.payload?.reason, expectedRevision, at: this.now() }); break;
|
|
1345
1509
|
case 'reopen': outcome = reopenTask(task, command.actor, { reason: command.payload?.reason, expectedRevision, members: state.members, at: this.now() }); break;
|
|
1346
1510
|
case 'reassign':
|
|
@@ -1491,12 +1655,15 @@ export class TeamService {
|
|
|
1491
1655
|
// 合同是「返回回答列表」:这里曾返回数字 0,调用方按数组迭代时抛 TypeError,
|
|
1492
1656
|
// 整个 PMO tick 被打断且每个 tick 都重复失败。
|
|
1493
1657
|
if (humanId === null || humanId === undefined) return [];
|
|
1658
|
+
const blueprint = this.state.projects?.[projectId]?.blueprint;
|
|
1494
1659
|
// 只自动回答**有结构化问题**的决策项。成员致命失败生成的升级项没有 questions,
|
|
1495
1660
|
// 自动作答会用一句通用话术把它 resolved,Human 再也看不到真正的失败。
|
|
1496
1661
|
const items = Object.values(this.state.inbox ?? {}).filter((item) =>
|
|
1497
1662
|
item.memberId === humanId
|
|
1498
1663
|
&& item.type === 'decision_required'
|
|
1499
1664
|
&& item.state === 'unread'
|
|
1665
|
+
&& item.ref?.humanOnly !== true
|
|
1666
|
+
&& (!blueprint || item.ref?.blueprintDecision === true)
|
|
1500
1667
|
&& Array.isArray(item.ref?.questions)
|
|
1501
1668
|
&& item.ref.questions.length > 0);
|
|
1502
1669
|
const results = [];
|
|
@@ -1505,12 +1672,17 @@ export class TeamService {
|
|
|
1505
1672
|
const answers = chooseDecisionAnswers(questions);
|
|
1506
1673
|
// 自动作答也要在锁内:它与 thread.post 一样是「读 head → 分配 seq → append」,
|
|
1507
1674
|
// 并发时同 seq 会被 fold 静默丢弃,而 Human 的明确决策可能被自动决策替换。
|
|
1508
|
-
|
|
1675
|
+
const result = await this.runExclusive(() => this.autoAnswerDecision(item, answers, projectId));
|
|
1676
|
+
if (result !== null) results.push(result);
|
|
1509
1677
|
}
|
|
1510
1678
|
return results;
|
|
1511
1679
|
}
|
|
1512
1680
|
|
|
1513
1681
|
async autoAnswerDecision(item, answers, projectId = Object.keys(this.state.projects ?? {})[0]) {
|
|
1682
|
+
const current = this.state.inbox?.[item.id];
|
|
1683
|
+
const project = this.state.projects?.[projectId];
|
|
1684
|
+
if (current?.state !== 'unread' || current.ref?.humanOnly === true) return null;
|
|
1685
|
+
if (project?.blueprint && (current.ref?.blueprintDecision !== true || project.pmoAuto === false || project.runState === 'stopped' || project.status === 'archived')) return null;
|
|
1514
1686
|
const taskId = typeof item.ref?.taskId === 'string' ? item.ref.taskId : null;
|
|
1515
1687
|
const task = taskId === null ? undefined : this.state.tasks?.[taskId];
|
|
1516
1688
|
const questionById = new Map((item.ref?.questions ?? []).map((question) => [question.id, question.text]));
|
|
@@ -1615,12 +1787,18 @@ export class TeamService {
|
|
|
1615
1787
|
};
|
|
1616
1788
|
});
|
|
1617
1789
|
const title = typeof payload.title === 'string' && payload.title.trim() !== '' ? payload.title.trim() : '需要你决策';
|
|
1618
|
-
const
|
|
1790
|
+
const blueprintDecision = Boolean(this.state.projects?.[command.projectId]?.blueprint);
|
|
1791
|
+
const currentTask = blueprintDecision ? latestBlueprintTask(this.state) : null;
|
|
1792
|
+
const activeTaskId = currentTask && !['done', 'cancelled', 'deleted'].includes(currentTask.status) ? currentTask.id : null;
|
|
1793
|
+
const taskId = typeof payload.taskId === 'string' ? payload.taskId : activeTaskId;
|
|
1794
|
+
if (blueprintDecision && taskId !== activeTaskId) fail(ERRORS.INVALID_ARGUMENT, '试跑决策需要关联当前任务');
|
|
1795
|
+
const humanOnly = blueprintDecision && !allowsBlueprintAutoAnswer({ type: payload.decisionType, title, questions, task: currentTask });
|
|
1619
1796
|
const duplicate = Object.values(this.state.inbox ?? {}).find((item) =>
|
|
1620
1797
|
item.memberId === humanId
|
|
1621
1798
|
&& item.type === 'decision_required'
|
|
1622
1799
|
&& item.ref?.title === title
|
|
1623
1800
|
&& item.ref?.taskId === taskId
|
|
1801
|
+
&& Boolean(item.ref?.humanOnly) === humanOnly
|
|
1624
1802
|
&& !['resolved', 'dismissed', 'superseded'].includes(item.state));
|
|
1625
1803
|
if (duplicate !== undefined) return { item: duplicate, duplicate: true };
|
|
1626
1804
|
const item = createInboxItem({
|
|
@@ -1632,6 +1810,7 @@ export class TeamService {
|
|
|
1632
1810
|
memberId: command.actor.memberId ?? null,
|
|
1633
1811
|
memberName: this.state.members?.[command.actor.memberId]?.name ?? command.actor.memberId ?? null,
|
|
1634
1812
|
questions,
|
|
1813
|
+
...(blueprintDecision ? { blueprintDecision: true, humanOnly } : {}),
|
|
1635
1814
|
...(typeof payload.source === 'string' && payload.source !== '' ? { source: payload.source } : {}),
|
|
1636
1815
|
},
|
|
1637
1816
|
requiresDecision: true,
|
package/lib/host/views.js
CHANGED
|
@@ -37,7 +37,9 @@ export function taskCard(state, task) {
|
|
|
37
37
|
blocked: isBlocked(state, task),
|
|
38
38
|
writeScopes: Array.isArray(task.writeScopes) ? [...task.writeScopes] : [],
|
|
39
39
|
revision: task.revision,
|
|
40
|
-
resultDefinition: task.
|
|
40
|
+
resultDefinition: task.blueprintRun
|
|
41
|
+
? `${task.resultDefinition}\n\n用户提供的材料如下。将其作为证据来源。\n\n${task.blueprintRun.sample}`
|
|
42
|
+
: task.resultDefinition ?? '',
|
|
41
43
|
irreversible: task.irreversible === true,
|
|
42
44
|
qaRequired: task.qaRequired === true,
|
|
43
45
|
qaChecklist: task.qaChecklist ?? [],
|
|
@@ -111,6 +113,45 @@ export function boardView(state, options = {}) {
|
|
|
111
113
|
};
|
|
112
114
|
}
|
|
113
115
|
|
|
116
|
+
/** 项目总览按最近七个 24 小时窗口归集已验收任务,按当前归属统计在手工作。 */
|
|
117
|
+
export function projectOverview(state, board, now = Date.now()) {
|
|
118
|
+
const dayMs = 24 * 60 * 60 * 1000;
|
|
119
|
+
const dayEnds = Array.from({ length: 7 }, (_, index) => now - (6 - index) * dayMs);
|
|
120
|
+
const collaboration = new Map(Object.values(state.members ?? {})
|
|
121
|
+
.filter((member) => member.kind === 'agent' && member.status !== 'retired')
|
|
122
|
+
.map((member) => [member.id, { memberId: member.id, active: 0, deliveries: 0, reviews: 0, daily: dayEnds.map(() => 0) }]));
|
|
123
|
+
let accepted = 0;
|
|
124
|
+
let firstPass = 0;
|
|
125
|
+
let sampleSize = 0;
|
|
126
|
+
const cycles = [];
|
|
127
|
+
for (const task of Object.values(state.tasks ?? {})) {
|
|
128
|
+
if (task.tombstone === true) continue;
|
|
129
|
+
const executor = collaboration.get(task.assigneeId);
|
|
130
|
+
if (['pending', 'in_progress', 'pending_acceptance'].includes(task.status) && executor) executor.active += 1;
|
|
131
|
+
if (task.status !== 'done' || !Number.isFinite(task.acceptedAt)) continue;
|
|
132
|
+
const slot = 6 - Math.floor((now - task.acceptedAt) / dayMs);
|
|
133
|
+
if (slot < 0 || slot > 6) continue;
|
|
134
|
+
accepted += 1;
|
|
135
|
+
if (executor) {
|
|
136
|
+
executor.deliveries += 1;
|
|
137
|
+
executor.daily[slot] += 1;
|
|
138
|
+
}
|
|
139
|
+
const reviewer = collaboration.get(task.reviewerId);
|
|
140
|
+
if (reviewer) reviewer.reviews += 1;
|
|
141
|
+
if (task.reviewRound >= 1) {
|
|
142
|
+
sampleSize += 1;
|
|
143
|
+
if (task.reviewRound === 1) firstPass += 1;
|
|
144
|
+
}
|
|
145
|
+
if (Number.isFinite(task.claimedAt) && task.claimedAt <= task.acceptedAt) cycles.push((task.acceptedAt - task.claimedAt) / 60_000);
|
|
146
|
+
}
|
|
147
|
+
cycles.sort((a, b) => a - b);
|
|
148
|
+
const middle = Math.floor(cycles.length / 2);
|
|
149
|
+
const medianMinutes = cycles.length ? Math.round(((cycles[middle] + cycles[Math.floor((cycles.length - 1) / 2)]) / 2) * 10) / 10 : null;
|
|
150
|
+
const evidenceTaskIds = board.columns.done.filter((task) => task.submission?.evidence.some((entry) => entry.label.trim() || entry.ref.trim()))
|
|
151
|
+
.slice(0, 6).map((task) => task.id);
|
|
152
|
+
return { dayEnds, accepted, firstPass, sampleSize, medianMinutes, cycleSamples: cycles.length, collaboration: [...collaboration.values()], evidenceTaskIds };
|
|
153
|
+
}
|
|
154
|
+
|
|
114
155
|
function quadrantItem(state, task, category) {
|
|
115
156
|
return {
|
|
116
157
|
id: task.id,
|
package/lib/host/waker.js
CHANGED
|
@@ -10,6 +10,7 @@ import { PERSONALITY_LIMIT, unfinishedTasksFor } from '../domain/member-profile.
|
|
|
10
10
|
import { pairedReviewer, projectOwnerId, reviewPairs } from '../domain/policy.js';
|
|
11
11
|
import { isBoardIdle } from '../ledger/fold.js';
|
|
12
12
|
import { describeAttachments, normalizeAttachments } from '../domain/rich-message.js';
|
|
13
|
+
import { blocksBlueprintTask } from '../domain/team-blueprint.js';
|
|
13
14
|
|
|
14
15
|
function text(value) {
|
|
15
16
|
return typeof value === 'string' ? value : '';
|
|
@@ -132,6 +133,7 @@ const THREAD_QUIET_STATUSES = new Set(['done', 'cancelled']);
|
|
|
132
133
|
export function planWakes(state, result, actor = {}, options = {}) {
|
|
133
134
|
const event = result?.event ?? null;
|
|
134
135
|
const task = result?.task ?? null;
|
|
136
|
+
const blueprint = Boolean(Object.values(state.projects ?? {})[0]?.blueprint);
|
|
135
137
|
const targets = new Map();
|
|
136
138
|
const add = (memberId, taskId, reason, key, promptOverride) => {
|
|
137
139
|
const member = agentMember(state, memberId);
|
|
@@ -174,10 +176,18 @@ export function planWakes(state, result, actor = {}, options = {}) {
|
|
|
174
176
|
});
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
|
-
if (event?.type === 'team/startup'
|
|
179
|
+
if (event?.type === 'team/startup' || (blueprint && event?.type === 'project/run-state' && event.payload?.runState === 'running')) {
|
|
180
|
+
const unfinished = Object.values(state.tasks ?? {})
|
|
178
181
|
.filter((entry) => entry.tombstone !== true && ['pending', 'in_progress', 'pending_acceptance'].includes(entry.status))
|
|
179
182
|
.slice(0, 5);
|
|
180
183
|
for (const entry of unfinished) {
|
|
184
|
+
if (blueprint && entry.blueprintRun) {
|
|
185
|
+
if (blocksBlueprintTask(state, entry.id)) continue;
|
|
186
|
+
const key = `blueprint-resume:${entry.id}:${event.seq ?? 'startup'}`;
|
|
187
|
+
if (entry.status === 'pending_acceptance') add(pairedReviewer(state, entry)?.id, entry.id, 'review_requested', key);
|
|
188
|
+
else add(entry.assigneeId, entry.id, 'startup_resume', key);
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
181
191
|
add(entry.ownerId, entry.id, 'startup_resume', `startup:${entry.id}`);
|
|
182
192
|
add(entry.assigneeId, entry.id, 'startup_resume', `startup:${entry.id}`);
|
|
183
193
|
}
|
|
@@ -195,7 +205,7 @@ export function planWakes(state, result, actor = {}, options = {}) {
|
|
|
195
205
|
// 账本事件路径没有嵌套 task:payload 只有 taskId,必须回投影里取。
|
|
196
206
|
const created = task ?? (event?.payload?.taskId === undefined ? null : state.tasks?.[event.payload.taskId]) ?? null;
|
|
197
207
|
if (created !== null && created !== undefined) {
|
|
198
|
-
add(created.ownerId, created.id, 'task_created', `task_created:${created.id}`);
|
|
208
|
+
if (!created.blueprintRun) add(created.ownerId, created.id, 'task_created', `task_created:${created.id}`);
|
|
199
209
|
add(created.assigneeId, created.id, 'task_assigned', `task_assigned:${created.id}`);
|
|
200
210
|
}
|
|
201
211
|
}
|
|
@@ -215,12 +225,14 @@ export function planWakes(state, result, actor = {}, options = {}) {
|
|
|
215
225
|
if (current !== undefined && current !== null) {
|
|
216
226
|
// One reflection per Task, independent of whether the HTTP result or
|
|
217
227
|
// the ledger event scheduled it (they carry different seq context).
|
|
218
|
-
add(current.assigneeId, current.id, 'reflection_requested', `reflection:${current.id}`);
|
|
228
|
+
if (!current.blueprintRun) add(current.assigneeId, current.id, 'reflection_requested', `reflection:${current.id}`);
|
|
219
229
|
// 回收结果(核心模型:PMO 排会、回收结果、派活):这一批全部验收、看板空了,
|
|
220
230
|
// 叫 PMO 在主对话向 Human 汇报。此前没人汇报,Human 只能去看板里翻。
|
|
221
231
|
const ownerId = Object.values(state.projects ?? {})[0]?.ownerMemberId;
|
|
222
232
|
if (ownerId !== undefined && isBoardIdle(state)) {
|
|
223
|
-
add(ownerId, current.id, 'wave_done', `wave_done:${current.id}
|
|
233
|
+
add(ownerId, current.id, 'wave_done', `wave_done:${current.id}`, current.blueprintRun
|
|
234
|
+
? '首发草稿已验收。读任务,把草稿、验收结论、原材料出处和待用户确认事项通过 team action=say 交接到主对话,附上任务卡。提醒用户登记实际人工耗时,包括准备和人工复核。'
|
|
235
|
+
: undefined);
|
|
224
236
|
}
|
|
225
237
|
}
|
|
226
238
|
}
|
|
@@ -236,15 +248,31 @@ export function planWakes(state, result, actor = {}, options = {}) {
|
|
|
236
248
|
const current = state.tasks?.[taskId];
|
|
237
249
|
// 终态卡上的讨论只落 Thread,不再唤醒任何人(#18,il2c 实账本:1272 次
|
|
238
250
|
// thread_reply 唤醒里 435 次打在已验收/已取消的卡上,卡关了讨论还在互相叫醒)。
|
|
239
|
-
const open = current !== undefined && current !== null && current.tombstone !== true && !THREAD_QUIET_STATUSES.has(current.status)
|
|
251
|
+
const open = current !== undefined && current !== null && current.tombstone !== true && !THREAD_QUIET_STATUSES.has(current.status)
|
|
252
|
+
&& (!current.blueprintRun || !blocksBlueprintTask(state, taskId));
|
|
240
253
|
// 账本写的是扁平载荷(service: `{ taskId, ...entry }`);嵌套形状只在 PMO 自动答复的内存结果里出现。
|
|
241
254
|
const author = event.payload?.authorId ?? event.payload?.entry?.authorId;
|
|
242
|
-
|
|
255
|
+
const reviewer = current?.blueprintRun && current.status === 'pending_acceptance' ? pairedReviewer(state, current)?.id : null;
|
|
256
|
+
for (const memberId of open ? [current.ownerId, current.assigneeId, reviewer] : []) {
|
|
243
257
|
if (memberId !== undefined && memberId !== author) {
|
|
244
258
|
add(memberId, taskId, 'thread_reply', `thread:${taskId}:${event.seq ?? event.payload?.entry?.seq}`);
|
|
245
259
|
}
|
|
246
260
|
}
|
|
247
261
|
}
|
|
262
|
+
if (blueprint && event?.type === 'inbox/acked') {
|
|
263
|
+
const inbox = state.inbox?.[event.payload?.itemId];
|
|
264
|
+
const taskId = inbox?.ref?.taskId;
|
|
265
|
+
const current = state.tasks?.[taskId];
|
|
266
|
+
if (inbox?.ref?.blueprintDecision === true && inbox.state === 'resolved' && current?.blueprintRun
|
|
267
|
+
&& !THREAD_QUIET_STATUSES.has(current.status) && !blocksBlueprintTask(state, taskId)) {
|
|
268
|
+
const worker = current.status === 'pending_acceptance' ? pairedReviewer(state, current)?.id : current.assigneeId;
|
|
269
|
+
const decidedBy = inbox.decision?.auto === true ? 'PMO' : '用户';
|
|
270
|
+
const prompt = `${decidedBy}的决定已写入任务讨论。用 team action=thread 查看原文,按本岗位处理当前卡,外部动作继续交给用户。`;
|
|
271
|
+
for (const memberId of new Set([current.ownerId, worker])) {
|
|
272
|
+
add(memberId, taskId, 'human_decision', `human_decision:${event.seq}`, prompt);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
248
276
|
if (event?.type === 'stream/posted' && event.payload?.kind === 'human_message') {
|
|
249
277
|
const project = Object.values(state.projects ?? {})[0];
|
|
250
278
|
const body = typeof event.payload?.body === 'string' ? event.payload.body : '';
|
|
@@ -254,7 +282,7 @@ export function planWakes(state, result, actor = {}, options = {}) {
|
|
|
254
282
|
.join('、');
|
|
255
283
|
const attachments = normalizeAttachments(event.payload?.attachments);
|
|
256
284
|
const attachmentNote = attachments.length > 0 ? `(${describeAttachments(attachments)},就在这条消息里,先看再判断。)` : '';
|
|
257
|
-
const mentioned = stringIds(event.payload?.mentions).filter((id) => state.members?.[id]?.kind === 'agent' && state.members[id].status !== 'retired');
|
|
285
|
+
const mentioned = blueprint ? [] : stringIds(event.payload?.mentions).filter((id) => state.members?.[id]?.kind === 'agent' && state.members[id].status !== 'retired');
|
|
258
286
|
const mentionNames = mentioned.map((id) => state.members[id].name).join('、');
|
|
259
287
|
const mentionNote = mentioned.length > 0 ? `Human 点名了 ${mentionNames},他们也直接收到了这句话;安排时以他们为先。` : '';
|
|
260
288
|
const ownerName = state.members?.[project?.ownerMemberId]?.name ?? '负责人';
|
|
@@ -263,7 +291,9 @@ export function planWakes(state, result, actor = {}, options = {}) {
|
|
|
263
291
|
null,
|
|
264
292
|
'human_message',
|
|
265
293
|
`human_message:${event.seq ?? event.payload?.seq}`,
|
|
266
|
-
|
|
294
|
+
blueprint
|
|
295
|
+
? `用户在主对话说:“${body.slice(0, 2000)}”。${attachmentNote}先读首发卡片和讨论,再用 team action=say 回复。请用户在「首发试跑」提供样本、手工基线和实测人工耗时。PMO 开启时按验收及实测证据推进,关闭时请用户逐步确认。可逆选项用 askHuman 并标记 decisionType=routine。缺事实或需要对外动作时提请用户本人确认。`
|
|
296
|
+
: `你是本项目的 PMO(Project owner)。Human 在主对话说:“${body.slice(0, 2000)}”。${attachmentNote}${mentionNote}Human 只看主对话,你是唯一在主对话回应 Human 的成员。先判断这句话是什么:\n- 打招呼、提问、确认、闲聊 → 直接用 team action=say 在主对话回答,不建卡。\n- 要团队完成的工作 → 先用 team action=members 看成员,再用 action=create 建卡(ownerId/assigneeId 用成员 id,resultDefinition 写可验证的验收标准,需要独立复跑时 qaRequired=true 并给 qaChecklist),然后用 action=say 在主对话告诉 Human 你的安排并用 taskIds 附上这些卡。需求很大或含糊时先建一张「澄清/拆解」卡,不要直接开始实现。\n只做 Human 要的范围,不要自行扩大。需要 Human 拍板的问题用 action=askHuman。可用成员:${roster || '无'}。`,
|
|
267
297
|
);
|
|
268
298
|
// #65:被 @ 的成员直接收到这句话(负责人照常收到并掌握全局)。
|
|
269
299
|
for (const memberId of mentioned) {
|