@omnicoreos/planka-mcp 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +26 -0
- package/.claude-plugin/plugin.json +45 -0
- package/.codex-plugin/mcp.json +16 -0
- package/.codex-plugin/plugin.json +27 -0
- package/.mcp.json +17 -0
- package/CHANGELOG.md +510 -0
- package/README.es.md +294 -55
- package/README.md +293 -55
- package/dist/cli/init.d.ts +101 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +481 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/client.d.ts +32 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +106 -32
- package/dist/client.js.map +1 -1
- package/dist/config/policy.d.ts +82 -0
- package/dist/config/policy.d.ts.map +1 -0
- package/dist/config/policy.js +226 -0
- package/dist/config/policy.js.map +1 -0
- package/dist/errors.d.ts +5 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +62 -5
- package/dist/errors.js.map +1 -1
- package/dist/identity.generated.d.ts +2 -1
- package/dist/identity.generated.d.ts.map +1 -1
- package/dist/identity.generated.js +2 -1
- package/dist/identity.generated.js.map +1 -1
- package/dist/index.js +85 -10
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +21 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +37 -0
- package/dist/instructions.js.map +1 -0
- package/dist/operations/actions.d.ts +654 -0
- package/dist/operations/actions.d.ts.map +1 -0
- package/dist/operations/actions.js +154 -0
- package/dist/operations/actions.js.map +1 -0
- package/dist/operations/archive.d.ts +28 -0
- package/dist/operations/archive.d.ts.map +1 -0
- package/dist/operations/archive.js +74 -0
- package/dist/operations/archive.js.map +1 -0
- package/dist/operations/attachments.d.ts +1 -1
- package/dist/operations/attachments.d.ts.map +1 -1
- package/dist/operations/attachments.js +3 -1
- package/dist/operations/attachments.js.map +1 -1
- package/dist/operations/board-id.d.ts +1 -1
- package/dist/operations/board-id.d.ts.map +1 -1
- package/dist/operations/board-id.js +13 -7
- package/dist/operations/board-id.js.map +1 -1
- package/dist/operations/boards.d.ts +96 -19
- package/dist/operations/boards.d.ts.map +1 -1
- package/dist/operations/boards.js +377 -93
- package/dist/operations/boards.js.map +1 -1
- package/dist/operations/card-brief.d.ts +91 -0
- package/dist/operations/card-brief.d.ts.map +1 -0
- package/dist/operations/card-brief.js +79 -0
- package/dist/operations/card-brief.js.map +1 -0
- package/dist/operations/cards.d.ts +34 -9
- package/dist/operations/cards.d.ts.map +1 -1
- package/dist/operations/cards.js +60 -14
- package/dist/operations/cards.js.map +1 -1
- package/dist/operations/comments.d.ts +61 -4
- package/dist/operations/comments.d.ts.map +1 -1
- package/dist/operations/comments.js +91 -8
- package/dist/operations/comments.js.map +1 -1
- package/dist/operations/duplicate.d.ts +16 -0
- package/dist/operations/duplicate.d.ts.map +1 -0
- package/dist/operations/duplicate.js +43 -0
- package/dist/operations/duplicate.js.map +1 -0
- package/dist/operations/labels.d.ts +1 -1
- package/dist/operations/labels.d.ts.map +1 -1
- package/dist/operations/labels.js +7 -4
- package/dist/operations/labels.js.map +1 -1
- package/dist/operations/lists.d.ts +63 -1
- package/dist/operations/lists.d.ts.map +1 -1
- package/dist/operations/lists.js +97 -2
- package/dist/operations/lists.js.map +1 -1
- package/dist/operations/members.d.ts +39 -0
- package/dist/operations/members.d.ts.map +1 -0
- package/dist/operations/members.js +107 -0
- package/dist/operations/members.js.map +1 -0
- package/dist/operations/projects.d.ts +16 -0
- package/dist/operations/projects.d.ts.map +1 -1
- package/dist/operations/projects.js +54 -9
- package/dist/operations/projects.js.map +1 -1
- package/dist/operations/tasks.d.ts +1 -1
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js +5 -3
- package/dist/operations/tasks.js.map +1 -1
- package/dist/operations/users.d.ts +123 -0
- package/dist/operations/users.d.ts.map +1 -0
- package/dist/operations/users.js +180 -0
- package/dist/operations/users.js.map +1 -0
- package/dist/operations/verify.d.ts +84 -0
- package/dist/operations/verify.d.ts.map +1 -0
- package/dist/operations/verify.js +124 -0
- package/dist/operations/verify.js.map +1 -0
- package/dist/prompts.d.ts +48 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +155 -0
- package/dist/prompts.js.map +1 -0
- package/dist/resources.d.ts +38 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +127 -0
- package/dist/resources.js.map +1 -0
- package/dist/schemas/entities.d.ts +115 -24
- package/dist/schemas/entities.d.ts.map +1 -1
- package/dist/schemas/entities.js +48 -0
- package/dist/schemas/entities.js.map +1 -1
- package/dist/schemas/requests.d.ts +121 -46
- package/dist/schemas/requests.d.ts.map +1 -1
- package/dist/schemas/requests.js +57 -12
- package/dist/schemas/requests.js.map +1 -1
- package/dist/schemas/responses.d.ts +541 -186
- package/dist/schemas/responses.d.ts.map +1 -1
- package/dist/schemas/responses.js +13 -2
- package/dist/schemas/responses.js.map +1 -1
- package/dist/tools/activity.d.ts +150 -0
- package/dist/tools/activity.d.ts.map +1 -0
- package/dist/tools/activity.js +198 -0
- package/dist/tools/activity.js.map +1 -0
- package/dist/tools/annotations.d.ts +52 -0
- package/dist/tools/annotations.d.ts.map +1 -0
- package/dist/tools/annotations.js +214 -0
- package/dist/tools/annotations.js.map +1 -0
- package/dist/tools/attachments.d.ts +28 -4
- package/dist/tools/attachments.d.ts.map +1 -1
- package/dist/tools/attachments.js +53 -34
- package/dist/tools/attachments.js.map +1 -1
- package/dist/tools/card-ops.d.ts +232 -0
- package/dist/tools/card-ops.d.ts.map +1 -0
- package/dist/tools/card-ops.js +333 -0
- package/dist/tools/card-ops.js.map +1 -0
- package/dist/tools/cards.d.ts +90 -8
- package/dist/tools/cards.d.ts.map +1 -1
- package/dist/tools/cards.js +411 -128
- package/dist/tools/cards.js.map +1 -1
- package/dist/tools/comments.d.ts +226 -22
- package/dist/tools/comments.d.ts.map +1 -1
- package/dist/tools/comments.js +163 -134
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/dispatch.d.ts +47 -0
- package/dist/tools/dispatch.d.ts.map +1 -0
- package/dist/tools/dispatch.js +63 -0
- package/dist/tools/dispatch.js.map +1 -0
- package/dist/tools/guard.d.ts +9 -0
- package/dist/tools/guard.d.ts.map +1 -0
- package/dist/tools/guard.js +20 -0
- package/dist/tools/guard.js.map +1 -0
- package/dist/tools/index.d.ts +748 -450
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +136 -17
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/labels.d.ts +213 -18
- package/dist/tools/labels.d.ts.map +1 -1
- package/dist/tools/labels.js +218 -203
- package/dist/tools/labels.js.map +1 -1
- package/dist/tools/lists.d.ts +222 -15
- package/dist/tools/lists.d.ts.map +1 -1
- package/dist/tools/lists.js +175 -156
- package/dist/tools/lists.js.map +1 -1
- package/dist/tools/members.d.ts +128 -0
- package/dist/tools/members.d.ts.map +1 -0
- package/dist/tools/members.js +150 -0
- package/dist/tools/members.js.map +1 -0
- package/dist/tools/navigation.d.ts +22 -2
- package/dist/tools/navigation.d.ts.map +1 -1
- package/dist/tools/navigation.js +60 -15
- package/dist/tools/navigation.js.map +1 -1
- package/dist/tools/queries.d.ts +196 -166
- package/dist/tools/queries.d.ts.map +1 -1
- package/dist/tools/queries.js +125 -155
- package/dist/tools/queries.js.map +1 -1
- package/dist/tools/tasks.d.ts +26 -6
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +110 -55
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/users.d.ts +130 -0
- package/dist/tools/users.d.ts.map +1 -0
- package/dist/tools/users.js +165 -0
- package/dist/tools/users.js.map +1 -0
- package/docs/planka-2x-gotchas.md +121 -5
- package/docs/tools.md +771 -187
- package/docs/troubleshooting.md +137 -5
- package/hooks/hooks.json +15 -0
- package/hooks/preflight.mjs +100 -0
- package/package.json +6 -1
- package/scripts/setup.sh +8 -26
- package/scripts/sync-identity.mjs +55 -1
- package/server.json +87 -6
- package/tests/smoke/planka-smoke.mjs +512 -72
- package/workflow/skills/planka-close-card/SKILL.md +18 -5
- package/workflow/skills/planka-orchestrator/SKILL.md +36 -7
package/dist/tools/labels.js
CHANGED
|
@@ -2,17 +2,200 @@
|
|
|
2
2
|
* Label tools for PLANKA MCP server.
|
|
3
3
|
*/
|
|
4
4
|
import { createLabel, updateLabel, deleteLabel, setCardLabels, } from "../operations/labels.js";
|
|
5
|
+
import { getBoard } from "../operations/boards.js";
|
|
5
6
|
import { LabelColorSchema } from "../schemas/entities.js";
|
|
7
|
+
import { nothingToDo, verifiedDelete, verifiedWrite, writeResult, } from "../operations/verify.js";
|
|
6
8
|
import { PlankaError } from "../errors.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
import { assertBoardAllowed, getPolicy } from "../config/policy.js";
|
|
10
|
+
import { dispatchAction } from "./dispatch.js";
|
|
11
|
+
import { guarded } from "./guard.js";
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
13
|
+
* The 43 Planka colors as a real JSON Schema enum instead of a sentence in the
|
|
14
|
+
* description. Measured: the enum costs 599 chars against the 580 of the prose
|
|
15
|
+
* it replaces — so this is NOT a token saving, it is a correctness one: the
|
|
16
|
+
* client now rejects a bad color before the call is made. The prose stays for
|
|
17
|
+
* the runtime error message only.
|
|
18
|
+
*/
|
|
19
|
+
const LABEL_COLORS = LabelColorSchema.options;
|
|
20
|
+
const validColors = LABEL_COLORS.join(", ");
|
|
21
|
+
function badColor(color) {
|
|
22
|
+
return {
|
|
23
|
+
content: [
|
|
24
|
+
{
|
|
25
|
+
type: "text",
|
|
26
|
+
text: `Error: Invalid color '${color}'. Valid colors: ${validColors}`,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The enum is announced ONCE, on planka_create_label: it is the discovery path,
|
|
34
|
+
* and 43 colors cost ~650 chars of every session on every tool that repeats
|
|
35
|
+
* them. update_label and the manage_labels alias take the same colors and
|
|
36
|
+
* validate them with `badColor()` server-side, which answers with the full list.
|
|
37
|
+
*/
|
|
38
|
+
const colorProperty = {
|
|
39
|
+
type: "string",
|
|
40
|
+
enum: LABEL_COLORS,
|
|
41
|
+
description: "Label color",
|
|
42
|
+
};
|
|
43
|
+
const colorPropertyNoEnum = {
|
|
44
|
+
type: "string",
|
|
45
|
+
description: "Label color. Same 43 values planka_create_label lists, also served as the planka://labels/colors resource; an invalid one comes back with the full list.",
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Tool: planka_create_label
|
|
49
|
+
*/
|
|
50
|
+
export const createLabelTool = {
|
|
51
|
+
name: "planka_create_label",
|
|
52
|
+
description: "Create a label on a board. Verified against the board's labels after writing.",
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
boardId: { type: "string", description: "Board ID" },
|
|
57
|
+
name: { type: "string", description: "Label name" },
|
|
58
|
+
color: colorProperty,
|
|
59
|
+
position: { type: "number", description: "Label position" },
|
|
60
|
+
},
|
|
61
|
+
required: ["boardId", "name", "color"],
|
|
62
|
+
},
|
|
63
|
+
handler: async (params) => guarded(async () => {
|
|
64
|
+
// Explicit, like every other write path: the allowlist must not depend
|
|
65
|
+
// on a lower layer the handler does not control.
|
|
66
|
+
const requested = params.boardId ?? getPolicy().defaultBoardId;
|
|
67
|
+
const boardId = requested ? assertBoardAllowed(requested) : null;
|
|
68
|
+
if (!boardId) {
|
|
69
|
+
return {
|
|
70
|
+
content: [
|
|
71
|
+
{
|
|
72
|
+
type: "text",
|
|
73
|
+
text: "Error: boardId is required (or set PLANKA_DEFAULT_BOARD_ID)",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
isError: true,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const colorParse = LabelColorSchema.safeParse(params.color);
|
|
80
|
+
if (!colorParse.success)
|
|
81
|
+
return badColor(params.color);
|
|
82
|
+
const written = await verifiedWrite({
|
|
83
|
+
write: () => createLabel({
|
|
84
|
+
boardId,
|
|
85
|
+
name: params.name,
|
|
86
|
+
color: colorParse.data,
|
|
87
|
+
...(params.position !== undefined
|
|
88
|
+
? { position: params.position }
|
|
89
|
+
: {}),
|
|
90
|
+
}),
|
|
91
|
+
reread: (label) => getBoard({ boardId: label.boardId }),
|
|
92
|
+
landed: (board, label) => board.labels.some((l) => l.id === label.id &&
|
|
93
|
+
l.name === params.name &&
|
|
94
|
+
l.color === colorParse.data),
|
|
95
|
+
});
|
|
96
|
+
return writeResult({
|
|
97
|
+
label: {
|
|
98
|
+
id: written.result.id,
|
|
99
|
+
name: written.result.name,
|
|
100
|
+
color: written.result.color,
|
|
101
|
+
boardId: written.result.boardId,
|
|
102
|
+
position: written.result.position,
|
|
103
|
+
},
|
|
104
|
+
}, written);
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Tool: planka_update_label
|
|
109
|
+
*/
|
|
110
|
+
export const updateLabelTool = {
|
|
111
|
+
name: "planka_update_label",
|
|
112
|
+
description: "Rename a label or change its color, by label ID from planka_board_summary. Verified against the board.",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
labelId: { type: "string", description: "Label ID" },
|
|
117
|
+
name: { type: "string", description: "New label name" },
|
|
118
|
+
color: colorPropertyNoEnum,
|
|
119
|
+
},
|
|
120
|
+
required: ["labelId"],
|
|
121
|
+
},
|
|
122
|
+
handler: async (params) => guarded(async () => {
|
|
123
|
+
const updates = { labelId: params.labelId };
|
|
124
|
+
if (params.name !== undefined)
|
|
125
|
+
updates.name = params.name;
|
|
126
|
+
if (params.color !== undefined) {
|
|
127
|
+
const colorParse = LabelColorSchema.safeParse(params.color);
|
|
128
|
+
if (!colorParse.success)
|
|
129
|
+
return badColor(params.color);
|
|
130
|
+
updates.color = colorParse.data;
|
|
131
|
+
}
|
|
132
|
+
if (Object.keys(updates).length === 1) {
|
|
133
|
+
return nothingToDo("name, color");
|
|
134
|
+
}
|
|
135
|
+
const written = await verifiedWrite({
|
|
136
|
+
write: () => updateLabel(updates),
|
|
137
|
+
reread: (label) => getBoard({ boardId: label.boardId }),
|
|
138
|
+
landed: (board) => {
|
|
139
|
+
const label = board.labels.find((l) => l.id === params.labelId);
|
|
140
|
+
if (!label)
|
|
141
|
+
return false;
|
|
142
|
+
if (updates.name !== undefined && label.name !== updates.name)
|
|
143
|
+
return false;
|
|
144
|
+
if (updates.color !== undefined && label.color !== updates.color)
|
|
145
|
+
return false;
|
|
146
|
+
return true;
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
const onBoard = written.after?.labels.find((l) => l.id === params.labelId);
|
|
150
|
+
return writeResult({
|
|
151
|
+
label: {
|
|
152
|
+
id: written.result.id,
|
|
153
|
+
name: onBoard?.name ?? written.result.name,
|
|
154
|
+
color: onBoard?.color ?? written.result.color,
|
|
155
|
+
boardId: written.result.boardId,
|
|
156
|
+
},
|
|
157
|
+
}, written);
|
|
158
|
+
}),
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Tool: planka_delete_label
|
|
162
|
+
*/
|
|
163
|
+
export const deleteLabelTool = {
|
|
164
|
+
name: "planka_delete_label",
|
|
165
|
+
description: "Delete a label from a board. DESTRUCTIVE: it disappears from every card that carried it. Confirmed by re-reading the board.",
|
|
166
|
+
inputSchema: {
|
|
167
|
+
type: "object",
|
|
168
|
+
properties: {
|
|
169
|
+
labelId: { type: "string", description: "Label ID" },
|
|
170
|
+
},
|
|
171
|
+
required: ["labelId"],
|
|
172
|
+
},
|
|
173
|
+
handler: async (params) => guarded(async () => {
|
|
174
|
+
const deleted = await verifiedDelete({
|
|
175
|
+
del: () => deleteLabel({ labelId: params.labelId }),
|
|
176
|
+
confirmGone: async (label) => {
|
|
177
|
+
if (!label)
|
|
178
|
+
return null;
|
|
179
|
+
const board = await getBoard({ boardId: label.boardId });
|
|
180
|
+
return !board.labels.some((l) => l.id === params.labelId);
|
|
181
|
+
},
|
|
182
|
+
unknownReason: "Planka did not echo the deleted label, so its board is unknown and the delete could not be confirmed — call planka_board_summary on the board to see whether the label is gone",
|
|
183
|
+
});
|
|
184
|
+
return writeResult({
|
|
185
|
+
labelId: params.labelId,
|
|
186
|
+
...(deleted.result ? { boardId: deleted.result.boardId } : {}),
|
|
187
|
+
message: deleted.verified
|
|
188
|
+
? `Label ${params.labelId} deleted`
|
|
189
|
+
: `Label ${params.labelId} delete NOT confirmed — check with planka_board_summary before retrying`,
|
|
190
|
+
}, deleted);
|
|
191
|
+
}),
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Tool: planka_manage_labels (DEPRECATED alias)
|
|
12
195
|
*/
|
|
13
196
|
export const manageLabelsTool = {
|
|
14
197
|
name: "planka_manage_labels",
|
|
15
|
-
description: "
|
|
198
|
+
description: "DEPRECATED: use planka_create_label / planka_update_label / planka_delete_label. Kept so existing callers keep working; it only routes `action` to those tools.",
|
|
16
199
|
inputSchema: {
|
|
17
200
|
type: "object",
|
|
18
201
|
properties: {
|
|
@@ -21,190 +204,24 @@ export const manageLabelsTool = {
|
|
|
21
204
|
enum: ["create", "update", "delete"],
|
|
22
205
|
description: "Action to perform",
|
|
23
206
|
},
|
|
24
|
-
boardId: {
|
|
25
|
-
type: "string",
|
|
26
|
-
description: "Board ID (required for create)",
|
|
27
|
-
},
|
|
207
|
+
boardId: { type: "string", description: "Board ID (required for create)" },
|
|
28
208
|
labelId: {
|
|
29
209
|
type: "string",
|
|
30
210
|
description: "Label ID (required for update/delete)",
|
|
31
211
|
},
|
|
32
|
-
name: {
|
|
33
|
-
type: "string",
|
|
34
|
-
description: "Label name",
|
|
35
|
-
},
|
|
212
|
+
name: { type: "string", description: "Label name" },
|
|
36
213
|
color: {
|
|
37
214
|
type: "string",
|
|
38
|
-
description:
|
|
215
|
+
description: "Label color (required for create). Values: planka_create_label's enum, or the planka://labels/colors resource.",
|
|
39
216
|
},
|
|
40
217
|
},
|
|
41
218
|
required: ["action"],
|
|
42
219
|
},
|
|
43
|
-
handler: async (params) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
content: [
|
|
50
|
-
{
|
|
51
|
-
type: "text",
|
|
52
|
-
text: "Error: boardId is required for create action",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
isError: true,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
if (!params.name) {
|
|
59
|
-
return {
|
|
60
|
-
content: [
|
|
61
|
-
{
|
|
62
|
-
type: "text",
|
|
63
|
-
text: "Error: name is required for create action",
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
isError: true,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
if (!params.color) {
|
|
70
|
-
return {
|
|
71
|
-
content: [
|
|
72
|
-
{
|
|
73
|
-
type: "text",
|
|
74
|
-
text: "Error: color is required for create action",
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
isError: true,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
// Validate color
|
|
81
|
-
const colorParse = LabelColorSchema.safeParse(params.color);
|
|
82
|
-
if (!colorParse.success) {
|
|
83
|
-
return {
|
|
84
|
-
content: [
|
|
85
|
-
{
|
|
86
|
-
type: "text",
|
|
87
|
-
text: `Error: Invalid color '${params.color}'. Valid colors: ${validColors}`,
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
isError: true,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
const label = await createLabel({
|
|
94
|
-
boardId: params.boardId,
|
|
95
|
-
name: params.name,
|
|
96
|
-
color: colorParse.data,
|
|
97
|
-
});
|
|
98
|
-
return {
|
|
99
|
-
content: [
|
|
100
|
-
{
|
|
101
|
-
type: "text",
|
|
102
|
-
text: JSON.stringify({
|
|
103
|
-
success: true,
|
|
104
|
-
label: {
|
|
105
|
-
id: label.id,
|
|
106
|
-
name: label.name,
|
|
107
|
-
color: label.color,
|
|
108
|
-
},
|
|
109
|
-
}, null, 2),
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
case "update": {
|
|
115
|
-
if (!params.labelId) {
|
|
116
|
-
return {
|
|
117
|
-
content: [
|
|
118
|
-
{
|
|
119
|
-
type: "text",
|
|
120
|
-
text: "Error: labelId is required for update action",
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
isError: true,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
const updates = { labelId: params.labelId };
|
|
127
|
-
if (params.name !== undefined)
|
|
128
|
-
updates.name = params.name;
|
|
129
|
-
if (params.color !== undefined) {
|
|
130
|
-
const colorParse = LabelColorSchema.safeParse(params.color);
|
|
131
|
-
if (!colorParse.success) {
|
|
132
|
-
return {
|
|
133
|
-
content: [
|
|
134
|
-
{
|
|
135
|
-
type: "text",
|
|
136
|
-
text: `Error: Invalid color '${params.color}'. Valid colors: ${validColors}`,
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
isError: true,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
updates.color = colorParse.data;
|
|
143
|
-
}
|
|
144
|
-
const label = await updateLabel(updates);
|
|
145
|
-
return {
|
|
146
|
-
content: [
|
|
147
|
-
{
|
|
148
|
-
type: "text",
|
|
149
|
-
text: JSON.stringify({
|
|
150
|
-
success: true,
|
|
151
|
-
label: {
|
|
152
|
-
id: label.id,
|
|
153
|
-
name: label.name,
|
|
154
|
-
color: label.color,
|
|
155
|
-
},
|
|
156
|
-
}, null, 2),
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
case "delete": {
|
|
162
|
-
if (!params.labelId) {
|
|
163
|
-
return {
|
|
164
|
-
content: [
|
|
165
|
-
{
|
|
166
|
-
type: "text",
|
|
167
|
-
text: "Error: labelId is required for delete action",
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
isError: true,
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
await deleteLabel({ labelId: params.labelId });
|
|
174
|
-
return {
|
|
175
|
-
content: [
|
|
176
|
-
{
|
|
177
|
-
type: "text",
|
|
178
|
-
text: JSON.stringify({
|
|
179
|
-
success: true,
|
|
180
|
-
message: `Label ${params.labelId} deleted`,
|
|
181
|
-
}, null, 2),
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
default:
|
|
187
|
-
return {
|
|
188
|
-
content: [
|
|
189
|
-
{
|
|
190
|
-
type: "text",
|
|
191
|
-
text: `Error: Unknown action '${params.action}'`,
|
|
192
|
-
},
|
|
193
|
-
],
|
|
194
|
-
isError: true,
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
catch (error) {
|
|
199
|
-
if (error instanceof PlankaError) {
|
|
200
|
-
return {
|
|
201
|
-
content: [{ type: "text", text: `Error: ${error.message}` }],
|
|
202
|
-
isError: true,
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
throw error;
|
|
206
|
-
}
|
|
207
|
-
},
|
|
220
|
+
handler: async (params) => dispatchAction("planka_manage_labels", params, {
|
|
221
|
+
create: createLabelTool,
|
|
222
|
+
update: updateLabelTool,
|
|
223
|
+
delete: deleteLabelTool,
|
|
224
|
+
}),
|
|
208
225
|
};
|
|
209
226
|
/**
|
|
210
227
|
* Tool: planka_set_card_labels
|
|
@@ -212,8 +229,7 @@ export const manageLabelsTool = {
|
|
|
212
229
|
*/
|
|
213
230
|
export const setCardLabelsTool = {
|
|
214
231
|
name: "planka_set_card_labels",
|
|
215
|
-
description: "Add or remove labels
|
|
216
|
-
"Reports what actually landed on the card, verified by re-reading it.",
|
|
232
|
+
description: "Add or remove labels on a card, by label ID — never by name. IDs come from planka_board_summary.",
|
|
217
233
|
inputSchema: {
|
|
218
234
|
type: "object",
|
|
219
235
|
properties: {
|
|
@@ -254,7 +270,7 @@ export const setCardLabelsTool = {
|
|
|
254
270
|
{
|
|
255
271
|
type: "text",
|
|
256
272
|
text: "Error: nothing to do — pass addLabelIds (or labelIds) and/or removeLabelIds. " +
|
|
257
|
-
"Label IDs come from
|
|
273
|
+
"Label IDs come from planka_board_summary.",
|
|
258
274
|
},
|
|
259
275
|
],
|
|
260
276
|
isError: true,
|
|
@@ -265,27 +281,20 @@ export const setCardLabelsTool = {
|
|
|
265
281
|
addLabelIds: toAdd,
|
|
266
282
|
removeLabelIds: toRemove,
|
|
267
283
|
});
|
|
284
|
+
// `failed` is derived from setCardLabels' own re-read of the card, so
|
|
285
|
+
// this IS the verification — no hand-written `verified: true`.
|
|
268
286
|
const ok = result.failed.length === 0;
|
|
269
|
-
return {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
alreadyPresent: result.alreadyPresent,
|
|
281
|
-
notPresent: result.notPresent,
|
|
282
|
-
failed: result.failed,
|
|
283
|
-
finalLabelIds: result.finalLabelIds,
|
|
284
|
-
}, null, 2),
|
|
285
|
-
},
|
|
286
|
-
],
|
|
287
|
-
...(ok ? {} : { isError: true }),
|
|
288
|
-
};
|
|
287
|
+
return writeResult({
|
|
288
|
+
cardId: params.cardId,
|
|
289
|
+
labelsAdded: result.added.length,
|
|
290
|
+
labelsRemoved: result.removed.length,
|
|
291
|
+
added: result.added,
|
|
292
|
+
removed: result.removed,
|
|
293
|
+
alreadyPresent: result.alreadyPresent,
|
|
294
|
+
notPresent: result.notPresent,
|
|
295
|
+
failed: result.failed,
|
|
296
|
+
finalLabelIds: result.finalLabelIds,
|
|
297
|
+
}, { verified: ok });
|
|
289
298
|
}
|
|
290
299
|
catch (error) {
|
|
291
300
|
if (error instanceof PlankaError) {
|
|
@@ -298,5 +307,11 @@ export const setCardLabelsTool = {
|
|
|
298
307
|
}
|
|
299
308
|
},
|
|
300
309
|
};
|
|
301
|
-
export const labelTools = [
|
|
310
|
+
export const labelTools = [
|
|
311
|
+
createLabelTool,
|
|
312
|
+
updateLabelTool,
|
|
313
|
+
deleteLabelTool,
|
|
314
|
+
setCardLabelsTool,
|
|
315
|
+
manageLabelsTool,
|
|
316
|
+
];
|
|
302
317
|
//# sourceMappingURL=labels.js.map
|
package/dist/tools/labels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/tools/labels.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/tools/labels.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EACL,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;GA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