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,187 @@
1
+ """Local snapshot 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.snapshots import (
8
+ execute_snapshot_build,
9
+ execute_snapshot_delete,
10
+ execute_snapshot_list,
11
+ execute_snapshot_refresh,
12
+ execute_snapshot_show,
13
+ validate_snapshot_build,
14
+ )
15
+
16
+
17
+ TOOLS = (
18
+ make_tool(
19
+ canonical_name="snapshot.build",
20
+ mcp_alias="kaiten_snapshot_build",
21
+ description="Build a persistent local sqlite snapshot for headless reads, analytics, and report workflows.",
22
+ input_schema={
23
+ "type": "object",
24
+ "properties": {
25
+ "name": {"type": "string", "description": "Stable snapshot name."},
26
+ "space_id": {"type": "integer", "description": "Source space ID."},
27
+ "board_ids": {
28
+ "type": "array",
29
+ "items": {"type": "integer"},
30
+ "description": "Optional board IDs to keep inside the snapshot.",
31
+ },
32
+ "preset": {
33
+ "type": "string",
34
+ "enum": ["basic", "analytics", "evidence", "full"],
35
+ "description": "Snapshot scope preset.",
36
+ },
37
+ "window_start": {
38
+ "type": "string",
39
+ "description": "Window start timestamp for analytics/full snapshots.",
40
+ },
41
+ "window_end": {
42
+ "type": "string",
43
+ "description": "Window end timestamp for analytics/full snapshots.",
44
+ },
45
+ },
46
+ "required": ["name", "space_id"],
47
+ },
48
+ operation=OperationSpec(
49
+ method="POST", path_template="/local/snapshots/{name}", path_fields=("name",)
50
+ ),
51
+ response_policy=ResponsePolicy(heavy=True, result_kind="entity"),
52
+ runtime_behavior=RuntimeBehavior(
53
+ execution_mode="custom",
54
+ custom_executor=execute_snapshot_build,
55
+ payload_validator=validate_snapshot_build,
56
+ cache_policy="none",
57
+ requires_profile=True,
58
+ enforce_mutation_guard=False,
59
+ remote_side_effects=False,
60
+ ),
61
+ examples=(
62
+ ExampleSpec(
63
+ command="kaiten --json snapshot build --name team-basic --space-id 10 --preset basic",
64
+ description="Build a reusable local snapshot with topology and cards.",
65
+ ),
66
+ ExampleSpec(
67
+ command="kaiten --json snapshot build --name team-q1 --space-id 10 --preset analytics --window-start 2026-01-01T00:00:00Z --window-end 2026-03-31T23:59:59Z",
68
+ description="Build an analytics snapshot with bounded activity and history data.",
69
+ ),
70
+ ),
71
+ usage_notes=(
72
+ "Build one snapshot, then run repeated local query cards/query metrics commands without extra Kaiten API calls.",
73
+ "analytics and full presets require window_start/window_end because throughput and history are window-bound datasets.",
74
+ ),
75
+ ),
76
+ make_tool(
77
+ canonical_name="snapshot.refresh",
78
+ mcp_alias="kaiten_snapshot_refresh",
79
+ description="Rebuild an existing local snapshot in place using its stored snapshot definition.",
80
+ input_schema={
81
+ "type": "object",
82
+ "properties": {
83
+ "name": {"type": "string", "description": "Snapshot name to rebuild."},
84
+ },
85
+ "required": ["name"],
86
+ },
87
+ operation=OperationSpec(
88
+ method="PATCH", path_template="/local/snapshots/{name}", path_fields=("name",)
89
+ ),
90
+ response_policy=ResponsePolicy(heavy=True, result_kind="entity"),
91
+ runtime_behavior=RuntimeBehavior(
92
+ execution_mode="custom",
93
+ custom_executor=execute_snapshot_refresh,
94
+ cache_policy="none",
95
+ requires_profile=True,
96
+ enforce_mutation_guard=False,
97
+ remote_side_effects=False,
98
+ ),
99
+ examples=(
100
+ ExampleSpec(
101
+ command="kaiten --json snapshot refresh --name team-q1",
102
+ description="Refresh a previously built snapshot.",
103
+ ),
104
+ ),
105
+ usage_notes=(
106
+ "refresh reuses the stored snapshot spec and rebuilds datasets in place; v1 is rebuild-oriented, not incremental.",
107
+ "refresh clears the current profile/domain HTTP cache first so the rebuilt snapshot comes from fresh Kaiten API reads.",
108
+ ),
109
+ ),
110
+ make_tool(
111
+ canonical_name="snapshot.list",
112
+ mcp_alias="kaiten_snapshot_list",
113
+ description="List locally stored snapshots with schema version and dataset counts.",
114
+ input_schema={"type": "object", "properties": {}},
115
+ operation=OperationSpec(method="GET", path_template="/local/snapshots"),
116
+ response_policy=ResponsePolicy(result_kind="list"),
117
+ runtime_behavior=RuntimeBehavior(
118
+ execution_mode="custom",
119
+ custom_executor=execute_snapshot_list,
120
+ cache_policy="none",
121
+ requires_profile=False,
122
+ ),
123
+ examples=(
124
+ ExampleSpec(
125
+ command="kaiten --json snapshot list", description="Show available local snapshots."
126
+ ),
127
+ ),
128
+ ),
129
+ make_tool(
130
+ canonical_name="snapshot.show",
131
+ mcp_alias="kaiten_snapshot_show",
132
+ description="Show local snapshot metadata, schema version, dataset counts, and the last build trace summary.",
133
+ input_schema={
134
+ "type": "object",
135
+ "properties": {
136
+ "name": {"type": "string", "description": "Snapshot name."},
137
+ },
138
+ "required": ["name"],
139
+ },
140
+ operation=OperationSpec(
141
+ method="GET", path_template="/local/snapshots/{name}", path_fields=("name",)
142
+ ),
143
+ response_policy=ResponsePolicy(result_kind="entity"),
144
+ runtime_behavior=RuntimeBehavior(
145
+ execution_mode="custom",
146
+ custom_executor=execute_snapshot_show,
147
+ cache_policy="none",
148
+ requires_profile=False,
149
+ ),
150
+ examples=(
151
+ ExampleSpec(
152
+ command="kaiten --json snapshot show --name team-q1",
153
+ description="Inspect snapshot metadata and dataset counts.",
154
+ ),
155
+ ),
156
+ ),
157
+ make_tool(
158
+ canonical_name="snapshot.delete",
159
+ mcp_alias="kaiten_snapshot_delete",
160
+ description="Delete a local snapshot from sqlite storage.",
161
+ input_schema={
162
+ "type": "object",
163
+ "properties": {
164
+ "name": {"type": "string", "description": "Snapshot name."},
165
+ },
166
+ "required": ["name"],
167
+ },
168
+ operation=OperationSpec(
169
+ method="DELETE", path_template="/local/snapshots/{name}", path_fields=("name",)
170
+ ),
171
+ response_policy=ResponsePolicy(result_kind="entity"),
172
+ runtime_behavior=RuntimeBehavior(
173
+ execution_mode="custom",
174
+ custom_executor=execute_snapshot_delete,
175
+ cache_policy="none",
176
+ requires_profile=False,
177
+ enforce_mutation_guard=False,
178
+ remote_side_effects=False,
179
+ ),
180
+ examples=(
181
+ ExampleSpec(
182
+ command="kaiten --json snapshot delete --name team-q1",
183
+ description="Delete a local snapshot.",
184
+ ),
185
+ ),
186
+ ),
187
+ )
@@ -0,0 +1,272 @@
1
+ """Space 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 execute_space_topology_get
8
+
9
+
10
+ TOOLS = (
11
+ make_tool(
12
+ canonical_name="spaces.list",
13
+ mcp_alias="kaiten_list_spaces",
14
+ description="List one page of Kaiten spaces with explicit limit/offset pagination.",
15
+ input_schema={
16
+ "type": "object",
17
+ "properties": {
18
+ "archived": {"type": "boolean", "description": "Include archived spaces"},
19
+ "limit": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "maximum": 100,
23
+ "description": "Max results (default 50, max 100)",
24
+ },
25
+ "offset": {"type": "integer", "minimum": 0, "description": "Pagination offset"},
26
+ "fields": {
27
+ "type": "string",
28
+ "description": "Comma-separated field names to keep in the response. Example: 'id,title'",
29
+ },
30
+ "compact": {
31
+ "type": "boolean",
32
+ "description": "Return compact response without heavy fields (avatars, nested user objects)",
33
+ "default": False,
34
+ },
35
+ },
36
+ },
37
+ operation=OperationSpec(
38
+ method="GET",
39
+ path_template="/spaces",
40
+ query_fields=("archived", "limit", "offset"),
41
+ ),
42
+ response_policy=ResponsePolicy(
43
+ compact_supported=True, fields_supported=True, default_limit=50, result_kind="list"
44
+ ),
45
+ examples=(
46
+ ExampleSpec(
47
+ command="kaiten --json spaces list",
48
+ description="List spaces as machine-readable JSON.",
49
+ ),
50
+ ExampleSpec(
51
+ command="kaiten --json spaces list --compact --fields id,title",
52
+ description="List spaces with a narrow response surface.",
53
+ ),
54
+ ),
55
+ usage_notes=(
56
+ "This direct command returns one page; increase offset to read subsequent pages.",
57
+ "Use tree.get or tree.children.list when a complete hierarchy is required.",
58
+ ),
59
+ ),
60
+ make_tool(
61
+ canonical_name="spaces.get",
62
+ mcp_alias="kaiten_get_space",
63
+ description="Get a Kaiten space by ID.",
64
+ input_schema={
65
+ "type": "object",
66
+ "properties": {"space_id": {"type": "integer", "description": "Space ID"}},
67
+ "required": ["space_id"],
68
+ },
69
+ operation=OperationSpec(
70
+ method="GET", path_template="/spaces/{space_id}", path_fields=("space_id",)
71
+ ),
72
+ examples=(
73
+ ExampleSpec(
74
+ command="kaiten spaces get --space-id 123", description="Get a space by ID."
75
+ ),
76
+ ),
77
+ ),
78
+ make_tool(
79
+ canonical_name="space-topology.get",
80
+ mcp_alias="kaiten_get_space_topology",
81
+ description="Fetch boards with their columns and lanes for a Kaiten space.",
82
+ input_schema={
83
+ "type": "object",
84
+ "properties": {"space_id": {"type": "integer", "description": "Space ID"}},
85
+ "required": ["space_id"],
86
+ },
87
+ operation=OperationSpec(
88
+ method="GET", path_template="/spaces/{space_id}/topology", path_fields=("space_id",)
89
+ ),
90
+ response_policy=ResponsePolicy(result_kind="entity", heavy=True),
91
+ runtime_behavior=RuntimeBehavior(
92
+ execution_mode="aggregated",
93
+ custom_executor=execute_space_topology_get,
94
+ ),
95
+ examples=(
96
+ ExampleSpec(
97
+ command="kaiten --json space-topology get --space-id 123",
98
+ description="Fetch board topology for a space.",
99
+ ),
100
+ ),
101
+ usage_notes=(
102
+ "Use this for report scaffolding instead of separate boards.list, columns.list, and lanes.list loops.",
103
+ ),
104
+ ),
105
+ make_tool(
106
+ canonical_name="spaces.create",
107
+ mcp_alias="kaiten_create_space",
108
+ description="Create a new Kaiten space.",
109
+ input_schema={
110
+ "type": "object",
111
+ "properties": {
112
+ "title": {
113
+ "type": ["string", "number"],
114
+ "description": "Space title",
115
+ "x-documentation-alternatives": [
116
+ {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 256,
120
+ "description": "Space title",
121
+ },
122
+ {"type": "number"},
123
+ ],
124
+ },
125
+ "description": {"type": "string", "description": "Space description"},
126
+ "access": {
127
+ "type": "string",
128
+ "enum": ["for_everyone", "by_invite"],
129
+ "description": "Access type (default: for_everyone)",
130
+ },
131
+ "external_id": {
132
+ "type": ["string", "number", "null"],
133
+ "description": "External ID",
134
+ "x-documentation-alternatives": [
135
+ {
136
+ "type": ["number", "string"],
137
+ "maxLength": 1024,
138
+ "description": "Any external id you want to assign to space. Not exposed in web interface",
139
+ },
140
+ {
141
+ "type": "null",
142
+ "description": "Any external id you want to assign to space. Not exposed in web interface",
143
+ },
144
+ ],
145
+ },
146
+ "parent_entity_uid": {
147
+ "type": "string",
148
+ "description": "Parent entity UID for nesting spaces",
149
+ },
150
+ "sort_order": {"type": "number", "description": "Sort order"},
151
+ "for_everyone_access_role_id": {"type": "string"},
152
+ "work_calendar_id": {"type": "string", "format": "uuid"},
153
+ },
154
+ "required": ["title"],
155
+ },
156
+ operation=OperationSpec(
157
+ method="POST",
158
+ path_template="/spaces",
159
+ body_fields=(
160
+ "title",
161
+ "description",
162
+ "access",
163
+ "external_id",
164
+ "parent_entity_uid",
165
+ "sort_order",
166
+ "for_everyone_access_role_id",
167
+ "work_calendar_id",
168
+ ),
169
+ ),
170
+ examples=(
171
+ ExampleSpec(
172
+ command='kaiten spaces create --title "CLI smoke"', description="Create a space."
173
+ ),
174
+ ),
175
+ ),
176
+ make_tool(
177
+ canonical_name="spaces.update",
178
+ mcp_alias="kaiten_update_space",
179
+ description="Update a Kaiten space.",
180
+ input_schema={
181
+ "type": "object",
182
+ "properties": {
183
+ "space_id": {"type": "integer", "description": "Space ID"},
184
+ "title": {
185
+ "type": ["string", "number"],
186
+ "description": "New title",
187
+ "x-documentation-alternatives": [
188
+ {
189
+ "type": "string",
190
+ "minLength": 1,
191
+ "maxLength": 256,
192
+ "description": "Space title",
193
+ },
194
+ {"type": "number"},
195
+ ],
196
+ },
197
+ "description": {"type": "string", "description": "New description"},
198
+ "access": {
199
+ "type": "string",
200
+ "enum": ["for_everyone", "by_invite"],
201
+ "description": "Access type",
202
+ },
203
+ "external_id": {
204
+ "type": ["string", "number", "null"],
205
+ "description": "External ID",
206
+ "x-documentation-alternatives": [
207
+ {
208
+ "type": ["number", "string"],
209
+ "maxLength": 1024,
210
+ "description": "Any external id you want to assign to space. Not exposed in web interface",
211
+ },
212
+ {
213
+ "type": "null",
214
+ "description": "Any external id you want to assign to space. Not exposed in web interface",
215
+ },
216
+ ],
217
+ },
218
+ "parent_entity_uid": {
219
+ "type": ["string", "null"],
220
+ "description": "Parent entity UID for nesting spaces",
221
+ },
222
+ "sort_order": {"type": "number", "description": "Sort order"},
223
+ "hidden_card_type_uids": {
224
+ "type": "array",
225
+ "items": {"type": "string", "format": "uuid"},
226
+ "description": "List of hidden card type uids.",
227
+ },
228
+ "settings": {"type": "object"},
229
+ },
230
+ "required": ["space_id"],
231
+ },
232
+ operation=OperationSpec(
233
+ method="PATCH",
234
+ path_template="/spaces/{space_id}",
235
+ path_fields=("space_id",),
236
+ body_fields=(
237
+ "title",
238
+ "description",
239
+ "access",
240
+ "external_id",
241
+ "parent_entity_uid",
242
+ "sort_order",
243
+ "hidden_card_type_uids",
244
+ "settings",
245
+ ),
246
+ ),
247
+ examples=(
248
+ ExampleSpec(
249
+ command='kaiten spaces update --space-id 123 --title "Updated"',
250
+ description="Update a space.",
251
+ ),
252
+ ),
253
+ ),
254
+ make_tool(
255
+ canonical_name="spaces.delete",
256
+ mcp_alias="kaiten_delete_space",
257
+ description="Delete a Kaiten space.",
258
+ input_schema={
259
+ "type": "object",
260
+ "properties": {"space_id": {"type": "integer", "description": "Space ID"}},
261
+ "required": ["space_id"],
262
+ },
263
+ operation=OperationSpec(
264
+ method="DELETE", path_template="/spaces/{space_id}", path_fields=("space_id",)
265
+ ),
266
+ examples=(
267
+ ExampleSpec(
268
+ command="kaiten spaces delete --space-id 123", description="Delete a space."
269
+ ),
270
+ ),
271
+ ),
272
+ )
@@ -0,0 +1,168 @@
1
+ """Subscriber 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 column_subscriber_default_type_request
8
+
9
+
10
+ TOOLS = (
11
+ make_tool(
12
+ canonical_name="card-subscribers.list",
13
+ mcp_alias="kaiten_list_card_subscribers",
14
+ description="List all subscribers of a Kaiten card.",
15
+ input_schema={
16
+ "type": "object",
17
+ "properties": {
18
+ "card_id": {"type": "integer", "description": "Card ID"},
19
+ "compact": {
20
+ "type": "boolean",
21
+ "description": "Return compact response without heavy fields.",
22
+ },
23
+ },
24
+ "required": ["card_id"],
25
+ },
26
+ operation=OperationSpec(
27
+ method="GET", path_template="/cards/{card_id}/subscribers", path_fields=("card_id",)
28
+ ),
29
+ response_policy=ResponsePolicy(compact_supported=True, result_kind="list"),
30
+ examples=(
31
+ ExampleSpec(
32
+ command="kaiten --json card-subscribers list --card-id 10 --compact",
33
+ description="List card subscribers.",
34
+ ),
35
+ ),
36
+ ),
37
+ make_tool(
38
+ canonical_name="card-subscribers.add",
39
+ mcp_alias="kaiten_add_card_subscriber",
40
+ description="Add a subscriber to a Kaiten card.",
41
+ input_schema={
42
+ "type": "object",
43
+ "properties": {
44
+ "card_id": {"type": "integer", "description": "Card ID"},
45
+ "user_id": {"type": "integer", "description": "User ID to subscribe"},
46
+ },
47
+ "required": ["card_id", "user_id"],
48
+ },
49
+ operation=OperationSpec(
50
+ method="POST",
51
+ path_template="/cards/{card_id}/subscribers",
52
+ path_fields=("card_id",),
53
+ body_fields=("user_id",),
54
+ ),
55
+ examples=(
56
+ ExampleSpec(
57
+ command="kaiten --json card-subscribers add --card-id 10 --user-id 7",
58
+ description="Add a card subscriber.",
59
+ ),
60
+ ),
61
+ ),
62
+ make_tool(
63
+ canonical_name="card-subscribers.remove",
64
+ mcp_alias="kaiten_remove_card_subscriber",
65
+ description="Remove a subscriber from a Kaiten card.",
66
+ input_schema={
67
+ "type": "object",
68
+ "properties": {
69
+ "card_id": {"type": "integer", "description": "Card ID"},
70
+ "user_id": {"type": "integer", "description": "User ID to unsubscribe"},
71
+ },
72
+ "required": ["card_id", "user_id"],
73
+ },
74
+ operation=OperationSpec(
75
+ method="DELETE",
76
+ path_template="/cards/{card_id}/subscribers/{user_id}",
77
+ path_fields=("card_id", "user_id"),
78
+ ),
79
+ examples=(
80
+ ExampleSpec(
81
+ command="kaiten --json card-subscribers remove --card-id 10 --user-id 7",
82
+ description="Remove a card subscriber.",
83
+ ),
84
+ ),
85
+ ),
86
+ make_tool(
87
+ canonical_name="column-subscribers.list",
88
+ mcp_alias="kaiten_list_column_subscribers",
89
+ description="List all subscribers of a Kaiten column.",
90
+ input_schema={
91
+ "type": "object",
92
+ "properties": {
93
+ "column_id": {"type": "integer", "description": "Column ID"},
94
+ "compact": {
95
+ "type": "boolean",
96
+ "description": "Return compact response without heavy fields.",
97
+ },
98
+ },
99
+ "required": ["column_id"],
100
+ },
101
+ operation=OperationSpec(
102
+ method="GET",
103
+ path_template="/columns/{column_id}/subscribers",
104
+ path_fields=("column_id",),
105
+ ),
106
+ response_policy=ResponsePolicy(compact_supported=True, result_kind="list"),
107
+ examples=(
108
+ ExampleSpec(
109
+ command="kaiten --json column-subscribers list --column-id 10 --compact",
110
+ description="List column subscribers.",
111
+ ),
112
+ ),
113
+ ),
114
+ make_tool(
115
+ canonical_name="column-subscribers.add",
116
+ mcp_alias="kaiten_add_column_subscriber",
117
+ description="Add a subscriber to a Kaiten column.",
118
+ input_schema={
119
+ "type": "object",
120
+ "properties": {
121
+ "column_id": {"type": "integer", "description": "Column ID"},
122
+ "user_id": {"type": "integer", "description": "User ID to subscribe"},
123
+ "type": {
124
+ "type": "integer",
125
+ "description": "Subscription type (1=all, 2=mentions only).",
126
+ },
127
+ },
128
+ "required": ["column_id", "user_id"],
129
+ },
130
+ operation=OperationSpec(
131
+ method="POST",
132
+ path_template="/columns/{column_id}/subscribers",
133
+ path_fields=("column_id",),
134
+ body_fields=("user_id", "type"),
135
+ ),
136
+ runtime_behavior=RuntimeBehavior(request_shaper=column_subscriber_default_type_request),
137
+ examples=(
138
+ ExampleSpec(
139
+ command="kaiten --json column-subscribers add --column-id 10 --user-id 7",
140
+ description="Add a column subscriber.",
141
+ ),
142
+ ),
143
+ ),
144
+ make_tool(
145
+ canonical_name="column-subscribers.remove",
146
+ mcp_alias="kaiten_remove_column_subscriber",
147
+ description="Remove a subscriber from a Kaiten column.",
148
+ input_schema={
149
+ "type": "object",
150
+ "properties": {
151
+ "column_id": {"type": "integer", "description": "Column ID"},
152
+ "user_id": {"type": "integer", "description": "User ID to unsubscribe"},
153
+ },
154
+ "required": ["column_id", "user_id"],
155
+ },
156
+ operation=OperationSpec(
157
+ method="DELETE",
158
+ path_template="/columns/{column_id}/subscribers/{user_id}",
159
+ path_fields=("column_id", "user_id"),
160
+ ),
161
+ examples=(
162
+ ExampleSpec(
163
+ command="kaiten --json column-subscribers remove --column-id 10 --user-id 7",
164
+ description="Remove a column subscriber.",
165
+ ),
166
+ ),
167
+ ),
168
+ )