cerca 0.1.0 → 0.2.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/cerca/internal/thread_messages_cursor_page.rb +92 -0
  5. data/lib/cerca/models/activity_detail.rb +24 -0
  6. data/lib/cerca/models/activity_summary.rb +112 -0
  7. data/lib/cerca/models/message.rb +1 -0
  8. data/lib/cerca/models/message_page.rb +27 -0
  9. data/lib/cerca/models/thread.rb +15 -1
  10. data/lib/cerca/models/thread_activity_params.rb +36 -0
  11. data/lib/cerca/models/thread_list_messages_params.rb +52 -0
  12. data/lib/cerca/models/thread_retrieve_params.rb +10 -3
  13. data/lib/cerca/models/thread_turn_summary.rb +56 -0
  14. data/lib/cerca/models.rb +12 -0
  15. data/lib/cerca/resources/threads.rb +65 -1
  16. data/lib/cerca/version.rb +1 -1
  17. data/lib/cerca.rb +7 -0
  18. data/rbi/cerca/internal/thread_messages_cursor_page.rbi +25 -0
  19. data/rbi/cerca/models/activity_detail.rbi +36 -0
  20. data/rbi/cerca/models/activity_summary.rbi +117 -0
  21. data/rbi/cerca/models/message_page.rbi +41 -0
  22. data/rbi/cerca/models/thread.rbi +12 -0
  23. data/rbi/cerca/models/thread_activity_params.rbi +58 -0
  24. data/rbi/cerca/models/thread_list_messages_params.rbi +80 -0
  25. data/rbi/cerca/models/thread_retrieve_params.rbi +9 -3
  26. data/rbi/cerca/models/thread_turn_summary.rbi +85 -0
  27. data/rbi/cerca/models.rbi +12 -0
  28. data/rbi/cerca/resources/threads.rbi +47 -1
  29. data/sig/cerca/internal/thread_messages_cursor_page.rbs +15 -0
  30. data/sig/cerca/models/activity_detail.rbs +28 -0
  31. data/sig/cerca/models/activity_summary.rbs +85 -0
  32. data/sig/cerca/models/message_page.rbs +26 -0
  33. data/sig/cerca/models/thread.rbs +10 -0
  34. data/sig/cerca/models/thread_activity_params.rbs +34 -0
  35. data/sig/cerca/models/thread_list_messages_params.rbs +52 -0
  36. data/sig/cerca/models/thread_turn_summary.rbs +56 -0
  37. data/sig/cerca/models.rbs +12 -0
  38. data/sig/cerca/resources/threads.rbs +16 -0
  39. metadata +28 -3
data/lib/cerca.rb CHANGED
@@ -64,8 +64,11 @@ require_relative "cerca/internal/grants_cursor_page"
64
64
  require_relative "cerca/internal/results_cursor_page"
65
65
  require_relative "cerca/internal/sources_cursor_page"
66
66
  require_relative "cerca/internal/subscriptions_cursor_page"
67
+ require_relative "cerca/internal/thread_messages_cursor_page"
67
68
  require_relative "cerca/internal/threads_cursor_page"
69
+ require_relative "cerca/models/activity_summary"
68
70
  require_relative "cerca/models/connection"
71
+ require_relative "cerca/models/activity_detail"
69
72
  require_relative "cerca/models/agent"
70
73
  require_relative "cerca/models/agent_create_params"
71
74
  require_relative "cerca/models/agent_delete_params"
@@ -143,6 +146,7 @@ require_relative "cerca/models/json_object"
143
146
  require_relative "cerca/models/mcp_tool_execution_policy"
144
147
  require_relative "cerca/models/mcp_tool_source"
145
148
  require_relative "cerca/models/message"
149
+ require_relative "cerca/models/message_page"
146
150
  require_relative "cerca/models/metadata"
147
151
  require_relative "cerca/models/model_descriptor"
148
152
  require_relative "cerca/models/model_list_params"
@@ -176,16 +180,19 @@ require_relative "cerca/models/steer_result"
176
180
  require_relative "cerca/models/subscription_event"
177
181
  require_relative "cerca/models/sub_thread_summary"
178
182
  require_relative "cerca/models/thread"
183
+ require_relative "cerca/models/thread_activity_params"
179
184
  require_relative "cerca/models/thread_cancel_params"
180
185
  require_relative "cerca/models/thread_close_params"
181
186
  require_relative "cerca/models/thread_compact_params"
182
187
  require_relative "cerca/models/thread_create_params"
188
+ require_relative "cerca/models/thread_list_messages_params"
183
189
  require_relative "cerca/models/thread_list_params"
184
190
  require_relative "cerca/models/thread_retrieve_params"
185
191
  require_relative "cerca/models/thread_start_turn_params"
186
192
  require_relative "cerca/models/thread_steer_params"
187
193
  require_relative "cerca/models/thread_stream_event"
188
194
  require_relative "cerca/models/thread_summary"
195
+ require_relative "cerca/models/thread_turn_summary"
189
196
  require_relative "cerca/models/token_usage"
190
197
  require_relative "cerca/models/tool"
191
198
  require_relative "cerca/models/tool_approval_mode"
@@ -0,0 +1,25 @@
1
+ # typed: strong
2
+
3
+ module Cerca
4
+ module Internal
5
+ class ThreadMessagesCursorPage
6
+ include Cerca::Internal::Type::BasePage
7
+
8
+ Elem = type_member
9
+
10
+ sig { returns(T.nilable(T::Array[Elem])) }
11
+ attr_accessor :messages
12
+
13
+ sig { returns(T.nilable(String)) }
14
+ attr_accessor :cursor
15
+
16
+ sig { returns(T::Boolean) }
17
+ attr_accessor :has_more
18
+
19
+ # @api private
20
+ sig { returns(String) }
21
+ def inspect
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,36 @@
1
+ # typed: strong
2
+
3
+ module Cerca
4
+ module Models
5
+ class ActivityDetail < Cerca::Models::ActivitySummary
6
+ OrHash =
7
+ T.type_alias { T.any(Cerca::ActivityDetail, Cerca::Internal::AnyHash) }
8
+
9
+ sig { returns(T.nilable(String)) }
10
+ attr_accessor :error
11
+
12
+ sig { returns(T::Array[Cerca::ThreadTurnSummary]) }
13
+ attr_accessor :recent_turns
14
+
15
+ sig do
16
+ params(
17
+ error: T.nilable(String),
18
+ recent_turns: T::Array[Cerca::ThreadTurnSummary::OrHash]
19
+ ).returns(T.attached_class)
20
+ end
21
+ def self.new(error:, recent_turns:)
22
+ end
23
+
24
+ sig do
25
+ override.returns(
26
+ {
27
+ error: T.nilable(String),
28
+ recent_turns: T::Array[Cerca::ThreadTurnSummary]
29
+ }
30
+ )
31
+ end
32
+ def to_hash
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,117 @@
1
+ # typed: strong
2
+
3
+ module Cerca
4
+ module Models
5
+ class ActivitySummary < Cerca::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(Cerca::ActivitySummary, Cerca::Internal::AnyHash) }
8
+
9
+ sig { returns(String) }
10
+ attr_accessor :id
11
+
12
+ sig { returns(T.nilable(String)) }
13
+ attr_accessor :completed_at
14
+
15
+ sig { returns(String) }
16
+ attr_accessor :created_at
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :goal
20
+
21
+ sig { returns(T.nilable(String)) }
22
+ attr_accessor :latest_activity
23
+
24
+ sig { returns(Float) }
25
+ attr_accessor :message_count
26
+
27
+ sig { returns(String) }
28
+ attr_accessor :model
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_accessor :next_step
32
+
33
+ sig { returns(T.nilable(String)) }
34
+ attr_accessor :parent_thread_id
35
+
36
+ sig { returns(T.nilable(String)) }
37
+ attr_accessor :result
38
+
39
+ sig { returns(T.nilable(String)) }
40
+ attr_accessor :schedule_id
41
+
42
+ # `idle` threads can accept a new turn or be closed. `running` threads have an
43
+ # active turn. `awaiting` threads are paused on external input such as approvals.
44
+ # `closed` threads are terminal.
45
+ sig { returns(Cerca::Status::TaggedSymbol) }
46
+ attr_accessor :status
47
+
48
+ sig { returns(Float) }
49
+ attr_accessor :step_count
50
+
51
+ sig { returns(String) }
52
+ attr_accessor :updated_at
53
+
54
+ sig do
55
+ params(
56
+ id: String,
57
+ completed_at: T.nilable(String),
58
+ created_at: String,
59
+ goal: String,
60
+ latest_activity: T.nilable(String),
61
+ message_count: Float,
62
+ model: String,
63
+ next_step: T.nilable(String),
64
+ parent_thread_id: T.nilable(String),
65
+ result: T.nilable(String),
66
+ schedule_id: T.nilable(String),
67
+ status: Cerca::Status::OrSymbol,
68
+ step_count: Float,
69
+ updated_at: String
70
+ ).returns(T.attached_class)
71
+ end
72
+ def self.new(
73
+ id:,
74
+ completed_at:,
75
+ created_at:,
76
+ goal:,
77
+ latest_activity:,
78
+ message_count:,
79
+ model:,
80
+ next_step:,
81
+ parent_thread_id:,
82
+ result:,
83
+ schedule_id:,
84
+ # `idle` threads can accept a new turn or be closed. `running` threads have an
85
+ # active turn. `awaiting` threads are paused on external input such as approvals.
86
+ # `closed` threads are terminal.
87
+ status:,
88
+ step_count:,
89
+ updated_at:
90
+ )
91
+ end
92
+
93
+ sig do
94
+ override.returns(
95
+ {
96
+ id: String,
97
+ completed_at: T.nilable(String),
98
+ created_at: String,
99
+ goal: String,
100
+ latest_activity: T.nilable(String),
101
+ message_count: Float,
102
+ model: String,
103
+ next_step: T.nilable(String),
104
+ parent_thread_id: T.nilable(String),
105
+ result: T.nilable(String),
106
+ schedule_id: T.nilable(String),
107
+ status: Cerca::Status::TaggedSymbol,
108
+ step_count: Float,
109
+ updated_at: String
110
+ }
111
+ )
112
+ end
113
+ def to_hash
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,41 @@
1
+ # typed: strong
2
+
3
+ module Cerca
4
+ module Models
5
+ class MessagePage < Cerca::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(Cerca::MessagePage, Cerca::Internal::AnyHash) }
8
+
9
+ sig { returns(T.nilable(String)) }
10
+ attr_accessor :cursor
11
+
12
+ sig { returns(T::Boolean) }
13
+ attr_accessor :has_more
14
+
15
+ sig { returns(T::Array[Cerca::Message]) }
16
+ attr_accessor :messages
17
+
18
+ sig do
19
+ params(
20
+ cursor: T.nilable(String),
21
+ has_more: T::Boolean,
22
+ messages: T::Array[Cerca::Message::OrHash]
23
+ ).returns(T.attached_class)
24
+ end
25
+ def self.new(cursor:, has_more:, messages:)
26
+ end
27
+
28
+ sig do
29
+ override.returns(
30
+ {
31
+ cursor: T.nilable(String),
32
+ has_more: T::Boolean,
33
+ messages: T::Array[Cerca::Message]
34
+ }
35
+ )
36
+ end
37
+ def to_hash
38
+ end
39
+ end
40
+ end
41
+ end
@@ -31,6 +31,9 @@ module Cerca
31
31
  sig { returns(T.nilable(String)) }
32
32
  attr_accessor :error
33
33
 
34
+ sig { returns(T::Boolean) }
35
+ attr_accessor :has_more_messages
36
+
34
37
  sig { returns(T.nilable(String)) }
35
38
  attr_accessor :instructions
36
39
 
@@ -40,6 +43,9 @@ module Cerca
40
43
  sig { returns(String) }
41
44
  attr_accessor :message
42
45
 
46
+ sig { returns(T.nilable(Float)) }
47
+ attr_accessor :message_cursor
48
+
43
49
  sig { returns(T::Array[Cerca::Message]) }
44
50
  attr_accessor :messages
45
51
 
@@ -95,9 +101,11 @@ module Cerca
95
101
  created_at: String,
96
102
  depth: Float,
97
103
  error: T.nilable(String),
104
+ has_more_messages: T::Boolean,
98
105
  instructions: T.nilable(String),
99
106
  last_turn_status: T.nilable(Cerca::Thread::LastTurnStatus::OrSymbol),
100
107
  message: String,
108
+ message_cursor: T.nilable(Float),
101
109
  messages: T::Array[Cerca::Message::OrHash],
102
110
  model: String,
103
111
  parent_thread_id: T.nilable(String),
@@ -120,9 +128,11 @@ module Cerca
120
128
  created_at:,
121
129
  depth:,
122
130
  error:,
131
+ has_more_messages:,
123
132
  instructions:,
124
133
  last_turn_status:,
125
134
  message:,
135
+ message_cursor:,
126
136
  messages:,
127
137
  model:,
128
138
  parent_thread_id:,
@@ -151,10 +161,12 @@ module Cerca
151
161
  created_at: String,
152
162
  depth: Float,
153
163
  error: T.nilable(String),
164
+ has_more_messages: T::Boolean,
154
165
  instructions: T.nilable(String),
155
166
  last_turn_status:
156
167
  T.nilable(Cerca::Thread::LastTurnStatus::TaggedSymbol),
157
168
  message: String,
169
+ message_cursor: T.nilable(Float),
158
170
  messages: T::Array[Cerca::Message],
159
171
  model: String,
160
172
  parent_thread_id: T.nilable(String),
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Cerca
4
+ module Models
5
+ class ThreadActivityParams < Cerca::Internal::Type::BaseModel
6
+ extend Cerca::Internal::Type::RequestParameters::Converter
7
+ include Cerca::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Cerca::ThreadActivityParams, Cerca::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :agent_id
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :thread_id
19
+
20
+ # Optional fleet id for index-backed authorization.
21
+ sig { returns(T.nilable(String)) }
22
+ attr_reader :fleet_id
23
+
24
+ sig { params(fleet_id: String).void }
25
+ attr_writer :fleet_id
26
+
27
+ sig do
28
+ params(
29
+ agent_id: String,
30
+ thread_id: String,
31
+ fleet_id: String,
32
+ request_options: Cerca::RequestOptions::OrHash
33
+ ).returns(T.attached_class)
34
+ end
35
+ def self.new(
36
+ agent_id:,
37
+ thread_id:,
38
+ # Optional fleet id for index-backed authorization.
39
+ fleet_id: nil,
40
+ request_options: {}
41
+ )
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {
47
+ agent_id: String,
48
+ thread_id: String,
49
+ fleet_id: String,
50
+ request_options: Cerca::RequestOptions
51
+ }
52
+ )
53
+ end
54
+ def to_hash
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,80 @@
1
+ # typed: strong
2
+
3
+ module Cerca
4
+ module Models
5
+ class ThreadListMessagesParams < Cerca::Internal::Type::BaseModel
6
+ extend Cerca::Internal::Type::RequestParameters::Converter
7
+ include Cerca::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Cerca::ThreadListMessagesParams, Cerca::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :agent_id
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :thread_id
19
+
20
+ # Cursor returned by a previous thread messages response.
21
+ sig { returns(T.nilable(String)) }
22
+ attr_reader :cursor
23
+
24
+ sig { params(cursor: String).void }
25
+ attr_writer :cursor
26
+
27
+ # Optional fleet id for index-backed authorization.
28
+ sig { returns(T.nilable(String)) }
29
+ attr_reader :fleet_id
30
+
31
+ sig { params(fleet_id: String).void }
32
+ attr_writer :fleet_id
33
+
34
+ # Maximum number of messages to include, capped at 500.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_reader :limit
37
+
38
+ sig { params(limit: String).void }
39
+ attr_writer :limit
40
+
41
+ sig do
42
+ params(
43
+ agent_id: String,
44
+ thread_id: String,
45
+ cursor: String,
46
+ fleet_id: String,
47
+ limit: String,
48
+ request_options: Cerca::RequestOptions::OrHash
49
+ ).returns(T.attached_class)
50
+ end
51
+ def self.new(
52
+ agent_id:,
53
+ thread_id:,
54
+ # Cursor returned by a previous thread messages response.
55
+ cursor: nil,
56
+ # Optional fleet id for index-backed authorization.
57
+ fleet_id: nil,
58
+ # Maximum number of messages to include, capped at 500.
59
+ limit: nil,
60
+ request_options: {}
61
+ )
62
+ end
63
+
64
+ sig do
65
+ override.returns(
66
+ {
67
+ agent_id: String,
68
+ thread_id: String,
69
+ cursor: String,
70
+ fleet_id: String,
71
+ limit: String,
72
+ request_options: Cerca::RequestOptions
73
+ }
74
+ )
75
+ end
76
+ def to_hash
77
+ end
78
+ end
79
+ end
80
+ end
@@ -24,7 +24,9 @@ module Cerca
24
24
  sig { params(debug: Cerca::ThreadRetrieveParams::Debug::OrSymbol).void }
25
25
  attr_writer :debug
26
26
 
27
- # When true, includes message content in the thread detail.
27
+ # Deprecated compatibility flag. Thread detail includes a bounded recent message
28
+ # page by default; pass `false` only to opt out when no message pagination params
29
+ # are present.
28
30
  sig do
29
31
  returns(
30
32
  T.nilable(Cerca::ThreadRetrieveParams::IncludeMessages::OrSymbol)
@@ -55,7 +57,9 @@ module Cerca
55
57
  thread_id:,
56
58
  # When true, includes debug-only compiled context fields.
57
59
  debug: nil,
58
- # When true, includes message content in the thread detail.
60
+ # Deprecated compatibility flag. Thread detail includes a bounded recent message
61
+ # page by default; pass `false` only to opt out when no message pagination params
62
+ # are present.
59
63
  include_messages: nil,
60
64
  request_options: {}
61
65
  )
@@ -96,7 +100,9 @@ module Cerca
96
100
  end
97
101
  end
98
102
 
99
- # When true, includes message content in the thread detail.
103
+ # Deprecated compatibility flag. Thread detail includes a bounded recent message
104
+ # page by default; pass `false` only to opt out when no message pagination params
105
+ # are present.
100
106
  module IncludeMessages
101
107
  extend Cerca::Internal::Type::Enum
102
108
 
@@ -0,0 +1,85 @@
1
+ # typed: strong
2
+
3
+ module Cerca
4
+ module Models
5
+ class ThreadTurnSummary < Cerca::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Cerca::ThreadTurnSummary, Cerca::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(T.nilable(String)) }
12
+ attr_accessor :activity
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :completed_at
16
+
17
+ sig { returns(Float) }
18
+ attr_accessor :message_count
19
+
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :next_step
22
+
23
+ sig { returns(Cerca::ThreadTurnSummary::Status::TaggedSymbol) }
24
+ attr_accessor :status
25
+
26
+ sig { returns(Float) }
27
+ attr_accessor :turn_seq
28
+
29
+ sig do
30
+ params(
31
+ activity: T.nilable(String),
32
+ completed_at: String,
33
+ message_count: Float,
34
+ next_step: T.nilable(String),
35
+ status: Cerca::ThreadTurnSummary::Status::OrSymbol,
36
+ turn_seq: Float
37
+ ).returns(T.attached_class)
38
+ end
39
+ def self.new(
40
+ activity:,
41
+ completed_at:,
42
+ message_count:,
43
+ next_step:,
44
+ status:,
45
+ turn_seq:
46
+ )
47
+ end
48
+
49
+ sig do
50
+ override.returns(
51
+ {
52
+ activity: T.nilable(String),
53
+ completed_at: String,
54
+ message_count: Float,
55
+ next_step: T.nilable(String),
56
+ status: Cerca::ThreadTurnSummary::Status::TaggedSymbol,
57
+ turn_seq: Float
58
+ }
59
+ )
60
+ end
61
+ def to_hash
62
+ end
63
+
64
+ module Status
65
+ extend Cerca::Internal::Type::Enum
66
+
67
+ TaggedSymbol =
68
+ T.type_alias { T.all(Symbol, Cerca::ThreadTurnSummary::Status) }
69
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
70
+
71
+ COMPLETED =
72
+ T.let(:completed, Cerca::ThreadTurnSummary::Status::TaggedSymbol)
73
+ FAILED = T.let(:failed, Cerca::ThreadTurnSummary::Status::TaggedSymbol)
74
+
75
+ sig do
76
+ override.returns(
77
+ T::Array[Cerca::ThreadTurnSummary::Status::TaggedSymbol]
78
+ )
79
+ end
80
+ def self.values
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
data/rbi/cerca/models.rbi CHANGED
@@ -1,6 +1,10 @@
1
1
  # typed: strong
2
2
 
3
3
  module Cerca
4
+ ActivityDetail = Cerca::Models::ActivityDetail
5
+
6
+ ActivitySummary = Cerca::Models::ActivitySummary
7
+
4
8
  Agent = Cerca::Models::Agent
5
9
 
6
10
  AgentCreateParams = Cerca::Models::AgentCreateParams
@@ -143,6 +147,8 @@ module Cerca
143
147
 
144
148
  Message = Cerca::Models::Message
145
149
 
150
+ MessagePage = Cerca::Models::MessagePage
151
+
146
152
  Metadata = T.let(Cerca::Models::Metadata, Cerca::Internal::Type::Converter)
147
153
 
148
154
  ModelDescriptor = Cerca::Models::ModelDescriptor
@@ -199,6 +205,8 @@ module Cerca
199
205
 
200
206
  Thread = Cerca::Models::Thread
201
207
 
208
+ ThreadActivityParams = Cerca::Models::ThreadActivityParams
209
+
202
210
  ThreadCancelParams = Cerca::Models::ThreadCancelParams
203
211
 
204
212
  ThreadCloseParams = Cerca::Models::ThreadCloseParams
@@ -207,6 +215,8 @@ module Cerca
207
215
 
208
216
  ThreadCreateParams = Cerca::Models::ThreadCreateParams
209
217
 
218
+ ThreadListMessagesParams = Cerca::Models::ThreadListMessagesParams
219
+
210
220
  ThreadListParams = Cerca::Models::ThreadListParams
211
221
 
212
222
  ThreadRetrieveParams = Cerca::Models::ThreadRetrieveParams
@@ -219,6 +229,8 @@ module Cerca
219
229
 
220
230
  ThreadSummary = Cerca::Models::ThreadSummary
221
231
 
232
+ ThreadTurnSummary = Cerca::Models::ThreadTurnSummary
233
+
222
234
  TokenUsage = Cerca::Models::TokenUsage
223
235
 
224
236
  Tool = Cerca::Models::Tool
@@ -46,7 +46,9 @@ module Cerca
46
46
  thread_id,
47
47
  # When true, includes debug-only compiled context fields.
48
48
  debug: nil,
49
- # When true, includes message content in the thread detail.
49
+ # Deprecated compatibility flag. Thread detail includes a bounded recent message
50
+ # page by default; pass `false` only to opt out when no message pagination params
51
+ # are present.
50
52
  include_messages: nil,
51
53
  request_options: {}
52
54
  )
@@ -78,6 +80,25 @@ module Cerca
78
80
  )
79
81
  end
80
82
 
83
+ # Fetch compact current and recent activity for a thread without returning
84
+ # transcript content or runtime debug state.
85
+ sig do
86
+ params(
87
+ agent_id: String,
88
+ thread_id: String,
89
+ fleet_id: String,
90
+ request_options: Cerca::RequestOptions::OrHash
91
+ ).returns(Cerca::ActivityDetail)
92
+ end
93
+ def activity(
94
+ agent_id,
95
+ thread_id,
96
+ # Optional fleet id for index-backed authorization.
97
+ fleet_id: nil,
98
+ request_options: {}
99
+ )
100
+ end
101
+
81
102
  # Cancel a running or awaiting thread. The underlying runtime treats repeat
82
103
  # cancellation as an idempotent lifecycle operation when possible.
83
104
  sig do
@@ -114,6 +135,31 @@ module Cerca
114
135
  def compact(agent_id, thread_id, request_options: {})
115
136
  end
116
137
 
138
+ # List a bounded page of transcript messages for a thread, newest first. Use the
139
+ # returned `cursor` to page older messages.
140
+ sig do
141
+ params(
142
+ agent_id: String,
143
+ thread_id: String,
144
+ cursor: String,
145
+ fleet_id: String,
146
+ limit: String,
147
+ request_options: Cerca::RequestOptions::OrHash
148
+ ).returns(Cerca::Internal::ThreadMessagesCursorPage[Cerca::Message])
149
+ end
150
+ def list_messages(
151
+ agent_id,
152
+ thread_id,
153
+ # Cursor returned by a previous thread messages response.
154
+ cursor: nil,
155
+ # Optional fleet id for index-backed authorization.
156
+ fleet_id: nil,
157
+ # Maximum number of messages to include, capped at 500.
158
+ limit: nil,
159
+ request_options: {}
160
+ )
161
+ end
162
+
117
163
  # Create turn
118
164
  sig do
119
165
  params(