feat: add path validation for archive, provider, sandbox, step, and identity IDs (#5526)

- Add validation for archive_id in archives.py
- Add validation for provider_id in providers.py
- Add validation for sandbox_config_id in sandbox_configs.py
- Add validation for step_id in steps.py
- Add validation for identity_id in identities.py
- Update validators.py to include new primitives and remove mcp_server
- Regenerate OpenAPI schema and SDK

🤖 Generated with Claude Code

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Kian Jones
2025-10-17 16:37:05 -07:00
committed by Caren Thomas
parent c97a395a48
commit c4379c3b8b
7 changed files with 155 additions and 38 deletions

View File

@@ -3,7 +3,23 @@ import re
from fastapi import Path
# TODO: extract this list from routers/v1/__init__.py and ROUTERS
primitives = ["agent", "message", "run", "job", "group", "block", "file", "folder", "source", "tool", "mcp_server"]
primitives = [
"agent",
"message",
"run",
"job",
"group",
"block",
"file",
"folder",
"source",
"tool",
"archive",
"provider",
"sandbox",
"step",
"identity",
]
PRIMITIVE_ID_PATTERNS = {
# f-string interpolation gets confused because of the regex's required curly braces {}