Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ All notable changes to this project will be documented in this file.
### Added

- **`ADMIN_ALLOWED_IPS` for admin UI** — When set, only matching client IPs may access `/admin` (HTML, APIs, static files, WebSocket). Comma-separated IPs and optional CIDR notation; empty or unset allows all. Uses the first address in `X-Forwarded-For` when present.
- **Dynamic choices for `AgentMethodField`** — Fields can now use `dynamic_choices` instead of static `choices` to resolve options at runtime via a callback. Add a `dynamic_choices_callback` callable (signature: `(method_name: str, context: dict) -> dict[str, list[tuple[str, str]]]`) to the `Agent` constructor and a `dynamic_choices` key to your `AgentMethodField`. Supervaize Studio fetches choices from the new `POST /supervaizer/agents/{slug}/start/dynamic_choices` endpoint (with `workspace_id` and `mission_id` in the request body) when rendering the job start form. Static `choices` and `dynamic_choices` are mutually exclusive on a field. See [Dynamic Choices guide](https://docs.runwaize.com/docs/supervaizer-controller/dynamic-choices).

### Unit Tests Results

`just test`

| Status | Count |
| ---------- | ----- |
| ✅ Passed | 446 |
| ✅ Passed | 464 |
| 🤔 Skipped | 0 |
| 🔴 Failed | 0 |
| ⏱️ in | 48s |
| ⏱️ in | 65s |

## v0.12.0

Expand Down
84 changes: 83 additions & 1 deletion docs/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,76 @@
]
}
},
"/supervaizer/agents/competitor-summary/start/dynamic_choices": {
"post": {
"tags": [
"Supervision",
"Supervision"
],
"summary": "Get dynamic choices for agent: competitor_summary start method",
"description": "Returns dynamic choice values for fields that use dynamic_choices. Accepts workspace and mission context for contextualized choices.",
"operationId": "get_dynamic_choices_supervaizer_agents_competitor_summary_start_dynamic_choices_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"title": "Body Params"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"additionalProperties": true,
"type": "object",
"title": "Response 200 Get Dynamic Choices Supervaizer Agents Competitor Summary Start Dynamic Choices Post"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"APIKeyHeader": []
}
]
}
},
"/supervaizer/agents/competitor-summary/jobs": {
"post": {
"tags": [
Expand Down Expand Up @@ -3578,6 +3648,18 @@
"title": "Required",
"description": "Whether field is required for form submission",
"default": false
},
"dynamic_choices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Dynamic Choices",
"description": "Key name for dynamic choices resolved at runtime via Agent.dynamic_choices_callback. Mutually exclusive with 'choices'."
}
},
"type": "object",
Expand Down Expand Up @@ -4023,7 +4105,7 @@
"type": "string",
"format": "date-time",
"title": "Timestamp",
"default": "2026-03-23T22:47:03.534997"
"default": "2026-04-08T23:59:53.027216"
},
"status_code": {
"type": "integer",
Expand Down
2 changes: 1 addition & 1 deletion docs/model_reference/model_core.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,4 @@ public_url: full url (including scheme and port) to use for outbound connections
```


*Uploaded on 2026-03-23 22:47:03*
*Uploaded on 2026-03-23 22:47:03*
2 changes: 1 addition & 1 deletion docs/model_reference/model_extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,4 +490,4 @@ A base class for creating Pydantic models.
| `details` | `Dict[str, Any]` | **required** | |


*Uploaded on 2026-03-23 22:47:03*
*Uploaded on 2026-03-23 22:47:03*
Loading
Loading