diff --git a/activities/quote-archive/src/manifest.ts b/activities/quote-archive/src/manifest.ts index e8da110..f0e4b42 100644 --- a/activities/quote-archive/src/manifest.ts +++ b/activities/quote-archive/src/manifest.ts @@ -13,7 +13,7 @@ export const manifest: ActivityManifest = { identity: { activityId: ACTIVITY_ID, name: 'A7 · 情报归档', - packageVersion: '0.1.1', + packageVersion: '0.1.2', category: '统一报价', paradigm: 'flow', sdkVersion: '0.1.0-m5', @@ -56,13 +56,13 @@ export const manifest: ActivityManifest = { { key: 'bd-release', label: 'BD 放行', level: 'L5' }, ], prohibitions: [{ key: 'no-blank-archive', statement: '不得空归档 —— 每一单不成交的报价也是情报资产' }], - authorization: { discretion: [], preauthorizedActions: [], humanCallBudget: 1 }, + authorization: { discretion: [], preauthorizedActions: [], humanCallBudget: 2 }, resources: { tools: [], skills: [], models: ['quote-extractor'], roles: ['BD'], - budget: { steps: 30, tokens: 60_000, activeMinutes: 60, humanCalls: 1 }, + budget: { steps: 30, tokens: 60_000, activeMinutes: 60, humanCalls: 2 }, }, }, diff --git a/activities/quote-intake/src/manifest.ts b/activities/quote-intake/src/manifest.ts index d3daeda..7a85960 100644 --- a/activities/quote-intake/src/manifest.ts +++ b/activities/quote-intake/src/manifest.ts @@ -40,7 +40,7 @@ export const manifest: ActivityManifest = { identity: { activityId: ACTIVITY_ID, name: 'A1 · RFQ 需求分析', - packageVersion: '0.1.2', + packageVersion: '0.1.3', category: '统一报价', paradigm: 'flow', sdkVersion: '0.1.0-m5', @@ -95,14 +95,14 @@ export const manifest: ActivityManifest = { authorization: { discretion: [{ key: 'ask-back', statement: '缺次要字段可受理并追问,缺 PN/数量/交期必须退回补全' }], preauthorizedActions: [], - humanCallBudget: 3, + humanCallBudget: 4, }, resources: { tools: [{ name: 'crm.history-price-read' }], skills: [], models: ['quote-extractor'], roles: ['BD'], - budget: { steps: 40, tokens: 120_000, activeMinutes: 60, humanCalls: 3 }, + budget: { steps: 40, tokens: 120_000, activeMinutes: 60, humanCalls: 4 }, }, }, diff --git a/activities/quote-negotiate/src/manifest.ts b/activities/quote-negotiate/src/manifest.ts index 21f23d0..be44e4f 100644 --- a/activities/quote-negotiate/src/manifest.ts +++ b/activities/quote-negotiate/src/manifest.ts @@ -15,7 +15,7 @@ export const manifest: ActivityManifest = { identity: { activityId: ACTIVITY_ID, name: 'A6 · 报价议价', - packageVersion: '0.1.1', + packageVersion: '0.1.2', category: '统一报价', paradigm: 'flow', sdkVersion: '0.1.0-m5', diff --git a/activities/quote-pricing/src/manifest.ts b/activities/quote-pricing/src/manifest.ts index ef7b54a..5d3cefc 100644 --- a/activities/quote-pricing/src/manifest.ts +++ b/activities/quote-pricing/src/manifest.ts @@ -59,7 +59,7 @@ export const manifest: ActivityManifest = { identity: { activityId: ACTIVITY_ID, name: 'A4 · 成本定价', - packageVersion: '0.1.2', + packageVersion: '0.1.3', category: '统一报价', paradigm: 'flow', sdkVersion: '0.1.0-m5', @@ -110,14 +110,14 @@ export const manifest: ActivityManifest = { authorization: { discretion: [{ key: 'margin-band', statement: '在 P-01 给出的毛利区间内自决;出区间必须调人决策' }], preauthorizedActions: [], - humanCallBudget: 2, + humanCallBudget: 3, }, resources: { tools: [{ name: 'quote-pricing.basis' }, { name: 'crm.history-price-read' }], skills: [], models: ['quote-extractor'], roles: ['BD'], - budget: { steps: 60, tokens: 150_000, activeMinutes: 120, humanCalls: 2 }, + budget: { steps: 60, tokens: 150_000, activeMinutes: 120, humanCalls: 3 }, }, }, diff --git a/apps/api/src/modules/flow-engine/internal/usecase/flow-runner.ts b/apps/api/src/modules/flow-engine/internal/usecase/flow-runner.ts index c5f527c..797beb0 100644 --- a/apps/api/src/modules/flow-engine/internal/usecase/flow-runner.ts +++ b/apps/api/src/modules/flow-engine/internal/usecase/flow-runner.ts @@ -151,14 +151,28 @@ export function createFlowRunner(deps: FlowRunnerDeps): FlowEngineService { } case 'human': { - // 异步步:完成条件 = 人事件;时限必配 - const card = await deps.cards.issue({ - taskId, - ownerId: context.ownerId, - humanCallCap: context.humanCallCap, - workOrder: step.workOrder, - card: step.card, - }); + // 异步步:完成条件 = 人事件;时限必配。 + // 发卡本身可能被 Harness 拦下(调人预算触顶等)—— 那是**这一步失败了**, + // 走它声明的失败走向;不接住就会每一拍重发一次、永远发不出去也永远不报错。 + let card: { id: string }; + try { + card = await deps.cards.issue({ + taskId, + ownerId: context.ownerId, + humanCallCap: context.humanCallCap, + workOrder: step.workOrder, + card: step.card, + }); + } catch (error) { + return handleFailure( + taskId, + step, + index, + position, + attempt, + error instanceof Error ? error.message : String(error), + ); + } await deps.listeners.register({ taskId, eventType: 'human',