@llodev/pm-tasks-clickup 0.0.0-pr-130-7078a2a → 0.0.0-stage

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 (67) hide show
  1. package/README.md +2 -195
  2. package/package.json +3 -61
  3. package/LICENSE +0 -21
  4. package/SKILL.md +0 -258
  5. package/anti-patterns/clickup.md +0 -73
  6. package/dist/adapter.d.ts +0 -39
  7. package/dist/adapter.d.ts.map +0 -1
  8. package/dist/adapter.js +0 -83
  9. package/dist/adapter.js.map +0 -1
  10. package/dist/bin/init.d.ts +0 -3
  11. package/dist/bin/init.d.ts.map +0 -1
  12. package/dist/bin/init.js +0 -20
  13. package/dist/bin/init.js.map +0 -1
  14. package/dist/doctor-cli.d.ts +0 -27
  15. package/dist/doctor-cli.d.ts.map +0 -1
  16. package/dist/doctor-cli.js +0 -315
  17. package/dist/doctor-cli.js.map +0 -1
  18. package/dist/env.d.ts +0 -6
  19. package/dist/env.d.ts.map +0 -1
  20. package/dist/env.js +0 -11
  21. package/dist/env.js.map +0 -1
  22. package/dist/envelope.d.ts +0 -44
  23. package/dist/envelope.d.ts.map +0 -1
  24. package/dist/envelope.js +0 -95
  25. package/dist/envelope.js.map +0 -1
  26. package/dist/errors.d.ts +0 -30
  27. package/dist/errors.d.ts.map +0 -1
  28. package/dist/errors.js +0 -60
  29. package/dist/errors.js.map +0 -1
  30. package/dist/estimation.d.ts +0 -20
  31. package/dist/estimation.d.ts.map +0 -1
  32. package/dist/estimation.js +0 -40
  33. package/dist/estimation.js.map +0 -1
  34. package/dist/index.d.ts +0 -5
  35. package/dist/index.d.ts.map +0 -1
  36. package/dist/index.js +0 -3
  37. package/dist/index.js.map +0 -1
  38. package/dist/init-api.d.ts +0 -67
  39. package/dist/init-api.d.ts.map +0 -1
  40. package/dist/init-api.js +0 -271
  41. package/dist/init-api.js.map +0 -1
  42. package/dist/init-flow.d.ts +0 -27
  43. package/dist/init-flow.d.ts.map +0 -1
  44. package/dist/init-flow.js +0 -206
  45. package/dist/init-flow.js.map +0 -1
  46. package/dist/status-map.d.ts +0 -31
  47. package/dist/status-map.d.ts.map +0 -1
  48. package/dist/status-map.js +0 -38
  49. package/dist/status-map.js.map +0 -1
  50. package/dist/status.d.ts +0 -17
  51. package/dist/status.d.ts.map +0 -1
  52. package/dist/status.js +0 -21
  53. package/dist/status.js.map +0 -1
  54. package/dist/transport-clickup.d.ts +0 -99
  55. package/dist/transport-clickup.d.ts.map +0 -1
  56. package/dist/transport-clickup.js +0 -676
  57. package/dist/transport-clickup.js.map +0 -1
  58. package/docs/i18n/README.es-ES.md +0 -196
  59. package/docs/i18n/README.pt-BR.md +0 -196
  60. package/i18n/en-US.json +0 -62
  61. package/i18n/es-ES.json +0 -62
  62. package/i18n/pt-BR.json +0 -62
  63. package/manifest.json +0 -14
  64. package/references/autonomous.md +0 -85
  65. package/references/estimation.md +0 -115
  66. package/references/operations.md +0 -128
  67. package/schemas/config.json +0 -140
@@ -1,73 +0,0 @@
1
- # ClickUp ingestion anti-patterns
2
-
3
- Apply when Phase 4, 5, 5b, 6 or 7 targets ClickUp. Formatting and publish detail live in [`../SKILL.md`](../SKILL.md); verb detail in [`../references/operations.md`](../references/operations.md).
4
-
5
- ## Paste health and fallbacks
6
-
7
- - Generic card title → `name`; if absent, take the first non-empty heading.
8
- - Descriptions are Markdown with literal newlines, sent as `markdown_description`.
9
- - No `.clickup.json` → produce the paste-ready description and point to `init`. Do not guess list ids or status names to publish anyway.
10
-
11
- ## ClickUp
12
-
13
- **NEVER hard-code a status name.**
14
- Statuses are defined per list, named by each team and often localized ("to do", "a fazer", "pendiente"). Two lists in one workspace can disagree. Always go through the role pinned in `lists[].statuses` (`open`, `wip`, `done`, `closed`). A name that does not exist on the task's list is rejected (`Status does not exist`).
15
-
16
- **NEVER pass `open`, `wip` or `done` as the `task.create` status.**
17
- `listOrSectionId` is sent to ClickUp as a status name; role words are resolved only by `task.move`, `checklist.check` and `task.close`. Pass the list's pinned `open` name, or leave it empty for the list default.
18
-
19
- **NEVER pass a list id where you mean a status.**
20
- `task.move` treats six or more digits as a destination list: the task leaves its list, and if that list is not in `lists[]`, every later status verb on it fails `list_not_configured`. The same holds for core's plan-execution hooks: `listsWipId` / `listsDoneId` are `"wip"` / `"done"`, not ids.
21
-
22
- **NEVER call `clickup_create_task_comment`.**
23
- It is deprecated. Use `clickup_create_comment {entity_type: "task", entity_id, comment_text}`.
24
-
25
- **NEVER assume `update_task.assignees` adds.**
26
- It replaces the whole set: sending one id silently unassigns everyone else, including the human who owns the task. `task.assignee.add` reads the task and writes the union; if you call `clickup_update_task` yourself, do the same.
27
-
28
- **NEVER pass a `members[].alias` as the assignee.**
29
- The transport resolves ids, `"me"`, emails and usernames; an alias is none of these, so it fails closed (`assignee_unresolved`) or, worse, may match someone else's username. Map the alias to `members[].id` first.
30
-
31
- **NEVER fake checklists with `- [ ]` in the description on MCP publish.**
32
- ClickUp renders the task list, but nothing can address those boxes: `checklist.check` works on subtasks only, and the MCP cannot write native checklists either. Task-list lines are for paste-ready output, where a human ticks them by hand.
33
-
34
- **NEVER write a native estimate on a parent and on its children.**
35
- ClickUp keeps a parent's own `time_estimate`, and spaces with time-estimate roll-up show parent plus children in views: the effort is counted twice. Native estimates go on leaves; the parent gets the `est:` tag only. Create subtasks before estimating the parent.
36
-
37
- **NEVER use `include_closed: false` as the "not done" filter.**
38
- `clickup_filter_tasks` still returns `done`-type tasks with it. Filter with `statuses: [<every open- and custom-type status name of the scoped lists>]`, read with one `clickup_get_list` per list, and `subtasks: false`.
39
-
40
- **NEVER filter plan tasks on the pinned open and wip names alone.**
41
- A task parked in another custom status (`on hold`, `planning`, `at risk`) drops out of the result, comes back `missing`, and gets created a second time. Pass every status name whose type is not `done` or `closed`.
42
-
43
- **NEVER read a write response as a task.**
44
- `clickup_create_task` / `clickup_update_task` return `{success, task_id, custom_id, task_url}`; `clickup_move_task` returns `new_list_id` and no URL. There is no status, list, parent or assignee in them: read `clickup_get_task` when you need state.
45
-
46
- **NEVER search for `[ct:<token>]` with the brackets.**
47
- ClickUp stores the description with escaped brackets (`\[ct:…\]`). Search `clickup_search {keywords: "ct:<token>"}` and confirm against `text_content`.
48
-
49
- **NEVER compute a relative date from your own clock.**
50
- "Today" or "tomorrow" depends on the ClickUp account's timezone, and date-only values are stored at 04:00 local time. Read `clickup_get_user.current_time` first, then send `YYYY-MM-DD`.
51
-
52
- **NEVER overwrite `due_date` at close, or wait for `date_closed`.**
53
- `due_date` is the plan. ClickUp leaves `date_closed` null for `done`-type statuses: completion is the status itself.
54
-
55
- **NEVER report `ALREADY_IN_STATE` as a failure.**
56
- `task.move` and `checklist.check` use it to say "nothing to do". Retrying or escalating on it creates noise and, in loops, duplicate comments.
57
-
58
- **NEVER expect `task.parent.set` to leave the task where it was.**
59
- ClickUp moves the child into the parent's list. Check that list is configured (and in autonomous scope) before re-parenting across lists. Detaching is not possible through the MCP.
60
-
61
- **NEVER delete or archive from this skill.**
62
- The MCP exposes `clickup_delete_task`, but deletion, archiving and renaming are forbidden autonomous verbs and outside this adapter. Ask the human to clean up in the ClickUp UI.
63
-
64
- **NEVER put the API token anywhere but the environment.**
65
- `CLICKUP_API_TOKEN` is read only from the environment, by `init` and the doctor, for read-only discovery. Never paste it into chat, an issue, a commit or `.clickup.json`; the MCP uses its own OAuth.
66
-
67
- ## Cross-tool
68
-
69
- **NEVER** carry ClickUp's quirks (per-list statuses, union assignee writes, list moves by id, leaf-only estimates) to another adapter after switching targets mid-chat, or bring another adapter's rules here (Linear's single assignee, Trello's due-date overwrite at close). Re-load that adapter's SKILL.md.
70
-
71
- ## The ClickUp UI is the human's audit trail
72
-
73
- `clickup_get_task` returns current values, not history. When auditing an autonomous run, check the task's activity in ClickUp, alongside the runtime audit log.
package/dist/adapter.d.ts DELETED
@@ -1,39 +0,0 @@
1
- import { type Runtime } from "@llodev/pm-tasks-core/runtime";
2
- import { type McpCaller } from "./transport-clickup.js";
3
- export type { McpCaller };
4
- export interface CreateAdapterOptions {
5
- /** Absolute or cwd-relative path to the .clickup.json config file. */
6
- configPath: string;
7
- /** Caller-supplied MCP dispatcher (proxies to the `clickup_*` tools, no server prefix). */
8
- mcp: McpCaller;
9
- /** Optional session id for audit-log correlation. Defaults to generateSession() when omitted. */
10
- session?: string;
11
- /** Optional locale hint (forwarded from the .clickup.json locale field for narration). */
12
- language?: string;
13
- }
14
- /**
15
- * Construct a ready-to-use ClickUp adapter Runtime. Reads and parses the config
16
- * from configPath, wires the ClickUp MCP transport to the caller-supplied
17
- * McpCaller, and returns the same Runtime shape as createCoreRuntime. No MCP
18
- * call is made here.
19
- *
20
- * The config is read twice (here for the transport, again by createCoreRuntime
21
- * for the handler layer). Construction rejects only a config that is not an
22
- * object, has no non-empty string `workspace.id`, has a `lists` that is not an
23
- * array, or has an `estimation` that is not an object. Everything else is left
24
- * to `init` and `doctor`, and each verb fails closed on what it needs (a list
25
- * without pinned statuses makes the status verbs INVALID_REQUEST).
26
- *
27
- * task.estimate.set: the runtime passes the request through unchanged and does
28
- * not read the config's `estimation` block, so the caller passes that block as
29
- * `req.config` (cast to core's `EstimationConfig`: ClickUp's block carries
30
- * `clickupTarget` instead of `jiraTarget`). The request config drives strategy,
31
- * target, scale, sizeMap and hoursPerDay. The block in .clickup.json is the on/off
32
- * switch: when it is absent or says `enabled: false` (or the request config does),
33
- * the verb is NOT_APPLICABLE; a request without `config` is INVALID_REQUEST.
34
- *
35
- * task.sprint.set is not in the manifest: the transport has no taskSprintSet, so
36
- * the runtime answers UNSUPPORTED_VERB without an MCP call.
37
- */
38
- export declare function createAdapter(opts: CreateAdapterOptions): Promise<Runtime>;
39
- //# sourceMappingURL=adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,OAAO,EAAkB,MAAM,+BAA+B,CAAC;AAEhG,OAAO,EAA8C,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEpG,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,GAAG,EAAE,SAAS,CAAC;IACf,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAgDD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAahF"}
package/dist/adapter.js DELETED
@@ -1,83 +0,0 @@
1
- import { readFile } from "node:fs/promises";
2
- import { createCoreRuntime } from "@llodev/pm-tasks-core/runtime";
3
- import { isObj } from "./envelope.js";
4
- import { createClickUpTransport } from "./transport-clickup.js";
5
- /**
6
- * The shape every verb relies on: an object, `workspace.id` a non-empty string,
7
- * `lists` an array, and `estimation` absent or an object.
8
- */
9
- function hasRequiredShape(value) {
10
- if (!isObj(value) || !isObj(value.workspace))
11
- return false;
12
- const id = value.workspace.id;
13
- return (typeof id === "string" &&
14
- id !== "" &&
15
- Array.isArray(value.lists) &&
16
- (value.estimation === undefined || isObj(value.estimation)));
17
- }
18
- /**
19
- * Reads and parses .clickup.json; a missing, malformed or misshapen file names
20
- * the path, never the content.
21
- */
22
- async function readConfig(configPath) {
23
- let raw;
24
- try {
25
- raw = await readFile(configPath, "utf8");
26
- }
27
- catch (e) {
28
- const missing = e.code === "ENOENT";
29
- throw new Error(missing
30
- ? `pm-tasks-clickup: config not found at ${configPath} — run 'npx @llodev/pm-tasks-clickup init' to create one`
31
- : `pm-tasks-clickup: cannot read config at ${configPath}`, { cause: e });
32
- }
33
- let parsed;
34
- try {
35
- parsed = JSON.parse(raw);
36
- }
37
- catch (e) {
38
- throw new Error(`pm-tasks-clickup: invalid JSON in config at ${configPath}`, { cause: e });
39
- }
40
- if (!hasRequiredShape(parsed)) {
41
- throw new Error(`pm-tasks-clickup: invalid config at ${configPath} (workspace.id and lists[] are required) — run 'npx @llodev/pm-tasks-clickup init --doctor'`);
42
- }
43
- return parsed;
44
- }
45
- /**
46
- * Construct a ready-to-use ClickUp adapter Runtime. Reads and parses the config
47
- * from configPath, wires the ClickUp MCP transport to the caller-supplied
48
- * McpCaller, and returns the same Runtime shape as createCoreRuntime. No MCP
49
- * call is made here.
50
- *
51
- * The config is read twice (here for the transport, again by createCoreRuntime
52
- * for the handler layer). Construction rejects only a config that is not an
53
- * object, has no non-empty string `workspace.id`, has a `lists` that is not an
54
- * array, or has an `estimation` that is not an object. Everything else is left
55
- * to `init` and `doctor`, and each verb fails closed on what it needs (a list
56
- * without pinned statuses makes the status verbs INVALID_REQUEST).
57
- *
58
- * task.estimate.set: the runtime passes the request through unchanged and does
59
- * not read the config's `estimation` block, so the caller passes that block as
60
- * `req.config` (cast to core's `EstimationConfig`: ClickUp's block carries
61
- * `clickupTarget` instead of `jiraTarget`). The request config drives strategy,
62
- * target, scale, sizeMap and hoursPerDay. The block in .clickup.json is the on/off
63
- * switch: when it is absent or says `enabled: false` (or the request config does),
64
- * the verb is NOT_APPLICABLE; a request without `config` is INVALID_REQUEST.
65
- *
66
- * task.sprint.set is not in the manifest: the transport has no taskSprintSet, so
67
- * the runtime answers UNSUPPORTED_VERB without an MCP call.
68
- */
69
- export async function createAdapter(opts) {
70
- const config = await readConfig(opts.configPath);
71
- // Cast to Transport: taskEstimateSet is narrowed to ClickUpTaskEstimateSetRequest
72
- // (clickupTarget instead of jiraTarget); the runtime's task-estimate-set handler
73
- // passes the caller's request, req.config included, through as is.
74
- const transport = createClickUpTransport({ mcp: opts.mcp, config });
75
- return createCoreRuntime({
76
- tool: "clickup",
77
- configPath: opts.configPath,
78
- transport,
79
- session: opts.session,
80
- language: opts.language,
81
- });
82
- }
83
- //# sourceMappingURL=adapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":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,CAAC,GAAG,CAAY,CAAC;IACtC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,+CAA+C,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7F,CAAC;IACD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,uCAAuC,UAAU,6FAA6F,CAC/I,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAA0B;IAC5D,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjD,kFAAkF;IAClF,iFAAiF;IACjF,mEAAmE;IACnE,MAAM,SAAS,GAAG,sBAAsB,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,CAAyB,CAAC;IAC5F,OAAO,iBAAiB,CAAC;QACvB,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,SAAS;QACT,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,CAAC,CAAC;AACL,CAAC"}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=init.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/bin/init.ts"],"names":[],"mappings":""}
package/dist/bin/init.js DELETED
@@ -1,20 +0,0 @@
1
- #!/usr/bin/env node
2
- // pm-tasks-clickup init: thin CLI shim. The library surface lives in ../init-flow.ts.
3
- import path from "node:path";
4
- import { runInit } from "../init-flow.js";
5
- async function run() {
6
- const argv = process.argv.slice(2);
7
- if (argv.includes("--doctor")) {
8
- const { runDoctor } = await import("../doctor-cli.js");
9
- await runDoctor({ tool: "clickup", argv: argv.filter((a) => a !== "--doctor") });
10
- return;
11
- }
12
- const outputIdx = argv.indexOf("--output");
13
- const outPath = outputIdx !== -1 && argv[outputIdx + 1] ? path.resolve(argv[outputIdx + 1]) : undefined;
14
- await runInit({ outPath });
15
- }
16
- run().catch((e) => {
17
- console.error("pm-tasks-clickup init:", e.message);
18
- process.exit(1);
19
- });
20
- //# sourceMappingURL=init.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/bin/init.ts"],"names":[],"mappings":";AACA,sFAAsF;AACtF,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,KAAK,UAAU,GAAG;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;QACvD,MAAM,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,EAAE,CAAC,CAAC;QACjF,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3C,MAAM,OAAO,GACX,SAAS,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE1F,MAAM,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAC7B,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAG,CAAW,CAAC,OAAO,CAAC,CAAC;IAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- import { type DoctorCheck } from "@llodev/pm-tasks-core/doctor";
2
- /** Live reads for C-CLK-7 and C-CLK-8; a missing method skips its check. */
3
- export interface ClickUpProbe {
4
- getWorkspaces?(): Promise<{
5
- id: string;
6
- }[]>;
7
- getListStatuses?(listId: string): Promise<string[]>;
8
- }
9
- /** Create the ClickUp checks; without a probe the live checks are skipped. */
10
- export declare function makeClickUpChecks(probe?: ClickUpProbe): DoctorCheck[];
11
- /** The checks without a probe: the live checks are skipped. */
12
- export declare const ADAPTER_CHECKS: DoctorCheck[];
13
- export interface RunDoctorOpts {
14
- tool: string;
15
- argv: string[];
16
- }
17
- /** Seams for tests; each defaults to the real process. */
18
- export interface DoctorDeps {
19
- env?: NodeJS.ProcessEnv;
20
- /** Wins over the REST probe that CLICKUP_API_TOKEN would build. */
21
- probe?: ClickUpProbe;
22
- write?: (text: string) => void;
23
- exit?: (code: number) => void;
24
- }
25
- /** `--json`, `--fix-hints-only`, `--config <path>` (default ./.clickup.json). Exits 1 on an error-severity failure. */
26
- export declare function runDoctor({ argv }: RunDoctorOpts, deps?: DoctorDeps): Promise<void>;
27
- //# sourceMappingURL=doctor-cli.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doctor-cli.d.ts","sourceRoot":"","sources":["../src/doctor-cli.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,WAAW,EAIjB,MAAM,8BAA8B,CAAC;AAkBtC,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAC;IAC5C,eAAe,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACrD;AAiKD,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,WAAW,EAAE,CAkGrE;AAED,+DAA+D;AAC/D,eAAO,MAAM,cAAc,EAAE,WAAW,EAAwB,CAAC;AAajE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,0DAA0D;AAC1D,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,mEAAmE;IACnE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,uHAAuH;AACvH,wBAAsB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA6C7F"}
@@ -1,315 +0,0 @@
1
- /**
2
- * Adapter health checks (C-CLK-*), run after core's shared checks. There is no
3
- * C-CLK-5: sprints are not part of this adapter. The live checks (C-CLK-7, C-CLK-8)
4
- * go through a probe only: a read-only REST probe when CLICKUP_API_TOKEN is set
5
- * (tests inject their own), else they are skipped with an advisory.
6
- */
7
- import { access, readFile } from "node:fs/promises";
8
- import path from "node:path";
9
- import { fileURLToPath } from "node:url";
10
- import { resolveDataDir } from "@llodev/pm-tasks-core/audit";
11
- import { renderReport } from "@llodev/pm-tasks-core/bin/doctor";
12
- import { runChecks, } from "@llodev/pm-tasks-core/doctor";
13
- import { interpolate, listLocales, loadStrings, registerI18nRoot, } from "@llodev/pm-tasks-core/i18n";
14
- import { isObj } from "./envelope.js";
15
- import { readClickUpToken } from "./env.js";
16
- import { TIME_STRATEGIES } from "./estimation.js";
17
- import { ClickUpInitError, createRestInitApi } from "./init-api.js";
18
- import { statusKey } from "./status.js";
19
- const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
20
- const I18N = "clickup";
21
- const REINIT = "Re-run pm-tasks-clickup init.";
22
- const ROLES = ["open", "wip", "done", "closed"];
23
- const obj = (v) => (isObj(v) ? v : {});
24
- const arr = (v) => (Array.isArray(v) ? v : []);
25
- /** A string trimmed, or "" for anything else. */
26
- const text = (v) => (typeof v === "string" ? v.trim() : "");
27
- const workspaceId = (ctx) => text(obj(obj(ctx.config).workspace).id);
28
- /** The C-CLK messages in the config's locale (en-US when unset or unknown). */
29
- async function strings(ctx) {
30
- registerI18nRoot(I18N, path.join(ROOT, "i18n"));
31
- const locale = text(obj(ctx.config).locale);
32
- return loadStrings(I18N, /^[a-z]{2}-[A-Z]{2}$/.test(locale) ? locale : "en-US");
33
- }
34
- function listLabel(l) {
35
- const name = text(l.name);
36
- const id = text(l.id);
37
- return name && id ? `${name} (${id})` : name || id || "?";
38
- }
39
- function verdict(problems, okMessage, fixHint) {
40
- return problems.length > 0
41
- ? { ok: false, message: problems.join(" "), fixHint }
42
- : { ok: true, message: okMessage };
43
- }
44
- /** An init error's message (built never to carry a token, header or body); else a fixed text. */
45
- function reason(e) {
46
- return e instanceof ClickUpInitError ? e.message : "the ClickUp probe failed";
47
- }
48
- const C_CLK_1 = {
49
- id: "C-CLK-1",
50
- label: "Config present and parseable",
51
- severity: "error",
52
- async run(ctx) {
53
- const s = await strings(ctx);
54
- if (isObj(ctx.config) && typeof ctx.config.version === "string") {
55
- return { ok: true, message: s.doctorOk };
56
- }
57
- const exists = await access(ctx.configPath).then(() => true, () => false);
58
- return exists
59
- ? {
60
- ok: false,
61
- message: interpolate(s.doctorConfigInvalid, { path: ctx.configPath }),
62
- fixHint: REINIT,
63
- }
64
- : {
65
- ok: false,
66
- message: s.doctorNoConfig,
67
- fixHint: "Run pm-tasks-clickup init, or pass --config <path>.",
68
- };
69
- },
70
- };
71
- const C_CLK_2 = {
72
- id: "C-CLK-2",
73
- label: "Workspace id present",
74
- severity: "error",
75
- async run(ctx) {
76
- const id = workspaceId(ctx);
77
- return id
78
- ? { ok: true, message: `workspace.id ${id}` }
79
- : { ok: false, message: (await strings(ctx)).doctorNoWorkspace, fixHint: REINIT };
80
- },
81
- };
82
- const C_CLK_3 = {
83
- id: "C-CLK-3",
84
- label: "Every list pins open and done",
85
- severity: "error",
86
- async run(ctx) {
87
- const s = await strings(ctx);
88
- const lists = arr(obj(ctx.config).lists).map(obj);
89
- if (lists.length === 0)
90
- return { ok: false, message: s.doctorNoLists, fixHint: REINIT };
91
- const problems = lists.flatMap((l) => {
92
- const pins = obj(l.statuses);
93
- const list = listLabel(l);
94
- return [
95
- ...(text(pins.open) ? [] : [interpolate(s.doctorNoOpen, { list })]),
96
- ...(text(pins.done) ? [] : [interpolate(s.doctorNoDone, { list })]),
97
- ];
98
- });
99
- return verdict(problems, `${lists.length} list(s) pin open and done`, REINIT);
100
- },
101
- };
102
- // warn: a time target on a point strategy only drops the native estimate. An
103
- // out-of-range hoursPerDay breaks every estimate, and core's schema check (C-CFG-1)
104
- // already fails the run on it.
105
- const C_CLK_4 = {
106
- id: "C-CLK-4",
107
- label: "Estimation coherent",
108
- severity: "warn",
109
- async run(ctx) {
110
- const s = await strings(ctx);
111
- const est = obj(ctx.config).estimation;
112
- if (!isObj(est) || est.enabled === false)
113
- return { ok: true, message: s.doctorEstimationOff };
114
- const h = est.hoursPerDay;
115
- const problems = [
116
- ...(h === undefined || (typeof h === "number" && h >= 1 && h <= 24)
117
- ? []
118
- : [s.doctorHoursPerDay]),
119
- ...(est.clickupTarget === "time" && !TIME_STRATEGIES.has(est.strategy)
120
- ? [s.doctorEstimationMismatch]
121
- : []),
122
- ];
123
- return verdict(problems, `estimation: ${String(est.strategy)} → ${String(est.clickupTarget)}`, "Edit the estimation block of .clickup.json, or re-run pm-tasks-clickup init.");
124
- },
125
- };
126
- const C_CLK_6 = {
127
- id: "C-CLK-6",
128
- label: "Autonomous scope and default aliases resolve",
129
- severity: "warn",
130
- async run(ctx) {
131
- const s = await strings(ctx);
132
- const cfg = obj(ctx.config);
133
- const auto = obj(cfg.autonomous);
134
- const defaults = obj(cfg.defaults);
135
- const listIds = new Set(arr(cfg.lists).map((l) => obj(l).id));
136
- // Core's rule (C-CFG-4): "me" or a members[].alias; an empty or non-string default is unset.
137
- const aliases = new Set(["me", ...arr(cfg.members).map((m) => obj(m).alias)]);
138
- const problems = [
139
- ...arr(obj(auto.scope).lists)
140
- .filter((id) => !listIds.has(id))
141
- .map((id) => interpolate(s.doctorScopeUnknownList, { list: String(id) })),
142
- ...["assigneeAlias", "escalateToAlias"]
143
- .filter((field) => {
144
- const alias = defaults[field];
145
- return typeof alias === "string" && alias !== "" && !aliases.has(alias);
146
- })
147
- .map((field) => interpolate(s.doctorAliasUnresolved, { field, alias: String(defaults[field]) })),
148
- ];
149
- const message = [
150
- ...(problems.length > 0 ? problems : ["autonomous scope and default aliases resolve"]),
151
- ...(auto.enabled === true ? [] : [s.doctorAutonomousDisabled]),
152
- ].join(" ");
153
- return problems.length > 0
154
- ? {
155
- ok: false,
156
- message,
157
- fixHint: 'Register the list with pm-tasks-clickup init or drop it from autonomous.scope.lists; set each default to "me" or a members[].alias.',
158
- }
159
- : { ok: true, message };
160
- },
161
- };
162
- /** Create the ClickUp checks; without a probe the live checks are skipped. */
163
- export function makeClickUpChecks(probe) {
164
- // C-CLK-7's result per run, so C-CLK-8 reuses it instead of probing again.
165
- const reached = new WeakMap();
166
- async function reach(ctx) {
167
- const s = await strings(ctx);
168
- const id = workspaceId(ctx);
169
- if (!probe?.getWorkspaces)
170
- return { ok: true, message: s.doctorNoProbe };
171
- if (!id)
172
- return { ok: true, message: "skipped: no workspace.id (see C-CLK-2)" };
173
- const fixHint = "Check CLICKUP_API_TOKEN, and that workspace.id is a workspace of that account.";
174
- try {
175
- if ((await probe.getWorkspaces()).some((w) => w.id === id)) {
176
- return { ok: true, message: `workspace ${id} reachable` };
177
- }
178
- return {
179
- ok: false,
180
- message: interpolate(s.doctorWorkspaceHidden, { workspace: id }),
181
- fixHint,
182
- };
183
- }
184
- catch (e) {
185
- return {
186
- ok: false,
187
- message: interpolate(s.doctorUnreachable, { reason: reason(e) }),
188
- fixHint,
189
- };
190
- }
191
- }
192
- const C_CLK_7 = {
193
- id: "C-CLK-7",
194
- label: "ClickUp reachable",
195
- severity: "warn",
196
- run(ctx) {
197
- let result = reached.get(ctx);
198
- if (!result)
199
- reached.set(ctx, (result = reach(ctx)));
200
- return result;
201
- },
202
- };
203
- // The safety net for a pinned status renamed or removed after init: the verbs
204
- // fail closed on it, and this check names the list and role to fix.
205
- const C_CLK_8 = {
206
- id: "C-CLK-8",
207
- label: "Pinned statuses exist in ClickUp",
208
- severity: "error",
209
- async run(ctx) {
210
- const s = await strings(ctx);
211
- if (!probe?.getListStatuses)
212
- return { ok: true, message: s.doctorNoProbe };
213
- // One skipped result, not one failure per list, when C-CLK-7 failed.
214
- if (!(await C_CLK_7.run(ctx)).ok)
215
- return { ok: true, message: s.doctorLiveSkipped };
216
- // One call per distinct list id (the first entry wins), no retry.
217
- const seen = new Set();
218
- const lists = arr(obj(ctx.config).lists)
219
- .map(obj)
220
- .filter((l) => {
221
- if (!text(l.id) || seen.has(l.id))
222
- return false;
223
- seen.add(l.id);
224
- return true;
225
- });
226
- const problems = [];
227
- for (const [i, l] of lists.entries()) {
228
- const list = listLabel(l);
229
- let live;
230
- try {
231
- live = new Set((await probe.getListStatuses(l.id)).map(statusKey));
232
- }
233
- catch (e) {
234
- // C-CLK-7 passed in this run, so a 401/403 means ClickUp will not show this list.
235
- if (e instanceof ClickUpInitError && e.code === "AUTH") {
236
- problems.push(interpolate(s.doctorListInaccessible, { list, status: e.status ?? 401 }));
237
- continue;
238
- }
239
- problems.push(interpolate(s.doctorListUnreadable, { list, reason: reason(e) }));
240
- // A rate-limit answer would repeat for every list: stop, and say so once.
241
- if (e instanceof ClickUpInitError && e.code === "RATE_LIMIT") {
242
- const count = lists.length - i - 1;
243
- if (count > 0)
244
- problems.push(interpolate(s.doctorListsNotChecked, { count }));
245
- break;
246
- }
247
- continue;
248
- }
249
- const pins = obj(l.statuses);
250
- for (const role of ROLES) {
251
- const status = text(pins[role]);
252
- if (status && !live.has(statusKey(status))) {
253
- problems.push(interpolate(s.doctorStatusDrift, { list, status: pins[role], role }));
254
- }
255
- }
256
- }
257
- return verdict(problems, `pinned statuses exist in ${lists.length} list(s)`, "Re-run pm-tasks-clickup init to pin the current lists and statuses.");
258
- },
259
- };
260
- return [C_CLK_1, C_CLK_2, C_CLK_3, C_CLK_4, C_CLK_6, C_CLK_7, C_CLK_8];
261
- }
262
- /** The checks without a probe: the live checks are skipped. */
263
- export const ADAPTER_CHECKS = makeClickUpChecks();
264
- /** A read-only REST probe. The token only reaches init-api, which sends it as the header. */
265
- function restProbe(token) {
266
- let api;
267
- // Built on first use, so a malformed token fails C-CLK-7 instead of throwing here.
268
- const rest = () => (api ??= createRestInitApi(token));
269
- return {
270
- getWorkspaces: async () => rest().getWorkspaces(),
271
- getListStatuses: async (id) => (await rest().getListStatuses(id)).map((st) => st.status),
272
- };
273
- }
274
- /** `--json`, `--fix-hints-only`, `--config <path>` (default ./.clickup.json). Exits 1 on an error-severity failure. */
275
- export async function runDoctor({ argv }, deps = {}) {
276
- const i = argv.indexOf("--config");
277
- const configPath = path.resolve((i === -1 ? undefined : argv[i + 1]) || ".clickup.json");
278
- let config = {};
279
- try {
280
- config = JSON.parse(await readFile(configPath, "utf8"));
281
- }
282
- catch {
283
- // Missing or not JSON: C-CLK-1 reports which.
284
- }
285
- const read = async (rel) => JSON.parse(await readFile(path.join(ROOT, rel), "utf8"));
286
- let availableLocales;
287
- try {
288
- registerI18nRoot(I18N, path.join(ROOT, "i18n"));
289
- availableLocales = await listLocales(I18N);
290
- }
291
- catch {
292
- availableLocales = undefined; // never crash the doctor over locale discovery
293
- }
294
- const ctx = {
295
- tool: "clickup",
296
- configPath,
297
- config,
298
- manifest: (await read("manifest.json")),
299
- schema: await read("schemas/config.json"),
300
- auditLogPath: path.join(resolveDataDir("clickup"), "audit.log"),
301
- auditRotationMaxBytes: 10 * 1024 * 1024,
302
- availableLocales,
303
- };
304
- const token = readClickUpToken(deps.env ?? process.env);
305
- const probe = deps.probe ?? (token === undefined ? undefined : restProbe(token));
306
- const report = await runChecks(ctx, makeClickUpChecks(probe));
307
- const write = deps.write ?? ((t) => console.log(t));
308
- write(renderReport(report, {
309
- format: argv.includes("--json") ? "json" : "md",
310
- fixHintsOnly: argv.includes("--fix-hints-only"),
311
- }));
312
- const hasError = report.results.some((r) => !r.result.ok && r.check.severity === "error");
313
- (deps.exit ?? ((code) => process.exit(code)))(hasError ? 1 : 0);
314
- }
315
- //# sourceMappingURL=doctor-cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doctor-cli.js","sourceRoot":"","sources":["../src/doctor-cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAIL,SAAS,GACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,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,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,KAAK,CACH,YAAY,CAAC,MAAM,EAAE;QACnB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;QAC/C,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC;KAChD,CAAC,CACH,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IAC1F,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E,CAAC"}
package/dist/env.d.ts DELETED
@@ -1,6 +0,0 @@
1
- /** Environment input shared by `init` and `doctor`. The token is never logged or stored. */
2
- /** Trim, then drop ONE pair of matching surrounding quotes: `"x"` or `'x'` → `x`. */
3
- export declare function stripEnvQuotes(v: string): string;
4
- /** `CLICKUP_API_TOKEN`, unquoted and trimmed; undefined when unset or empty. */
5
- export declare function readClickUpToken(env?: NodeJS.ProcessEnv): string | undefined;
6
- //# sourceMappingURL=env.d.ts.map
package/dist/env.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,qFAAqF;AACrF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAGzF"}
package/dist/env.js DELETED
@@ -1,11 +0,0 @@
1
- /** Environment input shared by `init` and `doctor`. The token is never logged or stored. */
2
- /** Trim, then drop ONE pair of matching surrounding quotes: `"x"` or `'x'` → `x`. */
3
- export function stripEnvQuotes(v) {
4
- return v.trim().replace(/^(['"])(.*)\1$/, "$2");
5
- }
6
- /** `CLICKUP_API_TOKEN`, unquoted and trimmed; undefined when unset or empty. */
7
- export function readClickUpToken(env = process.env) {
8
- const token = stripEnvQuotes(env.CLICKUP_API_TOKEN ?? "").trim();
9
- return token === "" ? undefined : token;
10
- }
11
- //# sourceMappingURL=env.js.map
package/dist/env.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,qFAAqF;AACrF,MAAM,UAAU,cAAc,CAAC,CAAS;IACtC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,gBAAgB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACnE,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACjE,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAC1C,CAAC"}