kaiten-cli 0.3.3__py3-none-any.whl

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 (99) hide show
  1. kaiten_cli/__init__.py +5 -0
  2. kaiten_cli/__main__.py +9 -0
  3. kaiten_cli/agent_gateway.py +577 -0
  4. kaiten_cli/app.py +1636 -0
  5. kaiten_cli/completion.py +570 -0
  6. kaiten_cli/discovery.py +39 -0
  7. kaiten_cli/errors.py +79 -0
  8. kaiten_cli/i18n.py +92 -0
  9. kaiten_cli/locales/ru.json +2967 -0
  10. kaiten_cli/localized_click.py +160 -0
  11. kaiten_cli/models.py +202 -0
  12. kaiten_cli/profiles.py +316 -0
  13. kaiten_cli/registry/__init__.py +260 -0
  14. kaiten_cli/registry/addons.py +392 -0
  15. kaiten_cli/registry/audit_and_analytics.py +451 -0
  16. kaiten_cli/registry/automation_schema.py +44 -0
  17. kaiten_cli/registry/automation_schemas.json +7417 -0
  18. kaiten_cli/registry/automations.py +342 -0
  19. kaiten_cli/registry/base.py +62 -0
  20. kaiten_cli/registry/blockers.py +320 -0
  21. kaiten_cli/registry/boards.py +520 -0
  22. kaiten_cli/registry/card_relations.py +376 -0
  23. kaiten_cli/registry/card_types.py +363 -0
  24. kaiten_cli/registry/cards.py +1329 -0
  25. kaiten_cli/registry/charts.py +539 -0
  26. kaiten_cli/registry/checklists.py +600 -0
  27. kaiten_cli/registry/columns.py +558 -0
  28. kaiten_cli/registry/comments.py +224 -0
  29. kaiten_cli/registry/custom_directories.py +980 -0
  30. kaiten_cli/registry/custom_properties.py +1460 -0
  31. kaiten_cli/registry/dashboards.py +564 -0
  32. kaiten_cli/registry/documents.py +761 -0
  33. kaiten_cli/registry/external_links.py +128 -0
  34. kaiten_cli/registry/files.py +738 -0
  35. kaiten_cli/registry/github_addon.py +613 -0
  36. kaiten_cli/registry/iterations.py +397 -0
  37. kaiten_cli/registry/lanes.py +205 -0
  38. kaiten_cli/registry/live_contracts.py +361 -0
  39. kaiten_cli/registry/members.py +336 -0
  40. kaiten_cli/registry/module_docs.py +108 -0
  41. kaiten_cli/registry/projects.py +369 -0
  42. kaiten_cli/registry/query.py +129 -0
  43. kaiten_cli/registry/restrictions.py +249 -0
  44. kaiten_cli/registry/roles_and_groups.py +1102 -0
  45. kaiten_cli/registry/scim.py +263 -0
  46. kaiten_cli/registry/service_desk.py +1270 -0
  47. kaiten_cli/registry/snapshot.py +187 -0
  48. kaiten_cli/registry/spaces.py +272 -0
  49. kaiten_cli/registry/subscribers.py +168 -0
  50. kaiten_cli/registry/tags.py +193 -0
  51. kaiten_cli/registry/time_logs.py +353 -0
  52. kaiten_cli/registry/tree.py +352 -0
  53. kaiten_cli/registry/utilities.py +287 -0
  54. kaiten_cli/registry/webhooks.py +265 -0
  55. kaiten_cli/runtime/__init__.py +1 -0
  56. kaiten_cli/runtime/automation_validation.py +115 -0
  57. kaiten_cli/runtime/behaviors.py +787 -0
  58. kaiten_cli/runtime/cache.py +733 -0
  59. kaiten_cli/runtime/client.py +387 -0
  60. kaiten_cli/runtime/endpoints.py +59 -0
  61. kaiten_cli/runtime/executor.py +269 -0
  62. kaiten_cli/runtime/fs_security.py +168 -0
  63. kaiten_cli/runtime/input.py +310 -0
  64. kaiten_cli/runtime/output.py +59 -0
  65. kaiten_cli/runtime/public_validation.py +35 -0
  66. kaiten_cli/runtime/snapshot_build.py +527 -0
  67. kaiten_cli/runtime/snapshot_common.py +363 -0
  68. kaiten_cli/runtime/snapshot_query.py +306 -0
  69. kaiten_cli/runtime/snapshot_store.py +1192 -0
  70. kaiten_cli/runtime/snapshots.py +62 -0
  71. kaiten_cli/runtime/sqlite_errors.py +23 -0
  72. kaiten_cli/runtime/support/__init__.py +1 -0
  73. kaiten_cli/runtime/support/addons.py +953 -0
  74. kaiten_cli/runtime/support/audit.py +70 -0
  75. kaiten_cli/runtime/support/batch.py +234 -0
  76. kaiten_cli/runtime/support/card_move_url.py +213 -0
  77. kaiten_cli/runtime/support/cards.py +174 -0
  78. kaiten_cli/runtime/support/checklists.py +21 -0
  79. kaiten_cli/runtime/support/company_users.py +117 -0
  80. kaiten_cli/runtime/support/dashboards.py +35 -0
  81. kaiten_cli/runtime/support/documents.py +175 -0
  82. kaiten_cli/runtime/support/files.py +561 -0
  83. kaiten_cli/runtime/support/markdown_export.py +525 -0
  84. kaiten_cli/runtime/support/pagination.py +167 -0
  85. kaiten_cli/runtime/support/projects.py +66 -0
  86. kaiten_cli/runtime/support/relations.py +86 -0
  87. kaiten_cli/runtime/support/restrictions.py +62 -0
  88. kaiten_cli/runtime/support/spaces.py +20 -0
  89. kaiten_cli/runtime/support/time_logs.py +61 -0
  90. kaiten_cli/runtime/support/tree.py +140 -0
  91. kaiten_cli/runtime/support/tree_sharing.py +447 -0
  92. kaiten_cli/runtime/trace.py +500 -0
  93. kaiten_cli/runtime/transforms.py +128 -0
  94. kaiten_cli/schema_docs.py +22 -0
  95. kaiten_cli/update_check.py +519 -0
  96. kaiten_cli-0.3.3.dist-info/METADATA +1110 -0
  97. kaiten_cli-0.3.3.dist-info/RECORD +99 -0
  98. kaiten_cli-0.3.3.dist-info/WHEEL +4 -0
  99. kaiten_cli-0.3.3.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,263 @@
1
+ """SCIM v2 tool specs."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from kaiten_cli.models import ExampleSpec, OperationSpec, ResponsePolicy, RuntimeBehavior
6
+ from kaiten_cli.registry.base import make_tool
7
+ from kaiten_cli.runtime.behaviors import payload_body_request, scim_query_request
8
+
9
+
10
+ SCIM_PAYLOAD = {
11
+ "type": "object",
12
+ "description": "SCIM JSON payload. Sent as the request body.",
13
+ }
14
+
15
+
16
+ TOOLS = (
17
+ make_tool(
18
+ canonical_name="scim.users.list",
19
+ mcp_alias="kaiten_list_scim_users",
20
+ description="List SCIM users.",
21
+ input_schema={
22
+ "type": "object",
23
+ "properties": {
24
+ "start_index": {"type": "integer", "description": "SCIM start index."},
25
+ "count": {"type": "integer", "description": "SCIM page size."},
26
+ "filter": {"type": "string", "description": "SCIM filter expression."},
27
+ },
28
+ },
29
+ operation=OperationSpec(
30
+ method="GET",
31
+ path_template="/scim/v2/Users",
32
+ query_fields=("start_index", "count", "filter"),
33
+ api_base_path="",
34
+ ),
35
+ runtime_behavior=RuntimeBehavior(request_shaper=scim_query_request),
36
+ response_policy=ResponsePolicy(result_kind="list"),
37
+ examples=(
38
+ ExampleSpec(command="kaiten --json scim users list", description="List SCIM users."),
39
+ ),
40
+ ),
41
+ make_tool(
42
+ canonical_name="scim.users.get",
43
+ mcp_alias="kaiten_get_scim_user",
44
+ description="Get a SCIM user.",
45
+ input_schema={
46
+ "type": "object",
47
+ "properties": {"user_id": {"type": "string", "description": "SCIM user ID."}},
48
+ "required": ["user_id"],
49
+ },
50
+ operation=OperationSpec(
51
+ method="GET",
52
+ path_template="/scim/v2/Users/{user_id}",
53
+ path_fields=("user_id",),
54
+ api_base_path="",
55
+ ),
56
+ examples=(
57
+ ExampleSpec(
58
+ command="kaiten --json scim users get --user-id user-id",
59
+ description="Get a SCIM user.",
60
+ ),
61
+ ),
62
+ ),
63
+ make_tool(
64
+ canonical_name="scim.users.create",
65
+ mcp_alias="kaiten_create_scim_user",
66
+ description="Create a SCIM user.",
67
+ input_schema={
68
+ "type": "object",
69
+ "properties": {
70
+ "payload": {
71
+ "type": "object",
72
+ "description": "SCIM JSON payload. Sent as the request body.",
73
+ },
74
+ "userName": {"type": "string", "description": "SCIM user name."},
75
+ "name": {
76
+ "type": "object",
77
+ "properties": {
78
+ "givenName": {"type": "string"},
79
+ "familyName": {"type": "string"},
80
+ },
81
+ "description": "SCIM structured name.",
82
+ },
83
+ "emails": {
84
+ "type": ["array", "object"],
85
+ "description": "SCIM emails. The portal labels this object but renders unnamed nested fields; array form is retained for SCIM compatibility.",
86
+ },
87
+ },
88
+ "required": [],
89
+ },
90
+ operation=OperationSpec(
91
+ method="POST",
92
+ path_template="/scim/v2/Users",
93
+ body_fields=("payload", "userName", "name", "emails"),
94
+ api_base_path="",
95
+ ),
96
+ runtime_behavior=RuntimeBehavior(request_shaper=payload_body_request),
97
+ examples=(
98
+ ExampleSpec(
99
+ command='kaiten --json scim users create --payload \'{"userName":"alice@example.com"}\'',
100
+ description="Create a SCIM user.",
101
+ ),
102
+ ),
103
+ ),
104
+ make_tool(
105
+ canonical_name="scim.users.update",
106
+ mcp_alias="kaiten_update_scim_user",
107
+ description="Update a SCIM user.",
108
+ input_schema={
109
+ "type": "object",
110
+ "properties": {
111
+ "user_id": {"type": "string", "description": "SCIM user ID."},
112
+ "payload": {
113
+ "type": "object",
114
+ "description": "SCIM JSON payload. Sent as the request body.",
115
+ },
116
+ "Operations": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "op": {"type": "string"},
122
+ "path": {"type": "string"},
123
+ "value": {},
124
+ },
125
+ },
126
+ "description": "SCIM PATCH operations. Unknown server-specific paths are preserved.",
127
+ },
128
+ },
129
+ "required": ["user_id"],
130
+ },
131
+ operation=OperationSpec(
132
+ method="PATCH",
133
+ path_template="/scim/v2/Users/{user_id}",
134
+ path_fields=("user_id",),
135
+ body_fields=("payload", "Operations"),
136
+ api_base_path="",
137
+ ),
138
+ runtime_behavior=RuntimeBehavior(request_shaper=payload_body_request),
139
+ examples=(
140
+ ExampleSpec(
141
+ command="kaiten --json scim users update --user-id user-id --payload '{\"active\":false}'",
142
+ description="Update a SCIM user.",
143
+ ),
144
+ ),
145
+ ),
146
+ make_tool(
147
+ canonical_name="scim.groups.list",
148
+ mcp_alias="kaiten_list_scim_groups",
149
+ description="List SCIM groups.",
150
+ input_schema={
151
+ "type": "object",
152
+ "properties": {
153
+ "start_index": {"type": "integer", "description": "SCIM start index."},
154
+ "count": {"type": "integer", "description": "SCIM page size."},
155
+ "filter": {"type": "string", "description": "SCIM filter expression."},
156
+ },
157
+ },
158
+ operation=OperationSpec(
159
+ method="GET",
160
+ path_template="/scim/v2/Groups",
161
+ query_fields=("start_index", "count", "filter"),
162
+ api_base_path="",
163
+ ),
164
+ runtime_behavior=RuntimeBehavior(request_shaper=scim_query_request),
165
+ response_policy=ResponsePolicy(result_kind="list"),
166
+ examples=(
167
+ ExampleSpec(command="kaiten --json scim groups list", description="List SCIM groups."),
168
+ ),
169
+ ),
170
+ make_tool(
171
+ canonical_name="scim.groups.get",
172
+ mcp_alias="kaiten_get_scim_group",
173
+ description="Get a SCIM group.",
174
+ input_schema={
175
+ "type": "object",
176
+ "properties": {"group_id": {"type": "string", "description": "SCIM group ID."}},
177
+ "required": ["group_id"],
178
+ },
179
+ operation=OperationSpec(
180
+ method="GET",
181
+ path_template="/scim/v2/Groups/{group_id}",
182
+ path_fields=("group_id",),
183
+ api_base_path="",
184
+ ),
185
+ examples=(
186
+ ExampleSpec(
187
+ command="kaiten --json scim groups get --group-id group-id",
188
+ description="Get a SCIM group.",
189
+ ),
190
+ ),
191
+ ),
192
+ make_tool(
193
+ canonical_name="scim.groups.create",
194
+ mcp_alias="kaiten_create_scim_group",
195
+ description="Create a SCIM group.",
196
+ input_schema={
197
+ "type": "object",
198
+ "properties": {
199
+ "payload": {
200
+ "type": "object",
201
+ "description": "SCIM JSON payload. Sent as the request body.",
202
+ },
203
+ "displayName": {"type": "string", "description": "SCIM group display name."},
204
+ },
205
+ "required": [],
206
+ },
207
+ operation=OperationSpec(
208
+ method="POST",
209
+ path_template="/scim/v2/Groups",
210
+ body_fields=("payload", "displayName"),
211
+ api_base_path="",
212
+ ),
213
+ runtime_behavior=RuntimeBehavior(request_shaper=payload_body_request),
214
+ examples=(
215
+ ExampleSpec(
216
+ command='kaiten --json scim groups create --payload \'{"displayName":"Engineering"}\'',
217
+ description="Create a SCIM group.",
218
+ ),
219
+ ),
220
+ ),
221
+ make_tool(
222
+ canonical_name="scim.groups.update",
223
+ mcp_alias="kaiten_update_scim_group",
224
+ description="Update a SCIM group.",
225
+ input_schema={
226
+ "type": "object",
227
+ "properties": {
228
+ "group_id": {"type": "string", "description": "SCIM group ID."},
229
+ "payload": {
230
+ "type": "object",
231
+ "description": "SCIM JSON payload. Sent as the request body.",
232
+ },
233
+ "Operations": {
234
+ "type": "array",
235
+ "items": {
236
+ "type": "object",
237
+ "properties": {
238
+ "op": {"type": "string"},
239
+ "path": {"type": "string"},
240
+ "value": {},
241
+ },
242
+ },
243
+ "description": "SCIM PATCH operations. Unknown server-specific paths are preserved.",
244
+ },
245
+ },
246
+ "required": ["group_id"],
247
+ },
248
+ operation=OperationSpec(
249
+ method="PATCH",
250
+ path_template="/scim/v2/Groups/{group_id}",
251
+ path_fields=("group_id",),
252
+ body_fields=("payload", "Operations"),
253
+ api_base_path="",
254
+ ),
255
+ runtime_behavior=RuntimeBehavior(request_shaper=payload_body_request),
256
+ examples=(
257
+ ExampleSpec(
258
+ command='kaiten --json scim groups update --group-id group-id --payload \'{"displayName":"Ops"}\'',
259
+ description="Update a SCIM group.",
260
+ ),
261
+ ),
262
+ ),
263
+ )