Allow router session tools to read external parquet paths
This commit is contained in:
@@ -254,7 +254,7 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
|
||||
'paths': {
|
||||
'type': 'array',
|
||||
'items': {'type': 'string'},
|
||||
'description': 'Workspace-relative parquet files or date directories. Use when dates is not enough.',
|
||||
'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},
|
||||
@@ -280,7 +280,7 @@ def build_data_agent_tools(handlers: Mapping[str, ToolHandler]) -> list[AgentToo
|
||||
'paths': {
|
||||
'type': 'array',
|
||||
'items': {'type': 'string'},
|
||||
'description': 'Workspace-relative parquet files or date directories. Use when dates is not enough.',
|
||||
'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'}},
|
||||
|
||||
@@ -278,10 +278,6 @@ def _resolve_parquet_files(
|
||||
files: list[Path] = []
|
||||
for path in requested:
|
||||
resolved = path.resolve()
|
||||
try:
|
||||
resolved.relative_to(root_path)
|
||||
except ValueError as exc:
|
||||
raise DataAgentRouterSessionError(f'path escapes workspace root: {path}') from exc
|
||||
if not resolved.exists():
|
||||
raise DataAgentRouterSessionError(f'path not found: {path}')
|
||||
if resolved.is_dir():
|
||||
|
||||
Reference in New Issue
Block a user