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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ existing `0.1.0` release; earlier development prereleases are not listed.

### Added

- Bind a Managed Session to a BYOC MCP tunnel with `tunnel_id` at creation. On Forward, set the tunnel on a Template for its sessions to inherit. Managed Deployments also accept and return the binding. Template and Deployment updates can replace or clear it.

- Add typed Forward Session budgets across create/update responses and events, including omission, explicit null clearing and decimal-string limits.
- Add Forward Session `config.model` overrides and model `speed` configuration, plus optional approval evaluation details, Outcome/status event fields and cumulative top-level Credits on `session.usage`.
- Add `startup_script` to Forward/Managed Environment models and Managed cloud/self-hosted parameters. It runs on sandbox start/resume; the external worker controls self-hosted execution.
Expand Down
38 changes: 38 additions & 0 deletions docs/api/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9775,6 +9775,7 @@ def create(
name: str,
model: Union[str, ModelConfigParam],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
system: Union[str, None, NotGiven] = NOT_GIVEN,
tools: Union[List[ToolParam], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -9845,6 +9846,7 @@ def update(
managed_tool_config: Union[ManagedToolConfigParam, None,
NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
vaults: Union[Dict[str, ResourceBindingParam], None,
NotGiven] = NOT_GIVEN,
files: Union[Dict[str, ResourceBindingParam], None,
Expand Down Expand Up @@ -9951,6 +9953,7 @@ async def create(
name: str,
model: Union[str, ModelConfigParam],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
system: Union[str, None, NotGiven] = NOT_GIVEN,
tools: Union[List[ToolParam], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -10021,6 +10024,7 @@ async def update(
managed_tool_config: Union[ManagedToolConfigParam, None,
NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
vaults: Union[Dict[str, ResourceBindingParam], None,
NotGiven] = NOT_GIVEN,
files: Union[Dict[str, ResourceBindingParam], None,
Expand Down Expand Up @@ -19174,6 +19178,10 @@ class Template(BaseModel)

#### environment\_id

<a id="qca.forward.types.template.Template.tunnel_id"></a>

#### tunnel\_id

<a id="qca.forward.types.template.Template.vaults"></a>

#### vaults
Expand Down Expand Up @@ -19288,6 +19296,10 @@ class TemplateCreateParams(TypedDict)

#### environment\_id

<a id="qca.forward.types.template_create_params.TemplateCreateParams.tunnel_id"></a>

#### tunnel\_id

<a id="qca.forward.types.template_create_params.TemplateCreateParams.description"></a>

#### description
Expand Down Expand Up @@ -19428,6 +19440,10 @@ class TemplateUpdateParams(TypedDict)

#### environment\_id

<a id="qca.forward.types.template_update_params.TemplateUpdateParams.tunnel_id"></a>

#### tunnel\_id

<a id="qca.forward.types.template_update_params.TemplateUpdateParams.vaults"></a>

#### vaults
Expand Down Expand Up @@ -21483,6 +21499,7 @@ def create(
*,
agent: Union[str, AgentParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
initial_events: List[Union[UserMessageEventParams,
UserDefineOutcomeEventParams,
SystemMessageEventParams]],
Expand Down Expand Up @@ -21548,6 +21565,7 @@ def update(
environment_variables: Union[str, None, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
name: Union[str, None, NotGiven] = NOT_GIVEN,
workspace_id: Union[str, None, NotGiven] = NOT_GIVEN,
metadata: Union[Dict[str, Any], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -21756,6 +21774,7 @@ async def create(
*,
agent: Union[str, AgentParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
initial_events: List[Union[UserMessageEventParams,
UserDefineOutcomeEventParams,
SystemMessageEventParams]],
Expand Down Expand Up @@ -21821,6 +21840,7 @@ async def update(
environment_variables: Union[str, None, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
name: Union[str, None, NotGiven] = NOT_GIVEN,
workspace_id: Union[str, None, NotGiven] = NOT_GIVEN,
metadata: Union[Dict[str, Any], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -24908,6 +24928,7 @@ def create(
*,
agent: Union[str, AgentParams, AgentWithOverridesParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
environment_variables: Union[Dict[str, str], None,
NotGiven] = NOT_GIVEN,
title: Union[str, None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -25178,6 +25199,7 @@ async def create(
*,
agent: Union[str, AgentParams, AgentWithOverridesParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
environment_variables: Union[Dict[str, str], None,
NotGiven] = NOT_GIVEN,
title: Union[str, None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -28965,6 +28987,10 @@ class Deployment(BaseModel)

#### environment\_id

<a id="qca.managed.types.deployment.Deployment.tunnel_id"></a>

#### tunnel\_id

<a id="qca.managed.types.deployment.Deployment.initial_events"></a>

#### initial\_events
Expand Down Expand Up @@ -29057,6 +29083,10 @@ class DeploymentCreateParams(TypedDict)

#### environment\_id

<a id="qca.managed.types.deployment_create_params.DeploymentCreateParams.tunnel_id"></a>

#### tunnel\_id

<a id="qca.managed.types.deployment_create_params.DeploymentCreateParams.initial_events"></a>

#### initial\_events
Expand Down Expand Up @@ -29633,6 +29663,10 @@ class DeploymentUpdateParams(TypedDict)

#### environment\_id

<a id="qca.managed.types.deployment_update_params.DeploymentUpdateParams.tunnel_id"></a>

#### tunnel\_id

<a id="qca.managed.types.deployment_update_params.DeploymentUpdateParams.name"></a>

#### name
Expand Down Expand Up @@ -34541,6 +34575,10 @@ class SessionCreateParams(TypedDict)

#### environment\_id

<a id="qca.managed.types.session_create_params.SessionCreateParams.tunnel_id"></a>

#### tunnel\_id

<a id="qca.managed.types.session_create_params.SessionCreateParams.title"></a>

#### title
Expand Down
8 changes: 8 additions & 0 deletions src/qca/forward/resources/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def create(
name: str,
model: Union[str, ModelConfigParam],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
system: Union[str, None, NotGiven] = NOT_GIVEN,
tools: Union[List[ToolParam], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -80,6 +81,7 @@ def create(
"name": name,
"model": model,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"description": description,
"system": system,
"tools": tools,
Expand Down Expand Up @@ -140,6 +142,7 @@ def update(
max_tool_rounds: Union[int, None, NotGiven] = NOT_GIVEN,
managed_tool_config: Union[ManagedToolConfigParam, None, NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
vaults: Union[Dict[str, ResourceBindingParam], None, NotGiven] = NOT_GIVEN,
files: Union[Dict[str, ResourceBindingParam], None, NotGiven] = NOT_GIVEN,
github_repositories: Union[Dict[str, GitHubRepositoryParam], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -167,6 +170,7 @@ def update(
"max_tool_rounds": max_tool_rounds,
"managed_tool_config": managed_tool_config,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"vaults": vaults,
"files": files,
"github_repositories": github_repositories,
Expand Down Expand Up @@ -265,6 +269,7 @@ async def create(
name: str,
model: Union[str, ModelConfigParam],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
system: Union[str, None, NotGiven] = NOT_GIVEN,
tools: Union[List[ToolParam], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -292,6 +297,7 @@ async def create(
"name": name,
"model": model,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"description": description,
"system": system,
"tools": tools,
Expand Down Expand Up @@ -352,6 +358,7 @@ async def update(
max_tool_rounds: Union[int, None, NotGiven] = NOT_GIVEN,
managed_tool_config: Union[ManagedToolConfigParam, None, NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
vaults: Union[Dict[str, ResourceBindingParam], None, NotGiven] = NOT_GIVEN,
files: Union[Dict[str, ResourceBindingParam], None, NotGiven] = NOT_GIVEN,
github_repositories: Union[Dict[str, GitHubRepositoryParam], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -379,6 +386,7 @@ async def update(
"max_tool_rounds": max_tool_rounds,
"managed_tool_config": managed_tool_config,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"vaults": vaults,
"files": files,
"github_repositories": github_repositories,
Expand Down
1 change: 1 addition & 0 deletions src/qca/forward/types/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Template(BaseModel):
model: Optional[Union[str, ModelConfig]] = None
multiagent: Optional[MultiagentConfig] = None
environment_id: Optional[str] = None
tunnel_id: Optional[str] = None
vaults: Optional[Dict[str, ResourceBinding]] = None
files: Optional[Dict[str, ResourceBinding]] = None
github_repositories: Optional[Dict[str, GitHubRepository]] = None
Expand Down
1 change: 1 addition & 0 deletions src/qca/forward/types/template_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class TemplateCreateParams(TypedDict, total=False):
name: Required[str]
model: Required[Union[str, ModelConfigParam]]
environment_id: Required[str]
tunnel_id: str
description: Optional[str]
system: Optional[str]
tools: List[ToolParam]
Expand Down
1 change: 1 addition & 0 deletions src/qca/forward/types/template_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class TemplateUpdateParams(TypedDict, total=False):
skills: List[SkillBindingParam]
multiagent: MultiagentConfigParam
environment_id: Optional[str]
tunnel_id: Optional[str]
vaults: Dict[str, ResourceBindingParam]
files: Dict[str, ResourceBindingParam]
github_repositories: Dict[str, GitHubRepositoryParam]
Expand Down
8 changes: 8 additions & 0 deletions src/qca/managed/resources/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def create(
*,
agent: Union[str, AgentParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
initial_events: List[Union[UserMessageEventParams, UserDefineOutcomeEventParams, SystemMessageEventParams]],
name: str,
environment_variables: Union[str, None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -71,6 +72,7 @@ def create(
"environment_variables": environment_variables,
"agent": agent,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"initial_events": initial_events,
"name": name,
"description": description,
Expand Down Expand Up @@ -120,6 +122,7 @@ def update(
environment_variables: Union[str, None, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
name: Union[str, None, NotGiven] = NOT_GIVEN,
workspace_id: Union[str, None, NotGiven] = NOT_GIVEN,
metadata: Union[Dict[str, Any], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -155,6 +158,7 @@ def update(
"environment_variables": environment_variables,
"description": description,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"name": name,
"metadata": metadata,
"resources": resources,
Expand Down Expand Up @@ -370,6 +374,7 @@ async def create(
*,
agent: Union[str, AgentParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
initial_events: List[Union[UserMessageEventParams, UserDefineOutcomeEventParams, SystemMessageEventParams]],
name: str,
environment_variables: Union[str, None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -404,6 +409,7 @@ async def create(
"environment_variables": environment_variables,
"agent": agent,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"initial_events": initial_events,
"name": name,
"description": description,
Expand Down Expand Up @@ -453,6 +459,7 @@ async def update(
environment_variables: Union[str, None, NotGiven] = NOT_GIVEN,
description: Union[str, None, NotGiven] = NOT_GIVEN,
environment_id: Union[str, None, NotGiven] = NOT_GIVEN,
tunnel_id: Union[str, None, NotGiven] = NOT_GIVEN,
name: Union[str, None, NotGiven] = NOT_GIVEN,
workspace_id: Union[str, None, NotGiven] = NOT_GIVEN,
metadata: Union[Dict[str, Any], None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -488,6 +495,7 @@ async def update(
"environment_variables": environment_variables,
"description": description,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"name": name,
"metadata": metadata,
"resources": resources,
Expand Down
4 changes: 4 additions & 0 deletions src/qca/managed/resources/sessions/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def create(
*,
agent: Union[str, AgentParams, AgentWithOverridesParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
environment_variables: Union[Dict[str, str], None, NotGiven] = NOT_GIVEN,
title: Union[str, None, NotGiven] = NOT_GIVEN,
workspace_id: Union[str, None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -110,6 +111,7 @@ def create(
"environment_variables": environment_variables,
"agent": agent,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"title": title,
"budget": budget,
"initial_events": initial_events,
Expand Down Expand Up @@ -394,6 +396,7 @@ async def create(
*,
agent: Union[str, AgentParams, AgentWithOverridesParams],
environment_id: str,
tunnel_id: Union[str, NotGiven] = NOT_GIVEN,
environment_variables: Union[Dict[str, str], None, NotGiven] = NOT_GIVEN,
title: Union[str, None, NotGiven] = NOT_GIVEN,
workspace_id: Union[str, None, NotGiven] = NOT_GIVEN,
Expand Down Expand Up @@ -428,6 +431,7 @@ async def create(
"environment_variables": environment_variables,
"agent": agent,
"environment_id": environment_id,
"tunnel_id": tunnel_id,
"title": title,
"budget": budget,
"initial_events": initial_events,
Expand Down
1 change: 1 addition & 0 deletions src/qca/managed/types/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Deployment(BaseModel):
created_at: Optional[datetime] = None
description: Optional[str] = None
environment_id: Optional[str] = None
tunnel_id: Optional[str] = None
initial_events: Optional[List[DeploymentInitialEventUnion]] = None
metadata: Optional[Dict[str, str]] = None
name: Optional[str] = None
Expand Down
1 change: 1 addition & 0 deletions src/qca/managed/types/deployment_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class DeploymentCreateParams(TypedDict, total=False):
environment_variables: Optional[str]
agent: Required[Union[str, AgentParams]]
environment_id: Required[str]
tunnel_id: str
initial_events: Required[
List[Union[UserMessageEventParams, UserDefineOutcomeEventParams, SystemMessageEventParams]]
]
Expand Down
1 change: 1 addition & 0 deletions src/qca/managed/types/deployment_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class DeploymentUpdateParams(TypedDict, total=False):
environment_variables: Optional[str]
description: Optional[str]
environment_id: Optional[str]
tunnel_id: Optional[str]
name: Optional[str]
workspace_id: Optional[str]
metadata: Dict[str, Any]
Expand Down
1 change: 1 addition & 0 deletions src/qca/managed/types/session_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SessionCreateParams(TypedDict, total=False):
environment_variables: Dict[str, str]
agent: Required[Union[str, AgentParams, AgentWithOverridesParams]]
environment_id: Required[str]
tunnel_id: str
title: Optional[str]
workspace_id: Optional[str]
budget: BudgetLimitParam
Expand Down
Loading
Loading