5000d1c003
GCPSkillRegistry.get_skill() interpolated the caller-supplied name straight
into "projects/.../locations/.../skills/{name}" and handed that to the Vertex
SDK, so a name containing a slash or "../" addressed a different resource than
the one asked for. The name comes from a model-issued tool call, so nothing
upstream of this point constrains it.
It now checks the name against the same snake-or-kebab pattern skill names are
already held to, and raises ValueError before any request is made.
Behaviour change: a name outside that character set, such as one with an
uppercase letter, a dot, or a slash, now raises ValueError locally instead of
reaching the registry. The registry would have rejected it anyway, so what
changes is the error type and the fact that no request goes out.
Ports the validation half of the upstream change. The percent-encoding half
does not apply here, because this branch builds an SDK resource name rather
than a URL and every character the pattern accepts is already safe.