anthropic 1.11.0 → 1.13.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 (177) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/helpers/streaming/message_stream.rb +3 -0
  5. data/lib/anthropic/internal/page_cursor.rb +92 -0
  6. data/lib/anthropic/internal/token_page.rb +92 -0
  7. data/lib/anthropic/internal/transport/pooled_net_requester.rb +30 -24
  8. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  9. data/lib/anthropic/models/beta/beta_all_thinking_turns.rb +19 -0
  10. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit.rb +48 -0
  11. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rb +36 -0
  12. data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +0 -2
  13. data/lib/anthropic/models/beta/beta_container.rb +9 -1
  14. data/lib/anthropic/models/beta/beta_container_params.rb +34 -0
  15. data/lib/anthropic/models/beta/beta_context_management_config.rb +17 -5
  16. data/lib/anthropic/models/beta/beta_context_management_response.rb +16 -5
  17. data/lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb +3 -3
  18. data/lib/anthropic/models/beta/beta_message.rb +4 -2
  19. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +2 -2
  20. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +3 -3
  21. data/lib/anthropic/models/beta/beta_skill.rb +51 -0
  22. data/lib/anthropic/models/beta/beta_skill_params.rb +51 -0
  23. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
  24. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
  25. data/lib/anthropic/models/beta/beta_thinking_turns.rb +25 -0
  26. data/lib/anthropic/models/beta/beta_tool.rb +5 -3
  27. data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +3 -3
  28. data/lib/anthropic/models/beta/message_count_tokens_params.rb +15 -12
  29. data/lib/anthropic/models/beta/message_create_params.rb +34 -18
  30. data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -20
  31. data/lib/anthropic/models/beta/skill_create_params.rb +49 -0
  32. data/lib/anthropic/models/beta/skill_create_response.rb +84 -0
  33. data/lib/anthropic/models/beta/skill_delete_params.rb +24 -0
  34. data/lib/anthropic/models/beta/skill_delete_response.rb +34 -0
  35. data/lib/anthropic/models/beta/skill_list_params.rb +61 -0
  36. data/lib/anthropic/models/beta/skill_list_response.rb +84 -0
  37. data/lib/anthropic/models/beta/skill_retrieve_params.rb +24 -0
  38. data/lib/anthropic/models/beta/skill_retrieve_response.rb +84 -0
  39. data/lib/anthropic/models/beta/skills/version_create_params.rb +42 -0
  40. data/lib/anthropic/models/beta/skills/version_create_response.rb +92 -0
  41. data/lib/anthropic/models/beta/skills/version_delete_params.rb +39 -0
  42. data/lib/anthropic/models/beta/skills/version_delete_response.rb +36 -0
  43. data/lib/anthropic/models/beta/skills/version_list_params.rb +47 -0
  44. data/lib/anthropic/models/beta/skills/version_list_response.rb +92 -0
  45. data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +39 -0
  46. data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +92 -0
  47. data/lib/anthropic/models/completion_create_params.rb +3 -4
  48. data/lib/anthropic/models/message_count_tokens_params.rb +10 -10
  49. data/lib/anthropic/models/message_create_params.rb +13 -13
  50. data/lib/anthropic/models/messages/batch_create_params.rb +14 -15
  51. data/lib/anthropic/models/model.rb +6 -20
  52. data/lib/anthropic/models/server_tool_use_block_param.rb +3 -3
  53. data/lib/anthropic/models/stop_reason.rb +0 -1
  54. data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
  55. data/lib/anthropic/models/thinking_config_param.rb +1 -1
  56. data/lib/anthropic/models/tool.rb +5 -3
  57. data/lib/anthropic/models/tool_use_block_param.rb +3 -3
  58. data/lib/anthropic/resources/beta/messages.rb +5 -5
  59. data/lib/anthropic/resources/beta/skills/versions.rb +154 -0
  60. data/lib/anthropic/resources/beta/skills.rb +144 -0
  61. data/lib/anthropic/resources/beta.rb +4 -0
  62. data/lib/anthropic/resources/completions.rb +4 -4
  63. data/lib/anthropic/version.rb +1 -1
  64. data/lib/anthropic.rb +27 -0
  65. data/rbi/anthropic/internal/page_cursor.rbi +25 -0
  66. data/rbi/anthropic/internal/token_page.rbi +25 -0
  67. data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
  68. data/rbi/anthropic/models/beta/beta_all_thinking_turns.rbi +30 -0
  69. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbi +109 -0
  70. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbi +61 -0
  71. data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +0 -1
  72. data/rbi/anthropic/models/beta/beta_container.rbi +23 -3
  73. data/rbi/anthropic/models/beta/beta_container_params.rbi +54 -0
  74. data/rbi/anthropic/models/beta/beta_context_management_config.rbi +51 -5
  75. data/rbi/anthropic/models/beta/beta_context_management_response.rbi +32 -4
  76. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block.rbi +3 -3
  77. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block_param.rbi +3 -3
  78. data/rbi/anthropic/models/beta/beta_message.rbi +6 -2
  79. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +2 -2
  80. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +3 -3
  81. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +3 -3
  82. data/rbi/anthropic/models/beta/beta_skill.rbi +80 -0
  83. data/rbi/anthropic/models/beta/beta_skill_params.rbi +91 -0
  84. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
  85. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
  86. data/rbi/anthropic/models/beta/beta_thinking_turns.rbi +33 -0
  87. data/rbi/anthropic/models/beta/beta_tool.rbi +3 -3
  88. data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +8 -3
  89. data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +3 -3
  90. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +27 -21
  91. data/rbi/anthropic/models/beta/message_create_params.rbi +61 -29
  92. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +70 -33
  93. data/rbi/anthropic/models/beta/skill_create_params.rbi +90 -0
  94. data/rbi/anthropic/models/beta/skill_create_response.rbi +118 -0
  95. data/rbi/anthropic/models/beta/skill_delete_params.rbi +62 -0
  96. data/rbi/anthropic/models/beta/skill_delete_response.rbi +46 -0
  97. data/rbi/anthropic/models/beta/skill_list_params.rbi +109 -0
  98. data/rbi/anthropic/models/beta/skill_list_response.rbi +118 -0
  99. data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +62 -0
  100. data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +118 -0
  101. data/rbi/anthropic/models/beta/skills/version_create_params.rbi +79 -0
  102. data/rbi/anthropic/models/beta/skills/version_create_response.rbi +124 -0
  103. data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +77 -0
  104. data/rbi/anthropic/models/beta/skills/version_delete_response.rbi +48 -0
  105. data/rbi/anthropic/models/beta/skills/version_list_params.rbi +85 -0
  106. data/rbi/anthropic/models/beta/skills/version_list_response.rbi +124 -0
  107. data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +77 -0
  108. data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +124 -0
  109. data/rbi/anthropic/models/completion_create_params.rbi +6 -8
  110. data/rbi/anthropic/models/message_count_tokens_params.rbi +19 -19
  111. data/rbi/anthropic/models/message_create_params.rbi +24 -24
  112. data/rbi/anthropic/models/messages/batch_create_params.rbi +26 -28
  113. data/rbi/anthropic/models/model.rbi +0 -11
  114. data/rbi/anthropic/models/server_tool_use_block.rbi +8 -3
  115. data/rbi/anthropic/models/server_tool_use_block_param.rbi +3 -3
  116. data/rbi/anthropic/models/stop_reason.rbi +0 -5
  117. data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
  118. data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
  119. data/rbi/anthropic/models/tool.rbi +3 -3
  120. data/rbi/anthropic/models/tool_use_block.rbi +8 -3
  121. data/rbi/anthropic/models/tool_use_block_param.rbi +3 -3
  122. data/rbi/anthropic/resources/beta/messages.rbi +51 -36
  123. data/rbi/anthropic/resources/beta/skills/versions.rbi +124 -0
  124. data/rbi/anthropic/resources/beta/skills.rbi +118 -0
  125. data/rbi/anthropic/resources/beta.rbi +3 -0
  126. data/rbi/anthropic/resources/completions.rbi +10 -12
  127. data/rbi/anthropic/resources/messages.rbi +31 -31
  128. data/sig/anthropic/internal/page_cursor.rbs +15 -0
  129. data/sig/anthropic/internal/token_page.rbs +15 -0
  130. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  131. data/sig/anthropic/models/beta/beta_all_thinking_turns.rbs +17 -0
  132. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbs +44 -0
  133. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbs +34 -0
  134. data/sig/anthropic/models/beta/beta_container.rbs +18 -3
  135. data/sig/anthropic/models/beta/beta_container_params.rbs +26 -0
  136. data/sig/anthropic/models/beta/beta_context_management_config.rbs +18 -6
  137. data/sig/anthropic/models/beta/beta_context_management_response.rbs +14 -4
  138. data/sig/anthropic/models/beta/beta_mcp_tool_use_block.rbs +4 -4
  139. data/sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs +4 -4
  140. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +4 -4
  141. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +4 -4
  142. data/sig/anthropic/models/beta/beta_skill.rbs +45 -0
  143. data/sig/anthropic/models/beta/beta_skill_params.rbs +47 -0
  144. data/sig/anthropic/models/beta/beta_thinking_turns.rbs +19 -0
  145. data/sig/anthropic/models/beta/beta_tool.rbs +8 -4
  146. data/sig/anthropic/models/beta/beta_tool_use_block.rbs +9 -4
  147. data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +4 -4
  148. data/sig/anthropic/models/beta/message_create_params.rbs +12 -4
  149. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +12 -4
  150. data/sig/anthropic/models/beta/skill_create_params.rbs +42 -0
  151. data/sig/anthropic/models/beta/skill_create_response.rbs +52 -0
  152. data/sig/anthropic/models/beta/skill_delete_params.rbs +30 -0
  153. data/sig/anthropic/models/beta/skill_delete_response.rbs +17 -0
  154. data/sig/anthropic/models/beta/skill_list_params.rbs +49 -0
  155. data/sig/anthropic/models/beta/skill_list_response.rbs +52 -0
  156. data/sig/anthropic/models/beta/skill_retrieve_params.rbs +30 -0
  157. data/sig/anthropic/models/beta/skill_retrieve_response.rbs +52 -0
  158. data/sig/anthropic/models/beta/skills/version_create_params.rbs +39 -0
  159. data/sig/anthropic/models/beta/skills/version_create_response.rbs +59 -0
  160. data/sig/anthropic/models/beta/skills/version_delete_params.rbs +39 -0
  161. data/sig/anthropic/models/beta/skills/version_delete_response.rbs +19 -0
  162. data/sig/anthropic/models/beta/skills/version_list_params.rbs +44 -0
  163. data/sig/anthropic/models/beta/skills/version_list_response.rbs +59 -0
  164. data/sig/anthropic/models/beta/skills/version_retrieve_params.rbs +39 -0
  165. data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +59 -0
  166. data/sig/anthropic/models/model.rbs +0 -11
  167. data/sig/anthropic/models/server_tool_use_block.rbs +9 -4
  168. data/sig/anthropic/models/server_tool_use_block_param.rbs +4 -4
  169. data/sig/anthropic/models/stop_reason.rbs +0 -2
  170. data/sig/anthropic/models/tool.rbs +8 -4
  171. data/sig/anthropic/models/tool_use_block.rbs +9 -4
  172. data/sig/anthropic/models/tool_use_block_param.rbs +4 -4
  173. data/sig/anthropic/resources/beta/messages.rbs +2 -2
  174. data/sig/anthropic/resources/beta/skills/versions.rbs +40 -0
  175. data/sig/anthropic/resources/beta/skills.rbs +38 -0
  176. data/sig/anthropic/resources/beta.rbs +2 -0
  177. metadata +83 -2
@@ -0,0 +1,85 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ class VersionListParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Anthropic::Beta::Skills::VersionListParams,
15
+ Anthropic::Internal::AnyHash
16
+ )
17
+ end
18
+
19
+ # Number of items to return per page.
20
+ #
21
+ # Defaults to `20`. Ranges from `1` to `1000`.
22
+ sig { returns(T.nilable(Integer)) }
23
+ attr_accessor :limit
24
+
25
+ # Optionally set to the `next_page` token from the previous response.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_accessor :page
28
+
29
+ # Optional header to specify the beta version(s) you want to use.
30
+ sig do
31
+ returns(
32
+ T.nilable(
33
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
34
+ )
35
+ )
36
+ end
37
+ attr_reader :betas
38
+
39
+ sig do
40
+ params(
41
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
42
+ ).void
43
+ end
44
+ attr_writer :betas
45
+
46
+ sig do
47
+ params(
48
+ limit: T.nilable(Integer),
49
+ page: T.nilable(String),
50
+ betas:
51
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
52
+ request_options: Anthropic::RequestOptions::OrHash
53
+ ).returns(T.attached_class)
54
+ end
55
+ def self.new(
56
+ # Number of items to return per page.
57
+ #
58
+ # Defaults to `20`. Ranges from `1` to `1000`.
59
+ limit: nil,
60
+ # Optionally set to the `next_page` token from the previous response.
61
+ page: nil,
62
+ # Optional header to specify the beta version(s) you want to use.
63
+ betas: nil,
64
+ request_options: {}
65
+ )
66
+ end
67
+
68
+ sig do
69
+ override.returns(
70
+ {
71
+ limit: T.nilable(Integer),
72
+ page: T.nilable(String),
73
+ betas:
74
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
75
+ request_options: Anthropic::RequestOptions
76
+ }
77
+ )
78
+ end
79
+ def to_hash
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,124 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ class VersionListResponse < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Models::Beta::Skills::VersionListResponse,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # Unique identifier for the skill version.
17
+ #
18
+ # The format and length of IDs may change over time.
19
+ sig { returns(String) }
20
+ attr_accessor :id
21
+
22
+ # ISO 8601 timestamp of when the skill version was created.
23
+ sig { returns(String) }
24
+ attr_accessor :created_at
25
+
26
+ # Description of the skill version.
27
+ #
28
+ # This is extracted from the SKILL.md file in the skill upload.
29
+ sig { returns(String) }
30
+ attr_accessor :description
31
+
32
+ # Directory name of the skill version.
33
+ #
34
+ # This is the top-level directory name that was extracted from the uploaded files.
35
+ sig { returns(String) }
36
+ attr_accessor :directory
37
+
38
+ # Human-readable name of the skill version.
39
+ #
40
+ # This is extracted from the SKILL.md file in the skill upload.
41
+ sig { returns(String) }
42
+ attr_accessor :name
43
+
44
+ # Identifier for the skill that this version belongs to.
45
+ sig { returns(String) }
46
+ attr_accessor :skill_id
47
+
48
+ # Object type.
49
+ #
50
+ # For Skill Versions, this is always `"skill_version"`.
51
+ sig { returns(String) }
52
+ attr_accessor :type
53
+
54
+ # Version identifier for the skill.
55
+ #
56
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
57
+ sig { returns(String) }
58
+ attr_accessor :version
59
+
60
+ sig do
61
+ params(
62
+ id: String,
63
+ created_at: String,
64
+ description: String,
65
+ directory: String,
66
+ name: String,
67
+ skill_id: String,
68
+ type: String,
69
+ version: String
70
+ ).returns(T.attached_class)
71
+ end
72
+ def self.new(
73
+ # Unique identifier for the skill version.
74
+ #
75
+ # The format and length of IDs may change over time.
76
+ id:,
77
+ # ISO 8601 timestamp of when the skill version was created.
78
+ created_at:,
79
+ # Description of the skill version.
80
+ #
81
+ # This is extracted from the SKILL.md file in the skill upload.
82
+ description:,
83
+ # Directory name of the skill version.
84
+ #
85
+ # This is the top-level directory name that was extracted from the uploaded files.
86
+ directory:,
87
+ # Human-readable name of the skill version.
88
+ #
89
+ # This is extracted from the SKILL.md file in the skill upload.
90
+ name:,
91
+ # Identifier for the skill that this version belongs to.
92
+ skill_id:,
93
+ # Object type.
94
+ #
95
+ # For Skill Versions, this is always `"skill_version"`.
96
+ type:,
97
+ # Version identifier for the skill.
98
+ #
99
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
100
+ version:
101
+ )
102
+ end
103
+
104
+ sig do
105
+ override.returns(
106
+ {
107
+ id: String,
108
+ created_at: String,
109
+ description: String,
110
+ directory: String,
111
+ name: String,
112
+ skill_id: String,
113
+ type: String,
114
+ version: String
115
+ }
116
+ )
117
+ end
118
+ def to_hash
119
+ end
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,77 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ class VersionRetrieveParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Anthropic::Beta::Skills::VersionRetrieveParams,
15
+ Anthropic::Internal::AnyHash
16
+ )
17
+ end
18
+
19
+ # Unique identifier for the skill.
20
+ #
21
+ # The format and length of IDs may change over time.
22
+ sig { returns(String) }
23
+ attr_accessor :skill_id
24
+
25
+ # Optional header to specify the beta version(s) you want to use.
26
+ sig do
27
+ returns(
28
+ T.nilable(
29
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
30
+ )
31
+ )
32
+ end
33
+ attr_reader :betas
34
+
35
+ sig do
36
+ params(
37
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
38
+ ).void
39
+ end
40
+ attr_writer :betas
41
+
42
+ sig do
43
+ params(
44
+ skill_id: String,
45
+ betas:
46
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
47
+ request_options: Anthropic::RequestOptions::OrHash
48
+ ).returns(T.attached_class)
49
+ end
50
+ def self.new(
51
+ # Unique identifier for the skill.
52
+ #
53
+ # The format and length of IDs may change over time.
54
+ skill_id:,
55
+ # Optional header to specify the beta version(s) you want to use.
56
+ betas: nil,
57
+ request_options: {}
58
+ )
59
+ end
60
+
61
+ sig do
62
+ override.returns(
63
+ {
64
+ skill_id: String,
65
+ betas:
66
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
67
+ request_options: Anthropic::RequestOptions
68
+ }
69
+ )
70
+ end
71
+ def to_hash
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,124 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ class VersionRetrieveResponse < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Models::Beta::Skills::VersionRetrieveResponse,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # Unique identifier for the skill version.
17
+ #
18
+ # The format and length of IDs may change over time.
19
+ sig { returns(String) }
20
+ attr_accessor :id
21
+
22
+ # ISO 8601 timestamp of when the skill version was created.
23
+ sig { returns(String) }
24
+ attr_accessor :created_at
25
+
26
+ # Description of the skill version.
27
+ #
28
+ # This is extracted from the SKILL.md file in the skill upload.
29
+ sig { returns(String) }
30
+ attr_accessor :description
31
+
32
+ # Directory name of the skill version.
33
+ #
34
+ # This is the top-level directory name that was extracted from the uploaded files.
35
+ sig { returns(String) }
36
+ attr_accessor :directory
37
+
38
+ # Human-readable name of the skill version.
39
+ #
40
+ # This is extracted from the SKILL.md file in the skill upload.
41
+ sig { returns(String) }
42
+ attr_accessor :name
43
+
44
+ # Identifier for the skill that this version belongs to.
45
+ sig { returns(String) }
46
+ attr_accessor :skill_id
47
+
48
+ # Object type.
49
+ #
50
+ # For Skill Versions, this is always `"skill_version"`.
51
+ sig { returns(String) }
52
+ attr_accessor :type
53
+
54
+ # Version identifier for the skill.
55
+ #
56
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
57
+ sig { returns(String) }
58
+ attr_accessor :version
59
+
60
+ sig do
61
+ params(
62
+ id: String,
63
+ created_at: String,
64
+ description: String,
65
+ directory: String,
66
+ name: String,
67
+ skill_id: String,
68
+ type: String,
69
+ version: String
70
+ ).returns(T.attached_class)
71
+ end
72
+ def self.new(
73
+ # Unique identifier for the skill version.
74
+ #
75
+ # The format and length of IDs may change over time.
76
+ id:,
77
+ # ISO 8601 timestamp of when the skill version was created.
78
+ created_at:,
79
+ # Description of the skill version.
80
+ #
81
+ # This is extracted from the SKILL.md file in the skill upload.
82
+ description:,
83
+ # Directory name of the skill version.
84
+ #
85
+ # This is the top-level directory name that was extracted from the uploaded files.
86
+ directory:,
87
+ # Human-readable name of the skill version.
88
+ #
89
+ # This is extracted from the SKILL.md file in the skill upload.
90
+ name:,
91
+ # Identifier for the skill that this version belongs to.
92
+ skill_id:,
93
+ # Object type.
94
+ #
95
+ # For Skill Versions, this is always `"skill_version"`.
96
+ type:,
97
+ # Version identifier for the skill.
98
+ #
99
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
100
+ version:
101
+ )
102
+ end
103
+
104
+ sig do
105
+ override.returns(
106
+ {
107
+ id: String,
108
+ created_at: String,
109
+ description: String,
110
+ directory: String,
111
+ name: String,
112
+ skill_id: String,
113
+ type: String,
114
+ version: String
115
+ }
116
+ )
117
+ end
118
+ def to_hash
119
+ end
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end
@@ -33,10 +33,9 @@ module Anthropic
33
33
  # "\n\nHuman: {userQuestion}\n\nAssistant:"
34
34
  # ```
35
35
  #
36
- # See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and
37
- # our guide to
38
- # [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more
39
- # details.
36
+ # See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
37
+ # our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
38
+ # for more details.
40
39
  sig { returns(String) }
41
40
  attr_accessor :prompt
42
41
 
@@ -148,10 +147,9 @@ module Anthropic
148
147
  # "\n\nHuman: {userQuestion}\n\nAssistant:"
149
148
  # ```
150
149
  #
151
- # See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and
152
- # our guide to
153
- # [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more
154
- # details.
150
+ # See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
151
+ # our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
152
+ # for more details.
155
153
  prompt:,
156
154
  # An object describing metadata about the request.
157
155
  metadata: nil,
@@ -71,12 +71,12 @@ module Anthropic
71
71
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
72
72
  # ```
73
73
  #
74
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
74
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
75
75
  #
76
76
  # Note that if you want to include a
77
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
78
- # the top-level `system` parameter — there is no `"system"` role for input
79
- # messages in the Messages API.
77
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
78
+ # top-level `system` parameter — there is no `"system"` role for input messages in
79
+ # the Messages API.
80
80
  #
81
81
  # There is a limit of 100,000 messages in a single request.
82
82
  sig { returns(T::Array[Anthropic::MessageParam]) }
@@ -92,7 +92,7 @@ module Anthropic
92
92
  #
93
93
  # A system prompt is a way of providing context and instructions to Claude, such
94
94
  # as specifying a particular goal or role. See our
95
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
95
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
96
96
  sig do
97
97
  returns(
98
98
  T.nilable(Anthropic::MessageCountTokensParams::System::Variants)
@@ -114,7 +114,7 @@ module Anthropic
114
114
  # tokens and counts towards your `max_tokens` limit.
115
115
  #
116
116
  # See
117
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
117
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
118
118
  # for details.
119
119
  sig do
120
120
  returns(
@@ -177,9 +177,9 @@ module Anthropic
177
177
  #
178
178
  # There are two types of tools: **client tools** and **server tools**. The
179
179
  # behavior described below applies to client tools. For
180
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
180
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
181
181
  # see their individual documentation as each has its own behavior (e.g., the
182
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
182
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
183
183
  #
184
184
  # Each tool definition includes:
185
185
  #
@@ -242,7 +242,7 @@ module Anthropic
242
242
  # functions, or more generally whenever you want the model to produce a particular
243
243
  # JSON structure of output.
244
244
  #
245
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
245
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
246
246
  sig do
247
247
  returns(
248
248
  T.nilable(
@@ -367,12 +367,12 @@ module Anthropic
367
367
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
368
368
  # ```
369
369
  #
370
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
370
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
371
371
  #
372
372
  # Note that if you want to include a
373
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
374
- # the top-level `system` parameter — there is no `"system"` role for input
375
- # messages in the Messages API.
373
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
374
+ # top-level `system` parameter — there is no `"system"` role for input messages in
375
+ # the Messages API.
376
376
  #
377
377
  # There is a limit of 100,000 messages in a single request.
378
378
  messages:,
@@ -384,7 +384,7 @@ module Anthropic
384
384
  #
385
385
  # A system prompt is a way of providing context and instructions to Claude, such
386
386
  # as specifying a particular goal or role. See our
387
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
387
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
388
388
  system_: nil,
389
389
  # Configuration for enabling Claude's extended thinking.
390
390
  #
@@ -393,7 +393,7 @@ module Anthropic
393
393
  # tokens and counts towards your `max_tokens` limit.
394
394
  #
395
395
  # See
396
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
396
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
397
397
  # for details.
398
398
  thinking: nil,
399
399
  # How the model should use the provided tools. The model can use a specific tool,
@@ -408,9 +408,9 @@ module Anthropic
408
408
  #
409
409
  # There are two types of tools: **client tools** and **server tools**. The
410
410
  # behavior described below applies to client tools. For
411
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
411
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
412
412
  # see their individual documentation as each has its own behavior (e.g., the
413
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
413
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
414
414
  #
415
415
  # Each tool definition includes:
416
416
  #
@@ -473,7 +473,7 @@ module Anthropic
473
473
  # functions, or more generally whenever you want the model to produce a particular
474
474
  # JSON structure of output.
475
475
  #
476
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
476
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
477
477
  tools: nil,
478
478
  request_options: {}
479
479
  )
@@ -519,7 +519,7 @@ module Anthropic
519
519
  #
520
520
  # A system prompt is a way of providing context and instructions to Claude, such
521
521
  # as specifying a particular goal or role. See our
522
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
522
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
523
523
  module System
524
524
  extend Anthropic::Internal::Type::Union
525
525