Skip to content
Open
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: 5 additions & 0 deletions .changeset/20260918134615-regenerate-sdk-from-openapi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@truefoundry/trueforge-sdk": patch
---

Regenerate SDK from updated OpenAPI spec.
6 changes: 6 additions & 0 deletions .changeset/turn-hitl-paused.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@truefoundry/trueforge": patch
"@truefoundry/trueforge-core": patch
---

Pause a turn on HITL (`paused` + `turn.update` with action-required event ids) instead of marking it `done` with required actions.
106 changes: 33 additions & 73 deletions .github/fern/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,6 @@
],
"type": "object"
},
"ActionRequiredEvent": {
"discriminator": {
"mapping": {
"mcp.auth_required": "#/components/schemas/MCPAuthRequiredEvent",
"tool.approval_required": "#/components/schemas/ToolApprovalRequiredEvent",
"tool.response_required": "#/components/schemas/ToolResponseRequiredEvent"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/components/schemas/ToolApprovalRequiredEvent"
},
{
"$ref": "#/components/schemas/ToolResponseRequiredEvent"
},
{
"$ref": "#/components/schemas/MCPAuthRequiredEvent"
}
]
},
"Agent": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -5224,6 +5203,7 @@
"cancelled": "#/components/schemas/TurnStateCancelled",
"done": "#/components/schemas/TurnStateDone",
"error": "#/components/schemas/TurnStateError",
"paused": "#/components/schemas/TurnStatePaused",
"running": "#/components/schemas/TurnStateRunning"
},
"propertyName": "status"
Expand All @@ -5232,6 +5212,9 @@
{
"$ref": "#/components/schemas/TurnStateRunning"
},
{
"$ref": "#/components/schemas/TurnStatePaused"
},
{
"$ref": "#/components/schemas/TurnStateDone"
},
Expand Down Expand Up @@ -5305,17 +5288,10 @@
"type": "null"
}
],
"description": "Final `model.message` for the turn, or null when the turn ended paused without a final message."
},
"required_actions": {
"description": "Pending actions (`tool.approval_required`, `tool.response_required`, `mcp.auth_required`); empty when none.",
"items": {
"$ref": "#/components/schemas/ActionRequiredEvent"
},
"type": "array"
"description": "Final `model.message` for the turn, or null when the turn finished without one."
},
"status": {
"description": "Turn finished (possibly paused for required actions).",
"description": "Turn finished with no open required actions.",
"enum": [
"done"
],
Expand All @@ -5325,7 +5301,6 @@
"required": [
"status",
"output",
"required_actions",
"completed_at"
],
"type": "object"
Expand Down Expand Up @@ -5365,6 +5340,29 @@
],
"type": "object"
},
"TurnStatePaused": {
"properties": {
"action_required_on_events": {
"description": "Events that still need a user or client action.",
"items": {
"$ref": "#/components/schemas/ActionRequired"
},
"type": "array"
},
"status": {
"description": "Turn is paused waiting for required actions.",
"enum": [
"paused"
],
"type": "string"
}
},
"required": [
"status",
"action_required_on_events"
],
"type": "object"
},
"TurnStateRunning": {
"properties": {
"status": {
Expand Down Expand Up @@ -5482,58 +5480,20 @@
"description": "Live non-terminal turn status.",
"discriminator": {
"mapping": {
"paused": "#/components/schemas/TurnUpdateStatePaused",
"running": "#/components/schemas/TurnUpdateStateRunning"
"paused": "#/components/schemas/TurnStatePaused",
"running": "#/components/schemas/TurnStateRunning"
},
"propertyName": "status"
},
"oneOf": [
{
"$ref": "#/components/schemas/TurnUpdateStatePaused"
"$ref": "#/components/schemas/TurnStatePaused"
},
{
"$ref": "#/components/schemas/TurnUpdateStateRunning"
"$ref": "#/components/schemas/TurnStateRunning"
}
]
},
"TurnUpdateStatePaused": {
"properties": {
"action_required_on_events": {
"description": "Events that still need a user or client action.",
"items": {
"$ref": "#/components/schemas/ActionRequired"
},
"type": "array"
},
"status": {
"description": "Turn is paused waiting for required actions.",
"enum": [
"paused"
],
"type": "string"
}
},
"required": [
"status",
"action_required_on_events"
],
"type": "object"
},
"TurnUpdateStateRunning": {
"properties": {
"status": {
"description": "Turn is executing.",
"enum": [
"running"
],
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"UpdateAgentRequest": {
"additionalProperties": false,
"properties": {
Expand Down
106 changes: 33 additions & 73 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,6 @@
],
"type": "object"
},
"ActionRequiredEvent": {
"discriminator": {
"mapping": {
"mcp.auth_required": "#/components/schemas/MCPAuthRequiredEvent",
"tool.approval_required": "#/components/schemas/ToolApprovalRequiredEvent",
"tool.response_required": "#/components/schemas/ToolResponseRequiredEvent"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/components/schemas/ToolApprovalRequiredEvent"
},
{
"$ref": "#/components/schemas/ToolResponseRequiredEvent"
},
{
"$ref": "#/components/schemas/MCPAuthRequiredEvent"
}
]
},
"Agent": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -5224,6 +5203,7 @@
"cancelled": "#/components/schemas/TurnStateCancelled",
"done": "#/components/schemas/TurnStateDone",
"error": "#/components/schemas/TurnStateError",
"paused": "#/components/schemas/TurnStatePaused",
"running": "#/components/schemas/TurnStateRunning"
},
"propertyName": "status"
Expand All @@ -5232,6 +5212,9 @@
{
"$ref": "#/components/schemas/TurnStateRunning"
},
{
"$ref": "#/components/schemas/TurnStatePaused"
},
{
"$ref": "#/components/schemas/TurnStateDone"
},
Expand Down Expand Up @@ -5305,17 +5288,10 @@
"type": "null"
}
],
"description": "Final `model.message` for the turn, or null when the turn ended paused without a final message."
},
"required_actions": {
"description": "Pending actions (`tool.approval_required`, `tool.response_required`, `mcp.auth_required`); empty when none.",
"items": {
"$ref": "#/components/schemas/ActionRequiredEvent"
},
"type": "array"
"description": "Final `model.message` for the turn, or null when the turn finished without one."
},
"status": {
"description": "Turn finished (possibly paused for required actions).",
"description": "Turn finished with no open required actions.",
"enum": [
"done"
],
Expand All @@ -5325,7 +5301,6 @@
"required": [
"status",
"output",
"required_actions",
"completed_at"
],
"type": "object"
Expand Down Expand Up @@ -5365,6 +5340,29 @@
],
"type": "object"
},
"TurnStatePaused": {
"properties": {
"action_required_on_events": {
"description": "Events that still need a user or client action.",
"items": {
"$ref": "#/components/schemas/ActionRequired"
},
"type": "array"
},
"status": {
"description": "Turn is paused waiting for required actions.",
"enum": [
"paused"
],
"type": "string"
}
},
"required": [
"status",
"action_required_on_events"
],
"type": "object"
},
"TurnStateRunning": {
"properties": {
"status": {
Expand Down Expand Up @@ -5482,58 +5480,20 @@
"description": "Live non-terminal turn status.",
"discriminator": {
"mapping": {
"paused": "#/components/schemas/TurnUpdateStatePaused",
"running": "#/components/schemas/TurnUpdateStateRunning"
"paused": "#/components/schemas/TurnStatePaused",
"running": "#/components/schemas/TurnStateRunning"
},
"propertyName": "status"
},
"oneOf": [
{
"$ref": "#/components/schemas/TurnUpdateStatePaused"
"$ref": "#/components/schemas/TurnStatePaused"
},
{
"$ref": "#/components/schemas/TurnUpdateStateRunning"
"$ref": "#/components/schemas/TurnStateRunning"
}
]
},
"TurnUpdateStatePaused": {
"properties": {
"action_required_on_events": {
"description": "Events that still need a user or client action.",
"items": {
"$ref": "#/components/schemas/ActionRequired"
},
"type": "array"
},
"status": {
"description": "Turn is paused waiting for required actions.",
"enum": [
"paused"
],
"type": "string"
}
},
"required": [
"status",
"action_required_on_events"
],
"type": "object"
},
"TurnUpdateStateRunning": {
"properties": {
"status": {
"description": "Turn is executing.",
"enum": [
"running"
],
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"UpdateAgentRequest": {
"additionalProperties": false,
"properties": {
Expand Down
Loading
Loading