Repository navigation
fix(python): align skills discovery and catalog ownership - #6546
jabrailkhalil wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the skill discovery mechanism to scan both .agents/skills and skills directories by default, and introduces a metadata key (skillsActivationTool) to track the activation tool associated with injected prompts. It also adds comprehensive unit tests for these features. The feedback suggests simplifying redundant dictionary type checks on the metadata variable in _skills.py to improve code readability.
|
Resolved the conflict with current main in 3f3221e. The merge preserves main's new Tool-handle API and description while keeping catalog ownership/discovery behavior. The unknown-name regression now executes through the handle's Action; expected output is unchanged. All 26 skills tests pass. With these same tests and clean current-main packages, 13 fail as expected. Full middleware validation is 95 passed / 1 failed on the PR versus 77 passed / the same 1 failed on main: an existing Windows path-separator assertion. Changed-file Ty, package Ruff and formatting pass; wheel/sdist build. Package-wide Ty's one fallback/ActionKind diagnostic also reproduces on main. No unrelated failures or dependency versions were patched. Could a maintainer review the integration head and approve the upstream workflows? The description distinguishes fresh Windows evidence from earlier Linux validation. |
Merge current main and preserve its public GenerateActionOptions import alongside the existing skills regression coverage.
|
Hi @jabrailkhalil — heads up that Genkit Python SDK development has moved to https://github.com/genkit-ai/genkit-python! Could you re-open this PR over there (file paths map 1:1 after stripping the leading py/ prefix; note genkit-ai/genkit-python#52 also updated _skills.py recently), and link/close this PR once moved? cc @huangjeff5 |
|
Thanks, Michael. I moved this to genkit-ai/genkit-python#166 and kept the discovery behavior from #52 in the new repo. Closing this copy. |
I align Python skill discovery and catalog ownership with the existing activation-tool contract:
Skills()scans.agents/skillsbeforeskills, later directories win duplicate names, and explicitskill_pathsreplace the defaults. I nameuse_skillin the catalog, recordskillsActivationTool, refresh same-owner/legacy catalogs and preserve foreign catalogs.This addresses the discovery/catalog portions of #6510 as the Python counterpart to #6544. I also test the existing recoverable unknown-name response.
I merged main
8ee17216into706e7378. Upstream removedTool.action(), so I updated the response assertions to call the tool through its public API. The net diff remains the skills handler, tests and README.Current-head Linux validation checks out
706e73783cff93913ef18d3e8409098f32fe1410:The first current-main run caught the obsolete test API call; the linked run includes its correction. Live-provider tests retain their existing skips. I have not repeated the updated wheel checks on Windows or exercised live providers; upstream CI authorization and review are still required.