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.
- kaiten_cli/__init__.py +5 -0
- kaiten_cli/__main__.py +9 -0
- kaiten_cli/agent_gateway.py +577 -0
- kaiten_cli/app.py +1636 -0
- kaiten_cli/completion.py +570 -0
- kaiten_cli/discovery.py +39 -0
- kaiten_cli/errors.py +79 -0
- kaiten_cli/i18n.py +92 -0
- kaiten_cli/locales/ru.json +2967 -0
- kaiten_cli/localized_click.py +160 -0
- kaiten_cli/models.py +202 -0
- kaiten_cli/profiles.py +316 -0
- kaiten_cli/registry/__init__.py +260 -0
- kaiten_cli/registry/addons.py +392 -0
- kaiten_cli/registry/audit_and_analytics.py +451 -0
- kaiten_cli/registry/automation_schema.py +44 -0
- kaiten_cli/registry/automation_schemas.json +7417 -0
- kaiten_cli/registry/automations.py +342 -0
- kaiten_cli/registry/base.py +62 -0
- kaiten_cli/registry/blockers.py +320 -0
- kaiten_cli/registry/boards.py +520 -0
- kaiten_cli/registry/card_relations.py +376 -0
- kaiten_cli/registry/card_types.py +363 -0
- kaiten_cli/registry/cards.py +1329 -0
- kaiten_cli/registry/charts.py +539 -0
- kaiten_cli/registry/checklists.py +600 -0
- kaiten_cli/registry/columns.py +558 -0
- kaiten_cli/registry/comments.py +224 -0
- kaiten_cli/registry/custom_directories.py +980 -0
- kaiten_cli/registry/custom_properties.py +1460 -0
- kaiten_cli/registry/dashboards.py +564 -0
- kaiten_cli/registry/documents.py +761 -0
- kaiten_cli/registry/external_links.py +128 -0
- kaiten_cli/registry/files.py +738 -0
- kaiten_cli/registry/github_addon.py +613 -0
- kaiten_cli/registry/iterations.py +397 -0
- kaiten_cli/registry/lanes.py +205 -0
- kaiten_cli/registry/live_contracts.py +361 -0
- kaiten_cli/registry/members.py +336 -0
- kaiten_cli/registry/module_docs.py +108 -0
- kaiten_cli/registry/projects.py +369 -0
- kaiten_cli/registry/query.py +129 -0
- kaiten_cli/registry/restrictions.py +249 -0
- kaiten_cli/registry/roles_and_groups.py +1102 -0
- kaiten_cli/registry/scim.py +263 -0
- kaiten_cli/registry/service_desk.py +1270 -0
- kaiten_cli/registry/snapshot.py +187 -0
- kaiten_cli/registry/spaces.py +272 -0
- kaiten_cli/registry/subscribers.py +168 -0
- kaiten_cli/registry/tags.py +193 -0
- kaiten_cli/registry/time_logs.py +353 -0
- kaiten_cli/registry/tree.py +352 -0
- kaiten_cli/registry/utilities.py +287 -0
- kaiten_cli/registry/webhooks.py +265 -0
- kaiten_cli/runtime/__init__.py +1 -0
- kaiten_cli/runtime/automation_validation.py +115 -0
- kaiten_cli/runtime/behaviors.py +787 -0
- kaiten_cli/runtime/cache.py +733 -0
- kaiten_cli/runtime/client.py +387 -0
- kaiten_cli/runtime/endpoints.py +59 -0
- kaiten_cli/runtime/executor.py +269 -0
- kaiten_cli/runtime/fs_security.py +168 -0
- kaiten_cli/runtime/input.py +310 -0
- kaiten_cli/runtime/output.py +59 -0
- kaiten_cli/runtime/public_validation.py +35 -0
- kaiten_cli/runtime/snapshot_build.py +527 -0
- kaiten_cli/runtime/snapshot_common.py +363 -0
- kaiten_cli/runtime/snapshot_query.py +306 -0
- kaiten_cli/runtime/snapshot_store.py +1192 -0
- kaiten_cli/runtime/snapshots.py +62 -0
- kaiten_cli/runtime/sqlite_errors.py +23 -0
- kaiten_cli/runtime/support/__init__.py +1 -0
- kaiten_cli/runtime/support/addons.py +953 -0
- kaiten_cli/runtime/support/audit.py +70 -0
- kaiten_cli/runtime/support/batch.py +234 -0
- kaiten_cli/runtime/support/card_move_url.py +213 -0
- kaiten_cli/runtime/support/cards.py +174 -0
- kaiten_cli/runtime/support/checklists.py +21 -0
- kaiten_cli/runtime/support/company_users.py +117 -0
- kaiten_cli/runtime/support/dashboards.py +35 -0
- kaiten_cli/runtime/support/documents.py +175 -0
- kaiten_cli/runtime/support/files.py +561 -0
- kaiten_cli/runtime/support/markdown_export.py +525 -0
- kaiten_cli/runtime/support/pagination.py +167 -0
- kaiten_cli/runtime/support/projects.py +66 -0
- kaiten_cli/runtime/support/relations.py +86 -0
- kaiten_cli/runtime/support/restrictions.py +62 -0
- kaiten_cli/runtime/support/spaces.py +20 -0
- kaiten_cli/runtime/support/time_logs.py +61 -0
- kaiten_cli/runtime/support/tree.py +140 -0
- kaiten_cli/runtime/support/tree_sharing.py +447 -0
- kaiten_cli/runtime/trace.py +500 -0
- kaiten_cli/runtime/transforms.py +128 -0
- kaiten_cli/schema_docs.py +22 -0
- kaiten_cli/update_check.py +519 -0
- kaiten_cli-0.3.3.dist-info/METADATA +1110 -0
- kaiten_cli-0.3.3.dist-info/RECORD +99 -0
- kaiten_cli-0.3.3.dist-info/WHEEL +4 -0
- kaiten_cli-0.3.3.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
"""Audit, activity, and saved-filter 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 (
|
|
8
|
+
execute_card_location_history_batch_get,
|
|
9
|
+
execute_space_activity_all,
|
|
10
|
+
saved_filter_title_request,
|
|
11
|
+
validate_history_batch_get,
|
|
12
|
+
)
|
|
13
|
+
from kaiten_cli.runtime.transforms import DEFAULT_LIMIT
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
TOOLS = (
|
|
17
|
+
make_tool(
|
|
18
|
+
canonical_name="audit-logs.list",
|
|
19
|
+
mcp_alias="kaiten_list_audit_logs",
|
|
20
|
+
description="List Kaiten audit logs for the company.",
|
|
21
|
+
input_schema={
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"categories": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Comma-separated log categories",
|
|
27
|
+
"x-documentation-constraints": "app\nauth\nuser_profile\nuser_management\ngroup_management\nservice_desk\npublication\nimport\ncompany_profile",
|
|
28
|
+
},
|
|
29
|
+
"actions": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Comma-separated audit actions",
|
|
32
|
+
"x-documentation-constraints": "start\nstop\nsign_in\nsign_in_fail\nsign_out\nrequest_auth_pin\nchange_password\nrequest_change_email\nchange_email\ninvite\ninvite_fail\ndeactivate\nactivate\nchange_permissions\nchange_apps_permissions\ngrant_access\nrevoke_access\ntransfer_ownership\ndepersonalization\ncreate\ndelete\ngroup_activate\ngroup_deactivate\nadd_user\nadd_admin\nadmin_add_user\ndelete_user\nadmin_delete_user\ndelete_admin\nset_sd_password\nchange_temporary_sd_password\npublish_document\npublish_document_group\npublish_card\nunpublish_document\nunpublish_document_group\nunpublish_card\nshare_entity\nunshare_entity\npublic_link\nextend_trial",
|
|
33
|
+
},
|
|
34
|
+
"from": {"type": "string", "description": "Start of date range filter"},
|
|
35
|
+
"to": {"type": "string", "description": "End of date range filter"},
|
|
36
|
+
"limit": {"type": "integer", "description": "Max results"},
|
|
37
|
+
"offset": {"type": "integer", "description": "Pagination offset"},
|
|
38
|
+
"author_id": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"description": "Filter events by author user id.Example: 123",
|
|
41
|
+
},
|
|
42
|
+
"author_uid": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Filter events by author user uid.Example: 27ca9e9f-d4fc-47dd-9d4b-35c7b6e3d105",
|
|
45
|
+
},
|
|
46
|
+
"id": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Filter by audit log event id.Example: 8f977f36-0f13-4b5f-91ab-0df9d15c7ed8",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
operation=OperationSpec(
|
|
53
|
+
method="GET",
|
|
54
|
+
path_template="/audit-logs",
|
|
55
|
+
query_fields=(
|
|
56
|
+
"categories",
|
|
57
|
+
"actions",
|
|
58
|
+
"from",
|
|
59
|
+
"to",
|
|
60
|
+
"limit",
|
|
61
|
+
"offset",
|
|
62
|
+
"author_id",
|
|
63
|
+
"author_uid",
|
|
64
|
+
"id",
|
|
65
|
+
),
|
|
66
|
+
),
|
|
67
|
+
response_policy=ResponsePolicy(default_limit=DEFAULT_LIMIT, result_kind="list", heavy=True),
|
|
68
|
+
examples=(
|
|
69
|
+
ExampleSpec(
|
|
70
|
+
command="kaiten --json audit-logs list --limit 10", description="List audit logs."
|
|
71
|
+
),
|
|
72
|
+
),
|
|
73
|
+
),
|
|
74
|
+
make_tool(
|
|
75
|
+
canonical_name="card-activity.get",
|
|
76
|
+
mcp_alias="kaiten_get_card_activity",
|
|
77
|
+
description="Get activity feed for a Kaiten card.",
|
|
78
|
+
input_schema={
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"card_id": {"type": "integer", "description": "Card ID"},
|
|
82
|
+
"limit": {"type": "integer", "description": "Max results"},
|
|
83
|
+
"offset": {"type": "integer", "description": "Pagination offset"},
|
|
84
|
+
},
|
|
85
|
+
"required": ["card_id"],
|
|
86
|
+
},
|
|
87
|
+
operation=OperationSpec(
|
|
88
|
+
method="GET",
|
|
89
|
+
path_template="/cards/{card_id}/activity",
|
|
90
|
+
path_fields=("card_id",),
|
|
91
|
+
query_fields=("limit", "offset"),
|
|
92
|
+
),
|
|
93
|
+
response_policy=ResponsePolicy(default_limit=DEFAULT_LIMIT, result_kind="list"),
|
|
94
|
+
examples=(
|
|
95
|
+
ExampleSpec(
|
|
96
|
+
command="kaiten --json card-activity get --card-id 1",
|
|
97
|
+
description="Get card activity.",
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
),
|
|
101
|
+
make_tool(
|
|
102
|
+
canonical_name="space-activity.get",
|
|
103
|
+
mcp_alias="kaiten_get_space_activity",
|
|
104
|
+
description="Get activity feed for a Kaiten space.",
|
|
105
|
+
input_schema={
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"space_id": {"type": "integer", "description": "Space ID"},
|
|
109
|
+
"actions": {"type": "string", "description": "Comma-separated action types"},
|
|
110
|
+
"created_after": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Filter activities after this datetime",
|
|
113
|
+
},
|
|
114
|
+
"created_before": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "Filter activities before this datetime",
|
|
117
|
+
},
|
|
118
|
+
"author_id": {"type": "integer", "description": "Filter by author user ID"},
|
|
119
|
+
"limit": {"type": "integer", "description": "Max results"},
|
|
120
|
+
"offset": {"type": "integer", "description": "Pagination offset"},
|
|
121
|
+
"compact": {"type": "boolean", "description": "Strip heavy fields"},
|
|
122
|
+
"fields": {"type": "string", "description": "Comma-separated field names to keep"},
|
|
123
|
+
},
|
|
124
|
+
"required": ["space_id"],
|
|
125
|
+
},
|
|
126
|
+
operation=OperationSpec(
|
|
127
|
+
method="GET",
|
|
128
|
+
path_template="/spaces/{space_id}/activity",
|
|
129
|
+
path_fields=("space_id",),
|
|
130
|
+
query_fields=(
|
|
131
|
+
"actions",
|
|
132
|
+
"created_after",
|
|
133
|
+
"created_before",
|
|
134
|
+
"author_id",
|
|
135
|
+
"limit",
|
|
136
|
+
"offset",
|
|
137
|
+
),
|
|
138
|
+
),
|
|
139
|
+
response_policy=ResponsePolicy(
|
|
140
|
+
compact_supported=True,
|
|
141
|
+
fields_supported=True,
|
|
142
|
+
default_limit=DEFAULT_LIMIT,
|
|
143
|
+
result_kind="list",
|
|
144
|
+
),
|
|
145
|
+
examples=(
|
|
146
|
+
ExampleSpec(
|
|
147
|
+
command="kaiten --json space-activity get --space-id 1 --limit 10",
|
|
148
|
+
description="Get space activity.",
|
|
149
|
+
),
|
|
150
|
+
),
|
|
151
|
+
usage_notes=(
|
|
152
|
+
"This low-level endpoint is useful for targeted page reads, but report workflows usually want the bounded bulk path.",
|
|
153
|
+
"Prefer space-activity-all.get over manual offset loops when collecting a full investigation window.",
|
|
154
|
+
),
|
|
155
|
+
bulk_alternative="space-activity-all.get",
|
|
156
|
+
),
|
|
157
|
+
make_tool(
|
|
158
|
+
canonical_name="company-activity.get",
|
|
159
|
+
mcp_alias="kaiten_get_company_activity",
|
|
160
|
+
description="Get company-wide activity feed.",
|
|
161
|
+
input_schema={
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"actions": {"type": "string", "description": "Comma-separated action types"},
|
|
165
|
+
"created_after": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"description": "Filter activities after this datetime",
|
|
168
|
+
},
|
|
169
|
+
"created_before": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "Filter activities before this datetime",
|
|
172
|
+
},
|
|
173
|
+
"author_id": {"type": "integer", "description": "Filter by author user ID"},
|
|
174
|
+
"cursor_created": {"type": "string", "description": "Cursor datetime"},
|
|
175
|
+
"cursor_id": {"type": "integer", "description": "Cursor ID"},
|
|
176
|
+
"limit": {"type": "integer", "description": "Max results"},
|
|
177
|
+
"offset": {"type": "integer", "description": "Pagination offset"},
|
|
178
|
+
"compact": {"type": "boolean", "description": "Strip heavy fields"},
|
|
179
|
+
"fields": {"type": "string", "description": "Comma-separated field names to keep"},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
operation=OperationSpec(
|
|
183
|
+
method="GET",
|
|
184
|
+
path_template="/company/activity",
|
|
185
|
+
query_fields=(
|
|
186
|
+
"actions",
|
|
187
|
+
"created_after",
|
|
188
|
+
"created_before",
|
|
189
|
+
"author_id",
|
|
190
|
+
"cursor_created",
|
|
191
|
+
"cursor_id",
|
|
192
|
+
"limit",
|
|
193
|
+
"offset",
|
|
194
|
+
),
|
|
195
|
+
),
|
|
196
|
+
response_policy=ResponsePolicy(
|
|
197
|
+
compact_supported=True,
|
|
198
|
+
fields_supported=True,
|
|
199
|
+
default_limit=DEFAULT_LIMIT,
|
|
200
|
+
result_kind="list",
|
|
201
|
+
heavy=True,
|
|
202
|
+
),
|
|
203
|
+
examples=(
|
|
204
|
+
ExampleSpec(
|
|
205
|
+
command="kaiten --json company-activity get --limit 10",
|
|
206
|
+
description="Get company activity.",
|
|
207
|
+
),
|
|
208
|
+
),
|
|
209
|
+
),
|
|
210
|
+
make_tool(
|
|
211
|
+
canonical_name="card-location-history.get",
|
|
212
|
+
mcp_alias="kaiten_get_card_location_history",
|
|
213
|
+
description="Get location history of a Kaiten card.",
|
|
214
|
+
input_schema={
|
|
215
|
+
"type": "object",
|
|
216
|
+
"properties": {"card_id": {"type": "integer", "description": "Card ID"}},
|
|
217
|
+
"required": ["card_id"],
|
|
218
|
+
},
|
|
219
|
+
operation=OperationSpec(
|
|
220
|
+
method="GET",
|
|
221
|
+
path_template="/cards/{card_id}/location-history",
|
|
222
|
+
path_fields=("card_id",),
|
|
223
|
+
),
|
|
224
|
+
response_policy=ResponsePolicy(result_kind="list"),
|
|
225
|
+
examples=(
|
|
226
|
+
ExampleSpec(
|
|
227
|
+
command="kaiten --json card-location-history get --card-id 1",
|
|
228
|
+
description="Get card location history.",
|
|
229
|
+
),
|
|
230
|
+
),
|
|
231
|
+
usage_notes=(
|
|
232
|
+
"This is a per-card read and becomes expensive when repeated hundreds of times.",
|
|
233
|
+
"For high-cardinality reads, use card-location-history.batch-get instead of spawning one CLI process per card.",
|
|
234
|
+
),
|
|
235
|
+
bulk_alternative="card-location-history.batch-get",
|
|
236
|
+
),
|
|
237
|
+
make_tool(
|
|
238
|
+
canonical_name="card-location-history.batch-get",
|
|
239
|
+
mcp_alias="kaiten_batch_get_card_location_history",
|
|
240
|
+
description="Fetch location history for multiple cards with bounded worker concurrency.",
|
|
241
|
+
input_schema={
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"card_ids": {
|
|
245
|
+
"type": "array",
|
|
246
|
+
"items": {"type": "integer"},
|
|
247
|
+
"description": "Card IDs to fetch",
|
|
248
|
+
},
|
|
249
|
+
"workers": {
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"description": "Parallel workers (default 2, max 6)",
|
|
252
|
+
},
|
|
253
|
+
"fields": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"description": "Comma-separated field names to keep for each history row",
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
"required": ["card_ids"],
|
|
259
|
+
},
|
|
260
|
+
operation=OperationSpec(method="GET", path_template="/cards/location-history/batch"),
|
|
261
|
+
response_policy=ResponsePolicy(result_kind="entity", heavy=True),
|
|
262
|
+
runtime_behavior=RuntimeBehavior(
|
|
263
|
+
execution_mode="aggregated",
|
|
264
|
+
payload_validator=validate_history_batch_get,
|
|
265
|
+
custom_executor=execute_card_location_history_batch_get,
|
|
266
|
+
),
|
|
267
|
+
examples=(
|
|
268
|
+
ExampleSpec(
|
|
269
|
+
command="kaiten --json card-location-history batch-get --card-ids '[1,2,3]'",
|
|
270
|
+
description="Fetch history for several cards in one CLI call.",
|
|
271
|
+
),
|
|
272
|
+
ExampleSpec(
|
|
273
|
+
command="kaiten --json card-location-history batch-get --card-ids '[1,2,3]' --workers 2 --fields changed,column_id,subcolumn_id",
|
|
274
|
+
description="Fetch projected history rows with bounded concurrency.",
|
|
275
|
+
),
|
|
276
|
+
),
|
|
277
|
+
usage_notes=(
|
|
278
|
+
"The command returns items, errors, and meta so partial per-card failures stay visible without aborting the whole batch.",
|
|
279
|
+
"Use conservative workers to avoid shifting the bottleneck from process startup to API rate limiting.",
|
|
280
|
+
),
|
|
281
|
+
),
|
|
282
|
+
make_tool(
|
|
283
|
+
canonical_name="space-activity-all.get",
|
|
284
|
+
mcp_alias="kaiten_get_all_space_activity",
|
|
285
|
+
description="Fetch all space activity with automatic pagination.",
|
|
286
|
+
input_schema={
|
|
287
|
+
"type": "object",
|
|
288
|
+
"properties": {
|
|
289
|
+
"space_id": {"type": "integer", "description": "Space ID"},
|
|
290
|
+
"actions": {"type": "string", "description": "Comma-separated action types"},
|
|
291
|
+
"created_after": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"description": "Filter activities after this datetime",
|
|
294
|
+
},
|
|
295
|
+
"created_before": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"description": "Filter activities before this datetime",
|
|
298
|
+
},
|
|
299
|
+
"author_id": {"type": "integer", "description": "Filter by author user ID"},
|
|
300
|
+
"page_size": {
|
|
301
|
+
"type": "integer",
|
|
302
|
+
"description": "Events per page (default 100, max 100)",
|
|
303
|
+
},
|
|
304
|
+
"max_pages": {"type": "integer", "description": "Safety limit on pages to fetch"},
|
|
305
|
+
"compact": {
|
|
306
|
+
"type": "boolean",
|
|
307
|
+
"description": "Strip heavy fields; defaults to true for bulk",
|
|
308
|
+
},
|
|
309
|
+
"fields": {"type": "string", "description": "Comma-separated field names to keep"},
|
|
310
|
+
},
|
|
311
|
+
"required": ["space_id"],
|
|
312
|
+
},
|
|
313
|
+
operation=OperationSpec(
|
|
314
|
+
method="GET", path_template="/spaces/{space_id}/activity", path_fields=("space_id",)
|
|
315
|
+
),
|
|
316
|
+
response_policy=ResponsePolicy(
|
|
317
|
+
compact_supported=True, fields_supported=True, result_kind="list", heavy=True
|
|
318
|
+
),
|
|
319
|
+
runtime_behavior=RuntimeBehavior(
|
|
320
|
+
execution_mode="aggregated",
|
|
321
|
+
custom_executor=execute_space_activity_all,
|
|
322
|
+
compact_default=True,
|
|
323
|
+
),
|
|
324
|
+
examples=(
|
|
325
|
+
ExampleSpec(
|
|
326
|
+
command="kaiten --json space-activity-all get --space-id 1 --page-size 20 --max-pages 2",
|
|
327
|
+
description="Fetch all space activity with bounded pagination.",
|
|
328
|
+
),
|
|
329
|
+
),
|
|
330
|
+
usage_notes=(
|
|
331
|
+
"Use this aggregated path for report windows instead of building manual offset loops around space-activity.get.",
|
|
332
|
+
),
|
|
333
|
+
),
|
|
334
|
+
make_tool(
|
|
335
|
+
canonical_name="saved-filters.list",
|
|
336
|
+
mcp_alias="kaiten_list_saved_filters",
|
|
337
|
+
description="List saved filters.",
|
|
338
|
+
input_schema={
|
|
339
|
+
"type": "object",
|
|
340
|
+
"properties": {
|
|
341
|
+
"limit": {"type": "integer", "description": "Max results"},
|
|
342
|
+
"offset": {"type": "integer", "description": "Pagination offset"},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
operation=OperationSpec(
|
|
346
|
+
method="GET", path_template="/saved-filters", query_fields=("limit", "offset")
|
|
347
|
+
),
|
|
348
|
+
response_policy=ResponsePolicy(default_limit=DEFAULT_LIMIT, result_kind="list"),
|
|
349
|
+
examples=(
|
|
350
|
+
ExampleSpec(
|
|
351
|
+
command="kaiten --json saved-filters list", description="List saved filters."
|
|
352
|
+
),
|
|
353
|
+
),
|
|
354
|
+
),
|
|
355
|
+
make_tool(
|
|
356
|
+
canonical_name="saved-filters.create",
|
|
357
|
+
mcp_alias="kaiten_create_saved_filter",
|
|
358
|
+
description="Create a saved filter.",
|
|
359
|
+
input_schema={
|
|
360
|
+
"type": "object",
|
|
361
|
+
"properties": {
|
|
362
|
+
"name": {"type": "string", "description": "Filter name"},
|
|
363
|
+
"filter": {"type": "object", "description": "Filter criteria object"},
|
|
364
|
+
"shared": {
|
|
365
|
+
"type": "boolean",
|
|
366
|
+
"description": "Whether the filter is shared with the team",
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
"required": ["name", "filter"],
|
|
370
|
+
},
|
|
371
|
+
operation=OperationSpec(
|
|
372
|
+
method="POST", path_template="/saved-filters", body_fields=("name", "filter", "shared")
|
|
373
|
+
),
|
|
374
|
+
runtime_behavior=RuntimeBehavior(request_shaper=saved_filter_title_request),
|
|
375
|
+
examples=(
|
|
376
|
+
ExampleSpec(
|
|
377
|
+
command="kaiten --json saved-filters create --name MyFilter --filter '{}'",
|
|
378
|
+
description="Create a saved filter.",
|
|
379
|
+
),
|
|
380
|
+
),
|
|
381
|
+
),
|
|
382
|
+
make_tool(
|
|
383
|
+
canonical_name="saved-filters.get",
|
|
384
|
+
mcp_alias="kaiten_get_saved_filter",
|
|
385
|
+
description="Get a saved filter by ID.",
|
|
386
|
+
input_schema={
|
|
387
|
+
"type": "object",
|
|
388
|
+
"properties": {"filter_id": {"type": "integer", "description": "Filter ID"}},
|
|
389
|
+
"required": ["filter_id"],
|
|
390
|
+
},
|
|
391
|
+
operation=OperationSpec(
|
|
392
|
+
method="GET", path_template="/saved-filters/{filter_id}", path_fields=("filter_id",)
|
|
393
|
+
),
|
|
394
|
+
examples=(
|
|
395
|
+
ExampleSpec(
|
|
396
|
+
command="kaiten --json saved-filters get --filter-id 1",
|
|
397
|
+
description="Get a saved filter.",
|
|
398
|
+
),
|
|
399
|
+
),
|
|
400
|
+
),
|
|
401
|
+
make_tool(
|
|
402
|
+
canonical_name="saved-filters.update",
|
|
403
|
+
mcp_alias="kaiten_update_saved_filter",
|
|
404
|
+
description="Update a saved filter.",
|
|
405
|
+
input_schema={
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"filter_id": {"type": "integer", "description": "Filter ID"},
|
|
409
|
+
"name": {"type": "string", "description": "Filter name"},
|
|
410
|
+
"filter": {"type": "object", "description": "Filter criteria object"},
|
|
411
|
+
"shared": {
|
|
412
|
+
"type": "boolean",
|
|
413
|
+
"description": "Whether the filter is shared with the team",
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
"required": ["filter_id"],
|
|
417
|
+
},
|
|
418
|
+
operation=OperationSpec(
|
|
419
|
+
method="PATCH",
|
|
420
|
+
path_template="/saved-filters/{filter_id}",
|
|
421
|
+
path_fields=("filter_id",),
|
|
422
|
+
body_fields=("name", "filter", "shared"),
|
|
423
|
+
),
|
|
424
|
+
runtime_behavior=RuntimeBehavior(request_shaper=saved_filter_title_request),
|
|
425
|
+
examples=(
|
|
426
|
+
ExampleSpec(
|
|
427
|
+
command="kaiten --json saved-filters update --filter-id 1 --name Renamed",
|
|
428
|
+
description="Update a saved filter.",
|
|
429
|
+
),
|
|
430
|
+
),
|
|
431
|
+
),
|
|
432
|
+
make_tool(
|
|
433
|
+
canonical_name="saved-filters.delete",
|
|
434
|
+
mcp_alias="kaiten_delete_saved_filter",
|
|
435
|
+
description="Delete a saved filter.",
|
|
436
|
+
input_schema={
|
|
437
|
+
"type": "object",
|
|
438
|
+
"properties": {"filter_id": {"type": "integer", "description": "Filter ID"}},
|
|
439
|
+
"required": ["filter_id"],
|
|
440
|
+
},
|
|
441
|
+
operation=OperationSpec(
|
|
442
|
+
method="DELETE", path_template="/saved-filters/{filter_id}", path_fields=("filter_id",)
|
|
443
|
+
),
|
|
444
|
+
examples=(
|
|
445
|
+
ExampleSpec(
|
|
446
|
+
command="kaiten --json saved-filters delete --filter-id 1",
|
|
447
|
+
description="Delete a saved filter.",
|
|
448
|
+
),
|
|
449
|
+
),
|
|
450
|
+
),
|
|
451
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Offline schemas normalized from the public automation modal tables.
|
|
2
|
+
|
|
3
|
+
Unknown variants/fields remain open for newer or on-premises servers. The source
|
|
4
|
+
snapshot and normalization script are checked into the repository for review.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from copy import deepcopy
|
|
10
|
+
import json
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
AUTOMATION_SCHEMAS = json.loads(Path(__file__).with_name("automation_schemas.json").read_text())
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def automation_properties():
|
|
17
|
+
return {
|
|
18
|
+
"trigger": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"type": {"type": "string"},
|
|
22
|
+
"hasToFireOnCardCreation": {"type": "boolean"},
|
|
23
|
+
"data": {"type": "object"},
|
|
24
|
+
},
|
|
25
|
+
"description": "Trigger configuration. Known variants are checked; server extensions are preserved.",
|
|
26
|
+
"x-variants": deepcopy(AUTOMATION_SCHEMAS["triggers"]),
|
|
27
|
+
},
|
|
28
|
+
"actions": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"minItems": 1,
|
|
31
|
+
"maxItems": 10,
|
|
32
|
+
"items": {"type": "object", "x-variants": deepcopy(AUTOMATION_SCHEMAS["actions"])},
|
|
33
|
+
"description": "Ordered automation actions (1–10). Known variants are checked; server extensions are preserved.",
|
|
34
|
+
},
|
|
35
|
+
"conditions": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Recursive and/or groups: {clause, conditions: [groups or typed conditions]}. Empty object means no conditions.",
|
|
38
|
+
"properties": {
|
|
39
|
+
"clause": {"type": "string", "enum": ["and", "or"]},
|
|
40
|
+
"conditions": {"type": "array", "items": {"type": "object"}},
|
|
41
|
+
},
|
|
42
|
+
"x-variants": deepcopy(AUTOMATION_SCHEMAS["conditions"]),
|
|
43
|
+
},
|
|
44
|
+
}
|