anthropic 1.11.0 → 1.12.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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/internal/page_cursor.rb +92 -0
  5. data/lib/anthropic/internal/token_page.rb +92 -0
  6. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  7. data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +0 -2
  8. data/lib/anthropic/models/beta/beta_container.rb +9 -1
  9. data/lib/anthropic/models/beta/beta_container_params.rb +34 -0
  10. data/lib/anthropic/models/beta/beta_context_management_config.rb +0 -2
  11. data/lib/anthropic/models/beta/beta_context_management_response.rb +0 -2
  12. data/lib/anthropic/models/beta/beta_message.rb +4 -2
  13. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +2 -2
  14. data/lib/anthropic/models/beta/beta_skill.rb +51 -0
  15. data/lib/anthropic/models/beta/beta_skill_params.rb +51 -0
  16. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
  17. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
  18. data/lib/anthropic/models/beta/message_count_tokens_params.rb +15 -12
  19. data/lib/anthropic/models/beta/message_create_params.rb +34 -18
  20. data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -20
  21. data/lib/anthropic/models/beta/skill_create_params.rb +49 -0
  22. data/lib/anthropic/models/beta/skill_create_response.rb +84 -0
  23. data/lib/anthropic/models/beta/skill_delete_params.rb +24 -0
  24. data/lib/anthropic/models/beta/skill_delete_response.rb +34 -0
  25. data/lib/anthropic/models/beta/skill_list_params.rb +61 -0
  26. data/lib/anthropic/models/beta/skill_list_response.rb +84 -0
  27. data/lib/anthropic/models/beta/skill_retrieve_params.rb +24 -0
  28. data/lib/anthropic/models/beta/skill_retrieve_response.rb +84 -0
  29. data/lib/anthropic/models/beta/skills/version_create_params.rb +42 -0
  30. data/lib/anthropic/models/beta/skills/version_create_response.rb +92 -0
  31. data/lib/anthropic/models/beta/skills/version_delete_params.rb +39 -0
  32. data/lib/anthropic/models/beta/skills/version_delete_response.rb +36 -0
  33. data/lib/anthropic/models/beta/skills/version_list_params.rb +47 -0
  34. data/lib/anthropic/models/beta/skills/version_list_response.rb +92 -0
  35. data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +39 -0
  36. data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +92 -0
  37. data/lib/anthropic/models/completion_create_params.rb +3 -4
  38. data/lib/anthropic/models/message_count_tokens_params.rb +10 -10
  39. data/lib/anthropic/models/message_create_params.rb +13 -13
  40. data/lib/anthropic/models/messages/batch_create_params.rb +14 -15
  41. data/lib/anthropic/models/stop_reason.rb +0 -1
  42. data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
  43. data/lib/anthropic/models/thinking_config_param.rb +1 -1
  44. data/lib/anthropic/resources/beta/messages.rb +5 -5
  45. data/lib/anthropic/resources/beta/skills/versions.rb +154 -0
  46. data/lib/anthropic/resources/beta/skills.rb +144 -0
  47. data/lib/anthropic/resources/beta.rb +4 -0
  48. data/lib/anthropic/resources/completions.rb +4 -4
  49. data/lib/anthropic/version.rb +1 -1
  50. data/lib/anthropic.rb +23 -0
  51. data/rbi/anthropic/internal/page_cursor.rbi +25 -0
  52. data/rbi/anthropic/internal/token_page.rbi +25 -0
  53. data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
  54. data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +0 -1
  55. data/rbi/anthropic/models/beta/beta_container.rbi +23 -3
  56. data/rbi/anthropic/models/beta/beta_container_params.rbi +54 -0
  57. data/rbi/anthropic/models/beta/beta_context_management_config.rbi +0 -1
  58. data/rbi/anthropic/models/beta/beta_context_management_response.rbi +0 -1
  59. data/rbi/anthropic/models/beta/beta_message.rbi +6 -2
  60. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +2 -2
  61. data/rbi/anthropic/models/beta/beta_skill.rbi +80 -0
  62. data/rbi/anthropic/models/beta/beta_skill_params.rbi +91 -0
  63. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
  64. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
  65. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +27 -21
  66. data/rbi/anthropic/models/beta/message_create_params.rbi +61 -29
  67. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +70 -33
  68. data/rbi/anthropic/models/beta/skill_create_params.rbi +90 -0
  69. data/rbi/anthropic/models/beta/skill_create_response.rbi +118 -0
  70. data/rbi/anthropic/models/beta/skill_delete_params.rbi +62 -0
  71. data/rbi/anthropic/models/beta/skill_delete_response.rbi +46 -0
  72. data/rbi/anthropic/models/beta/skill_list_params.rbi +109 -0
  73. data/rbi/anthropic/models/beta/skill_list_response.rbi +118 -0
  74. data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +62 -0
  75. data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +118 -0
  76. data/rbi/anthropic/models/beta/skills/version_create_params.rbi +79 -0
  77. data/rbi/anthropic/models/beta/skills/version_create_response.rbi +124 -0
  78. data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +77 -0
  79. data/rbi/anthropic/models/beta/skills/version_delete_response.rbi +48 -0
  80. data/rbi/anthropic/models/beta/skills/version_list_params.rbi +85 -0
  81. data/rbi/anthropic/models/beta/skills/version_list_response.rbi +124 -0
  82. data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +77 -0
  83. data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +124 -0
  84. data/rbi/anthropic/models/completion_create_params.rbi +6 -8
  85. data/rbi/anthropic/models/message_count_tokens_params.rbi +19 -19
  86. data/rbi/anthropic/models/message_create_params.rbi +24 -24
  87. data/rbi/anthropic/models/messages/batch_create_params.rbi +26 -28
  88. data/rbi/anthropic/models/stop_reason.rbi +0 -5
  89. data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
  90. data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
  91. data/rbi/anthropic/resources/beta/messages.rbi +51 -36
  92. data/rbi/anthropic/resources/beta/skills/versions.rbi +124 -0
  93. data/rbi/anthropic/resources/beta/skills.rbi +118 -0
  94. data/rbi/anthropic/resources/beta.rbi +3 -0
  95. data/rbi/anthropic/resources/completions.rbi +10 -12
  96. data/rbi/anthropic/resources/messages.rbi +31 -31
  97. data/sig/anthropic/internal/page_cursor.rbs +15 -0
  98. data/sig/anthropic/internal/token_page.rbs +15 -0
  99. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  100. data/sig/anthropic/models/beta/beta_container.rbs +18 -3
  101. data/sig/anthropic/models/beta/beta_container_params.rbs +26 -0
  102. data/sig/anthropic/models/beta/beta_skill.rbs +45 -0
  103. data/sig/anthropic/models/beta/beta_skill_params.rbs +47 -0
  104. data/sig/anthropic/models/beta/message_create_params.rbs +12 -4
  105. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +12 -4
  106. data/sig/anthropic/models/beta/skill_create_params.rbs +42 -0
  107. data/sig/anthropic/models/beta/skill_create_response.rbs +52 -0
  108. data/sig/anthropic/models/beta/skill_delete_params.rbs +30 -0
  109. data/sig/anthropic/models/beta/skill_delete_response.rbs +17 -0
  110. data/sig/anthropic/models/beta/skill_list_params.rbs +49 -0
  111. data/sig/anthropic/models/beta/skill_list_response.rbs +52 -0
  112. data/sig/anthropic/models/beta/skill_retrieve_params.rbs +30 -0
  113. data/sig/anthropic/models/beta/skill_retrieve_response.rbs +52 -0
  114. data/sig/anthropic/models/beta/skills/version_create_params.rbs +39 -0
  115. data/sig/anthropic/models/beta/skills/version_create_response.rbs +59 -0
  116. data/sig/anthropic/models/beta/skills/version_delete_params.rbs +39 -0
  117. data/sig/anthropic/models/beta/skills/version_delete_response.rbs +19 -0
  118. data/sig/anthropic/models/beta/skills/version_list_params.rbs +44 -0
  119. data/sig/anthropic/models/beta/skills/version_list_response.rbs +59 -0
  120. data/sig/anthropic/models/beta/skills/version_retrieve_params.rbs +39 -0
  121. data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +59 -0
  122. data/sig/anthropic/models/stop_reason.rbs +0 -2
  123. data/sig/anthropic/resources/beta/messages.rbs +2 -2
  124. data/sig/anthropic/resources/beta/skills/versions.rbs +40 -0
  125. data/sig/anthropic/resources/beta/skills.rbs +38 -0
  126. data/sig/anthropic/resources/beta.rbs +2 -0
  127. metadata +71 -2
@@ -0,0 +1,118 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class SkillCreateResponse < Anthropic::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Anthropic::Models::Beta::SkillCreateResponse,
11
+ Anthropic::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Unique identifier for the skill.
16
+ #
17
+ # The format and length of IDs may change over time.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # ISO 8601 timestamp of when the skill was created.
22
+ sig { returns(String) }
23
+ attr_accessor :created_at
24
+
25
+ # Display title for the skill.
26
+ #
27
+ # This is a human-readable label that is not included in the prompt sent to the
28
+ # model.
29
+ sig { returns(T.nilable(String)) }
30
+ attr_accessor :display_title
31
+
32
+ # The latest version identifier for the skill.
33
+ #
34
+ # This represents the most recent version of the skill that has been created.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :latest_version
37
+
38
+ # Source of the skill.
39
+ #
40
+ # This may be one of the following values:
41
+ #
42
+ # - `"custom"`: the skill was created by a user
43
+ # - `"anthropic"`: the skill was created by Anthropic
44
+ sig { returns(String) }
45
+ attr_accessor :source
46
+
47
+ # Object type.
48
+ #
49
+ # For Skills, this is always `"skill"`.
50
+ sig { returns(String) }
51
+ attr_accessor :type
52
+
53
+ # ISO 8601 timestamp of when the skill was last updated.
54
+ sig { returns(String) }
55
+ attr_accessor :updated_at
56
+
57
+ sig do
58
+ params(
59
+ id: String,
60
+ created_at: String,
61
+ display_title: T.nilable(String),
62
+ latest_version: T.nilable(String),
63
+ source: String,
64
+ type: String,
65
+ updated_at: String
66
+ ).returns(T.attached_class)
67
+ end
68
+ def self.new(
69
+ # Unique identifier for the skill.
70
+ #
71
+ # The format and length of IDs may change over time.
72
+ id:,
73
+ # ISO 8601 timestamp of when the skill was created.
74
+ created_at:,
75
+ # Display title for the skill.
76
+ #
77
+ # This is a human-readable label that is not included in the prompt sent to the
78
+ # model.
79
+ display_title:,
80
+ # The latest version identifier for the skill.
81
+ #
82
+ # This represents the most recent version of the skill that has been created.
83
+ latest_version:,
84
+ # Source of the skill.
85
+ #
86
+ # This may be one of the following values:
87
+ #
88
+ # - `"custom"`: the skill was created by a user
89
+ # - `"anthropic"`: the skill was created by Anthropic
90
+ source:,
91
+ # Object type.
92
+ #
93
+ # For Skills, this is always `"skill"`.
94
+ type:,
95
+ # ISO 8601 timestamp of when the skill was last updated.
96
+ updated_at:
97
+ )
98
+ end
99
+
100
+ sig do
101
+ override.returns(
102
+ {
103
+ id: String,
104
+ created_at: String,
105
+ display_title: T.nilable(String),
106
+ latest_version: T.nilable(String),
107
+ source: String,
108
+ type: String,
109
+ updated_at: String
110
+ }
111
+ )
112
+ end
113
+ def to_hash
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,62 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class SkillDeleteParams < Anthropic::Internal::Type::BaseModel
7
+ extend Anthropic::Internal::Type::RequestParameters::Converter
8
+ include Anthropic::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Anthropic::Beta::SkillDeleteParams,
14
+ Anthropic::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Optional header to specify the beta version(s) you want to use.
19
+ sig do
20
+ returns(
21
+ T.nilable(
22
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
23
+ )
24
+ )
25
+ end
26
+ attr_reader :betas
27
+
28
+ sig do
29
+ params(
30
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
31
+ ).void
32
+ end
33
+ attr_writer :betas
34
+
35
+ sig do
36
+ params(
37
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
38
+ request_options: Anthropic::RequestOptions::OrHash
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(
42
+ # Optional header to specify the beta version(s) you want to use.
43
+ betas: nil,
44
+ request_options: {}
45
+ )
46
+ end
47
+
48
+ sig do
49
+ override.returns(
50
+ {
51
+ betas:
52
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
53
+ request_options: Anthropic::RequestOptions
54
+ }
55
+ )
56
+ end
57
+ def to_hash
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,46 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class SkillDeleteResponse < Anthropic::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Anthropic::Models::Beta::SkillDeleteResponse,
11
+ Anthropic::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Unique identifier for the skill.
16
+ #
17
+ # The format and length of IDs may change over time.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # Deleted object type.
22
+ #
23
+ # For Skills, this is always `"skill_deleted"`.
24
+ sig { returns(String) }
25
+ attr_accessor :type
26
+
27
+ sig { params(id: String, type: String).returns(T.attached_class) }
28
+ def self.new(
29
+ # Unique identifier for the skill.
30
+ #
31
+ # The format and length of IDs may change over time.
32
+ id:,
33
+ # Deleted object type.
34
+ #
35
+ # For Skills, this is always `"skill_deleted"`.
36
+ type:
37
+ )
38
+ end
39
+
40
+ sig { override.returns({ id: String, type: String }) }
41
+ def to_hash
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,109 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class SkillListParams < Anthropic::Internal::Type::BaseModel
7
+ extend Anthropic::Internal::Type::RequestParameters::Converter
8
+ include Anthropic::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Anthropic::Beta::SkillListParams,
14
+ Anthropic::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Number of results to return per page.
19
+ #
20
+ # Maximum value is 100. Defaults to 20.
21
+ sig { returns(T.nilable(Integer)) }
22
+ attr_reader :limit
23
+
24
+ sig { params(limit: Integer).void }
25
+ attr_writer :limit
26
+
27
+ # Pagination token for fetching a specific page of results.
28
+ #
29
+ # Pass the value from a previous response's `next_page` field to get the next page
30
+ # of results.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :page
33
+
34
+ # Filter skills by source.
35
+ #
36
+ # If provided, only skills from the specified source will be returned:
37
+ #
38
+ # - `"custom"`: only return user-created skills
39
+ # - `"anthropic"`: only return Anthropic-created skills
40
+ sig { returns(T.nilable(String)) }
41
+ attr_accessor :source
42
+
43
+ # Optional header to specify the beta version(s) you want to use.
44
+ sig do
45
+ returns(
46
+ T.nilable(
47
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
48
+ )
49
+ )
50
+ end
51
+ attr_reader :betas
52
+
53
+ sig do
54
+ params(
55
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
56
+ ).void
57
+ end
58
+ attr_writer :betas
59
+
60
+ sig do
61
+ params(
62
+ limit: Integer,
63
+ page: T.nilable(String),
64
+ source: T.nilable(String),
65
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
66
+ request_options: Anthropic::RequestOptions::OrHash
67
+ ).returns(T.attached_class)
68
+ end
69
+ def self.new(
70
+ # Number of results to return per page.
71
+ #
72
+ # Maximum value is 100. Defaults to 20.
73
+ limit: nil,
74
+ # Pagination token for fetching a specific page of results.
75
+ #
76
+ # Pass the value from a previous response's `next_page` field to get the next page
77
+ # of results.
78
+ page: nil,
79
+ # Filter skills by source.
80
+ #
81
+ # If provided, only skills from the specified source will be returned:
82
+ #
83
+ # - `"custom"`: only return user-created skills
84
+ # - `"anthropic"`: only return Anthropic-created skills
85
+ source: nil,
86
+ # Optional header to specify the beta version(s) you want to use.
87
+ betas: nil,
88
+ request_options: {}
89
+ )
90
+ end
91
+
92
+ sig do
93
+ override.returns(
94
+ {
95
+ limit: Integer,
96
+ page: T.nilable(String),
97
+ source: T.nilable(String),
98
+ betas:
99
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
100
+ request_options: Anthropic::RequestOptions
101
+ }
102
+ )
103
+ end
104
+ def to_hash
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,118 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class SkillListResponse < Anthropic::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Anthropic::Models::Beta::SkillListResponse,
11
+ Anthropic::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Unique identifier for the skill.
16
+ #
17
+ # The format and length of IDs may change over time.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # ISO 8601 timestamp of when the skill was created.
22
+ sig { returns(String) }
23
+ attr_accessor :created_at
24
+
25
+ # Display title for the skill.
26
+ #
27
+ # This is a human-readable label that is not included in the prompt sent to the
28
+ # model.
29
+ sig { returns(T.nilable(String)) }
30
+ attr_accessor :display_title
31
+
32
+ # The latest version identifier for the skill.
33
+ #
34
+ # This represents the most recent version of the skill that has been created.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :latest_version
37
+
38
+ # Source of the skill.
39
+ #
40
+ # This may be one of the following values:
41
+ #
42
+ # - `"custom"`: the skill was created by a user
43
+ # - `"anthropic"`: the skill was created by Anthropic
44
+ sig { returns(String) }
45
+ attr_accessor :source
46
+
47
+ # Object type.
48
+ #
49
+ # For Skills, this is always `"skill"`.
50
+ sig { returns(String) }
51
+ attr_accessor :type
52
+
53
+ # ISO 8601 timestamp of when the skill was last updated.
54
+ sig { returns(String) }
55
+ attr_accessor :updated_at
56
+
57
+ sig do
58
+ params(
59
+ id: String,
60
+ created_at: String,
61
+ display_title: T.nilable(String),
62
+ latest_version: T.nilable(String),
63
+ source: String,
64
+ type: String,
65
+ updated_at: String
66
+ ).returns(T.attached_class)
67
+ end
68
+ def self.new(
69
+ # Unique identifier for the skill.
70
+ #
71
+ # The format and length of IDs may change over time.
72
+ id:,
73
+ # ISO 8601 timestamp of when the skill was created.
74
+ created_at:,
75
+ # Display title for the skill.
76
+ #
77
+ # This is a human-readable label that is not included in the prompt sent to the
78
+ # model.
79
+ display_title:,
80
+ # The latest version identifier for the skill.
81
+ #
82
+ # This represents the most recent version of the skill that has been created.
83
+ latest_version:,
84
+ # Source of the skill.
85
+ #
86
+ # This may be one of the following values:
87
+ #
88
+ # - `"custom"`: the skill was created by a user
89
+ # - `"anthropic"`: the skill was created by Anthropic
90
+ source:,
91
+ # Object type.
92
+ #
93
+ # For Skills, this is always `"skill"`.
94
+ type:,
95
+ # ISO 8601 timestamp of when the skill was last updated.
96
+ updated_at:
97
+ )
98
+ end
99
+
100
+ sig do
101
+ override.returns(
102
+ {
103
+ id: String,
104
+ created_at: String,
105
+ display_title: T.nilable(String),
106
+ latest_version: T.nilable(String),
107
+ source: String,
108
+ type: String,
109
+ updated_at: String
110
+ }
111
+ )
112
+ end
113
+ def to_hash
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,62 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class SkillRetrieveParams < Anthropic::Internal::Type::BaseModel
7
+ extend Anthropic::Internal::Type::RequestParameters::Converter
8
+ include Anthropic::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Anthropic::Beta::SkillRetrieveParams,
14
+ Anthropic::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Optional header to specify the beta version(s) you want to use.
19
+ sig do
20
+ returns(
21
+ T.nilable(
22
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
23
+ )
24
+ )
25
+ end
26
+ attr_reader :betas
27
+
28
+ sig do
29
+ params(
30
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
31
+ ).void
32
+ end
33
+ attr_writer :betas
34
+
35
+ sig do
36
+ params(
37
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
38
+ request_options: Anthropic::RequestOptions::OrHash
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(
42
+ # Optional header to specify the beta version(s) you want to use.
43
+ betas: nil,
44
+ request_options: {}
45
+ )
46
+ end
47
+
48
+ sig do
49
+ override.returns(
50
+ {
51
+ betas:
52
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
53
+ request_options: Anthropic::RequestOptions
54
+ }
55
+ )
56
+ end
57
+ def to_hash
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,118 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class SkillRetrieveResponse < Anthropic::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Anthropic::Models::Beta::SkillRetrieveResponse,
11
+ Anthropic::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Unique identifier for the skill.
16
+ #
17
+ # The format and length of IDs may change over time.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # ISO 8601 timestamp of when the skill was created.
22
+ sig { returns(String) }
23
+ attr_accessor :created_at
24
+
25
+ # Display title for the skill.
26
+ #
27
+ # This is a human-readable label that is not included in the prompt sent to the
28
+ # model.
29
+ sig { returns(T.nilable(String)) }
30
+ attr_accessor :display_title
31
+
32
+ # The latest version identifier for the skill.
33
+ #
34
+ # This represents the most recent version of the skill that has been created.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :latest_version
37
+
38
+ # Source of the skill.
39
+ #
40
+ # This may be one of the following values:
41
+ #
42
+ # - `"custom"`: the skill was created by a user
43
+ # - `"anthropic"`: the skill was created by Anthropic
44
+ sig { returns(String) }
45
+ attr_accessor :source
46
+
47
+ # Object type.
48
+ #
49
+ # For Skills, this is always `"skill"`.
50
+ sig { returns(String) }
51
+ attr_accessor :type
52
+
53
+ # ISO 8601 timestamp of when the skill was last updated.
54
+ sig { returns(String) }
55
+ attr_accessor :updated_at
56
+
57
+ sig do
58
+ params(
59
+ id: String,
60
+ created_at: String,
61
+ display_title: T.nilable(String),
62
+ latest_version: T.nilable(String),
63
+ source: String,
64
+ type: String,
65
+ updated_at: String
66
+ ).returns(T.attached_class)
67
+ end
68
+ def self.new(
69
+ # Unique identifier for the skill.
70
+ #
71
+ # The format and length of IDs may change over time.
72
+ id:,
73
+ # ISO 8601 timestamp of when the skill was created.
74
+ created_at:,
75
+ # Display title for the skill.
76
+ #
77
+ # This is a human-readable label that is not included in the prompt sent to the
78
+ # model.
79
+ display_title:,
80
+ # The latest version identifier for the skill.
81
+ #
82
+ # This represents the most recent version of the skill that has been created.
83
+ latest_version:,
84
+ # Source of the skill.
85
+ #
86
+ # This may be one of the following values:
87
+ #
88
+ # - `"custom"`: the skill was created by a user
89
+ # - `"anthropic"`: the skill was created by Anthropic
90
+ source:,
91
+ # Object type.
92
+ #
93
+ # For Skills, this is always `"skill"`.
94
+ type:,
95
+ # ISO 8601 timestamp of when the skill was last updated.
96
+ updated_at:
97
+ )
98
+ end
99
+
100
+ sig do
101
+ override.returns(
102
+ {
103
+ id: String,
104
+ created_at: String,
105
+ display_title: T.nilable(String),
106
+ latest_version: T.nilable(String),
107
+ source: String,
108
+ type: String,
109
+ updated_at: String
110
+ }
111
+ )
112
+ end
113
+ def to_hash
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end