@omnicoreos/planka-mcp 0.2.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/CONTRIBUTING.md +37 -0
  3. package/CREDITS.md +39 -0
  4. package/LICENSE +22 -0
  5. package/README.es.md +213 -0
  6. package/README.md +213 -0
  7. package/dist/client.d.ts +96 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +281 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/errors.d.ts +85 -0
  12. package/dist/errors.d.ts.map +1 -0
  13. package/dist/errors.js +226 -0
  14. package/dist/errors.js.map +1 -0
  15. package/dist/identity.generated.d.ts +3 -0
  16. package/dist/identity.generated.d.ts.map +1 -0
  17. package/dist/identity.generated.js +4 -0
  18. package/dist/identity.generated.js.map +1 -0
  19. package/dist/index.d.ts +3 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +93 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/operations/attachments.d.ts +34 -0
  24. package/dist/operations/attachments.d.ts.map +1 -0
  25. package/dist/operations/attachments.js +89 -0
  26. package/dist/operations/attachments.js.map +1 -0
  27. package/dist/operations/board-id.d.ts +9 -0
  28. package/dist/operations/board-id.d.ts.map +1 -0
  29. package/dist/operations/board-id.js +86 -0
  30. package/dist/operations/board-id.js.map +1 -0
  31. package/dist/operations/boards.d.ts +143 -0
  32. package/dist/operations/boards.d.ts.map +1 -0
  33. package/dist/operations/boards.js +391 -0
  34. package/dist/operations/boards.js.map +1 -0
  35. package/dist/operations/cards.d.ts +36 -0
  36. package/dist/operations/cards.d.ts.map +1 -0
  37. package/dist/operations/cards.js +81 -0
  38. package/dist/operations/cards.js.map +1 -0
  39. package/dist/operations/comments.d.ts +28 -0
  40. package/dist/operations/comments.d.ts.map +1 -0
  41. package/dist/operations/comments.js +53 -0
  42. package/dist/operations/comments.js.map +1 -0
  43. package/dist/operations/labels.d.ts +60 -0
  44. package/dist/operations/labels.d.ts.map +1 -0
  45. package/dist/operations/labels.js +146 -0
  46. package/dist/operations/labels.js.map +1 -0
  47. package/dist/operations/lists.d.ts +15 -0
  48. package/dist/operations/lists.d.ts.map +1 -0
  49. package/dist/operations/lists.js +40 -0
  50. package/dist/operations/lists.js.map +1 -0
  51. package/dist/operations/projects.d.ts +24 -0
  52. package/dist/operations/projects.d.ts.map +1 -0
  53. package/dist/operations/projects.js +61 -0
  54. package/dist/operations/projects.js.map +1 -0
  55. package/dist/operations/tasks.d.ts +30 -0
  56. package/dist/operations/tasks.d.ts.map +1 -0
  57. package/dist/operations/tasks.js +111 -0
  58. package/dist/operations/tasks.js.map +1 -0
  59. package/dist/schemas/entities.d.ts +389 -0
  60. package/dist/schemas/entities.d.ts.map +1 -0
  61. package/dist/schemas/entities.js +202 -0
  62. package/dist/schemas/entities.js.map +1 -0
  63. package/dist/schemas/requests.d.ts +539 -0
  64. package/dist/schemas/requests.d.ts.map +1 -0
  65. package/dist/schemas/requests.js +187 -0
  66. package/dist/schemas/requests.js.map +1 -0
  67. package/dist/schemas/responses.d.ts +2626 -0
  68. package/dist/schemas/responses.d.ts.map +1 -0
  69. package/dist/schemas/responses.js +75 -0
  70. package/dist/schemas/responses.js.map +1 -0
  71. package/dist/tools/attachments.d.ts +270 -0
  72. package/dist/tools/attachments.d.ts.map +1 -0
  73. package/dist/tools/attachments.js +247 -0
  74. package/dist/tools/attachments.js.map +1 -0
  75. package/dist/tools/cards.d.ts +401 -0
  76. package/dist/tools/cards.d.ts.map +1 -0
  77. package/dist/tools/cards.js +368 -0
  78. package/dist/tools/cards.js.map +1 -0
  79. package/dist/tools/comments.d.ts +217 -0
  80. package/dist/tools/comments.d.ts.map +1 -0
  81. package/dist/tools/comments.js +208 -0
  82. package/dist/tools/comments.js.map +1 -0
  83. package/dist/tools/index.d.ts +1293 -0
  84. package/dist/tools/index.d.ts.map +1 -0
  85. package/dist/tools/index.js +62 -0
  86. package/dist/tools/index.js.map +1 -0
  87. package/dist/tools/labels.d.ts +214 -0
  88. package/dist/tools/labels.d.ts.map +1 -0
  89. package/dist/tools/labels.js +302 -0
  90. package/dist/tools/labels.js.map +1 -0
  91. package/dist/tools/lists.d.ts +117 -0
  92. package/dist/tools/lists.d.ts.map +1 -0
  93. package/dist/tools/lists.js +178 -0
  94. package/dist/tools/lists.js.map +1 -0
  95. package/dist/tools/navigation.d.ts +106 -0
  96. package/dist/tools/navigation.d.ts.map +1 -0
  97. package/dist/tools/navigation.js +151 -0
  98. package/dist/tools/navigation.js.map +1 -0
  99. package/dist/tools/queries.d.ts +380 -0
  100. package/dist/tools/queries.d.ts.map +1 -0
  101. package/dist/tools/queries.js +256 -0
  102. package/dist/tools/queries.js.map +1 -0
  103. package/dist/tools/tasks.d.ts +223 -0
  104. package/dist/tools/tasks.d.ts.map +1 -0
  105. package/dist/tools/tasks.js +169 -0
  106. package/dist/tools/tasks.js.map +1 -0
  107. package/docs/planka-2x-gotchas.md +192 -0
  108. package/docs/tools.md +659 -0
  109. package/docs/troubleshooting.md +138 -0
  110. package/package.json +71 -0
  111. package/project.identity.json +7 -0
  112. package/scripts/bootstrap-board.mjs +160 -0
  113. package/scripts/lib/planka-api.mjs +244 -0
  114. package/scripts/lib/workflow-template.mjs +26 -0
  115. package/scripts/setup.mjs +236 -0
  116. package/scripts/setup.sh +48 -0
  117. package/scripts/sync-identity.mjs +57 -0
  118. package/server.json +43 -0
  119. package/tests/smoke/planka-smoke.mjs +920 -0
  120. package/workflow/README.md +232 -0
  121. package/workflow/board-template.md +115 -0
  122. package/workflow/skills/planka-close-card/SKILL.md +81 -0
  123. package/workflow/skills/planka-orchestrator/SKILL.md +126 -0
  124. package/workflow/worktrees/README.md +104 -0
  125. package/workflow/worktrees/wt.conf.example +24 -0
  126. package/workflow/worktrees/wt.sh +345 -0
@@ -0,0 +1,96 @@
1
+ export interface ClientConfig {
2
+ baseUrl: string;
3
+ email: string;
4
+ password: string;
5
+ }
6
+ export interface RequestOptions {
7
+ token?: string;
8
+ body?: unknown;
9
+ /**
10
+ * Multipart body (attachment uploads). Content-Type is left unset on
11
+ * purpose: fetch generates it together with the boundary.
12
+ */
13
+ form?: FormData;
14
+ /**
15
+ * Also send the token as an `accessToken` cookie. Planka 2.0 serves
16
+ * attachment downloads with either, and different deployments disagree on
17
+ * which one they honour.
18
+ */
19
+ cookieToken?: boolean;
20
+ signal?: AbortSignal;
21
+ }
22
+ export declare function createRequestInit(method: string, options?: RequestOptions): RequestInit;
23
+ /**
24
+ * Validates and returns the configuration from environment variables.
25
+ */
26
+ export declare function getConfig(env?: NodeJS.ProcessEnv): ClientConfig;
27
+ /**
28
+ * PLANKA API client with automatic JWT token management.
29
+ */
30
+ export declare class PlankaClient {
31
+ private readonly env;
32
+ private readonly fetchImpl;
33
+ private config;
34
+ private token;
35
+ private tokenExpiresAt;
36
+ constructor(env?: NodeJS.ProcessEnv, fetchImpl?: typeof fetch);
37
+ /**
38
+ * Gets or initializes the configuration.
39
+ */
40
+ private getConfig;
41
+ /** Request timeout in milliseconds */
42
+ private static readonly REQUEST_TIMEOUT_MS;
43
+ /**
44
+ * Creates an AbortSignal with timeout.
45
+ * Uses AbortSignal.timeout() which automatically cleans up when the request completes.
46
+ */
47
+ private createTimeoutSignal;
48
+ /**
49
+ * Authenticates and retrieves a new JWT token.
50
+ */
51
+ private authenticate;
52
+ /**
53
+ * Gets a valid token, refreshing if necessary.
54
+ */
55
+ private getToken;
56
+ /**
57
+ * Safely parses JSON from a response, returning null on failure.
58
+ */
59
+ private safeParseJson;
60
+ /**
61
+ * Makes an authenticated request to the PLANKA API.
62
+ * @param isRetry - Internal flag to prevent infinite retry loops on 401
63
+ */
64
+ private request;
65
+ /**
66
+ * POST multipart/form-data (attachment uploads).
67
+ * @param isRetry - Internal flag to prevent infinite retry loops on 401
68
+ */
69
+ postMultipart<T>(path: string, form: FormData, isRetry?: boolean): Promise<T>;
70
+ /**
71
+ * Authenticated binary download (attachment contents).
72
+ * Accepts an absolute URL on the same host, or a relative path.
73
+ */
74
+ getBinary(urlOrPath: string): Promise<{
75
+ bytes: Uint8Array;
76
+ mimeType: string | null;
77
+ }>;
78
+ /**
79
+ * GET request.
80
+ */
81
+ get<T>(path: string): Promise<T>;
82
+ /**
83
+ * POST request.
84
+ */
85
+ post<T>(path: string, body: unknown): Promise<T>;
86
+ /**
87
+ * PATCH request.
88
+ */
89
+ patch<T>(path: string, body: unknown): Promise<T>;
90
+ /**
91
+ * DELETE request.
92
+ */
93
+ delete(path: string): Promise<void>;
94
+ }
95
+ export declare const plankaClient: PlankaClient;
96
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,cAAmB,GAC3B,WAAW,CAkBb;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,YAAY,CA6Bd;AAED;;GAEG;AACH,qBAAa,YAAY;IAMrB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAN5B,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,cAAc,CAAa;gBAGhB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,SAAS,GAAE,OAAO,KAAa;IAGlD;;OAEG;IACH,OAAO,CAAC,SAAS;IAOjB,sCAAsC;IACtC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAEnD;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;YACW,YAAY;IA+D1B;;OAEG;YACW,QAAQ;IAOtB;;OAEG;YACW,aAAa;IAQ3B;;;OAGG;YACW,OAAO;IA+CrB;;;OAGG;IACG,aAAa,CAAC,CAAC,EACnB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,OAAO,UAAQ,GACd,OAAO,CAAC,CAAC,CAAC;IAoCb;;;OAGG;IACG,SAAS,CACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,UAAU,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAmC1D;;OAEG;IACG,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAItC;;OAEG;IACG,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAItD;;OAEG;IACG,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAIvD;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1C;AAGD,eAAO,MAAM,YAAY,cAAqB,CAAC"}
package/dist/client.js ADDED
@@ -0,0 +1,281 @@
1
+ /**
2
+ * HTTP client for PLANKA API with automatic authentication.
3
+ */
4
+ import { PlankaAuthError, PlankaConfigError, PlankaNetworkError, createPlankaError, } from "./errors.js";
5
+ import { AuthResponse } from "./schemas/responses.js";
6
+ export function createRequestInit(method, options = {}) {
7
+ const headers = {};
8
+ if (options.token)
9
+ headers.Authorization = `Bearer ${options.token}`;
10
+ if (options.token && options.cookieToken) {
11
+ headers.Cookie = `accessToken=${options.token}`;
12
+ }
13
+ if (options.form === undefined && options.body !== undefined) {
14
+ headers["Content-Type"] = "application/json";
15
+ }
16
+ return {
17
+ method,
18
+ headers,
19
+ body: options.form ??
20
+ (options.body !== undefined ? JSON.stringify(options.body) : undefined),
21
+ signal: options.signal,
22
+ };
23
+ }
24
+ /**
25
+ * Validates and returns the configuration from environment variables.
26
+ */
27
+ export function getConfig(env = process.env) {
28
+ const baseUrl = env.PLANKA_BASE_URL;
29
+ const email = env.PLANKA_AGENT_EMAIL;
30
+ const password = env.PLANKA_AGENT_PASSWORD;
31
+ const missing = [];
32
+ if (!baseUrl)
33
+ missing.push("PLANKA_BASE_URL");
34
+ if (!email)
35
+ missing.push("PLANKA_AGENT_EMAIL");
36
+ if (!password)
37
+ missing.push("PLANKA_AGENT_PASSWORD");
38
+ if (missing.length > 0) {
39
+ throw new PlankaConfigError(`Missing required environment variables: ${missing.join(", ")}`);
40
+ }
41
+ // Validate URL format
42
+ try {
43
+ new URL(baseUrl);
44
+ }
45
+ catch {
46
+ throw new PlankaConfigError(`Invalid PLANKA_BASE_URL: ${baseUrl}`);
47
+ }
48
+ // TypeScript narrowing: after the check above, these are guaranteed to be defined
49
+ return {
50
+ baseUrl: baseUrl.replace(/\/+$/, ""), // Remove trailing slashes
51
+ email: email,
52
+ password: password,
53
+ };
54
+ }
55
+ /**
56
+ * PLANKA API client with automatic JWT token management.
57
+ */
58
+ export class PlankaClient {
59
+ env;
60
+ fetchImpl;
61
+ config = null;
62
+ token = null;
63
+ tokenExpiresAt = 0;
64
+ constructor(env = process.env, fetchImpl = fetch) {
65
+ this.env = env;
66
+ this.fetchImpl = fetchImpl;
67
+ }
68
+ /**
69
+ * Gets or initializes the configuration.
70
+ */
71
+ getConfig() {
72
+ if (!this.config) {
73
+ this.config = getConfig(this.env);
74
+ }
75
+ return this.config;
76
+ }
77
+ /** Request timeout in milliseconds */
78
+ static REQUEST_TIMEOUT_MS = 30000;
79
+ /**
80
+ * Creates an AbortSignal with timeout.
81
+ * Uses AbortSignal.timeout() which automatically cleans up when the request completes.
82
+ */
83
+ createTimeoutSignal() {
84
+ return AbortSignal.timeout(PlankaClient.REQUEST_TIMEOUT_MS);
85
+ }
86
+ /**
87
+ * Authenticates and retrieves a new JWT token.
88
+ */
89
+ async authenticate() {
90
+ const config = this.getConfig();
91
+ const url = `${config.baseUrl}/api/access-tokens`;
92
+ let response;
93
+ try {
94
+ response = await this.fetchImpl(url, createRequestInit("POST", {
95
+ body: {
96
+ emailOrUsername: config.email,
97
+ password: config.password,
98
+ },
99
+ signal: this.createTimeoutSignal(),
100
+ }));
101
+ }
102
+ catch (error) {
103
+ if (error instanceof Error && error.name === "AbortError") {
104
+ throw new PlankaNetworkError(`Request timeout connecting to PLANKA at ${config.baseUrl}`, error);
105
+ }
106
+ throw new PlankaNetworkError(`Failed to connect to PLANKA at ${config.baseUrl}`, error);
107
+ }
108
+ if (!response.ok) {
109
+ await this.safeParseJson(response);
110
+ throw new PlankaAuthError(`Authentication failed: ${response.status} ${response.statusText}`);
111
+ }
112
+ const data = await this.safeParseJson(response);
113
+ if (data === null) {
114
+ const redirectHint = config.baseUrl.startsWith("http://") || response.redirected
115
+ ? " Your HTTP URL probably redirects to HTTPS; a 301/302 can drop the POST body. Configure the final https:// URL directly."
116
+ : " Check that PLANKA_BASE_URL points to the Planka API origin, not a proxy error page.";
117
+ throw new PlankaAuthError(`Authentication returned HTML or another non-JSON response.${redirectHint}`);
118
+ }
119
+ const parsed = AuthResponse.safeParse(data);
120
+ if (!parsed.success) {
121
+ throw new PlankaAuthError("Authentication returned JSON, but not a Planka access token response.");
122
+ }
123
+ // PLANKA tokens are valid for 30 minutes by default.
124
+ // We refresh after 25 minutes to avoid edge cases.
125
+ // If PLANKA's token lifetime changes, adjust this value.
126
+ this.tokenExpiresAt = Date.now() + 25 * 60 * 1000;
127
+ this.token = parsed.data.item;
128
+ return parsed.data.item;
129
+ }
130
+ /**
131
+ * Gets a valid token, refreshing if necessary.
132
+ */
133
+ async getToken() {
134
+ if (!this.token || Date.now() >= this.tokenExpiresAt) {
135
+ return this.authenticate();
136
+ }
137
+ return this.token;
138
+ }
139
+ /**
140
+ * Safely parses JSON from a response, returning null on failure.
141
+ */
142
+ async safeParseJson(response) {
143
+ try {
144
+ return await response.json();
145
+ }
146
+ catch {
147
+ return null;
148
+ }
149
+ }
150
+ /**
151
+ * Makes an authenticated request to the PLANKA API.
152
+ * @param isRetry - Internal flag to prevent infinite retry loops on 401
153
+ */
154
+ async request(method, path, body, isRetry = false) {
155
+ const config = this.getConfig();
156
+ const token = await this.getToken();
157
+ const url = `${config.baseUrl}${path}`;
158
+ let response;
159
+ try {
160
+ response = await this.fetchImpl(url, createRequestInit(method, {
161
+ token,
162
+ body,
163
+ signal: this.createTimeoutSignal(),
164
+ }));
165
+ }
166
+ catch (error) {
167
+ if (error instanceof Error && error.name === "AbortError") {
168
+ throw new PlankaNetworkError(`Request timeout: ${method} ${path}`, error);
169
+ }
170
+ throw new PlankaNetworkError(`Network error: ${method} ${path}`, error);
171
+ }
172
+ // Handle 204 No Content
173
+ if (response.status === 204) {
174
+ return undefined;
175
+ }
176
+ const data = await this.safeParseJson(response);
177
+ if (!response.ok) {
178
+ // If token expired and this is not already a retry, get fresh token and retry once
179
+ if (response.status === 401 && this.token && !isRetry) {
180
+ this.token = null;
181
+ this.tokenExpiresAt = 0;
182
+ return this.request(method, path, body, true);
183
+ }
184
+ throw createPlankaError(response.status, data, `${method} ${path}`);
185
+ }
186
+ return data;
187
+ }
188
+ /**
189
+ * POST multipart/form-data (attachment uploads).
190
+ * @param isRetry - Internal flag to prevent infinite retry loops on 401
191
+ */
192
+ async postMultipart(path, form, isRetry = false) {
193
+ const config = this.getConfig();
194
+ const token = await this.getToken();
195
+ const url = `${config.baseUrl}${path}`;
196
+ let response;
197
+ try {
198
+ response = await this.fetchImpl(url, createRequestInit("POST", {
199
+ token,
200
+ form,
201
+ signal: this.createTimeoutSignal(),
202
+ }));
203
+ }
204
+ catch (error) {
205
+ if (error instanceof Error && error.name === "AbortError") {
206
+ throw new PlankaNetworkError(`Request timeout: POST ${path}`, error);
207
+ }
208
+ throw new PlankaNetworkError(`Network error: POST ${path}`, error);
209
+ }
210
+ const data = await this.safeParseJson(response);
211
+ if (!response.ok) {
212
+ if (response.status === 401 && this.token && !isRetry) {
213
+ this.token = null;
214
+ this.tokenExpiresAt = 0;
215
+ return this.postMultipart(path, form, true);
216
+ }
217
+ throw createPlankaError(response.status, data, `POST ${path}`);
218
+ }
219
+ return data;
220
+ }
221
+ /**
222
+ * Authenticated binary download (attachment contents).
223
+ * Accepts an absolute URL on the same host, or a relative path.
224
+ */
225
+ async getBinary(urlOrPath) {
226
+ const config = this.getConfig();
227
+ const token = await this.getToken();
228
+ const url = urlOrPath.startsWith("http")
229
+ ? urlOrPath
230
+ : `${config.baseUrl}${urlOrPath}`;
231
+ let response;
232
+ try {
233
+ response = await this.fetchImpl(url, createRequestInit("GET", {
234
+ token,
235
+ cookieToken: true,
236
+ signal: this.createTimeoutSignal(),
237
+ }));
238
+ }
239
+ catch (error) {
240
+ if (error instanceof Error && error.name === "AbortError") {
241
+ throw new PlankaNetworkError(`Request timeout: GET ${url}`, error);
242
+ }
243
+ throw new PlankaNetworkError(`Network error: GET ${url}`, error);
244
+ }
245
+ if (!response.ok) {
246
+ throw createPlankaError(response.status, null, `GET ${url}`);
247
+ }
248
+ const buffer = await response.arrayBuffer();
249
+ return {
250
+ bytes: new Uint8Array(buffer),
251
+ mimeType: response.headers.get("content-type"),
252
+ };
253
+ }
254
+ /**
255
+ * GET request.
256
+ */
257
+ async get(path) {
258
+ return this.request("GET", path);
259
+ }
260
+ /**
261
+ * POST request.
262
+ */
263
+ async post(path, body) {
264
+ return this.request("POST", path, body);
265
+ }
266
+ /**
267
+ * PATCH request.
268
+ */
269
+ async patch(path, body) {
270
+ return this.request("PATCH", path, body);
271
+ }
272
+ /**
273
+ * DELETE request.
274
+ */
275
+ async delete(path) {
276
+ return this.request("DELETE", path);
277
+ }
278
+ }
279
+ // Singleton client instance
280
+ export const plankaClient = new PlankaClient();
281
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAyBtD,MAAM,UAAU,iBAAiB,CAC/B,MAAc,EACd,UAA0B,EAAE;IAE5B,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,IAAI,OAAO,CAAC,KAAK;QAAE,OAAO,CAAC,aAAa,GAAG,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC;IACrE,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACzC,OAAO,CAAC,MAAM,GAAG,eAAe,OAAO,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7D,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;IAC/C,CAAC;IAED,OAAO;QACL,MAAM;QACN,OAAO;QACP,IAAI,EACF,OAAO,CAAC,IAAI;YACZ,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzE,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,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od";
5
+ export declare class PlankaError extends Error {
6
+ readonly code: string;
7
+ readonly status: number;
8
+ readonly details?: unknown | undefined;
9
+ constructor(message: string, code: string, status: number, details?: unknown | undefined);
10
+ }
11
+ export declare class PlankaAuthError extends PlankaError {
12
+ constructor(message?: string);
13
+ }
14
+ export declare class PlankaNotFoundError extends PlankaError {
15
+ constructor(resource: string, id: string);
16
+ }
17
+ export declare class PlankaValidationError extends PlankaError {
18
+ constructor(message: string, details?: unknown);
19
+ }
20
+ export declare class PlankaPermissionError extends PlankaError {
21
+ constructor(message?: string);
22
+ }
23
+ export declare class PlankaConfigError extends PlankaError {
24
+ constructor(message: string);
25
+ }
26
+ export declare class PlankaNetworkError extends PlankaError {
27
+ constructor(message: string, details?: unknown);
28
+ }
29
+ /**
30
+ * Factory function to create typed errors from API responses.
31
+ * @param status HTTP status code
32
+ * @param body Response body (parsed JSON or null)
33
+ * @param context Optional context (e.g., "GET /api/cards/123")
34
+ */
35
+ export declare function createPlankaError(status: number, body: unknown, context?: string): PlankaError;
36
+ /**
37
+ * Type guard for PlankaError instances.
38
+ */
39
+ export declare function isPlankaError(error: unknown): error is PlankaError;
40
+ /**
41
+ * An operation's INPUT failed validation.
42
+ *
43
+ * Deliberately NOT a subclass of PlankaError: every tool catches PlankaError
44
+ * to report Planka API failures, and this error has to travel untouched to the
45
+ * dispatcher in `src/index.ts` — the only place that knows the tool name and
46
+ * its inputSchema, and therefore the only place that can build the actionable
47
+ * message.
48
+ */
49
+ export declare class PlankaInputError extends Error {
50
+ readonly issues: z.ZodIssue[];
51
+ readonly received: unknown;
52
+ constructor(issues: z.ZodIssue[], received: unknown);
53
+ }
54
+ /**
55
+ * Validates an operation's input against its schema.
56
+ * Replaces `Schema.parse(input)`: instead of a bare ZodError it throws a
57
+ * PlankaInputError that keeps what was received, so it can be shown back.
58
+ */
59
+ export declare function parseInput<S extends z.ZodTypeAny>(schema: S, input: unknown): z.output<S>;
60
+ /** Type guard for Zod validation errors (response-shape failures). */
61
+ export declare function isZodError(error: unknown): error is z.ZodError;
62
+ /**
63
+ * The validation message the model sees: which tool failed, which field, what
64
+ * was expected and what arrived.
65
+ */
66
+ export declare function formatInputError(toolName: string, error: PlankaInputError, schema?: {
67
+ properties?: Record<string, unknown>;
68
+ required?: string[];
69
+ }): string;
70
+ /**
71
+ * Required fields that never arrived, detected before entering the handler.
72
+ * Without this a missing `tasks` dies as "Cannot read properties of undefined
73
+ * (reading 'map')", which names neither the tool nor the field.
74
+ */
75
+ export declare function formatMissingArgsError(toolName: string, missing: string[], args: unknown, schema?: {
76
+ properties?: Record<string, unknown>;
77
+ required?: string[];
78
+ }): string;
79
+ /**
80
+ * A ZodError that did NOT come from the input: Planka's response did not match
81
+ * the schema. Saying so explicitly keeps the model from assuming it got the
82
+ * arguments wrong.
83
+ */
84
+ export declare function formatResponseShapeError(toolName: string, error: z.ZodError): string;
85
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qBAAa,WAAY,SAAQ,KAAK;aAGlB,IAAI,EAAE,MAAM;aACZ,MAAM,EAAE,MAAM;aACd,OAAO,CAAC,EAAE,OAAO;gBAHjC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,OAAO,YAAA;CAKpC;AAED,qBAAa,eAAgB,SAAQ,WAAW;gBAClC,OAAO,SAA0B;CAI9C;AAED,qBAAa,mBAAoB,SAAQ,WAAW;gBACtC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;CAIzC;AAED,qBAAa,qBAAsB,SAAQ,WAAW;gBACxC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,qBAAsB,SAAQ,WAAW;gBACxC,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