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,564 @@
|
|
|
1
|
+
"""Experimental dashboard tool specs."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from kaiten_cli.models import (
|
|
6
|
+
CACHE_POLICY_NONE,
|
|
7
|
+
ExampleSpec,
|
|
8
|
+
OperationSpec,
|
|
9
|
+
ResponsePolicy,
|
|
10
|
+
RuntimeBehavior,
|
|
11
|
+
)
|
|
12
|
+
from kaiten_cli.registry.base import make_tool
|
|
13
|
+
from kaiten_cli.runtime.support.dashboards import (
|
|
14
|
+
execute_dashboard_widgets_list,
|
|
15
|
+
validate_dashboard_compute_payload,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
DASHBOARD_WARNING = (
|
|
20
|
+
"Dashboards are experimental and not yet documented in the public REST catalog; "
|
|
21
|
+
"older Kaiten installations may return 404 or 405."
|
|
22
|
+
)
|
|
23
|
+
DASHBOARD_PERMISSION_NOTE = (
|
|
24
|
+
"Only the owner can change title/publicity or delete a dashboard; editors can change "
|
|
25
|
+
"layout/filter and manage users/widgets, while viewers have read access."
|
|
26
|
+
)
|
|
27
|
+
DASHBOARD_WIDGET_SCHEMA_NOTE = (
|
|
28
|
+
"Current sources include distribution, cardsTrend, velocity, throughput, cycleTimeTrends, "
|
|
29
|
+
"burndown, cfd, cycleTime, controlChart, blockResolutionTime, metric, fieldSum, "
|
|
30
|
+
"sprintProgress, cardList, dueDates and timeSpent. Current visualizations include bar, "
|
|
31
|
+
"horizontalBar, pie, donut, table, line, area, stackedArea, scatter, "
|
|
32
|
+
"percentileHistogram, number, numberTrend and battery. Values are intentionally not "
|
|
33
|
+
"client-enumerated because the dashboard schema is experimental."
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _shaping_properties() -> dict[str, dict]:
|
|
38
|
+
return {
|
|
39
|
+
"compact": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Return compact output without heavy nested fields.",
|
|
42
|
+
},
|
|
43
|
+
"fields": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Comma-separated field names to return.",
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
SHAPED_LIST = ResponsePolicy(
|
|
51
|
+
compact_supported=True,
|
|
52
|
+
fields_supported=True,
|
|
53
|
+
result_kind="list",
|
|
54
|
+
)
|
|
55
|
+
SHAPED_ENTITY = ResponsePolicy(
|
|
56
|
+
compact_supported=True,
|
|
57
|
+
fields_supported=True,
|
|
58
|
+
result_kind="entity",
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
TOOLS = (
|
|
63
|
+
make_tool(
|
|
64
|
+
canonical_name="dashboards.list",
|
|
65
|
+
mcp_alias="kaiten_list_dashboards",
|
|
66
|
+
description="List dashboards visible to the current user, including public dashboards.",
|
|
67
|
+
input_schema={
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"search": {"type": "string", "description": "Search dashboard titles."},
|
|
71
|
+
"limit": {
|
|
72
|
+
"type": "integer",
|
|
73
|
+
"description": "Maximum dashboards to return (server cap 50).",
|
|
74
|
+
},
|
|
75
|
+
"offset": {"type": "integer", "description": "Pagination offset."},
|
|
76
|
+
**_shaping_properties(),
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
operation=OperationSpec(
|
|
80
|
+
method="GET",
|
|
81
|
+
path_template="/dashboards",
|
|
82
|
+
query_fields=("search", "limit", "offset"),
|
|
83
|
+
),
|
|
84
|
+
response_policy=ResponsePolicy(
|
|
85
|
+
compact_supported=True,
|
|
86
|
+
fields_supported=True,
|
|
87
|
+
default_limit=50,
|
|
88
|
+
result_kind="list",
|
|
89
|
+
),
|
|
90
|
+
examples=(
|
|
91
|
+
ExampleSpec(
|
|
92
|
+
command='kaiten --json dashboards list --search "Requests" --fields id,title,is_public,role --compact',
|
|
93
|
+
description="Find visible dashboards by title.",
|
|
94
|
+
),
|
|
95
|
+
),
|
|
96
|
+
usage_notes=(DASHBOARD_WARNING,),
|
|
97
|
+
),
|
|
98
|
+
make_tool(
|
|
99
|
+
canonical_name="dashboards.get",
|
|
100
|
+
mcp_alias="kaiten_get_dashboard",
|
|
101
|
+
description="Get a dashboard and optionally include its widgets.",
|
|
102
|
+
input_schema={
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
106
|
+
"include": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "Comma-separated relations to include; currently widgets.",
|
|
109
|
+
},
|
|
110
|
+
**_shaping_properties(),
|
|
111
|
+
},
|
|
112
|
+
"required": ["dashboard_id"],
|
|
113
|
+
},
|
|
114
|
+
operation=OperationSpec(
|
|
115
|
+
method="GET",
|
|
116
|
+
path_template="/dashboards/{dashboard_id}",
|
|
117
|
+
path_fields=("dashboard_id",),
|
|
118
|
+
query_fields=("include",),
|
|
119
|
+
),
|
|
120
|
+
response_policy=SHAPED_ENTITY,
|
|
121
|
+
examples=(
|
|
122
|
+
ExampleSpec(
|
|
123
|
+
command="kaiten --json dashboards get --dashboard-id <dashboard_uuid> --include widgets",
|
|
124
|
+
description="Get dashboard configuration and widgets.",
|
|
125
|
+
),
|
|
126
|
+
),
|
|
127
|
+
usage_notes=(DASHBOARD_WARNING, DASHBOARD_PERMISSION_NOTE),
|
|
128
|
+
),
|
|
129
|
+
make_tool(
|
|
130
|
+
canonical_name="dashboards.create",
|
|
131
|
+
mcp_alias="kaiten_create_dashboard",
|
|
132
|
+
description="Create a private or public dashboard owned by the current user.",
|
|
133
|
+
input_schema={
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"title": {"type": "string", "description": "Dashboard title."},
|
|
137
|
+
"is_public": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"description": "Make the dashboard visible company-wide (default false).",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
"required": ["title"],
|
|
143
|
+
},
|
|
144
|
+
operation=OperationSpec(
|
|
145
|
+
method="POST", path_template="/dashboards", body_fields=("title", "is_public")
|
|
146
|
+
),
|
|
147
|
+
examples=(
|
|
148
|
+
ExampleSpec(
|
|
149
|
+
command='kaiten --json dashboards create --title "Team health"',
|
|
150
|
+
description="Create a private dashboard.",
|
|
151
|
+
),
|
|
152
|
+
ExampleSpec(
|
|
153
|
+
command='kaiten --json dashboards create --title "Company metrics" --is-public',
|
|
154
|
+
description="Create a public dashboard.",
|
|
155
|
+
),
|
|
156
|
+
),
|
|
157
|
+
usage_notes=(DASHBOARD_WARNING, DASHBOARD_PERMISSION_NOTE),
|
|
158
|
+
),
|
|
159
|
+
make_tool(
|
|
160
|
+
canonical_name="dashboards.clone",
|
|
161
|
+
mcp_alias="kaiten_clone_dashboard",
|
|
162
|
+
description="Create a personal dashboard copy with new widget IDs.",
|
|
163
|
+
input_schema={
|
|
164
|
+
"type": "object",
|
|
165
|
+
"properties": {
|
|
166
|
+
"source_dashboard_id": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "Accessible source dashboard UUID.",
|
|
169
|
+
},
|
|
170
|
+
"title": {"type": "string", "description": "Title for the new dashboard."},
|
|
171
|
+
"is_public": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"description": "Override copied visibility; otherwise inherit it.",
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
"required": ["source_dashboard_id", "title"],
|
|
177
|
+
},
|
|
178
|
+
operation=OperationSpec(
|
|
179
|
+
method="POST",
|
|
180
|
+
path_template="/dashboards",
|
|
181
|
+
body_fields=("source_dashboard_id", "title", "is_public"),
|
|
182
|
+
),
|
|
183
|
+
examples=(
|
|
184
|
+
ExampleSpec(
|
|
185
|
+
command='kaiten --json dashboards clone --source-dashboard-id <dashboard_uuid> --title "My copy"',
|
|
186
|
+
description="Clone an accessible dashboard into a personal copy.",
|
|
187
|
+
),
|
|
188
|
+
),
|
|
189
|
+
usage_notes=(
|
|
190
|
+
DASHBOARD_WARNING,
|
|
191
|
+
"Clone copies layout, filter and widgets with fresh widget IDs; shared users are not copied.",
|
|
192
|
+
),
|
|
193
|
+
),
|
|
194
|
+
make_tool(
|
|
195
|
+
canonical_name="dashboards.update",
|
|
196
|
+
mcp_alias="kaiten_update_dashboard",
|
|
197
|
+
description="Update dashboard metadata, filter, or layout.",
|
|
198
|
+
input_schema={
|
|
199
|
+
"type": "object",
|
|
200
|
+
"properties": {
|
|
201
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
202
|
+
"title": {"type": "string", "description": "New title (owner only)."},
|
|
203
|
+
"is_public": {
|
|
204
|
+
"type": "boolean",
|
|
205
|
+
"description": "New visibility (owner only).",
|
|
206
|
+
},
|
|
207
|
+
"filter": {
|
|
208
|
+
"type": ["object", "null"],
|
|
209
|
+
"description": "Dashboard filter JSON; use null to clear it.",
|
|
210
|
+
},
|
|
211
|
+
"layout": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"description": "Responsive dashboard layout keyed by breakpoint and widget UUID.",
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
"required": ["dashboard_id"],
|
|
217
|
+
},
|
|
218
|
+
operation=OperationSpec(
|
|
219
|
+
method="PATCH",
|
|
220
|
+
path_template="/dashboards/{dashboard_id}",
|
|
221
|
+
path_fields=("dashboard_id",),
|
|
222
|
+
body_fields=("title", "is_public", "filter", "layout"),
|
|
223
|
+
),
|
|
224
|
+
examples=(
|
|
225
|
+
ExampleSpec(
|
|
226
|
+
command="kaiten --json dashboards update --dashboard-id <dashboard_uuid> --layout '{\"lg\":{}}'",
|
|
227
|
+
description="Update an editable dashboard layout.",
|
|
228
|
+
),
|
|
229
|
+
),
|
|
230
|
+
usage_notes=(DASHBOARD_WARNING, DASHBOARD_PERMISSION_NOTE),
|
|
231
|
+
),
|
|
232
|
+
make_tool(
|
|
233
|
+
canonical_name="dashboards.delete",
|
|
234
|
+
mcp_alias="kaiten_delete_dashboard",
|
|
235
|
+
description="Archive a dashboard owned by the current user.",
|
|
236
|
+
input_schema={
|
|
237
|
+
"type": "object",
|
|
238
|
+
"properties": {"dashboard_id": {"type": "string", "description": "Dashboard UUID."}},
|
|
239
|
+
"required": ["dashboard_id"],
|
|
240
|
+
},
|
|
241
|
+
operation=OperationSpec(
|
|
242
|
+
method="DELETE",
|
|
243
|
+
path_template="/dashboards/{dashboard_id}",
|
|
244
|
+
path_fields=("dashboard_id",),
|
|
245
|
+
),
|
|
246
|
+
examples=(
|
|
247
|
+
ExampleSpec(
|
|
248
|
+
command="kaiten --json dashboards delete --dashboard-id <dashboard_uuid>",
|
|
249
|
+
description="Archive an owned dashboard.",
|
|
250
|
+
),
|
|
251
|
+
),
|
|
252
|
+
usage_notes=(DASHBOARD_WARNING, "Only the dashboard owner can delete it."),
|
|
253
|
+
),
|
|
254
|
+
make_tool(
|
|
255
|
+
canonical_name="dashboard-users.list",
|
|
256
|
+
mcp_alias="kaiten_list_dashboard_users",
|
|
257
|
+
description="List users with explicit access to a dashboard.",
|
|
258
|
+
input_schema={
|
|
259
|
+
"type": "object",
|
|
260
|
+
"properties": {
|
|
261
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
262
|
+
"limit": {
|
|
263
|
+
"type": "integer",
|
|
264
|
+
"description": "Maximum users to return (server cap 50).",
|
|
265
|
+
},
|
|
266
|
+
"offset": {"type": "integer", "description": "Pagination offset."},
|
|
267
|
+
**_shaping_properties(),
|
|
268
|
+
},
|
|
269
|
+
"required": ["dashboard_id"],
|
|
270
|
+
},
|
|
271
|
+
operation=OperationSpec(
|
|
272
|
+
method="GET",
|
|
273
|
+
path_template="/dashboards/{dashboard_id}/users",
|
|
274
|
+
path_fields=("dashboard_id",),
|
|
275
|
+
query_fields=("limit", "offset"),
|
|
276
|
+
),
|
|
277
|
+
response_policy=ResponsePolicy(
|
|
278
|
+
compact_supported=True,
|
|
279
|
+
fields_supported=True,
|
|
280
|
+
default_limit=50,
|
|
281
|
+
result_kind="list",
|
|
282
|
+
),
|
|
283
|
+
examples=(
|
|
284
|
+
ExampleSpec(
|
|
285
|
+
command="kaiten --json dashboard-users list --dashboard-id <dashboard_uuid> --fields user_uid,role",
|
|
286
|
+
description="List dashboard collaborators.",
|
|
287
|
+
),
|
|
288
|
+
),
|
|
289
|
+
usage_notes=(DASHBOARD_WARNING, "Only owners and editors can list or manage access."),
|
|
290
|
+
),
|
|
291
|
+
make_tool(
|
|
292
|
+
canonical_name="dashboard-users.add",
|
|
293
|
+
mcp_alias="kaiten_add_dashboard_user",
|
|
294
|
+
description="Grant a company user viewer or editor access to a dashboard.",
|
|
295
|
+
input_schema={
|
|
296
|
+
"type": "object",
|
|
297
|
+
"properties": {
|
|
298
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
299
|
+
"user_uid": {"type": "string", "description": "Company user UUID."},
|
|
300
|
+
"role": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"enum": ["viewer", "editor"],
|
|
303
|
+
"description": "Dashboard role.",
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
"required": ["dashboard_id", "user_uid", "role"],
|
|
307
|
+
},
|
|
308
|
+
operation=OperationSpec(
|
|
309
|
+
method="POST",
|
|
310
|
+
path_template="/dashboards/{dashboard_id}/users",
|
|
311
|
+
path_fields=("dashboard_id",),
|
|
312
|
+
body_fields=("user_uid", "role"),
|
|
313
|
+
),
|
|
314
|
+
examples=(
|
|
315
|
+
ExampleSpec(
|
|
316
|
+
command="kaiten --json dashboard-users add --dashboard-id <dashboard_uuid> --user-uid <user_uuid> --role viewer",
|
|
317
|
+
description="Grant view access.",
|
|
318
|
+
),
|
|
319
|
+
),
|
|
320
|
+
usage_notes=(DASHBOARD_WARNING, "The user must already belong to the company."),
|
|
321
|
+
),
|
|
322
|
+
make_tool(
|
|
323
|
+
canonical_name="dashboard-users.update",
|
|
324
|
+
mcp_alias="kaiten_update_dashboard_user",
|
|
325
|
+
description="Change a dashboard collaborator role.",
|
|
326
|
+
input_schema={
|
|
327
|
+
"type": "object",
|
|
328
|
+
"properties": {
|
|
329
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
330
|
+
"user_uid": {"type": "string", "description": "Company user UUID."},
|
|
331
|
+
"role": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"enum": ["viewer", "editor"],
|
|
334
|
+
"description": "New dashboard role.",
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
"required": ["dashboard_id", "user_uid", "role"],
|
|
338
|
+
},
|
|
339
|
+
operation=OperationSpec(
|
|
340
|
+
method="PATCH",
|
|
341
|
+
path_template="/dashboards/{dashboard_id}/users/{user_uid}",
|
|
342
|
+
path_fields=("dashboard_id", "user_uid"),
|
|
343
|
+
body_fields=("role",),
|
|
344
|
+
),
|
|
345
|
+
examples=(
|
|
346
|
+
ExampleSpec(
|
|
347
|
+
command="kaiten --json dashboard-users update --dashboard-id <dashboard_uuid> --user-uid <user_uuid> --role editor",
|
|
348
|
+
description="Promote a collaborator to editor.",
|
|
349
|
+
),
|
|
350
|
+
),
|
|
351
|
+
usage_notes=(DASHBOARD_WARNING, "The owner role cannot be changed or downgraded."),
|
|
352
|
+
),
|
|
353
|
+
make_tool(
|
|
354
|
+
canonical_name="dashboard-users.remove",
|
|
355
|
+
mcp_alias="kaiten_remove_dashboard_user",
|
|
356
|
+
description="Revoke a collaborator's explicit dashboard access.",
|
|
357
|
+
input_schema={
|
|
358
|
+
"type": "object",
|
|
359
|
+
"properties": {
|
|
360
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
361
|
+
"user_uid": {"type": "string", "description": "Company user UUID."},
|
|
362
|
+
},
|
|
363
|
+
"required": ["dashboard_id", "user_uid"],
|
|
364
|
+
},
|
|
365
|
+
operation=OperationSpec(
|
|
366
|
+
method="DELETE",
|
|
367
|
+
path_template="/dashboards/{dashboard_id}/users/{user_uid}",
|
|
368
|
+
path_fields=("dashboard_id", "user_uid"),
|
|
369
|
+
),
|
|
370
|
+
examples=(
|
|
371
|
+
ExampleSpec(
|
|
372
|
+
command="kaiten --json dashboard-users remove --dashboard-id <dashboard_uuid> --user-uid <user_uuid>",
|
|
373
|
+
description="Remove explicit dashboard access.",
|
|
374
|
+
),
|
|
375
|
+
),
|
|
376
|
+
usage_notes=(DASHBOARD_WARNING, "The dashboard owner cannot be removed."),
|
|
377
|
+
),
|
|
378
|
+
make_tool(
|
|
379
|
+
canonical_name="dashboard-widgets.list",
|
|
380
|
+
mcp_alias="kaiten_list_dashboard_widgets",
|
|
381
|
+
description="List dashboard widgets through dashboards.get?include=widgets.",
|
|
382
|
+
input_schema={
|
|
383
|
+
"type": "object",
|
|
384
|
+
"properties": {
|
|
385
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
386
|
+
**_shaping_properties(),
|
|
387
|
+
},
|
|
388
|
+
"required": ["dashboard_id"],
|
|
389
|
+
},
|
|
390
|
+
operation=OperationSpec(
|
|
391
|
+
method="GET",
|
|
392
|
+
path_template="/dashboards/{dashboard_id}",
|
|
393
|
+
path_fields=("dashboard_id",),
|
|
394
|
+
),
|
|
395
|
+
response_policy=SHAPED_LIST,
|
|
396
|
+
runtime_behavior=RuntimeBehavior(
|
|
397
|
+
execution_mode="synthetic", custom_executor=execute_dashboard_widgets_list
|
|
398
|
+
),
|
|
399
|
+
examples=(
|
|
400
|
+
ExampleSpec(
|
|
401
|
+
command="kaiten --json dashboard-widgets list --dashboard-id <dashboard_uuid> --fields id,title,source,visualization",
|
|
402
|
+
description="Extract widgets from a dashboard read.",
|
|
403
|
+
),
|
|
404
|
+
),
|
|
405
|
+
usage_notes=(DASHBOARD_WARNING,),
|
|
406
|
+
),
|
|
407
|
+
make_tool(
|
|
408
|
+
canonical_name="dashboard-widgets.create",
|
|
409
|
+
mcp_alias="kaiten_create_dashboard_widget",
|
|
410
|
+
description="Create a widget without freezing the evolving source/config schema client-side.",
|
|
411
|
+
input_schema={
|
|
412
|
+
"type": "object",
|
|
413
|
+
"properties": {
|
|
414
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
415
|
+
"title": {"type": "string", "description": "Widget title."},
|
|
416
|
+
"source": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"description": "Widget source; current examples include metric, cardList, distribution, cardsTrend.",
|
|
419
|
+
},
|
|
420
|
+
"visualization": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"description": "Visualization identifier accepted by the current Kaiten installation.",
|
|
423
|
+
},
|
|
424
|
+
"config": {"type": "object", "description": "Source-specific widget config JSON."},
|
|
425
|
+
},
|
|
426
|
+
"required": ["dashboard_id", "title", "source", "visualization", "config"],
|
|
427
|
+
},
|
|
428
|
+
operation=OperationSpec(
|
|
429
|
+
method="POST",
|
|
430
|
+
path_template="/dashboards/{dashboard_id}/widgets",
|
|
431
|
+
path_fields=("dashboard_id",),
|
|
432
|
+
body_fields=("title", "source", "visualization", "config"),
|
|
433
|
+
),
|
|
434
|
+
examples=(
|
|
435
|
+
ExampleSpec(
|
|
436
|
+
command='kaiten --json dashboard-widgets create --dashboard-id <dashboard_uuid> --title "Cards" --source cardList --visualization table --config \'{"filter":{}}\'',
|
|
437
|
+
description="Create a card-list widget using server-validated config.",
|
|
438
|
+
),
|
|
439
|
+
),
|
|
440
|
+
usage_notes=(
|
|
441
|
+
DASHBOARD_WARNING,
|
|
442
|
+
"Source, visualization and config are validated by Kaiten because their schema changes quickly.",
|
|
443
|
+
DASHBOARD_WIDGET_SCHEMA_NOTE,
|
|
444
|
+
),
|
|
445
|
+
),
|
|
446
|
+
make_tool(
|
|
447
|
+
canonical_name="dashboard-widgets.update",
|
|
448
|
+
mcp_alias="kaiten_update_dashboard_widget",
|
|
449
|
+
description="Update a dashboard widget; config is merged by the server.",
|
|
450
|
+
input_schema={
|
|
451
|
+
"type": "object",
|
|
452
|
+
"properties": {
|
|
453
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
454
|
+
"widget_id": {"type": "string", "description": "Widget UUID."},
|
|
455
|
+
"title": {"type": "string", "description": "Widget title."},
|
|
456
|
+
"source": {"type": "string", "description": "Widget source."},
|
|
457
|
+
"visualization": {"type": "string", "description": "Visualization identifier."},
|
|
458
|
+
"config": {"type": "object", "description": "Partial config merged by Kaiten."},
|
|
459
|
+
},
|
|
460
|
+
"required": ["dashboard_id", "widget_id"],
|
|
461
|
+
},
|
|
462
|
+
operation=OperationSpec(
|
|
463
|
+
method="PATCH",
|
|
464
|
+
path_template="/dashboards/{dashboard_id}/widgets/{widget_id}",
|
|
465
|
+
path_fields=("dashboard_id", "widget_id"),
|
|
466
|
+
body_fields=("title", "source", "visualization", "config"),
|
|
467
|
+
),
|
|
468
|
+
examples=(
|
|
469
|
+
ExampleSpec(
|
|
470
|
+
command='kaiten --json dashboard-widgets update --dashboard-id <dashboard_uuid> --widget-id <widget_uuid> --title "Open cards"',
|
|
471
|
+
description="Rename a widget.",
|
|
472
|
+
),
|
|
473
|
+
),
|
|
474
|
+
usage_notes=(DASHBOARD_WARNING, DASHBOARD_WIDGET_SCHEMA_NOTE),
|
|
475
|
+
),
|
|
476
|
+
make_tool(
|
|
477
|
+
canonical_name="dashboard-widgets.delete",
|
|
478
|
+
mcp_alias="kaiten_delete_dashboard_widget",
|
|
479
|
+
description="Delete a dashboard widget.",
|
|
480
|
+
input_schema={
|
|
481
|
+
"type": "object",
|
|
482
|
+
"properties": {
|
|
483
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
484
|
+
"widget_id": {"type": "string", "description": "Widget UUID."},
|
|
485
|
+
},
|
|
486
|
+
"required": ["dashboard_id", "widget_id"],
|
|
487
|
+
},
|
|
488
|
+
operation=OperationSpec(
|
|
489
|
+
method="DELETE",
|
|
490
|
+
path_template="/dashboards/{dashboard_id}/widgets/{widget_id}",
|
|
491
|
+
path_fields=("dashboard_id", "widget_id"),
|
|
492
|
+
),
|
|
493
|
+
examples=(
|
|
494
|
+
ExampleSpec(
|
|
495
|
+
command="kaiten --json dashboard-widgets delete --dashboard-id <dashboard_uuid> --widget-id <widget_uuid>",
|
|
496
|
+
description="Delete a widget.",
|
|
497
|
+
),
|
|
498
|
+
),
|
|
499
|
+
usage_notes=(DASHBOARD_WARNING,),
|
|
500
|
+
),
|
|
501
|
+
make_tool(
|
|
502
|
+
canonical_name="dashboard-compute-jobs.create",
|
|
503
|
+
mcp_alias="kaiten_create_dashboard_compute_job",
|
|
504
|
+
description="Queue computation for up to 100 widgets on an accessible dashboard.",
|
|
505
|
+
input_schema={
|
|
506
|
+
"type": "object",
|
|
507
|
+
"properties": {
|
|
508
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
509
|
+
"widget_ids": {
|
|
510
|
+
"type": "array",
|
|
511
|
+
"items": {"type": "string"},
|
|
512
|
+
"description": "JSON array containing 1 to 100 widget UUIDs.",
|
|
513
|
+
},
|
|
514
|
+
"force": {"type": "boolean", "description": "Force recomputation."},
|
|
515
|
+
},
|
|
516
|
+
"required": ["dashboard_id", "widget_ids"],
|
|
517
|
+
},
|
|
518
|
+
operation=OperationSpec(
|
|
519
|
+
method="POST",
|
|
520
|
+
path_template="/dashboards/{dashboard_id}/compute-jobs",
|
|
521
|
+
path_fields=("dashboard_id",),
|
|
522
|
+
body_fields=("widget_ids", "force"),
|
|
523
|
+
),
|
|
524
|
+
runtime_behavior=RuntimeBehavior(payload_validator=validate_dashboard_compute_payload),
|
|
525
|
+
examples=(
|
|
526
|
+
ExampleSpec(
|
|
527
|
+
command="kaiten --json dashboard-compute-jobs create --dashboard-id <dashboard_uuid> --widget-ids '[\"<widget_uuid>\"]'",
|
|
528
|
+
description="Queue widget computation and receive a compute_job_id.",
|
|
529
|
+
),
|
|
530
|
+
),
|
|
531
|
+
usage_notes=(DASHBOARD_WARNING, "A successful queue operation returns HTTP 202."),
|
|
532
|
+
),
|
|
533
|
+
make_tool(
|
|
534
|
+
canonical_name="dashboard-compute-jobs.get",
|
|
535
|
+
mcp_alias="kaiten_get_dashboard_compute_job",
|
|
536
|
+
description="Poll a dashboard compute job without reusing cached status.",
|
|
537
|
+
input_schema={
|
|
538
|
+
"type": "object",
|
|
539
|
+
"properties": {
|
|
540
|
+
"dashboard_id": {"type": "string", "description": "Dashboard UUID."},
|
|
541
|
+
"job_id": {
|
|
542
|
+
"type": ["string", "integer"],
|
|
543
|
+
"description": "Compute job ID returned by create.",
|
|
544
|
+
},
|
|
545
|
+
**_shaping_properties(),
|
|
546
|
+
},
|
|
547
|
+
"required": ["dashboard_id", "job_id"],
|
|
548
|
+
},
|
|
549
|
+
operation=OperationSpec(
|
|
550
|
+
method="GET",
|
|
551
|
+
path_template="/dashboards/{dashboard_id}/compute-jobs/{job_id}",
|
|
552
|
+
path_fields=("dashboard_id", "job_id"),
|
|
553
|
+
),
|
|
554
|
+
response_policy=SHAPED_ENTITY,
|
|
555
|
+
runtime_behavior=RuntimeBehavior(cache_policy=CACHE_POLICY_NONE),
|
|
556
|
+
examples=(
|
|
557
|
+
ExampleSpec(
|
|
558
|
+
command="kaiten --json dashboard-compute-jobs get --dashboard-id <dashboard_uuid> --job-id 123",
|
|
559
|
+
description="Poll queued/running/completed/failed status.",
|
|
560
|
+
),
|
|
561
|
+
),
|
|
562
|
+
usage_notes=(DASHBOARD_WARNING, "Polling bypasses both request and persistent cache."),
|
|
563
|
+
),
|
|
564
|
+
)
|