ultra-jira-mcp 2.1.2

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 (239) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +167 -0
  3. package/build/auth/jira-client.d.ts +59 -0
  4. package/build/auth/jira-client.d.ts.map +1 -0
  5. package/build/auth/jira-client.js +267 -0
  6. package/build/auth/jira-client.js.map +1 -0
  7. package/build/cli/direct.d.ts +5 -0
  8. package/build/cli/direct.d.ts.map +1 -0
  9. package/build/cli/direct.js +47 -0
  10. package/build/cli/direct.js.map +1 -0
  11. package/build/cli/index.d.ts +3 -0
  12. package/build/cli/index.d.ts.map +1 -0
  13. package/build/cli/index.js +27 -0
  14. package/build/cli/index.js.map +1 -0
  15. package/build/cli/install-skill.d.ts +10 -0
  16. package/build/cli/install-skill.d.ts.map +1 -0
  17. package/build/cli/install-skill.js +100 -0
  18. package/build/cli/install-skill.js.map +1 -0
  19. package/build/codeapi/boot.d.ts +16 -0
  20. package/build/codeapi/boot.d.ts.map +1 -0
  21. package/build/codeapi/boot.js +53 -0
  22. package/build/codeapi/boot.js.map +1 -0
  23. package/build/codeapi/bridge.d.ts +15 -0
  24. package/build/codeapi/bridge.d.ts.map +1 -0
  25. package/build/codeapi/bridge.js +59 -0
  26. package/build/codeapi/bridge.js.map +1 -0
  27. package/build/codeapi/generator.d.ts +22 -0
  28. package/build/codeapi/generator.d.ts.map +1 -0
  29. package/build/codeapi/generator.js +106 -0
  30. package/build/codeapi/generator.js.map +1 -0
  31. package/build/codeapi/templates.d.ts +17 -0
  32. package/build/codeapi/templates.d.ts.map +1 -0
  33. package/build/codeapi/templates.js +296 -0
  34. package/build/codeapi/templates.js.map +1 -0
  35. package/build/codeapi/tool.d.ts +6 -0
  36. package/build/codeapi/tool.d.ts.map +1 -0
  37. package/build/codeapi/tool.js +66 -0
  38. package/build/codeapi/tool.js.map +1 -0
  39. package/build/config.d.ts +18 -0
  40. package/build/config.d.ts.map +1 -0
  41. package/build/config.js +124 -0
  42. package/build/config.js.map +1 -0
  43. package/build/core/adf.d.ts +14 -0
  44. package/build/core/adf.d.ts.map +1 -0
  45. package/build/core/adf.js +289 -0
  46. package/build/core/adf.js.map +1 -0
  47. package/build/core/attachments.d.ts +28 -0
  48. package/build/core/attachments.d.ts.map +1 -0
  49. package/build/core/attachments.js +150 -0
  50. package/build/core/attachments.js.map +1 -0
  51. package/build/core/http.d.ts +24 -0
  52. package/build/core/http.d.ts.map +1 -0
  53. package/build/core/http.js +110 -0
  54. package/build/core/http.js.map +1 -0
  55. package/build/core/lru.d.ts +18 -0
  56. package/build/core/lru.d.ts.map +1 -0
  57. package/build/core/lru.js +57 -0
  58. package/build/core/lru.js.map +1 -0
  59. package/build/core/manifest.d.ts +19 -0
  60. package/build/core/manifest.d.ts.map +1 -0
  61. package/build/core/manifest.js +99 -0
  62. package/build/core/manifest.js.map +1 -0
  63. package/build/core/operations.d.ts +3 -0
  64. package/build/core/operations.d.ts.map +1 -0
  65. package/build/core/operations.js +1028 -0
  66. package/build/core/operations.js.map +1 -0
  67. package/build/core/sandbox.d.ts +9 -0
  68. package/build/core/sandbox.d.ts.map +1 -0
  69. package/build/core/sandbox.js +17 -0
  70. package/build/core/sandbox.js.map +1 -0
  71. package/build/core/tenant-cache.d.ts +4 -0
  72. package/build/core/tenant-cache.d.ts.map +1 -0
  73. package/build/core/tenant-cache.js +53 -0
  74. package/build/core/tenant-cache.js.map +1 -0
  75. package/build/core/trim-registry.d.ts +15 -0
  76. package/build/core/trim-registry.d.ts.map +1 -0
  77. package/build/core/trim-registry.js +25 -0
  78. package/build/core/trim-registry.js.map +1 -0
  79. package/build/core/trim.d.ts +105 -0
  80. package/build/core/trim.d.ts.map +1 -0
  81. package/build/core/trim.js +147 -0
  82. package/build/core/trim.js.map +1 -0
  83. package/build/index.d.ts +3 -0
  84. package/build/index.d.ts.map +1 -0
  85. package/build/index.js +161 -0
  86. package/build/index.js.map +1 -0
  87. package/build/resources/index.d.ts +21 -0
  88. package/build/resources/index.d.ts.map +1 -0
  89. package/build/resources/index.js +99 -0
  90. package/build/resources/index.js.map +1 -0
  91. package/build/tools/attachments.d.ts +27 -0
  92. package/build/tools/attachments.d.ts.map +1 -0
  93. package/build/tools/attachments.js +98 -0
  94. package/build/tools/attachments.js.map +1 -0
  95. package/build/tools/boards.d.ts +205 -0
  96. package/build/tools/boards.d.ts.map +1 -0
  97. package/build/tools/boards.js +308 -0
  98. package/build/tools/boards.js.map +1 -0
  99. package/build/tools/comments.d.ts +134 -0
  100. package/build/tools/comments.d.ts.map +1 -0
  101. package/build/tools/comments.js +207 -0
  102. package/build/tools/comments.js.map +1 -0
  103. package/build/tools/epics.d.ts +107 -0
  104. package/build/tools/epics.d.ts.map +1 -0
  105. package/build/tools/epics.js +139 -0
  106. package/build/tools/epics.js.map +1 -0
  107. package/build/tools/fields.d.ts +59 -0
  108. package/build/tools/fields.d.ts.map +1 -0
  109. package/build/tools/fields.js +134 -0
  110. package/build/tools/fields.js.map +1 -0
  111. package/build/tools/filters.d.ts +233 -0
  112. package/build/tools/filters.d.ts.map +1 -0
  113. package/build/tools/filters.js +273 -0
  114. package/build/tools/filters.js.map +1 -0
  115. package/build/tools/groups.d.ts +109 -0
  116. package/build/tools/groups.d.ts.map +1 -0
  117. package/build/tools/groups.js +146 -0
  118. package/build/tools/groups.js.map +1 -0
  119. package/build/tools/index.d.ts +23 -0
  120. package/build/tools/index.d.ts.map +1 -0
  121. package/build/tools/index.js +138 -0
  122. package/build/tools/index.js.map +1 -0
  123. package/build/tools/issue-links.d.ts +61 -0
  124. package/build/tools/issue-links.d.ts.map +1 -0
  125. package/build/tools/issue-links.js +139 -0
  126. package/build/tools/issue-links.js.map +1 -0
  127. package/build/tools/issues.d.ts +421 -0
  128. package/build/tools/issues.d.ts.map +1 -0
  129. package/build/tools/issues.js +479 -0
  130. package/build/tools/issues.js.map +1 -0
  131. package/build/tools/projects.d.ts +353 -0
  132. package/build/tools/projects.d.ts.map +1 -0
  133. package/build/tools/projects.js +457 -0
  134. package/build/tools/projects.js.map +1 -0
  135. package/build/tools/search.d.ts +60 -0
  136. package/build/tools/search.d.ts.map +1 -0
  137. package/build/tools/search.js +103 -0
  138. package/build/tools/search.js.map +1 -0
  139. package/build/tools/server.d.ts +12 -0
  140. package/build/tools/server.d.ts.map +1 -0
  141. package/build/tools/server.js +23 -0
  142. package/build/tools/server.js.map +1 -0
  143. package/build/tools/sprints.d.ts +269 -0
  144. package/build/tools/sprints.d.ts.map +1 -0
  145. package/build/tools/sprints.js +318 -0
  146. package/build/tools/sprints.js.map +1 -0
  147. package/build/tools/users.d.ts +134 -0
  148. package/build/tools/users.d.ts.map +1 -0
  149. package/build/tools/users.js +183 -0
  150. package/build/tools/users.js.map +1 -0
  151. package/build/tools/v2/attachment.d.ts +3 -0
  152. package/build/tools/v2/attachment.d.ts.map +1 -0
  153. package/build/tools/v2/attachment.js +25 -0
  154. package/build/tools/v2/attachment.js.map +1 -0
  155. package/build/tools/v2/board.d.ts +3 -0
  156. package/build/tools/v2/board.d.ts.map +1 -0
  157. package/build/tools/v2/board.js +64 -0
  158. package/build/tools/v2/board.js.map +1 -0
  159. package/build/tools/v2/comment.d.ts +3 -0
  160. package/build/tools/v2/comment.d.ts.map +1 -0
  161. package/build/tools/v2/comment.js +41 -0
  162. package/build/tools/v2/comment.js.map +1 -0
  163. package/build/tools/v2/dispatcher.d.ts +19 -0
  164. package/build/tools/v2/dispatcher.d.ts.map +1 -0
  165. package/build/tools/v2/dispatcher.js +255 -0
  166. package/build/tools/v2/dispatcher.js.map +1 -0
  167. package/build/tools/v2/epic.d.ts +3 -0
  168. package/build/tools/v2/epic.d.ts.map +1 -0
  169. package/build/tools/v2/epic.js +34 -0
  170. package/build/tools/v2/epic.js.map +1 -0
  171. package/build/tools/v2/field.d.ts +3 -0
  172. package/build/tools/v2/field.d.ts.map +1 -0
  173. package/build/tools/v2/field.js +26 -0
  174. package/build/tools/v2/field.js.map +1 -0
  175. package/build/tools/v2/filter.d.ts +3 -0
  176. package/build/tools/v2/filter.d.ts.map +1 -0
  177. package/build/tools/v2/filter.js +55 -0
  178. package/build/tools/v2/filter.js.map +1 -0
  179. package/build/tools/v2/group.d.ts +3 -0
  180. package/build/tools/v2/group.d.ts.map +1 -0
  181. package/build/tools/v2/group.js +40 -0
  182. package/build/tools/v2/group.js.map +1 -0
  183. package/build/tools/v2/index.d.ts +16 -0
  184. package/build/tools/v2/index.d.ts.map +1 -0
  185. package/build/tools/v2/index.js +121 -0
  186. package/build/tools/v2/index.js.map +1 -0
  187. package/build/tools/v2/issue.d.ts +3 -0
  188. package/build/tools/v2/issue.d.ts.map +1 -0
  189. package/build/tools/v2/issue.js +78 -0
  190. package/build/tools/v2/issue.js.map +1 -0
  191. package/build/tools/v2/link.d.ts +3 -0
  192. package/build/tools/v2/link.d.ts.map +1 -0
  193. package/build/tools/v2/link.js +29 -0
  194. package/build/tools/v2/link.js.map +1 -0
  195. package/build/tools/v2/project.d.ts +3 -0
  196. package/build/tools/v2/project.d.ts.map +1 -0
  197. package/build/tools/v2/project.js +101 -0
  198. package/build/tools/v2/project.js.map +1 -0
  199. package/build/tools/v2/search.d.ts +3 -0
  200. package/build/tools/v2/search.d.ts.map +1 -0
  201. package/build/tools/v2/search.js +43 -0
  202. package/build/tools/v2/search.js.map +1 -0
  203. package/build/tools/v2/server.d.ts +3 -0
  204. package/build/tools/v2/server.d.ts.map +1 -0
  205. package/build/tools/v2/server.js +13 -0
  206. package/build/tools/v2/server.js.map +1 -0
  207. package/build/tools/v2/sprint.d.ts +3 -0
  208. package/build/tools/v2/sprint.d.ts.map +1 -0
  209. package/build/tools/v2/sprint.js +67 -0
  210. package/build/tools/v2/sprint.js.map +1 -0
  211. package/build/tools/v2/user.d.ts +3 -0
  212. package/build/tools/v2/user.d.ts.map +1 -0
  213. package/build/tools/v2/user.js +48 -0
  214. package/build/tools/v2/user.js.map +1 -0
  215. package/build/tools/v2/watcher.d.ts +3 -0
  216. package/build/tools/v2/watcher.d.ts.map +1 -0
  217. package/build/tools/v2/watcher.js +31 -0
  218. package/build/tools/v2/watcher.js.map +1 -0
  219. package/build/tools/v2/worklog.d.ts +3 -0
  220. package/build/tools/v2/worklog.d.ts.map +1 -0
  221. package/build/tools/v2/worklog.js +55 -0
  222. package/build/tools/v2/worklog.js.map +1 -0
  223. package/build/tools/watchers.d.ts +35 -0
  224. package/build/tools/watchers.d.ts.map +1 -0
  225. package/build/tools/watchers.js +156 -0
  226. package/build/tools/watchers.js.map +1 -0
  227. package/build/tools/worklogs.d.ts +167 -0
  228. package/build/tools/worklogs.d.ts.map +1 -0
  229. package/build/tools/worklogs.js +266 -0
  230. package/build/tools/worklogs.js.map +1 -0
  231. package/build/types/jira.d.ts +337 -0
  232. package/build/types/jira.d.ts.map +1 -0
  233. package/build/types/jira.js +3 -0
  234. package/build/types/jira.js.map +1 -0
  235. package/build/types/refs.d.ts +14 -0
  236. package/build/types/refs.d.ts.map +1 -0
  237. package/build/types/refs.js +10 -0
  238. package/build/types/refs.js.map +1 -0
  239. package/package.json +52 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-skill.d.ts","sourceRoot":"","sources":["../../src/cli/install-skill.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAC;AAatC,eAAO,MAAM,aAAa,0nEA0DzB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAI/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAIhB,KAAK,CAAC,EAAE,OAAO,CAAC;IAIhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAMnC,wBAAsB,YAAY,CAChC,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CAQ7B"}
@@ -0,0 +1,100 @@
1
+ // `jira-cli install-skill` — write a Claude Code skill that teaches
2
+ // the agent how to call this CLI.
3
+ //
4
+ // Without a skill the agent has no in-band way to discover that the
5
+ // CLI exists in standalone (no-MCP) deployments. The MCP path
6
+ // teaches the agent via the `jira_code_api` tool's response; the
7
+ // standalone path needs an out-of-band hint, and a skill is the
8
+ // idiomatic shape — loaded on demand by the harness when the user
9
+ // mentions Jira, rather than burning context every session like a
10
+ // CLAUDE.md entry would.
11
+ //
12
+ // The subcommand is intentionally small: render a fixed SKILL.md
13
+ // string to ~/.claude/skills/jira/SKILL.md, refusing to overwrite
14
+ // unless --force is passed. --print dumps to stdout for users who
15
+ // want to inspect or hand-place the file.
16
+ import { installSkill as toolkitInstallSkill, } from "@scottlepper/mcp-toolkit/cli";
17
+ // SKILL.md body. The trigger description is deliberately conservative:
18
+ // "explicit mention of Jira / JQL / ticket lookup" rather than "any
19
+ // PROJ-123 sighting" — non-Jira codebases use ticket-shaped strings
20
+ // for unrelated identifiers, and false-positive activations are more
21
+ // annoying than missed ones.
22
+ //
23
+ // The body teaches the *shape* of the CLI, not the operations:
24
+ // `jira-cli --help` is the source of truth for the operation list,
25
+ // and re-listing it here would rot fast. Naming a few common ops
26
+ // keeps first-call discovery cheap without setting up a maintenance
27
+ // burden.
28
+ export const SKILL_CONTENT = `---
29
+ name: jira
30
+ description: >-
31
+ Query Jira tickets, comments, sprints, boards, and JQL searches via the
32
+ bundled jira-cli shell binary. Use when the user mentions Jira/JIRA,
33
+ asks to look up a ticket by key, references JQL, or asks about sprint
34
+ or board state.
35
+ ---
36
+ # Jira CLI
37
+
38
+ Query Jira from the shell via \`jira-cli\`. Run it with \`npx\`:
39
+
40
+ \`\`\`bash
41
+ npx -y -p github:scottlepp/ultra-jira-mcp#codeapi jira-cli <op> [--flag=value ...]
42
+ \`\`\`
43
+
44
+ ## First call in a session
45
+
46
+ Run \`jira-cli --help\` once to see every operation. The list is stable
47
+ across calls — don't re-fetch it on every Jira task.
48
+
49
+ For a specific operation's flags: \`jira-cli <op> --help\`.
50
+
51
+ ## Common operations
52
+
53
+ - \`issue.get --issueIdOrKey=KEY-123\` — fetch one ticket
54
+ - \`search.issues --jql='project = PROJ ORDER BY updated DESC' --fields=summary,status --maxResults=10\` — JQL search
55
+ - \`comment.list --issueIdOrKey=KEY-123 --maxResults=100\` — list comments
56
+ - \`issue.create --summary='...' --projectKey=PROJ --issueType=Task\` — create a ticket
57
+
58
+ ## Subtasks
59
+
60
+ Subtasks aren't a JQL link type. To find children of KEY-123, use
61
+ \`parent = "KEY-123"\` in JQL on \`search.issues\`. The parent's own
62
+ \`fields.subtasks\` array (visible in \`issue.get\`'s response) is also fine.
63
+
64
+ ## Output shape
65
+
66
+ Every successful call prints:
67
+
68
+ 1. A trimmed summary as JSON on stdout (the fields agents usually need —
69
+ key, summary, status, description, etc.)
70
+ 2. A final line of the form \`ref: /path/to/full.json\` pointing at the
71
+ complete untrimmed Jira response on disk. \`cat\` that file when the
72
+ summary leaves out detail you need.
73
+
74
+ ## Credentials
75
+
76
+ The CLI reads \`JIRA_HOST\`, \`JIRA_EMAIL\`, and \`JIRA_API_TOKEN\` from its
77
+ own environment (or a \`.env.local\` in the cwd). The agent never sees
78
+ these — the user exports them in their shell once. If a call fails with
79
+ "Missing required environment variables", ask the user to set them; do
80
+ not put them on the command line.
81
+
82
+ ## Disabled actions
83
+
84
+ \`JIRA_DISABLED_ACTIONS\` (e.g. \`issue.delete,project.delete\`) is honored
85
+ end-to-end. Calls to disabled operations error before any HTTP request.
86
+ `;
87
+ // Wraps the toolkit's generic skill installer with the Jira slug + the
88
+ // local SKILL_CONTENT pre-baked. Public surface unchanged so the test
89
+ // continues to call `installSkill({ targetDir })` and assert on
90
+ // SKILL_CONTENT roundtrip.
91
+ export async function installSkill(opts = {}) {
92
+ return toolkitInstallSkill({
93
+ content: SKILL_CONTENT,
94
+ slug: "jira",
95
+ force: opts.force,
96
+ print: opts.print,
97
+ targetDir: opts.targetDir,
98
+ });
99
+ }
100
+ //# sourceMappingURL=install-skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-skill.js","sourceRoot":"","sources":["../../src/cli/install-skill.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,kCAAkC;AAClC,EAAE;AACF,oEAAoE;AACpE,8DAA8D;AAC9D,iEAAiE;AACjE,gEAAgE;AAChE,kEAAkE;AAClE,kEAAkE;AAClE,yBAAyB;AACzB,EAAE;AACF,iEAAiE;AACjE,kEAAkE;AAClE,kEAAkE;AAClE,0CAA0C;AAE1C,OAAO,EACL,YAAY,IAAI,mBAAmB,GAEpC,MAAM,8BAA8B,CAAC;AAEtC,uEAAuE;AACvE,oEAAoE;AACpE,oEAAoE;AACpE,qEAAqE;AACrE,6BAA6B;AAC7B,EAAE;AACF,+DAA+D;AAC/D,mEAAmE;AACnE,iEAAiE;AACjE,oEAAoE;AACpE,UAAU;AACV,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D5B,CAAC;AAmBF,uEAAuE;AACvE,sEAAsE;AACtE,gEAAgE;AAChE,2BAA2B;AAC3B,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAyB,EAAE;IAE3B,OAAO,mBAAmB,CAAC;QACzB,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { JiraClient } from "../auth/jira-client.js";
2
+ import { type BridgeServer } from "./bridge.js";
3
+ import type { CodeApiToolContext } from "./tool.js";
4
+ export declare function defaultCliPath(): string;
5
+ export interface BootedCodeApi {
6
+ bridge: BridgeServer;
7
+ ctx: CodeApiToolContext;
8
+ }
9
+ export interface BootCodeApiOpts {
10
+ client: JiraClient;
11
+ disabledActions?: readonly string[];
12
+ cliPath?: string;
13
+ cleanupSessions?: boolean;
14
+ }
15
+ export declare function bootCodeApi(opts: BootCodeApiOpts): Promise<BootedCodeApi>;
16
+ //# sourceMappingURL=boot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/codeapi/boot.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAMpD,wBAAgB,cAAc,IAAI,MAAM,CAGvC;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,EAAE,kBAAkB,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,UAAU,CAAC;IAInB,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEpC,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,aAAa,CAAC,CAyBxB"}
@@ -0,0 +1,53 @@
1
+ // Code-api startup glue.
2
+ //
3
+ // Three steps wrap together at server boot in code-api mode:
4
+ //
5
+ // 1. Sweep stale session dirs (>24h old) under the cache root.
6
+ // 2. Resolve the bundled `jira-cli` binary path relative to this
7
+ // compiled module's location.
8
+ // 3. Start the IPC bridge and publish its socket address in
9
+ // `JIRA_MCP_SOCKET` so any subprocess (Claude Code's Bash, a
10
+ // direct `jira-cli` invocation) inherits it without manual setup.
11
+ //
12
+ // The toolkit ships a `bootCodeApi` helper that does steps (1) and (3)
13
+ // generically, but jira-mcp's bridge needs an explicit socket-prefix
14
+ // override (preserving the v2 `jmcp-<hash>.sock` filename) that the
15
+ // toolkit's helper doesn't surface. So we orchestrate the steps
16
+ // ourselves and call jira-mcp's own `startBridge`, which handles the
17
+ // prefix and the agile-vs-platform routing executor.
18
+ import * as path from "node:path";
19
+ import { fileURLToPath } from "node:url";
20
+ import { operations } from "../core/operations.js";
21
+ import { jiraSandbox } from "../core/sandbox.js";
22
+ import { startBridge } from "./bridge.js";
23
+ // Resolves to build/cli/index.js at runtime. This module compiles to
24
+ // build/codeapi/boot.js, so "../cli/index.js" lands at build/cli/index.js.
25
+ // The CLI is what code-api mode hands to the agent — a single
26
+ // shell-callable binary that talks to the bridge over JIRA_MCP_SOCKET.
27
+ export function defaultCliPath() {
28
+ const here = path.dirname(fileURLToPath(import.meta.url));
29
+ return path.join(here, "..", "cli", "index.js");
30
+ }
31
+ export async function bootCodeApi(opts) {
32
+ if (opts.cleanupSessions !== false) {
33
+ await jiraSandbox.cleanupStaleSessions().catch(() => {
34
+ // Best-effort. Permission failures on a stale dir shouldn't
35
+ // block startup.
36
+ });
37
+ }
38
+ const cliPath = opts.cliPath ?? defaultCliPath();
39
+ const bridge = await startBridge({
40
+ manifest: operations,
41
+ client: opts.client,
42
+ disabledActions: opts.disabledActions,
43
+ });
44
+ // Place the socket in the *server* env so any subprocess (Claude
45
+ // Code's Bash tool, a direct jira-cli invocation) inherits it
46
+ // without the user having to configure anything.
47
+ process.env.JIRA_MCP_SOCKET = bridge.address;
48
+ return {
49
+ bridge,
50
+ ctx: { cliPath, socketAddress: bridge.address },
51
+ };
52
+ }
53
+ //# sourceMappingURL=boot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot.js","sourceRoot":"","sources":["../../src/codeapi/boot.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,EAAE;AACF,6DAA6D;AAC7D,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,mCAAmC;AACnC,8DAA8D;AAC9D,kEAAkE;AAClE,uEAAuE;AACvE,EAAE;AACF,uEAAuE;AACvE,qEAAqE;AACrE,oEAAoE;AACpE,gEAAgE;AAChE,qEAAqE;AACrE,qDAAqD;AAErD,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@ -0,0 +1,15 @@
1
+ import { type BridgeAddress, type BridgeServer } from "@scottlepper/mcp-toolkit/bridge";
2
+ import type { JiraClient } from "../auth/jira-client.js";
3
+ import { type Manifest } from "../core/manifest.js";
4
+ import type { SandboxResult } from "../types/refs.js";
5
+ export type { BridgeAddress, BridgeServer };
6
+ export declare function defaultBridgeAddress(): BridgeAddress;
7
+ export interface StartBridgeOpts {
8
+ manifest: Manifest;
9
+ client: JiraClient;
10
+ address?: BridgeAddress;
11
+ disabledActions?: readonly string[];
12
+ }
13
+ export declare function startBridge(opts: StartBridgeOpts): Promise<BridgeServer>;
14
+ export declare function invokeAndSandbox(manifest: Manifest, client: JiraClient, operation: string, args: Record<string, unknown>, disabledActions?: readonly string[]): Promise<SandboxResult<unknown>>;
15
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/codeapi/bridge.ts"],"names":[],"mappings":"AAmBA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;AAO5C,wBAAgB,oBAAoB,IAAI,aAAa,CAKpD;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,YAAY,CAAC,CAavB;AAID,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,GAClC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAYjC"}
@@ -0,0 +1,59 @@
1
+ // Jira-specific bridge wrapper around the toolkit's IPC primitives.
2
+ //
3
+ // All socket handling, wire format, connection lifecycle, and the
4
+ // invoke→sandbox dispatch loop live in
5
+ // `@scottlepper/mcp-toolkit/bridge`. This module:
6
+ //
7
+ // 1. Pins the address to a `jmcp-<hash>.sock` filename under
8
+ // ${TMPDIR} when the session-cache path is too long for
9
+ // sockaddr_un (preserves the v2 socket prefix).
10
+ // 2. Injects the Jira sandbox + trim registry + agile-routing
11
+ // execute hook so the toolkit's dispatcher routes platform vs
12
+ // agile correctly.
13
+ // 3. Pre-checks `JIRA_DISABLED_ACTIONS` inside the executor so the
14
+ // OperationError names the env var users actually need to edit
15
+ // (the toolkit's generic check would throw "Operation X is
16
+ // disabled." with no hint).
17
+ // 4. Keeps the v2 positional `invokeAndSandbox` signature so
18
+ // `cli/direct.ts` and the bridge tests don't need to change.
19
+ import { startBridge as toolkitStartBridge, invokeAndSandbox as toolkitInvokeAndSandbox, defaultBridgeAddress as toolkitDefaultBridgeAddress, } from "@scottlepper/mcp-toolkit/bridge";
20
+ import { makeJiraExecutor } from "../core/manifest.js";
21
+ import { jiraSandbox } from "../core/sandbox.js";
22
+ import { trimRegistry } from "../core/trim-registry.js";
23
+ // Defaults the socket path under the current session cache dir.
24
+ // `socketPrefix: "jmcp"` preserves the v2 fallback filename so any
25
+ // external tooling watching `${TMPDIR}/jmcp-*.sock` still finds us
26
+ // when the preferred in-session path exceeds sockaddr_un's limit on
27
+ // macOS.
28
+ export function defaultBridgeAddress() {
29
+ return toolkitDefaultBridgeAddress({
30
+ sessionCacheDir: jiraSandbox.sessionCacheDir(),
31
+ socketPrefix: "jmcp",
32
+ });
33
+ }
34
+ export async function startBridge(opts) {
35
+ return toolkitStartBridge({
36
+ manifest: opts.manifest,
37
+ client: opts.client,
38
+ sandbox: jiraSandbox,
39
+ trimRegistry,
40
+ address: opts.address ?? defaultBridgeAddress(),
41
+ // Disabled-action enforcement lives inside the executor so the
42
+ // OperationError mentions JIRA_DISABLED_ACTIONS. We deliberately
43
+ // do not pass disabledActions to the toolkit (its check would run
44
+ // first and throw a generic message).
45
+ execute: makeJiraExecutor(opts.disabledActions),
46
+ });
47
+ }
48
+ // Positional-signature wrapper preserved for `cli/direct.ts` (which
49
+ // dispatches without the bridge running) and the bridge tests.
50
+ export async function invokeAndSandbox(manifest, client, operation, args, disabledActions) {
51
+ return toolkitInvokeAndSandbox({
52
+ manifest,
53
+ client,
54
+ sandbox: jiraSandbox,
55
+ trimRegistry,
56
+ execute: makeJiraExecutor(disabledActions),
57
+ }, operation, args);
58
+ }
59
+ //# sourceMappingURL=bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../src/codeapi/bridge.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,kEAAkE;AAClE,uCAAuC;AACvC,kDAAkD;AAClD,EAAE;AACF,+DAA+D;AAC/D,6DAA6D;AAC7D,qDAAqD;AACrD,gEAAgE;AAChE,mEAAmE;AACnE,wBAAwB;AACxB,qEAAqE;AACrE,oEAAoE;AACpE,gEAAgE;AAChE,iCAAiC;AACjC,+DAA+D;AAC/D,kEAAkE;AAElE,OAAO,EACL,WAAW,IAAI,kBAAkB,EACjC,gBAAgB,IAAI,uBAAuB,EAC3C,oBAAoB,IAAI,2BAA2B,GAGpD,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAiB,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKxD,gEAAgE;AAChE,mEAAmE;AACnE,mEAAmE;AACnE,oEAAoE;AACpE,SAAS;AACT,MAAM,UAAU,oBAAoB;IAClC,OAAO,2BAA2B,CAAC;QACjC,eAAe,EAAE,WAAW,CAAC,eAAe,EAAE;QAC9C,YAAY,EAAE,MAAM;KACrB,CAAC,CAAC;AACL,CAAC;AASD,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,IAAqB;IAErB,OAAO,kBAAkB,CAAC;QACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,OAAO,EAAE,WAAW;QACpB,YAAY;QACZ,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,oBAAoB,EAAE;QAC/C,+DAA+D;QAC/D,iEAAiE;QACjE,kEAAkE;QAClE,sCAAsC;QACtC,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,eAAe,CAAC;KAChD,CAAC,CAAC;AACL,CAAC;AAED,oEAAoE;AACpE,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,QAAkB,EAClB,MAAkB,EAClB,SAAiB,EACjB,IAA6B,EAC7B,eAAmC;IAEnC,OAAO,uBAAuB,CAC5B;QACE,QAAQ;QACR,MAAM;QACN,OAAO,EAAE,WAAW;QACpB,YAAY;QACZ,OAAO,EAAE,gBAAgB,CAAC,eAAe,CAAC;KAC3C,EACD,SAAS,EACT,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { Manifest } from "../core/manifest.js";
2
+ export interface GenerateApiOptions {
3
+ manifest: Manifest;
4
+ outDir: string;
5
+ }
6
+ export interface GeneratedFile {
7
+ path: string;
8
+ size: number;
9
+ }
10
+ export interface GenerateApiResult {
11
+ outDir: string;
12
+ files: GeneratedFile[];
13
+ operationCount: number;
14
+ categories: string[];
15
+ }
16
+ export interface PlannedFile {
17
+ relativePath: string;
18
+ contents: string;
19
+ }
20
+ export declare function planApi(manifest: Manifest): PlannedFile[];
21
+ export declare function generateApi(opts: GenerateApiOptions): Promise<GenerateApiResult>;
22
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/codeapi/generator.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,QAAQ,EAAa,MAAM,qBAAqB,CAAC;AAW/D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,QAAQ,CAAC;IAInB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAE5B,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAqBD,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,EAAE,CAmDzD;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,iBAAiB,CAAC,CA6B5B"}
@@ -0,0 +1,106 @@
1
+ // Code-API generator.
2
+ //
3
+ // Walks the manifest and emits one TypeScript stub per operation
4
+ // under `${outDir}/`. Output is deterministic: same manifest +
5
+ // same outDir = byte-identical files. That property lets us
6
+ // golden-snapshot the result in tests.
7
+ //
8
+ // Run at npm run build time by scripts/build-api.ts; the resulting
9
+ // build/api/ directory ships in the npm package and is what
10
+ // code-api mode hands to the agent at runtime. Earlier versions
11
+ // generated per session at MCP-server startup; that's no longer
12
+ // necessary now that types.ts is self-contained (no install-path
13
+ // dependency).
14
+ import * as fsp from "node:fs/promises";
15
+ import * as path from "node:path";
16
+ import { renderCategoryIndex, renderClientFile, renderRootIndex, renderStub, renderTypesFile, splitOperationName, } from "./templates.js";
17
+ // Group operations by their category prefix. Returns a Map so iteration
18
+ // order is stable (insertion-ordered by first occurrence in the manifest).
19
+ function groupByCategory(manifest) {
20
+ const groups = new Map();
21
+ for (const op of manifest) {
22
+ const { category } = splitOperationName(op.name);
23
+ const existing = groups.get(category);
24
+ if (existing) {
25
+ existing.push(op);
26
+ }
27
+ else {
28
+ groups.set(category, [op]);
29
+ }
30
+ }
31
+ return groups;
32
+ }
33
+ export function planApi(manifest) {
34
+ const groups = groupByCategory(manifest);
35
+ const out = [];
36
+ // Static support files first so they appear at the top of any
37
+ // sorted listing — easier on humans browsing the directory.
38
+ out.push({ relativePath: "_client.ts", contents: renderClientFile() });
39
+ out.push({
40
+ relativePath: "types.ts",
41
+ contents: renderTypesFile(),
42
+ });
43
+ out.push({
44
+ relativePath: "index.ts",
45
+ contents: renderRootIndex([...groups.keys()]),
46
+ });
47
+ // Track stub paths so we fail loudly on a manifest where two
48
+ // operations would emit to the same file. Today's manifest has no
49
+ // collisions, but a future entry like a second "issue.get" (perhaps
50
+ // imported from a different category split) would silently shadow
51
+ // the first one without this check — and the integration test that
52
+ // counts plan entries would still pass, since one stub gets emitted
53
+ // per operation either way.
54
+ const stubPaths = new Map();
55
+ for (const [category, ops] of groups) {
56
+ out.push({
57
+ relativePath: `${category}/index.ts`,
58
+ contents: renderCategoryIndex(category, ops),
59
+ });
60
+ for (const op of ops) {
61
+ const stub = renderStub(op);
62
+ const collidesWith = stubPaths.get(stub.relativePath);
63
+ if (collidesWith) {
64
+ throw new Error(`Operation '${op.name}' would overwrite stub for '${collidesWith}' at ${stub.relativePath}. ` +
65
+ `Two operations cannot share the same category/verb path.`);
66
+ }
67
+ stubPaths.set(stub.relativePath, op.name);
68
+ out.push({
69
+ relativePath: stub.relativePath,
70
+ contents: stub.contents,
71
+ });
72
+ }
73
+ }
74
+ // Sort the result so the planning output is order-stable regardless
75
+ // of category insertion order. Keeps golden snapshots small and
76
+ // diffable.
77
+ out.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
78
+ return out;
79
+ }
80
+ export async function generateApi(opts) {
81
+ const planned = planApi(opts.manifest);
82
+ const written = [];
83
+ // Create directories breadth-first so we don't redundantly mkdir for
84
+ // every stub in a category. Tracking via a Set keeps it cheap.
85
+ const ensuredDirs = new Set();
86
+ ensuredDirs.add(opts.outDir);
87
+ await fsp.mkdir(opts.outDir, { recursive: true });
88
+ for (const file of planned) {
89
+ const abs = path.join(opts.outDir, file.relativePath);
90
+ const dir = path.dirname(abs);
91
+ if (!ensuredDirs.has(dir)) {
92
+ await fsp.mkdir(dir, { recursive: true });
93
+ ensuredDirs.add(dir);
94
+ }
95
+ await fsp.writeFile(abs, file.contents, "utf8");
96
+ written.push({ path: abs, size: Buffer.byteLength(file.contents, "utf8") });
97
+ }
98
+ const categories = [...groupByCategory(opts.manifest).keys()].sort();
99
+ return {
100
+ outDir: opts.outDir,
101
+ files: written,
102
+ operationCount: opts.manifest.length,
103
+ categories,
104
+ };
105
+ }
106
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/codeapi/generator.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,EAAE;AACF,iEAAiE;AACjE,+DAA+D;AAC/D,4DAA4D;AAC5D,uCAAuC;AACvC,EAAE;AACF,mEAAmE;AACnE,4DAA4D;AAC5D,gEAAgE;AAChE,gEAAgE;AAChE,iEAAiE;AACjE,eAAe;AAEf,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,eAAe,EACf,kBAAkB,GAEnB,MAAM,gBAAgB,CAAC;AAwBxB,wEAAwE;AACxE,2EAA2E;A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C,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAElD,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACtD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC1C,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;QACD,MAAM,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,UAAU,GAAG,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAErE,OAAO;QACL,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,KAAK,EAAE,OAAO;QACd,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM;QACpC,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type Operation } from "../core/manifest.js";
2
+ export declare const GENERATED_BANNER = "// AUTO-GENERATED by jira-mcp Layer 3 code-api generator. Do not edit by hand.\n// Source of truth: src/core/operations.ts (manifest entries).";
3
+ export declare function splitOperationName(opName: string): {
4
+ category: string;
5
+ verb: string;
6
+ };
7
+ export declare function safeIdentifier(name: string): string;
8
+ export interface RenderedStub {
9
+ relativePath: string;
10
+ contents: string;
11
+ }
12
+ export declare function renderStub(op: Operation): RenderedStub;
13
+ export declare function renderCategoryIndex(category: string, operations: Operation[]): string;
14
+ export declare function renderRootIndex(categories: string[]): string;
15
+ export declare function renderTypesFile(): string;
16
+ export declare function renderClientFile(): string;
17
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/codeapi/templates.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,gBAAgB,mJAAmJ,CAAC;AAQjL,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAWA;AA8BD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD;AAsBD,MAAM,WAAW,YAAY;IAG3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAMD,wBAAgB,UAAU,CAAC,EAAE,EAAE,SAAS,GAAG,YAAY,CAiEtD;AAYD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,SAAS,EAAE,GACtB,MAAM,CAMR;AAQD,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAK5D;AAcD,wBAAgB,eAAe,IAAI,MAAM,CAexC;AAgBD,wBAAgB,gBAAgB,IAAI,MAAM,CA0FzC"}