基线:鉴权会话+工作组+工作台三区修复+编排工作区+产品设计文档

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
2026-07-27 20:43:35 +08:00
co-authored by Claude Fable 5
parent 61fe181678
commit ac85ecf2ea
119 changed files with 16634 additions and 1246 deletions
+12 -1
View File
@@ -31,6 +31,7 @@ import type { TriggerService } from '@modules/trigger';
import { evaluate as evalSfeel, evaluateCondition, evaluateUnaryTest } from '@sfeel';
import type { StaffId, TaskId } from '@contracts';
import { staffIdSchema } from '@contracts';
import { createAgentRunner } from '../agent-runner.ts';
import type { Clock, IdGenerator } from '../runtime.ts';
@@ -656,6 +657,12 @@ export function wireEngines(deps: EngineWiringDeps): EngineWiring {
);
return withLoad;
},
// 起单时按来源人取其工作组(ADR-011);没建组即 undefined,全走四策略
workGroupBinding: async (staffId) => deps.org.bindingOf(staffIdSchema.parse(staffId)),
isActive: async (staffId) => {
const staff = await deps.org.getStaff(staffIdSchema.parse(staffId)).catch(() => undefined);
return staff?.state === 'active';
},
},
tasks: {
start: async (input) =>
@@ -732,7 +739,11 @@ export function wireEngines(deps: EngineWiringDeps): EngineWiring {
process: {
start: async (input) => process.start(input),
requiredInputs: async (packageId) => {
const pkg = await process.getPackage(packageId);
// 与起单取版同口径:读**最新已发布**的调用接口 —— 草稿的 schema 不该影响装配判定
const all = await process.listPackages();
const pkg = all
.filter((x) => x.id === packageId && x.state === 'published')
.sort((a, b) => b.version - a.version)[0];
const input = pkg?.callInterface.input as { required?: string[] } | undefined;
return input?.required ?? [];
},