Remove legacy online mining tools

This commit is contained in:
wuyang6
2026-05-12 18:03:39 +08:00
parent 6dad2cc4b3
commit a48c86501a
4 changed files with 6 additions and 1011 deletions
-136
View File
@@ -237,142 +237,6 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
},
handler=resolve_handler(handlers, 'data_agent_render_source_context', 'data-agent'),
),
AgentTool(
name='data_agent_profile_router_sessions',
description=(
'Profile local router_session_parquet date partitions before mining online sessions. '
'Returns schema, sampled row count, distributions, and example sessions.'
),
parameters={
'type': 'object',
'properties': {
'dates': {
'type': 'array',
'items': {'type': 'string'},
'description': 'Date partitions such as ["20260428"]. Resolved under router_session_parquet/date=YYYYMMDD.',
},
'paths': {
'type': 'array',
'items': {'type': 'string'},
'description': 'Parquet files or date directories. Relative paths resolve from workspace root; absolute paths are allowed for external online data.',
},
'max_files': {'type': 'integer', 'minimum': 1, 'maximum': 200},
'max_rows_per_file': {'type': 'integer', 'minimum': 1, 'maximum': 100000},
'examples_limit': {'type': 'integer', 'minimum': 0, 'maximum': 20},
},
},
handler=resolve_handler(handlers, 'data_agent_profile_router_sessions', 'data-agent'),
),
AgentTool(
name='data_agent_search_router_sessions',
description=(
'Search local router_session_parquet data with reviewable filters such as device, domain, intent, func, '
'query keywords, regex, turn count, and match scope. Returns turn-level candidates with prev turns.'
),
parameters={
'type': 'object',
'properties': {
'dates': {
'type': 'array',
'items': {'type': 'string'},
'description': 'Date partitions such as ["20260428"]. Resolved under router_session_parquet/date=YYYYMMDD.',
},
'paths': {
'type': 'array',
'items': {'type': 'string'},
'description': 'Parquet files or date directories. Relative paths resolve from workspace root; absolute paths are allowed for external online data.',
},
'devices': {'type': 'array', 'items': {'type': 'string'}},
'domains': {'type': 'array', 'items': {'type': 'string'}},
'intents': {'type': 'array', 'items': {'type': 'string'}},
'funcs': {'type': 'array', 'items': {'type': 'string'}},
'query_keywords': {'type': 'array', 'items': {'type': 'string'}},
'keyword_match_mode': {'type': 'string', 'enum': ['any', 'all']},
'query_regex': {'type': 'string'},
'match_scope': {'type': 'string', 'enum': ['any_turn', 'last_turn']},
'turn_count_min': {'type': 'integer', 'minimum': 1},
'turn_count_max': {'type': 'integer', 'minimum': 1},
'max_files': {'type': 'integer', 'minimum': 1, 'maximum': 200},
'max_rows_per_file': {'type': 'integer', 'minimum': 1, 'maximum': 100000},
'max_candidates': {'type': 'integer', 'minimum': 1, 'maximum': 5000},
},
},
handler=resolve_handler(handlers, 'data_agent_search_router_sessions', 'data-agent'),
),
AgentTool(
name='data_agent_sample_router_candidates',
description=(
'Sample router session candidates for human review and return candidate-level summary statistics. '
'Use after data_agent_search_router_sessions.'
),
parameters={
'type': 'object',
'properties': {
'candidates': {
'oneOf': [
{'type': 'array'},
{'type': 'object'},
{'type': 'string'},
],
'description': 'Candidates array, search result object, or JSON string containing candidates.',
},
'sample_size': {'type': 'integer', 'minimum': 1, 'maximum': 1000},
'strategy': {'type': 'string', 'enum': ['random', 'first', 'stride']},
'seed': {'type': 'integer'},
},
'required': ['candidates'],
},
handler=resolve_handler(handlers, 'data_agent_sample_router_candidates', 'data-agent'),
),
AgentTool(
name='data_agent_convert_router_candidates_to_records',
description=(
'Convert reviewed online router session candidates directly into canonical data-agent records. '
'Use this when the user wants to keep mined online data as samples; do not use generation-plan tools for this path.'
),
parameters={
'type': 'object',
'properties': {
'candidates': {
'oneOf': [
{'type': 'array'},
{'type': 'object'},
{'type': 'string'},
],
'description': 'Candidates array, search/sample result object, or JSON string containing candidates.',
},
'dataset_label': {'type': 'string'},
'default_target': {
'type': 'string',
'description': 'Target label used for included candidates unless review_decisions provides a target.',
},
'default_complex': {
'type': 'boolean',
'description': 'Default complex dimension for included candidates unless review_decisions provides complex.',
},
'review_decisions': {
'type': 'array',
'description': 'Optional include/exclude/uncertain decisions keyed by semantic_session_id or req_id.',
'items': {
'type': 'object',
'properties': {
'semantic_session_id': {'type': 'string'},
'req_id': {'type': 'string'},
'matched_turn_index': {'type': 'integer'},
'decision': {'type': 'string', 'enum': ['include', 'exclude', 'uncertain']},
'target': {'type': 'string'},
'complex': {'type': 'boolean'},
'notes': {'type': 'string'},
},
},
},
'batch_id': {'type': 'string'},
'include_uncertain': {'type': 'boolean'},
},
'required': ['candidates', 'dataset_label'],
},
handler=resolve_handler(handlers, 'data_agent_convert_router_candidates_to_records', 'data-agent'),
),
AgentTool(
name='data_agent_show_generation_plan',
description='Show a data-agent generation plan for human review.',