openai 0.102.0 → 0.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agent_session_environment_expired_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_environment_state.rb +6 -0
- data/lib/openai/models/beta/agent_session_environment_suspended_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_event.rb +7 -1
- data/lib/openai/models/beta/agents/environment_info.rb +3 -0
- data/lib/openai/models/webhooks/agent_environment_expired_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/agent_environment_suspended_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +8 -3
- data/lib/openai/models/webhooks/webhook_create_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +2 -0
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -0
- data/rbi/openai/models/beta/agent_session_environment_expired_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_environment_state.rbi +6 -0
- data/rbi/openai/models/beta/agent_session_environment_suspended_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_event.rbi +2 -0
- data/rbi/openai/models/beta/agents/environment_info.rbi +3 -0
- data/rbi/openai/models/webhooks/agent_environment_expired_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/agent_environment_suspended_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +3 -2
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +8 -0
- data/rbi/openai/resources/webhooks.rbi +2 -0
- data/sig/openai/models/beta/agent_session_environment_expired_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_environment_state.rbs +14 -1
- data/sig/openai/models/beta/agent_session_environment_suspended_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_event.rbs +2 -0
- data/sig/openai/models/beta/agents/environment_info.rbs +11 -1
- data/sig/openai/models/webhooks/agent_environment_expired_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/agent_environment_suspended_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +3 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +4 -0
- data/sig/openai/resources/webhooks.rbs +3 -1
- metadata +13 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
class AgentSessionEnvironmentSuspendedEvent < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Beta::AgentSessionEnvironmentSuspendedEvent,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The current environment state.
|
|
18
|
+
sig { returns(OpenAI::Beta::AgentSessionEnvironmentState) }
|
|
19
|
+
attr_reader :environment
|
|
20
|
+
|
|
21
|
+
sig { params(environment: OpenAI::Beta::AgentSessionEnvironmentState::OrHash).void }
|
|
22
|
+
attr_writer :environment
|
|
23
|
+
|
|
24
|
+
# The unique ID of the event.
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :event_id
|
|
27
|
+
|
|
28
|
+
# The ID of the session associated with the event.
|
|
29
|
+
sig { returns(String) }
|
|
30
|
+
attr_accessor :session_id
|
|
31
|
+
|
|
32
|
+
# The ID of the turn associated with the event, when applicable.
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_accessor :turn_id
|
|
35
|
+
|
|
36
|
+
# The type of the object. Always `agent.session.environment.suspended`.
|
|
37
|
+
sig { returns(Symbol) }
|
|
38
|
+
attr_accessor :type
|
|
39
|
+
|
|
40
|
+
# Emitted after an idle hosted session environment is checkpointed and stopped.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
|
|
44
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState::OrHash,
|
|
45
|
+
|
|
46
|
+
event_id: String,
|
|
47
|
+
|
|
48
|
+
session_id: String,
|
|
49
|
+
|
|
50
|
+
turn_id: T.nilable(String),
|
|
51
|
+
|
|
52
|
+
type: Symbol
|
|
53
|
+
)
|
|
54
|
+
.returns(T.attached_class)
|
|
55
|
+
end
|
|
56
|
+
def self.new(
|
|
57
|
+
|
|
58
|
+
# The current environment state.
|
|
59
|
+
environment:,
|
|
60
|
+
|
|
61
|
+
# The unique ID of the event.
|
|
62
|
+
event_id:,
|
|
63
|
+
|
|
64
|
+
# The ID of the session associated with the event.
|
|
65
|
+
session_id:,
|
|
66
|
+
|
|
67
|
+
# The ID of the turn associated with the event, when applicable.
|
|
68
|
+
turn_id:,
|
|
69
|
+
|
|
70
|
+
# The type of the object. Always `agent.session.environment.suspended`.
|
|
71
|
+
|
|
72
|
+
type: :"agent.session.environment.suspended"
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
80
|
+
event_id: String,
|
|
81
|
+
session_id: String,
|
|
82
|
+
turn_id: T.nilable(String),
|
|
83
|
+
type: Symbol
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
def to_hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -13,6 +13,8 @@ module OpenAI
|
|
|
13
13
|
T.any(
|
|
14
14
|
OpenAI::Beta::AgentSessionErrorEvent,
|
|
15
15
|
OpenAI::Beta::AgentSessionEnvironmentReadyEvent,
|
|
16
|
+
OpenAI::Beta::AgentSessionEnvironmentSuspendedEvent,
|
|
17
|
+
OpenAI::Beta::AgentSessionEnvironmentExpiredEvent,
|
|
16
18
|
OpenAI::Beta::AgentSessionEnvironmentResetEvent,
|
|
17
19
|
OpenAI::Beta::AgentOutputCommandExecutionOutputDeltaEvent,
|
|
18
20
|
OpenAI::Beta::AgentSessionCreatedEvent,
|
|
@@ -126,6 +126,9 @@ module OpenAI
|
|
|
126
126
|
|
|
127
127
|
CONNECTED = T.let(:connected, OpenAI::Beta::Agents::EnvironmentInfo::Status::TaggedSymbol)
|
|
128
128
|
DISCONNECTED = T.let(:disconnected, OpenAI::Beta::Agents::EnvironmentInfo::Status::TaggedSymbol)
|
|
129
|
+
# The sandbox is stopped and can be resumed from its private checkpoint.
|
|
130
|
+
SUSPENDED = T.let(:suspended, OpenAI::Beta::Agents::EnvironmentInfo::Status::TaggedSymbol)
|
|
131
|
+
|
|
129
132
|
EXPIRED = T.let(:expired, OpenAI::Beta::Agents::EnvironmentInfo::Status::TaggedSymbol)
|
|
130
133
|
FAILED = T.let(:failed, OpenAI::Beta::Agents::EnvironmentInfo::Status::TaggedSymbol)
|
|
131
134
|
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class AgentEnvironmentExpiredWebhookEvent < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The unique ID of the event.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
22
|
+
sig { returns(Integer) }
|
|
23
|
+
attr_accessor :created_at
|
|
24
|
+
|
|
25
|
+
# Identifies the environment whose lifecycle changed.
|
|
26
|
+
sig { returns(OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data) }
|
|
27
|
+
attr_reader :data
|
|
28
|
+
|
|
29
|
+
sig { params(data: OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data::OrHash).void }
|
|
30
|
+
attr_writer :data
|
|
31
|
+
|
|
32
|
+
# The object type. Always `event`.
|
|
33
|
+
sig { returns(Symbol) }
|
|
34
|
+
attr_accessor :object
|
|
35
|
+
|
|
36
|
+
# The event type. Always `agent.environment.expired`.
|
|
37
|
+
sig { returns(Symbol) }
|
|
38
|
+
attr_accessor :type
|
|
39
|
+
|
|
40
|
+
# Sent when an agent environment expires and can no longer resume from a snapshot.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
|
|
44
|
+
id: String,
|
|
45
|
+
|
|
46
|
+
created_at: Integer,
|
|
47
|
+
|
|
48
|
+
data: OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data::OrHash,
|
|
49
|
+
|
|
50
|
+
object: Symbol,
|
|
51
|
+
|
|
52
|
+
type: Symbol
|
|
53
|
+
)
|
|
54
|
+
.returns(T.attached_class)
|
|
55
|
+
end
|
|
56
|
+
def self.new(
|
|
57
|
+
|
|
58
|
+
# The unique ID of the event.
|
|
59
|
+
id:,
|
|
60
|
+
|
|
61
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
62
|
+
created_at:,
|
|
63
|
+
|
|
64
|
+
# Identifies the environment whose lifecycle changed.
|
|
65
|
+
data:,
|
|
66
|
+
|
|
67
|
+
# The object type. Always `event`.
|
|
68
|
+
object: :event,
|
|
69
|
+
|
|
70
|
+
# The event type. Always `agent.environment.expired`.
|
|
71
|
+
|
|
72
|
+
type: :"agent.environment.expired"
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
id: String,
|
|
80
|
+
created_at: Integer,
|
|
81
|
+
data: OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data,
|
|
82
|
+
object: Symbol,
|
|
83
|
+
type: Symbol
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
def to_hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
|
91
|
+
OrHash = T.type_alias do
|
|
92
|
+
T.any(
|
|
93
|
+
OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data,
|
|
94
|
+
OpenAI::Internal::AnyHash
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# The ID of the environment.
|
|
99
|
+
sig { returns(String) }
|
|
100
|
+
attr_accessor :id
|
|
101
|
+
|
|
102
|
+
# Identifies the environment whose lifecycle changed.
|
|
103
|
+
sig do
|
|
104
|
+
params(
|
|
105
|
+
|
|
106
|
+
id: String
|
|
107
|
+
)
|
|
108
|
+
.returns(T.attached_class)
|
|
109
|
+
end
|
|
110
|
+
def self.new(
|
|
111
|
+
|
|
112
|
+
# The ID of the environment.
|
|
113
|
+
|
|
114
|
+
id:
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
sig do
|
|
119
|
+
override.returns(
|
|
120
|
+
{id: String}
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
def to_hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class AgentEnvironmentSuspendedWebhookEvent < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The unique ID of the event.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
22
|
+
sig { returns(Integer) }
|
|
23
|
+
attr_accessor :created_at
|
|
24
|
+
|
|
25
|
+
# Identifies the environment whose lifecycle changed.
|
|
26
|
+
sig { returns(OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent::Data) }
|
|
27
|
+
attr_reader :data
|
|
28
|
+
|
|
29
|
+
sig { params(data: OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent::Data::OrHash).void }
|
|
30
|
+
attr_writer :data
|
|
31
|
+
|
|
32
|
+
# The object type. Always `event`.
|
|
33
|
+
sig { returns(Symbol) }
|
|
34
|
+
attr_accessor :object
|
|
35
|
+
|
|
36
|
+
# The event type. Always `agent.environment.suspended`.
|
|
37
|
+
sig { returns(Symbol) }
|
|
38
|
+
attr_accessor :type
|
|
39
|
+
|
|
40
|
+
# Sent when an agent environment is suspended and can resume from a snapshot.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
|
|
44
|
+
id: String,
|
|
45
|
+
|
|
46
|
+
created_at: Integer,
|
|
47
|
+
|
|
48
|
+
data: OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent::Data::OrHash,
|
|
49
|
+
|
|
50
|
+
object: Symbol,
|
|
51
|
+
|
|
52
|
+
type: Symbol
|
|
53
|
+
)
|
|
54
|
+
.returns(T.attached_class)
|
|
55
|
+
end
|
|
56
|
+
def self.new(
|
|
57
|
+
|
|
58
|
+
# The unique ID of the event.
|
|
59
|
+
id:,
|
|
60
|
+
|
|
61
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
62
|
+
created_at:,
|
|
63
|
+
|
|
64
|
+
# Identifies the environment whose lifecycle changed.
|
|
65
|
+
data:,
|
|
66
|
+
|
|
67
|
+
# The object type. Always `event`.
|
|
68
|
+
object: :event,
|
|
69
|
+
|
|
70
|
+
# The event type. Always `agent.environment.suspended`.
|
|
71
|
+
|
|
72
|
+
type: :"agent.environment.suspended"
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
id: String,
|
|
80
|
+
created_at: Integer,
|
|
81
|
+
data: OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent::Data,
|
|
82
|
+
object: Symbol,
|
|
83
|
+
type: Symbol
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
def to_hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
|
91
|
+
OrHash = T.type_alias do
|
|
92
|
+
T.any(
|
|
93
|
+
OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent::Data,
|
|
94
|
+
OpenAI::Internal::AnyHash
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# The ID of the environment.
|
|
99
|
+
sig { returns(String) }
|
|
100
|
+
attr_accessor :id
|
|
101
|
+
|
|
102
|
+
# Identifies the environment whose lifecycle changed.
|
|
103
|
+
sig do
|
|
104
|
+
params(
|
|
105
|
+
|
|
106
|
+
id: String
|
|
107
|
+
)
|
|
108
|
+
.returns(T.attached_class)
|
|
109
|
+
end
|
|
110
|
+
def self.new(
|
|
111
|
+
|
|
112
|
+
# The ID of the environment.
|
|
113
|
+
|
|
114
|
+
id:
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
sig do
|
|
119
|
+
override.returns(
|
|
120
|
+
{id: String}
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
def to_hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -5,13 +5,14 @@ module OpenAI
|
|
|
5
5
|
|
|
6
6
|
module Webhooks
|
|
7
7
|
|
|
8
|
-
# Sent when
|
|
9
|
-
# attached to a session.
|
|
8
|
+
# Sent when an agent environment expires and can no longer resume from a snapshot.
|
|
10
9
|
module UnwrapWebhookEvent
|
|
11
10
|
extend OpenAI::Internal::Type::Union
|
|
12
11
|
|
|
13
12
|
Variants = T.type_alias do
|
|
14
13
|
T.any(
|
|
14
|
+
OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent,
|
|
15
|
+
OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent,
|
|
15
16
|
OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent,
|
|
16
17
|
OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent,
|
|
17
18
|
OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent,
|
|
@@ -129,6 +129,14 @@ module OpenAI
|
|
|
129
129
|
:"agent.environment.failed",
|
|
130
130
|
OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
|
|
131
131
|
)
|
|
132
|
+
AGENT_ENVIRONMENT_SUSPENDED = T.let(
|
|
133
|
+
:"agent.environment.suspended",
|
|
134
|
+
OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
|
|
135
|
+
)
|
|
136
|
+
AGENT_ENVIRONMENT_EXPIRED = T.let(
|
|
137
|
+
:"agent.environment.expired",
|
|
138
|
+
OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
|
|
139
|
+
)
|
|
132
140
|
AGENT_SESSION_CREATED = T.let(
|
|
133
141
|
:"agent.session.created",
|
|
134
142
|
OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
|
|
@@ -114,6 +114,14 @@ module OpenAI
|
|
|
114
114
|
:"agent.environment.failed",
|
|
115
115
|
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
116
116
|
)
|
|
117
|
+
AGENT_ENVIRONMENT_SUSPENDED = T.let(
|
|
118
|
+
:"agent.environment.suspended",
|
|
119
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
120
|
+
)
|
|
121
|
+
AGENT_ENVIRONMENT_EXPIRED = T.let(
|
|
122
|
+
:"agent.environment.expired",
|
|
123
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
124
|
+
)
|
|
117
125
|
AGENT_SESSION_CREATED = T.let(
|
|
118
126
|
:"agent.session.created",
|
|
119
127
|
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
@@ -146,6 +146,14 @@ module OpenAI
|
|
|
146
146
|
:"agent.environment.failed",
|
|
147
147
|
OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
|
|
148
148
|
)
|
|
149
|
+
AGENT_ENVIRONMENT_SUSPENDED = T.let(
|
|
150
|
+
:"agent.environment.suspended",
|
|
151
|
+
OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
|
|
152
|
+
)
|
|
153
|
+
AGENT_ENVIRONMENT_EXPIRED = T.let(
|
|
154
|
+
:"agent.environment.expired",
|
|
155
|
+
OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
|
|
156
|
+
)
|
|
149
157
|
AGENT_SESSION_CREATED = T.let(
|
|
150
158
|
:"agent.session.created",
|
|
151
159
|
OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
|
|
@@ -140,6 +140,8 @@ module OpenAI
|
|
|
140
140
|
)
|
|
141
141
|
.returns(
|
|
142
142
|
T.any(
|
|
143
|
+
OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent,
|
|
144
|
+
OpenAI::Webhooks::AgentEnvironmentSuspendedWebhookEvent,
|
|
143
145
|
OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent,
|
|
144
146
|
OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent,
|
|
145
147
|
OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_session_environment_expired_event =
|
|
5
|
+
{
|
|
6
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
7
|
+
event_id: String,
|
|
8
|
+
session_id: String,
|
|
9
|
+
turn_id: String?,
|
|
10
|
+
?type: :"agent.session.environment.expired"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class AgentSessionEnvironmentExpiredEvent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The current environment state.
|
|
15
|
+
attr_accessor environment: OpenAI::Beta::AgentSessionEnvironmentState
|
|
16
|
+
|
|
17
|
+
# The unique ID of the event.
|
|
18
|
+
attr_accessor event_id: String
|
|
19
|
+
|
|
20
|
+
# The ID of the session associated with the event.
|
|
21
|
+
attr_accessor session_id: String
|
|
22
|
+
|
|
23
|
+
# The ID of the turn associated with the event, when applicable.
|
|
24
|
+
attr_accessor turn_id: String?
|
|
25
|
+
|
|
26
|
+
# The type of the object. Always `agent.session.environment.expired`.
|
|
27
|
+
attr_accessor type: :"agent.session.environment.expired"
|
|
28
|
+
|
|
29
|
+
# @param environment
|
|
30
|
+
# The current environment state.
|
|
31
|
+
# @param event_id
|
|
32
|
+
# The unique ID of the event.
|
|
33
|
+
# @param session_id
|
|
34
|
+
# The ID of the session associated with the event.
|
|
35
|
+
# @param turn_id
|
|
36
|
+
# The ID of the turn associated with the event, when applicable.
|
|
37
|
+
# @param type
|
|
38
|
+
# The type of the object. Always `agent.session.environment.expired`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
41
|
+
event_id: String,
|
|
42
|
+
session_id: String,
|
|
43
|
+
turn_id: String?,
|
|
44
|
+
?type: :"agent.session.environment.expired"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
49
|
+
event_id: String,
|
|
50
|
+
session_id: String,
|
|
51
|
+
turn_id: String?,
|
|
52
|
+
?type: :"agent.session.environment.expired"
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -67,7 +67,14 @@ module OpenAI
|
|
|
67
67
|
def to_hash: -> { code: String, message: String, type: String }
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
type status =
|
|
70
|
+
type status =
|
|
71
|
+
:pending
|
|
72
|
+
| :ready
|
|
73
|
+
| :connected
|
|
74
|
+
| :disconnected
|
|
75
|
+
| :suspended
|
|
76
|
+
| :expired
|
|
77
|
+
| :failed
|
|
71
78
|
|
|
72
79
|
module Status
|
|
73
80
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -84,6 +91,12 @@ module OpenAI
|
|
|
84
91
|
# The environment is disconnected.
|
|
85
92
|
DISCONNECTED: :disconnected
|
|
86
93
|
|
|
94
|
+
# The environment is stopped and can be resumed from its private checkpoint.
|
|
95
|
+
SUSPENDED: :suspended
|
|
96
|
+
|
|
97
|
+
# The environment and its private checkpoint have expired.
|
|
98
|
+
EXPIRED: :expired
|
|
99
|
+
|
|
87
100
|
# The environment failed to connect.
|
|
88
101
|
FAILED: :failed
|
|
89
102
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_session_environment_suspended_event =
|
|
5
|
+
{
|
|
6
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
7
|
+
event_id: String,
|
|
8
|
+
session_id: String,
|
|
9
|
+
turn_id: String?,
|
|
10
|
+
?type: :"agent.session.environment.suspended"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class AgentSessionEnvironmentSuspendedEvent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The current environment state.
|
|
15
|
+
attr_accessor environment: OpenAI::Beta::AgentSessionEnvironmentState
|
|
16
|
+
|
|
17
|
+
# The unique ID of the event.
|
|
18
|
+
attr_accessor event_id: String
|
|
19
|
+
|
|
20
|
+
# The ID of the session associated with the event.
|
|
21
|
+
attr_accessor session_id: String
|
|
22
|
+
|
|
23
|
+
# The ID of the turn associated with the event, when applicable.
|
|
24
|
+
attr_accessor turn_id: String?
|
|
25
|
+
|
|
26
|
+
# The type of the object. Always `agent.session.environment.suspended`.
|
|
27
|
+
attr_accessor type: :"agent.session.environment.suspended"
|
|
28
|
+
|
|
29
|
+
# @param environment
|
|
30
|
+
# The current environment state.
|
|
31
|
+
# @param event_id
|
|
32
|
+
# The unique ID of the event.
|
|
33
|
+
# @param session_id
|
|
34
|
+
# The ID of the session associated with the event.
|
|
35
|
+
# @param turn_id
|
|
36
|
+
# The ID of the turn associated with the event, when applicable.
|
|
37
|
+
# @param type
|
|
38
|
+
# The type of the object. Always `agent.session.environment.suspended`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
41
|
+
event_id: String,
|
|
42
|
+
session_id: String,
|
|
43
|
+
turn_id: String?,
|
|
44
|
+
?type: :"agent.session.environment.suspended"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
49
|
+
event_id: String,
|
|
50
|
+
session_id: String,
|
|
51
|
+
turn_id: String?,
|
|
52
|
+
?type: :"agent.session.environment.suspended"
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -4,6 +4,8 @@ module OpenAI
|
|
|
4
4
|
type agent_session_event =
|
|
5
5
|
OpenAI::Beta::AgentSessionErrorEvent
|
|
6
6
|
| OpenAI::Beta::AgentSessionEnvironmentReadyEvent
|
|
7
|
+
| OpenAI::Beta::AgentSessionEnvironmentSuspendedEvent
|
|
8
|
+
| OpenAI::Beta::AgentSessionEnvironmentExpiredEvent
|
|
7
9
|
| OpenAI::Beta::AgentSessionEnvironmentResetEvent
|
|
8
10
|
| OpenAI::Beta::AgentOutputCommandExecutionOutputDeltaEvent
|
|
9
11
|
| OpenAI::Beta::AgentSessionCreatedEvent
|
|
@@ -70,7 +70,13 @@ module OpenAI
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
type status =
|
|
73
|
-
:pending
|
|
73
|
+
:pending
|
|
74
|
+
| :ready
|
|
75
|
+
| :connected
|
|
76
|
+
| :disconnected
|
|
77
|
+
| :suspended
|
|
78
|
+
| :expired
|
|
79
|
+
| :failed
|
|
74
80
|
|
|
75
81
|
module Status
|
|
76
82
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -82,6 +88,10 @@ module OpenAI
|
|
|
82
88
|
|
|
83
89
|
CONNECTED: :connected
|
|
84
90
|
DISCONNECTED: :disconnected
|
|
91
|
+
|
|
92
|
+
# The sandbox is stopped and can be resumed from its private checkpoint.
|
|
93
|
+
SUSPENDED: :suspended
|
|
94
|
+
|
|
85
95
|
EXPIRED: :expired
|
|
86
96
|
FAILED: :failed
|
|
87
97
|
|