Archived
chore(w05): 两枚工具与两张判定表退役,技能戳删除 —— 规则只许有一处真源
四态与推荐等级现在活在 S2 配方的 when 链里(spec §3.5)。 再留一份 DMN 或一枚工具,就是同一件事两处各存一份,改一处就分叉而没人看得出以哪份为准。 技能戳是给模型看的,而这个活动全程没有 agent。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LKMZDwMbyKzjw6Hembwvet
This commit is contained in:
@@ -67,8 +67,7 @@ import type { ProcessService } from '@modules/process';
|
||||
import type { TriggerService } from '@modules/trigger';
|
||||
import type { MinuteService } from '@modules/minute';
|
||||
import type { ReportService } from '@modules/report';
|
||||
import { FIRST_PARTY_TOOLS, compareParametersWith } from './tools/first-party.ts';
|
||||
import type { ParameterLedger } from './tools/first-party.ts';
|
||||
import { FIRST_PARTY_TOOLS } from './tools/first-party.ts';
|
||||
import { httpToolHandler } from './tools/http-tool.ts';
|
||||
import { createMastraSpanFactory } from './mastra-spans.ts';
|
||||
import { createTraceService, createTraceStore } from '@modules/trace';
|
||||
@@ -418,22 +417,12 @@ export async function createContainer(config: AppConfig, overrides: ContainerOve
|
||||
/** 第一方工具实现 —— `mail.send` 真发信,处理器在这儿闭包持 mail(放行时经 ToolInvoker 执行) */
|
||||
// 导入的自定义工具走通用 HTTP 实现:契约申报 endpoint,运行时只把那一个连接目标交出去
|
||||
/*
|
||||
* 差异评估的比对工具**从台账取参数**(2026-08-27 晚):静态名单里那份只认 pairs;这里用 ledger 顶掉 ——
|
||||
* 有 taskId 读任务视图(正式版 + 本单草稿),没有(试运行)只读正式版。只读。
|
||||
* 差异评估的两枚比对工具已退役(2026-08-29,墓志铭见 `tools/first-party.ts`)——
|
||||
* 规则改由 `part-substitution-assessment` 的 `S2_assess.auto` 配方现算,这里的
|
||||
* `parameterLedger`(从台账取参数的只读口)随之一并撤,不再有第二处消费方。
|
||||
*/
|
||||
const parameterLedger: ParameterLedger = {
|
||||
rows: async (taskId, address, where) => {
|
||||
const query = { address, where, orderBy: [], limit: 500, offset: 0 };
|
||||
const page = taskId === undefined ? await ledger.query(query) : await ledger.taskView(taskId, query);
|
||||
return page.rows;
|
||||
},
|
||||
};
|
||||
const toolRuntime = createToolRuntime(
|
||||
new Map<string, ToolHandler>([
|
||||
...FIRST_PARTY_TOOLS,
|
||||
['part-substitution-assessment.compare-parameters', compareParametersWith(parameterLedger)],
|
||||
['mail.send', mailSendTool(mail)],
|
||||
]),
|
||||
new Map<string, ToolHandler>([...FIRST_PARTY_TOOLS, ['mail.send', mailSendTool(mail)]]),
|
||||
httpToolHandler,
|
||||
);
|
||||
const schemas = createSchemaValidator();
|
||||
|
||||
Reference in New Issue
Block a user