feat(rah-light): remove delegateToWiseRAH orchestration tool
- Deleted src/tools/orchestration/delegateToWiseRAH.ts - Removed delegateToWiseRAH from registry.ts and groups.ts - Deleted tests/evals/scenarios/delegate-wise.ts and delegate-mini.ts - Updated tests/evals/scenarios/index.ts to remove deleted test imports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
fa96c238c2
commit
844a9b57ab
@@ -45,7 +45,6 @@ export const TOOL_GROUP_ASSIGNMENTS: Record<string, string> = {
|
||||
// Orchestration: Workflows and reasoning (orchestrator only)
|
||||
webSearch: 'orchestration',
|
||||
think: 'orchestration',
|
||||
delegateToWiseRAH: 'orchestration',
|
||||
executeWorkflow: 'orchestration',
|
||||
listWorkflows: 'orchestration',
|
||||
getWorkflow: 'orchestration',
|
||||
|
||||
@@ -16,7 +16,6 @@ import { queryDimensionNodesTool } from '../database/queryDimensionNodes';
|
||||
import { searchContentEmbeddingsTool } from '../other/searchContentEmbeddings';
|
||||
import { webSearchTool } from '../other/webSearch';
|
||||
import { thinkTool } from '../other/think';
|
||||
import { delegateToWiseRAHTool } from '../orchestration/delegateToWiseRAH';
|
||||
import { executeWorkflowTool } from '../orchestration/executeWorkflow';
|
||||
import { listWorkflowsTool } from '../orchestration/listWorkflows';
|
||||
import { getWorkflowTool } from '../orchestration/getWorkflow';
|
||||
@@ -42,7 +41,6 @@ const CORE_TOOLS: Record<string, any> = {
|
||||
const ORCHESTRATION_TOOLS: Record<string, any> = {
|
||||
webSearch: webSearchTool,
|
||||
think: thinkTool,
|
||||
delegateToWiseRAH: delegateToWiseRAHTool,
|
||||
executeWorkflow: executeWorkflowTool,
|
||||
listWorkflows: listWorkflowsTool,
|
||||
getWorkflow: getWorkflowTool,
|
||||
@@ -98,7 +96,6 @@ const ORCHESTRATOR_TOOL_NAMES = Array.from(new Set([
|
||||
const EXECUTOR_TOOL_NAMES = [
|
||||
...Object.keys(CORE_TOOLS),
|
||||
...Object.keys(ORCHESTRATION_TOOLS).filter(name =>
|
||||
name !== 'delegateToWiseRAH' &&
|
||||
name !== 'executeWorkflow'
|
||||
),
|
||||
...Object.keys(EXECUTION_TOOLS),
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
import { tool } from 'ai';
|
||||
import { z } from 'zod';
|
||||
import { WorkflowExecutor } from '@/services/agents/workflowExecutor';
|
||||
import { RequestContext } from '@/services/context/requestContext';
|
||||
|
||||
export const delegateToWiseRAHTool = tool({
|
||||
description: 'Delegate complex workflows to workflow executor',
|
||||
inputSchema: z.object({
|
||||
task: z.string().describe('Complex workflow description: what needs to be planned and executed'),
|
||||
context: z.array(z.string()).max(8).default([]).describe('Optional context: node IDs, URLs, or key information the planner needs'),
|
||||
expectedOutcome: z.string().optional().describe('Optional: what final result or format you expect in the summary'),
|
||||
workflowKey: z.string().optional().describe('Optional: workflow key if invoked via executeWorkflow'),
|
||||
workflowNodeId: z.number().optional().describe('Optional: target node ID for workflow'),
|
||||
}),
|
||||
execute: async ({ task, context = [], expectedOutcome, workflowKey, workflowNodeId }) => {
|
||||
const requestContext = RequestContext.get();
|
||||
console.log('[delegateToWiseRAH] Current traceId:', requestContext.traceId);
|
||||
|
||||
const sessionId = `workflow_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
||||
|
||||
const execution = await WorkflowExecutor.execute({
|
||||
sessionId,
|
||||
task,
|
||||
context,
|
||||
expectedOutcome,
|
||||
traceId: requestContext.traceId,
|
||||
parentChatId: requestContext.parentChatId,
|
||||
workflowKey,
|
||||
workflowNodeId,
|
||||
});
|
||||
|
||||
// Return a simple string that Claude can directly use in conversation
|
||||
const summary = execution?.summary || 'Workflow completed but no summary returned.';
|
||||
return `Workflow (session ${sessionId.split('_').pop()}) completed:\n\n${summary}`;
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user