kaxil opened a new pull request, #69924: URL: https://github.com/apache/airflow/pull/69924
`AgentSkillsToolset` gains an optional `exclude_resources` parameter — a list of glob patterns forwarded to `pydantic-ai-skills`' `SkillsToolset` that keeps matched files out of a skill's discovered resources. It mirrors the existing `exclude_tools` escape hatch and is resolved per-run on the worker (so nothing is baked into the serialized DAG). ## Why now [`pydantic-ai-skills` 1.2.0](https://github.com/DougTrajano/pydantic-ai-skills/releases/tag/v1.2.0) broadened resource discovery from a fixed seven-extension allowlist (`.md/.json/.yaml/.yml/.csv/.xml/.txt`) to **every readable text file** in a skill bundle, so `.sql`, `.toml`, `.jinja`, and similar assets are exposed with no extra config ([DougTrajano/pydantic-ai-skills#54](https://github.com/DougTrajano/pydantic-ai-skills/issues/54), [#55](https://github.com/DougTrajano/pydantic-ai-skills/pull/55)). That broader discovery also means more files reach the model, so `exclude_resources` is the trim knob for secrets or scratch files that happen to live in a skill directory. The two ship together: broaden discovery, and give users a way to narrow it back. ## Usage ```python from airflow.providers.common.ai.toolsets.skills import AgentSkillsToolset toolset = AgentSkillsToolset( sources=["./skills"], exclude_resources=["*.env", "secrets/*"], # added on top of the built-in defaults ) ``` Patterns extend the built-in defaults (`__pycache__`, `*.pyc`, `*.pyo`, `.DS_Store`, `.git`) and match either the full skill-relative path or any single path component. ## Scope of the guarantee `exclude_resources` hides files from **resource discovery only** — the resource list and the `read_skill_resource` tool. It does **not** stop a skill's `run_skill_script` from reading an excluded file off disk (a skill script runs as a subprocess with the worker's filesystem permissions). When files are genuinely sensitive, pair it with `exclude_tools={"run_skill_script"}`. This is called out in both the docstring and the toolset guide. ## Packaging notes - The `[skills]` extra floor moves to `pydantic-ai-skills>=1.2.0` (the version that adds the parameter). - 1.2.0 was published inside the repo's `exclude-newer = "4 days"` window, so a **temporary** per-package `exclude-newer-package` cutoff (`2026-07-16T00:00:00Z`) is added in both `[tool.uv.exclude-newer-package]` and `[tool.uv.pip.exclude-newer-package]` so it resolves. The comment marks it for removal once the rolling window advances past 2026-07-15. - Regenerating `uv.lock` for the floor bump also picked up **pre-existing drift on `main`** unrelated to this change: the `openai` provider had already dropped its `[datalib]` extra in `pyproject.toml` but the lock was never refreshed, and `common-dataquality` is re-sorted. `uv lock` always fully syncs, so this churn is unavoidable when touching the lock. -- 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]
