kaxil opened a new pull request, #73899:
URL: https://github.com/apache/airflow/pull/73899

   An agent that needs to read files on S3, GCS, Azure or a local path had no 
toolset for it: `HookToolset` over a storage hook exposes whatever the hook's 
methods take, including buckets and paths the Dag author never meant to hand 
over. `ObjectStorageToolset` gives read-only access to the files under one 
`ObjectStoragePath` root, through three tools: `list_files`, `get_file_info`, 
and `read_file`, which returns a window of lines from a text file, or the 
schema and first rows of a Parquet or Avro file.
   
   - **Every path resolves under the root.** Absolute paths, schemes and `..` 
are refused, and on a local root so is a symlink that leads outside it.
   - **Reads are bounded.** A large directory is listed a page at a time, with 
the `offset` to continue from. Bytes read and output size have limits, so one 
call cannot fill the context window or pull a large object into the worker.
   - **A refusal is final, not a retry.** A missing file, a path outside the 
root, or a file the model cannot read (binary, too large, corrupt) comes back 
as a failed call the model can read, without using the tool's retry budget.
   
   It works in `AgentOperator`, a Pydantic AI agent, Strands and Google ADK, 
and is listed as experimental on the stability page. The root is only a path 
check: the connection's own permissions are the real limit, which the docs say.
   
   
   ---
   
   * Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information. Note: commit author/co-author name and email in commits 
become permanently public when merged.
   * For fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   * When adding dependency, check compliance with the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   * For significant user-facing changes create newsfragment: 
`{pr_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
 You can add this file in a follow-up commit after the PR is created so you 
know the PR number.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to