@specship/specship-win32-arm64 0.13.0 → 0.14.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 (240) hide show
  1. package/lib/dist/bin/specship.js +180 -1
  2. package/lib/dist/bin/specship.js.map +1 -1
  3. package/lib/dist/jira/auth.d.ts +17 -0
  4. package/lib/dist/jira/auth.d.ts.map +1 -0
  5. package/lib/dist/jira/auth.js +33 -0
  6. package/lib/dist/jira/auth.js.map +1 -0
  7. package/lib/dist/jira/client.d.ts +120 -0
  8. package/lib/dist/jira/client.d.ts.map +1 -0
  9. package/lib/dist/jira/client.js +316 -0
  10. package/lib/dist/jira/client.js.map +1 -0
  11. package/lib/dist/jira/config.d.ts +45 -0
  12. package/lib/dist/jira/config.d.ts.map +1 -0
  13. package/lib/dist/jira/config.js +178 -0
  14. package/lib/dist/jira/config.js.map +1 -0
  15. package/lib/dist/jira/index.d.ts +8 -0
  16. package/lib/dist/jira/index.d.ts.map +1 -0
  17. package/lib/dist/jira/index.js +24 -0
  18. package/lib/dist/jira/index.js.map +1 -0
  19. package/lib/dist/jira/pull-request.d.ts +72 -0
  20. package/lib/dist/jira/pull-request.d.ts.map +1 -0
  21. package/lib/dist/jira/pull-request.js +127 -0
  22. package/lib/dist/jira/pull-request.js.map +1 -0
  23. package/lib/dist/jira/spec-generator.d.ts +34 -0
  24. package/lib/dist/jira/spec-generator.d.ts.map +1 -0
  25. package/lib/dist/jira/spec-generator.js +138 -0
  26. package/lib/dist/jira/spec-generator.js.map +1 -0
  27. package/lib/dist/jira/spec-writer.d.ts +36 -0
  28. package/lib/dist/jira/spec-writer.d.ts.map +1 -0
  29. package/lib/dist/jira/spec-writer.js +143 -0
  30. package/lib/dist/jira/spec-writer.js.map +1 -0
  31. package/lib/dist/jira/types.d.ts +174 -0
  32. package/lib/dist/jira/types.d.ts.map +1 -0
  33. package/lib/dist/jira/types.js +60 -0
  34. package/lib/dist/jira/types.js.map +1 -0
  35. package/lib/dist/mcp/jira-tools.d.ts +234 -0
  36. package/lib/dist/mcp/jira-tools.d.ts.map +1 -0
  37. package/lib/dist/mcp/jira-tools.js +787 -0
  38. package/lib/dist/mcp/jira-tools.js.map +1 -0
  39. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  40. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  41. package/lib/dist/mcp/server-instructions.js +10 -0
  42. package/lib/dist/mcp/server-instructions.js.map +1 -1
  43. package/lib/dist/mcp/tools.d.ts.map +1 -1
  44. package/lib/dist/mcp/tools.js +32 -0
  45. package/lib/dist/mcp/tools.js.map +1 -1
  46. package/lib/dist/server/cli.js +1 -1
  47. package/lib/dist/server/routes/sse.js +1 -1
  48. package/lib/dist/server/server.js +1 -1
  49. package/lib/dist/statusline/index.d.ts +19 -0
  50. package/lib/dist/statusline/index.d.ts.map +1 -1
  51. package/lib/dist/statusline/index.js +96 -3
  52. package/lib/dist/statusline/index.js.map +1 -1
  53. package/lib/dist/statusline/render.d.ts +24 -0
  54. package/lib/dist/statusline/render.d.ts.map +1 -1
  55. package/lib/dist/statusline/render.js +26 -5
  56. package/lib/dist/statusline/render.js.map +1 -1
  57. package/lib/dist/workflows/executor.d.ts +25 -1
  58. package/lib/dist/workflows/executor.d.ts.map +1 -1
  59. package/lib/dist/workflows/executor.js +28 -3
  60. package/lib/dist/workflows/executor.js.map +1 -1
  61. package/lib/node_modules/.package-lock.json +11 -20
  62. package/lib/node_modules/ajv/node_modules/fast-uri/index.js +1 -1
  63. package/lib/node_modules/ajv/node_modules/fast-uri/package.json +1 -1
  64. package/lib/node_modules/ajv/node_modules/fast-uri/test/security.test.js +28 -0
  65. package/lib/node_modules/toad-cache/README.md +10 -9
  66. package/lib/node_modules/toad-cache/dist/toad-cache.cjs +139 -139
  67. package/lib/node_modules/toad-cache/dist/toad-cache.mjs +136 -140
  68. package/lib/node_modules/toad-cache/package.json +8 -8
  69. package/lib/node_modules/toad-cache/toad-cache.d.cts +20 -14
  70. package/lib/node_modules/toad-cache/toad-cache.d.ts +18 -14
  71. package/lib/node_modules/yaml/README.md +14 -31
  72. package/lib/node_modules/yaml/browser/dist/compose/compose-collection.js +3 -3
  73. package/lib/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -1
  74. package/lib/node_modules/yaml/browser/dist/compose/compose-node.js +4 -21
  75. package/lib/node_modules/yaml/browser/dist/compose/compose-scalar.js +8 -14
  76. package/lib/node_modules/yaml/browser/dist/compose/composer.js +2 -4
  77. package/lib/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -2
  78. package/lib/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -3
  79. package/lib/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +2 -8
  80. package/lib/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +4 -6
  81. package/lib/node_modules/yaml/browser/dist/compose/resolve-props.js +5 -3
  82. package/lib/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +2 -1
  83. package/lib/node_modules/yaml/browser/dist/compose/util-map-includes.js +5 -1
  84. package/lib/node_modules/yaml/browser/dist/doc/Document.js +2 -3
  85. package/lib/node_modules/yaml/browser/dist/doc/anchors.js +2 -1
  86. package/lib/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -1
  87. package/lib/node_modules/yaml/browser/dist/doc/createNode.js +2 -1
  88. package/lib/node_modules/yaml/browser/dist/errors.js +1 -1
  89. package/lib/node_modules/yaml/browser/dist/log.js +6 -1
  90. package/lib/node_modules/yaml/browser/dist/node_modules/tslib/tslib.es6.js +21 -0
  91. package/lib/node_modules/yaml/browser/dist/nodes/Alias.js +12 -27
  92. package/lib/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
  93. package/lib/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +49 -8
  94. package/lib/node_modules/yaml/browser/dist/parse/lexer.js +24 -28
  95. package/lib/node_modules/yaml/browser/dist/parse/parser.js +8 -31
  96. package/lib/node_modules/yaml/browser/dist/public-api.js +0 -3
  97. package/lib/node_modules/yaml/browser/dist/schema/Schema.js +2 -1
  98. package/lib/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
  99. package/lib/node_modules/yaml/browser/dist/schema/tags.js +16 -29
  100. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +13 -5
  101. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
  102. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -2
  103. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
  104. package/lib/node_modules/yaml/browser/dist/stringify/stringify.js +5 -10
  105. package/lib/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +3 -13
  106. package/lib/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -3
  107. package/lib/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
  108. package/lib/node_modules/yaml/browser/dist/stringify/stringifyString.js +16 -24
  109. package/lib/node_modules/yaml/browser/dist/util.js +1 -1
  110. package/lib/node_modules/yaml/dist/cli.d.ts +1 -1
  111. package/lib/node_modules/yaml/dist/cli.mjs +3 -5
  112. package/lib/node_modules/yaml/dist/compose/compose-collection.d.ts +4 -4
  113. package/lib/node_modules/yaml/dist/compose/compose-collection.js +3 -3
  114. package/lib/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -6
  115. package/lib/node_modules/yaml/dist/compose/compose-doc.js +0 -1
  116. package/lib/node_modules/yaml/dist/compose/compose-node.d.ts +7 -8
  117. package/lib/node_modules/yaml/dist/compose/compose-node.js +4 -21
  118. package/lib/node_modules/yaml/dist/compose/compose-scalar.d.ts +4 -4
  119. package/lib/node_modules/yaml/dist/compose/compose-scalar.js +7 -13
  120. package/lib/node_modules/yaml/dist/compose/composer.d.ts +6 -7
  121. package/lib/node_modules/yaml/dist/compose/composer.js +3 -6
  122. package/lib/node_modules/yaml/dist/compose/resolve-block-map.d.ts +5 -5
  123. package/lib/node_modules/yaml/dist/compose/resolve-block-map.js +0 -2
  124. package/lib/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +5 -5
  125. package/lib/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -5
  126. package/lib/node_modules/yaml/dist/compose/resolve-block-seq.js +1 -3
  127. package/lib/node_modules/yaml/dist/compose/resolve-end.d.ts +2 -2
  128. package/lib/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -7
  129. package/lib/node_modules/yaml/dist/compose/resolve-flow-collection.js +2 -8
  130. package/lib/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +4 -4
  131. package/lib/node_modules/yaml/dist/compose/resolve-flow-scalar.js +4 -6
  132. package/lib/node_modules/yaml/dist/compose/resolve-props.d.ts +2 -2
  133. package/lib/node_modules/yaml/dist/compose/resolve-props.js +5 -3
  134. package/lib/node_modules/yaml/dist/compose/util-contains-newline.d.ts +1 -1
  135. package/lib/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +1 -1
  136. package/lib/node_modules/yaml/dist/compose/util-empty-scalar-position.js +2 -1
  137. package/lib/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +2 -2
  138. package/lib/node_modules/yaml/dist/compose/util-map-includes.d.ts +3 -3
  139. package/lib/node_modules/yaml/dist/compose/util-map-includes.js +5 -1
  140. package/lib/node_modules/yaml/dist/doc/Document.d.ts +11 -11
  141. package/lib/node_modules/yaml/dist/doc/Document.js +2 -3
  142. package/lib/node_modules/yaml/dist/doc/anchors.d.ts +2 -2
  143. package/lib/node_modules/yaml/dist/doc/anchors.js +2 -1
  144. package/lib/node_modules/yaml/dist/doc/applyReviver.js +0 -1
  145. package/lib/node_modules/yaml/dist/doc/createNode.d.ts +4 -4
  146. package/lib/node_modules/yaml/dist/doc/createNode.js +2 -1
  147. package/lib/node_modules/yaml/dist/doc/directives.d.ts +1 -1
  148. package/lib/node_modules/yaml/dist/errors.d.ts +1 -1
  149. package/lib/node_modules/yaml/dist/errors.js +1 -1
  150. package/lib/node_modules/yaml/dist/index.d.ts +18 -21
  151. package/lib/node_modules/yaml/dist/log.js +4 -4
  152. package/lib/node_modules/yaml/dist/nodes/Alias.d.ts +9 -10
  153. package/lib/node_modules/yaml/dist/nodes/Alias.js +11 -26
  154. package/lib/node_modules/yaml/dist/nodes/Collection.d.ts +4 -4
  155. package/lib/node_modules/yaml/dist/nodes/Node.d.ts +9 -16
  156. package/lib/node_modules/yaml/dist/nodes/Pair.d.ts +8 -9
  157. package/lib/node_modules/yaml/dist/nodes/Scalar.d.ts +4 -9
  158. package/lib/node_modules/yaml/dist/nodes/YAMLMap.d.ts +10 -10
  159. package/lib/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +10 -10
  160. package/lib/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -3
  161. package/lib/node_modules/yaml/dist/nodes/addPairToJSMap.js +48 -7
  162. package/lib/node_modules/yaml/dist/nodes/identity.d.ts +7 -7
  163. package/lib/node_modules/yaml/dist/nodes/toJS.d.ts +2 -4
  164. package/lib/node_modules/yaml/dist/options.d.ts +10 -22
  165. package/lib/node_modules/yaml/dist/parse/cst-scalar.d.ts +4 -4
  166. package/lib/node_modules/yaml/dist/parse/cst-stringify.d.ts +1 -1
  167. package/lib/node_modules/yaml/dist/parse/cst-visit.d.ts +2 -2
  168. package/lib/node_modules/yaml/dist/parse/cst.d.ts +3 -4
  169. package/lib/node_modules/yaml/dist/parse/lexer.d.ts +1 -1
  170. package/lib/node_modules/yaml/dist/parse/lexer.js +24 -28
  171. package/lib/node_modules/yaml/dist/parse/parser.d.ts +4 -4
  172. package/lib/node_modules/yaml/dist/parse/parser.js +9 -33
  173. package/lib/node_modules/yaml/dist/public-api.d.ts +5 -6
  174. package/lib/node_modules/yaml/dist/public-api.js +0 -3
  175. package/lib/node_modules/yaml/dist/schema/Schema.d.ts +5 -4
  176. package/lib/node_modules/yaml/dist/schema/Schema.js +2 -1
  177. package/lib/node_modules/yaml/dist/schema/common/map.d.ts +1 -1
  178. package/lib/node_modules/yaml/dist/schema/common/null.d.ts +1 -1
  179. package/lib/node_modules/yaml/dist/schema/common/seq.d.ts +1 -1
  180. package/lib/node_modules/yaml/dist/schema/common/string.d.ts +1 -1
  181. package/lib/node_modules/yaml/dist/schema/core/bool.d.ts +1 -1
  182. package/lib/node_modules/yaml/dist/schema/core/float.d.ts +1 -1
  183. package/lib/node_modules/yaml/dist/schema/core/int.d.ts +1 -1
  184. package/lib/node_modules/yaml/dist/schema/core/schema.d.ts +1 -1
  185. package/lib/node_modules/yaml/dist/schema/json/schema.d.ts +1 -1
  186. package/lib/node_modules/yaml/dist/schema/json/schema.js +1 -1
  187. package/lib/node_modules/yaml/dist/schema/tags.d.ts +3 -11
  188. package/lib/node_modules/yaml/dist/schema/tags.js +13 -26
  189. package/lib/node_modules/yaml/dist/schema/types.d.ts +12 -14
  190. package/lib/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +1 -1
  191. package/lib/node_modules/yaml/dist/schema/yaml-1.1/binary.js +7 -9
  192. package/lib/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +1 -1
  193. package/lib/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +1 -1
  194. package/lib/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +1 -1
  195. package/lib/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +17 -11
  196. package/lib/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +7 -7
  197. package/lib/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -1
  198. package/lib/node_modules/yaml/dist/schema/yaml-1.1/schema.js +0 -2
  199. package/lib/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +9 -9
  200. package/lib/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +1 -1
  201. package/lib/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +1 -1
  202. package/lib/node_modules/yaml/dist/stringify/stringify.d.ts +3 -3
  203. package/lib/node_modules/yaml/dist/stringify/stringify.js +5 -10
  204. package/lib/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +2 -2
  205. package/lib/node_modules/yaml/dist/stringify/stringifyCollection.js +3 -13
  206. package/lib/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -3
  207. package/lib/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +1 -1
  208. package/lib/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -3
  209. package/lib/node_modules/yaml/dist/stringify/stringifyPair.d.ts +2 -2
  210. package/lib/node_modules/yaml/dist/stringify/stringifyPair.js +1 -1
  211. package/lib/node_modules/yaml/dist/stringify/stringifyString.d.ts +2 -2
  212. package/lib/node_modules/yaml/dist/stringify/stringifyString.js +15 -23
  213. package/lib/node_modules/yaml/dist/util.d.ts +12 -16
  214. package/lib/node_modules/yaml/dist/util.js +2 -2
  215. package/lib/node_modules/yaml/dist/visit.d.ts +7 -7
  216. package/lib/node_modules/yaml/package.json +14 -13
  217. package/lib/package.json +5 -6
  218. package/package.json +1 -1
  219. package/lib/node_modules/jsonc-parser/CHANGELOG.md +0 -76
  220. package/lib/node_modules/jsonc-parser/LICENSE.md +0 -21
  221. package/lib/node_modules/jsonc-parser/README.md +0 -364
  222. package/lib/node_modules/jsonc-parser/SECURITY.md +0 -41
  223. package/lib/node_modules/jsonc-parser/lib/esm/impl/edit.js +0 -185
  224. package/lib/node_modules/jsonc-parser/lib/esm/impl/format.js +0 -261
  225. package/lib/node_modules/jsonc-parser/lib/esm/impl/parser.js +0 -659
  226. package/lib/node_modules/jsonc-parser/lib/esm/impl/scanner.js +0 -443
  227. package/lib/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +0 -29
  228. package/lib/node_modules/jsonc-parser/lib/esm/main.d.ts +0 -351
  229. package/lib/node_modules/jsonc-parser/lib/esm/main.js +0 -178
  230. package/lib/node_modules/jsonc-parser/lib/umd/impl/edit.js +0 -201
  231. package/lib/node_modules/jsonc-parser/lib/umd/impl/format.js +0 -275
  232. package/lib/node_modules/jsonc-parser/lib/umd/impl/parser.js +0 -682
  233. package/lib/node_modules/jsonc-parser/lib/umd/impl/scanner.js +0 -456
  234. package/lib/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +0 -42
  235. package/lib/node_modules/jsonc-parser/lib/umd/main.d.ts +0 -351
  236. package/lib/node_modules/jsonc-parser/lib/umd/main.js +0 -194
  237. package/lib/node_modules/jsonc-parser/package.json +0 -37
  238. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -67
  239. package/lib/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +0 -9
  240. package/lib/node_modules/yaml/dist/schema/yaml-1.1/merge.js +0 -71
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-writer.d.ts","sourceRoot":"","sources":["../../src/jira/spec-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;CAClB;AA8BD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAqBf;AAWD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,GAClB,eAAe,CAkBjB"}
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ /**
3
+ * JIRA issue → spec file on disk (REQ-JIRA-004).
4
+ *
5
+ * `writeSpecFromIssue` resolves the project's `specs/` directory, generates the
6
+ * spec markdown from the issue, and writes it idempotently (A3). Idempotency is
7
+ * keyed on the frontmatter `jira_issue:` value — parsed from a real frontmatter
8
+ * block, NOT grepped from the body (which could match the key in prose) — so a
9
+ * re-pick of the same issue overwrites the existing file even if it was renamed,
10
+ * and never leaves a duplicate. Pure filesystem side of the feature; it handles
11
+ * no credential (REQ-JIRA-009).
12
+ */
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.findSpecForIssueKey = findSpecForIssueKey;
48
+ exports.writeSpecFromIssue = writeSpecFromIssue;
49
+ const fs = __importStar(require("fs"));
50
+ const path = __importStar(require("path"));
51
+ const spec_generator_1 = require("./spec-generator");
52
+ /**
53
+ * Parse the `jira_issue:` value out of a spec file's leading frontmatter block.
54
+ * Returns `null` when the file has no `---`-delimited frontmatter or no
55
+ * `jira_issue:` key. A real (if minimal) frontmatter parse, so a `jira_issue:`
56
+ * mention buried in the body can never be mistaken for the source key.
57
+ */
58
+ function readJiraIssueKey(content) {
59
+ const lines = content.split(/\r?\n/);
60
+ if ((lines[0] ?? '').trim() !== '---')
61
+ return null;
62
+ for (let i = 1; i < lines.length; i++) {
63
+ const line = (lines[i] ?? '').trim();
64
+ if (line === '---')
65
+ break; // end of frontmatter
66
+ const colon = line.indexOf(':');
67
+ if (colon <= 0)
68
+ continue;
69
+ const key = line.slice(0, colon).trim();
70
+ if (key !== 'jira_issue')
71
+ continue;
72
+ let value = line.slice(colon + 1).trim();
73
+ if ((value.startsWith('"') && value.endsWith('"')) ||
74
+ (value.startsWith("'") && value.endsWith("'"))) {
75
+ value = value.slice(1, -1);
76
+ }
77
+ return value.length > 0 ? value : null;
78
+ }
79
+ return null;
80
+ }
81
+ /**
82
+ * Find the spec file (if any) whose frontmatter records `issueKey`, scanning
83
+ * `<projectRoot>/specs/`. Returns the absolute path, or `null` when no spec for
84
+ * the key exists. Keyed on the parsed `jira_issue:` frontmatter value — never a
85
+ * body match — so it locates the exact file a pick wrote even if it was renamed.
86
+ * Shared by `writeSpecFromIssue` (idempotent overwrite) and `specship_jira_start`
87
+ * (does a spec for this key exist yet?).
88
+ */
89
+ function findSpecForIssueKey(issueKey, projectRoot) {
90
+ const specsDir = path.join(projectRoot, 'specs');
91
+ let entries = [];
92
+ try {
93
+ entries = fs.readdirSync(specsDir);
94
+ }
95
+ catch {
96
+ return null;
97
+ }
98
+ for (const name of entries) {
99
+ if (!name.toLowerCase().endsWith('.md'))
100
+ continue;
101
+ const full = path.join(specsDir, name);
102
+ try {
103
+ if (!fs.statSync(full).isFile())
104
+ continue;
105
+ if (readJiraIssueKey(fs.readFileSync(full, 'utf8')) === issueKey) {
106
+ return full;
107
+ }
108
+ }
109
+ catch {
110
+ continue;
111
+ }
112
+ }
113
+ return null;
114
+ }
115
+ /** A filesystem-safe slug for the default filename, from the issue key. */
116
+ function slugForKey(key) {
117
+ return ((0, spec_generator_1.reqIdForIssue)(key)
118
+ .replace(/^REQ-/, '')
119
+ .toLowerCase() || 'issue');
120
+ }
121
+ /**
122
+ * Generate and write a spec for `issue` under `<projectRoot>/specs/`, creating
123
+ * the directory if needed. If an existing spec already records this issue key in
124
+ * its frontmatter, that file is overwritten (keyed on the key, not the filename,
125
+ * so a renamed file still updates); otherwise a new `specs/jira-<slug>.md` is
126
+ * created.
127
+ */
128
+ function writeSpecFromIssue(issue, projectRoot) {
129
+ const specsDir = path.join(projectRoot, 'specs');
130
+ fs.mkdirSync(specsDir, { recursive: true });
131
+ const markdown = (0, spec_generator_1.generateSpecMarkdown)(issue);
132
+ // Idempotency (A3): find an existing spec whose frontmatter records this key.
133
+ const existing = findSpecForIssueKey(issue.key, projectRoot);
134
+ if (existing) {
135
+ fs.writeFileSync(existing, markdown, 'utf8');
136
+ return { path: existing, created: false };
137
+ }
138
+ const target = path.join(specsDir, `jira-${slugForKey(issue.key)}.md`);
139
+ const created = !fs.existsSync(target);
140
+ fs.writeFileSync(target, markdown, 'utf8');
141
+ return { path: target, created };
142
+ }
143
+ //# sourceMappingURL=spec-writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-writer.js","sourceRoot":"","sources":["../../src/jira/spec-writer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,kDAwBC;AAkBD,gDAqBC;AA/GD,uCAAyB;AACzB,2CAA6B;AAE7B,qDAAuE;AASvE;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACnD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACt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AQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC7C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5C,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvE,MAAM,OAAO,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACvC,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACnC,CAAC"}
@@ -0,0 +1,174 @@
1
+ /**
2
+ * JIRA connection types (REQ-JIRA-001).
3
+ *
4
+ * SpecShip talks to both JIRA deployments:
5
+ * - **Cloud** — authenticated with HTTP Basic (`email:apiToken`).
6
+ * - **Data Center / Server** — authenticated with a `Bearer` PAT.
7
+ *
8
+ * SECURITY: no field here should ever be echoed to logs, CLI output, or
9
+ * thrown-error messages. The token/PAT is a secret — surface only the
10
+ * base URL host and the resolved display name (REQ-JIRA-009 builds on this).
11
+ */
12
+ /** Which JIRA deployment we're talking to. */
13
+ export type JiraDeployment = 'cloud' | 'datacenter';
14
+ /**
15
+ * Names (or ids) of the workflow transitions SpecShip drives at lifecycle
16
+ * moments (REQ-JIRA-007). JIRA workflows differ per project, so these are
17
+ * configurable; each is matched case-insensitively against the transitions
18
+ * the issue actually offers, and an unconfigured project keeps the sensible
19
+ * defaults ("In Progress" on start, "In Review" on PR raised).
20
+ */
21
+ export interface JiraTransitionNames {
22
+ /** Transition applied on start (default "In Progress"). */
23
+ inProgress?: string;
24
+ /** Transition applied when a PR is raised (default "In Review"). */
25
+ inReview?: string;
26
+ }
27
+ /**
28
+ * Fully-resolved credentials used to build a request against a JIRA
29
+ * instance. `deployment` is always resolved (inferred if not explicit).
30
+ */
31
+ export interface JiraCredentials {
32
+ /** Base URL of the JIRA instance, e.g. `https://acme.atlassian.net`. */
33
+ baseUrl: string;
34
+ /** Resolved deployment kind. */
35
+ deployment: JiraDeployment;
36
+ /** Cloud only: the account email used with an API token. */
37
+ email?: string;
38
+ /** Cloud only: the API token paired with `email`. */
39
+ apiToken?: string;
40
+ /** Data Center only: the personal access token. */
41
+ pat?: string;
42
+ /**
43
+ * Resolved lifecycle transition names (REQ-JIRA-007).
44
+ * `resolveJiraCredentials` always fills the defaults; optional here so
45
+ * hand-built credentials (tests, direct callers) needn't supply it.
46
+ */
47
+ transitions?: JiraTransitionNames;
48
+ }
49
+ /**
50
+ * On-disk config shape (`~/.specship/jira.json`). `deployment` is
51
+ * optional on disk — it's inferred from which credentials are present
52
+ * when not stored explicitly.
53
+ */
54
+ export interface JiraConfig {
55
+ baseUrl: string;
56
+ deployment?: JiraDeployment;
57
+ email?: string;
58
+ apiToken?: string;
59
+ pat?: string;
60
+ /**
61
+ * Optional per-project transition names (REQ-JIRA-007). Omitted → the
62
+ * built-in "In Progress" / "In Review" defaults apply.
63
+ */
64
+ transitions?: JiraTransitionNames;
65
+ }
66
+ /**
67
+ * Result of probing a JIRA instance's `/myself` endpoint. Carries only
68
+ * non-secret identity fields — never the credential.
69
+ */
70
+ export interface JiraConnectionResult {
71
+ ok: boolean;
72
+ accountId?: string;
73
+ displayName?: string;
74
+ error?: string;
75
+ }
76
+ /**
77
+ * A single JIRA issue. The list path (REQ-JIRA-002) populates only the four
78
+ * always-present fields — key/id, summary, status, and issue type. The detail
79
+ * path (REQ-JIRA-003) additionally fills `description` and `subtasks`; both are
80
+ * optional so the list path is unaffected. Never any credential-adjacent data.
81
+ */
82
+ export interface JiraIssue {
83
+ /** Human-facing key, e.g. `PROJ-123`. */
84
+ key: string;
85
+ /** Numeric/opaque internal id. */
86
+ id: string;
87
+ /** One-line summary of the issue. */
88
+ summary: string;
89
+ /** Current workflow status name, e.g. `In Progress`. */
90
+ status: string;
91
+ /** Issue type name, e.g. `Bug`, `Story`. */
92
+ issueType: string;
93
+ /** Detail path only (REQ-JIRA-003): the issue body, empty string if none. */
94
+ description?: string;
95
+ /** Detail path only (REQ-JIRA-003): child subtasks, if any. */
96
+ subtasks?: Array<{
97
+ key: string;
98
+ summary: string;
99
+ status: string;
100
+ }>;
101
+ }
102
+ /**
103
+ * Result of listing the current user's issues (REQ-JIRA-002). An empty
104
+ * `issues` array is a valid success (A3) — a user with nothing assigned is
105
+ * not an error. Any auth/network/non-200 failure throws instead of returning
106
+ * a partial or fabricated list (A4).
107
+ */
108
+ export interface JiraIssueListResult {
109
+ ok: true;
110
+ issues: JiraIssue[];
111
+ }
112
+ /**
113
+ * Result of fetching a single issue by key (REQ-JIRA-003). The single-issue
114
+ * analog of `JiraIssueListResult`. A missing / no-access issue throws
115
+ * `JiraNotFoundError` rather than returning an empty result (A2).
116
+ */
117
+ export interface JiraIssueResult {
118
+ ok: true;
119
+ issue: JiraIssue;
120
+ }
121
+ /**
122
+ * A single transition offered by an issue's current workflow state
123
+ * (REQ-JIRA-007). Returned by `GET /issue/{key}/transitions`.
124
+ */
125
+ export interface JiraTransition {
126
+ /** The transition id used to execute it (`POST /transitions`). */
127
+ id: string;
128
+ /** The transition's human-facing name, e.g. "In Progress". */
129
+ name: string;
130
+ }
131
+ /**
132
+ * Outcome of attempting a lifecycle transition (REQ-JIRA-007). Never a thrown
133
+ * error for a *missing* transition — a workflow that lacks the configured
134
+ * transition returns `{ ok, skipped, reason }` so the flow can still comment
135
+ * the PR link and report the skip (A3). A genuine auth/network fault on the
136
+ * write still throws, like every other credentialed call.
137
+ */
138
+ export type JiraTransitionResult = {
139
+ ok: true;
140
+ transitioned: string;
141
+ } | {
142
+ ok: true;
143
+ skipped: string;
144
+ reason: string;
145
+ };
146
+ /**
147
+ * Base class for JIRA errors. Mirrors `McpConfigError` in
148
+ * `server/src/routes/mcp.ts` — a plain `Error` subclass with a code.
149
+ *
150
+ * SECURITY: never construct one of these with a message that contains a
151
+ * token, PAT, or the `Authorization` header value.
152
+ */
153
+ export declare class JiraError extends Error {
154
+ readonly code: string;
155
+ constructor(message: string, code: string);
156
+ }
157
+ /** Missing / malformed configuration, or an unreachable host. */
158
+ export declare class JiraConfigError extends JiraError {
159
+ constructor(message: string);
160
+ }
161
+ /** The instance rejected the credentials (HTTP 401 / 403). */
162
+ export declare class JiraAuthError extends JiraError {
163
+ constructor(message: string);
164
+ }
165
+ /**
166
+ * The requested issue does not exist or the user can't see it (HTTP 404)
167
+ * — REQ-JIRA-003 A2. Distinct from config/auth errors so the caller can
168
+ * surface a clear "no such issue / no access" message and do no downstream
169
+ * work, rather than silently returning an empty spec.
170
+ */
171
+ export declare class JiraNotFoundError extends JiraError {
172
+ constructor(message: string);
173
+ }
174
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/jira/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,8CAA8C;AAC9C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,YAAY,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,UAAU,EAAE,cAAc,CAAC;IAC3B,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACz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CACd;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD;;;;;;GAMG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBACV,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAK1C;AAED,iEAAiE;AACjE,qBAAa,eAAgB,SAAQ,SAAS;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,8DAA8D;AAC9D,qBAAa,aAAc,SAAQ,SAAS;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;gBAClC,OAAO,EAAE,MAAM;CAI5B"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /**
3
+ * JIRA connection types (REQ-JIRA-001).
4
+ *
5
+ * SpecShip talks to both JIRA deployments:
6
+ * - **Cloud** — authenticated with HTTP Basic (`email:apiToken`).
7
+ * - **Data Center / Server** — authenticated with a `Bearer` PAT.
8
+ *
9
+ * SECURITY: no field here should ever be echoed to logs, CLI output, or
10
+ * thrown-error messages. The token/PAT is a secret — surface only the
11
+ * base URL host and the resolved display name (REQ-JIRA-009 builds on this).
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.JiraNotFoundError = exports.JiraAuthError = exports.JiraConfigError = exports.JiraError = void 0;
15
+ /**
16
+ * Base class for JIRA errors. Mirrors `McpConfigError` in
17
+ * `server/src/routes/mcp.ts` — a plain `Error` subclass with a code.
18
+ *
19
+ * SECURITY: never construct one of these with a message that contains a
20
+ * token, PAT, or the `Authorization` header value.
21
+ */
22
+ class JiraError extends Error {
23
+ code;
24
+ constructor(message, code) {
25
+ super(message);
26
+ this.name = 'JiraError';
27
+ this.code = code;
28
+ }
29
+ }
30
+ exports.JiraError = JiraError;
31
+ /** Missing / malformed configuration, or an unreachable host. */
32
+ class JiraConfigError extends JiraError {
33
+ constructor(message) {
34
+ super(message, 'JIRA_CONFIG_ERROR');
35
+ this.name = 'JiraConfigError';
36
+ }
37
+ }
38
+ exports.JiraConfigError = JiraConfigError;
39
+ /** The instance rejected the credentials (HTTP 401 / 403). */
40
+ class JiraAuthError extends JiraError {
41
+ constructor(message) {
42
+ super(message, 'JIRA_AUTH_ERROR');
43
+ this.name = 'JiraAuthError';
44
+ }
45
+ }
46
+ exports.JiraAuthError = JiraAuthError;
47
+ /**
48
+ * The requested issue does not exist or the user can't see it (HTTP 404)
49
+ * — REQ-JIRA-003 A2. Distinct from config/auth errors so the caller can
50
+ * surface a clear "no such issue / no access" message and do no downstream
51
+ * work, rather than silently returning an empty spec.
52
+ */
53
+ class JiraNotFoundError extends JiraError {
54
+ constructor(message) {
55
+ super(message, 'JIRA_NOT_FOUND');
56
+ this.name = 'JiraNotFoundError';
57
+ }
58
+ }
59
+ exports.JiraNotFoundError = JiraNotFoundError;
60
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/jira/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAyIH;;;;;;GAMG;AACH,MAAa,SAAU,SAAQ,KAAK;IACzB,IAAI,CAAS;IACtB,YAAY,OAAe,EAAE,IAAY;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAPD,8BAOC;AAED,iEAAiE;AACjE,MAAa,eAAgB,SAAQ,SAAS;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AALD,0CAKC;AAED,8DAA8D;AAC9D,MAAa,aAAc,SAAQ,SAAS;IAC1C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AALD,sCAKC;AAED;;;;;GAKG;AACH,MAAa,iBAAkB,SAAQ,SAAS;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AALD,8CAKC"}
@@ -0,0 +1,234 @@
1
+ /**
2
+ * JIRA MCP tools (REQ-JIRA-002, REQ-JIRA-003, REQ-JIRA-004).
3
+ *
4
+ * `specship_jira_issues` lists the issues assigned to the authenticated user
5
+ * (identity resolved from the token, never a typed name), optionally narrowed
6
+ * to a project. `specship_jira_issue` fetches a single issue by key with its
7
+ * full detail (description + subtasks). `specship_jira_pick` fetches an issue
8
+ * and authors a well-formed SpecShip spec from it under `specs/` (idempotent on
9
+ * the issue key). All read the user-level config, resolve credentials, and
10
+ * drive `JiraClient`.
11
+ *
12
+ * SECURITY (REQ-JIRA-009): the token is never surfaced. Every error path
13
+ * returns only the JiraError's own message — which by construction contains
14
+ * no credential — and the "not configured" path returns a plain pointer to
15
+ * `specship jira configure`, never a partial or fabricated result.
16
+ */
17
+ import type { ToolDefinition, ToolResult } from './tools';
18
+ import { type JiraIssueListResult, type JiraIssueResult, type JiraConnectionResult, type JiraTransitionNames, type JiraTransitionResult } from '../jira/types';
19
+ import { raisePullRequest as defaultRaisePullRequest, type PullRequestOutcome } from '../jira/pull-request';
20
+ /**
21
+ * The subset of `JiraClient` the status-push paths (REQ-JIRA-007) use. A
22
+ * seam interface so tests inject a fake client and the suite NEVER hits a real
23
+ * JIRA host (and no token is handled in tests).
24
+ */
25
+ export interface JiraStatusClient {
26
+ testConnection(): Promise<JiraConnectionResult>;
27
+ assignIssue(key: string, accountId: string): Promise<void>;
28
+ transitionIssue(key: string, nameOrId: string): Promise<JiraTransitionResult>;
29
+ addComment(key: string, body: string): Promise<void>;
30
+ }
31
+ /** A built status client paired with the resolved transition names. */
32
+ export interface JiraStatusContext {
33
+ client: JiraStatusClient;
34
+ transitions: JiraTransitionNames;
35
+ }
36
+ export declare const jiraToolDefinitions: ToolDefinition[];
37
+ /**
38
+ * Dependencies for `handleSpecshipJiraStart`. The DB handle (`specQueries`) and
39
+ * the project root are threaded in from the MCP session's open SpecShip
40
+ * (DOM-SPECSHIP-004: the JIRA tools never `import` the SpecShip package
41
+ * directly). The workflow loader + isolation/executor constructors are seams so
42
+ * tests can stub them and never spawn a real nested spec-implement run.
43
+ */
44
+ export interface JiraStartDeps {
45
+ /** SpecQueries handle from the MCP session's open SpecShip. */
46
+ specQueries: unknown;
47
+ /** The SpecShip project root the spec + worktree live under. */
48
+ projectRoot: string;
49
+ /** Loader for the bundled workflow (default: ../workflows/discovery). */
50
+ loadWorkflowByName?: (projectRoot: string, name: string) => {
51
+ workflow: unknown;
52
+ } | null | undefined;
53
+ /** Worktree-provider constructor (default: ../isolation/worktree). */
54
+ WorktreeProvider?: new (specQueries: unknown) => unknown;
55
+ /** Workflow-executor constructor (default: ../workflows/executor). */
56
+ WorkflowExecutor?: new (specQueries: unknown, worktrees: unknown, projectRoot: string, onRunCompleted?: (run: JiraStartRunLike) => void | Promise<void>) => JiraStartExecutorLike;
57
+ /** Resolver for the .specship dir (default: ../directory). */
58
+ getSpecShipDir?: (projectRoot: string) => string;
59
+ /**
60
+ * PR-raise seam (default: ../jira/pull-request). Stubbed in tests so the
61
+ * suite NEVER runs a real `git push` / `gh pr create` (REQ-JIRA-006).
62
+ */
63
+ raisePullRequest?: typeof defaultRaisePullRequest;
64
+ /**
65
+ * Isolation-env lookup seam (default: specQueries.getIsolationEnvById).
66
+ * Resolves the run's worktree branch + path at completion.
67
+ */
68
+ getIsolationEnvById?: (id: string) => IsolationEnvLike | null | undefined;
69
+ /**
70
+ * JIRA status-client factory (default: resolve creds + new JiraClient).
71
+ * Stubbed in tests so the start-status push (assign + in-progress
72
+ * transition, REQ-JIRA-007.A1) never hits a real host. Threaded through to
73
+ * the completion hook for the PR-raised status push too.
74
+ */
75
+ makeJiraClient?: () => JiraStatusContext;
76
+ }
77
+ /** Minimal shape of an isolation env the completion handler needs. */
78
+ export interface IsolationEnvLike {
79
+ branchName: string;
80
+ workingPath: string;
81
+ metadata?: unknown;
82
+ }
83
+ /** Dependencies for `handleJiraRunCompletion` — all stubbable, no real shell. */
84
+ export interface JiraCompletionDeps {
85
+ /** Resolve the run's worktree (branch + path) by isolation-env id. */
86
+ getIsolationEnvById: (id: string) => IsolationEnvLike | null | undefined;
87
+ /** PR-raise seam (default: ../jira/pull-request). */
88
+ raisePullRequest?: typeof defaultRaisePullRequest;
89
+ /** Repo root fallback when the env metadata omits it. */
90
+ projectRoot?: string;
91
+ /** Where to surface the outcome (default: console.log). */
92
+ log?: (message: string) => void;
93
+ /**
94
+ * JIRA status-client factory (default: resolve creds + new JiraClient).
95
+ * Stubbed in tests so the PR-raised status push (in-review transition + PR
96
+ * comment, REQ-JIRA-007.A2) never hits a real host.
97
+ */
98
+ makeJiraClient?: () => JiraStatusContext;
99
+ }
100
+ /** Minimal shape of a workflow run the executor returns/persists. */
101
+ interface JiraStartRunLike {
102
+ id: string;
103
+ status: string;
104
+ errorMessage?: string;
105
+ isolationEnvId?: string;
106
+ metadata?: unknown;
107
+ }
108
+ /** Minimal shape of the executor's `start` result. */
109
+ interface JiraStartExecutorLike {
110
+ start(workflow: unknown, opts: {
111
+ projectRoot: string;
112
+ runId?: string;
113
+ branchName?: string;
114
+ inputs?: Record<string, string>;
115
+ variables?: Record<string, string>;
116
+ runMetadata?: Record<string, unknown>;
117
+ }): Promise<{
118
+ run: JiraStartRunLike;
119
+ }>;
120
+ }
121
+ /**
122
+ * Handle `specship_jira_issues`. Independent of the code graph — talks only
123
+ * to the configured JIRA host through the stored credentials.
124
+ */
125
+ export declare function handleSpecshipJiraIssues(args: Record<string, unknown>): Promise<ToolResult>;
126
+ /**
127
+ * Handle `specship_jira_issue` (REQ-JIRA-003). Fetches a single issue by key
128
+ * and renders its full detail. Independent of the code graph — talks only to
129
+ * the configured JIRA host. A missing/no-access key surfaces as an explicit
130
+ * tool error (A2), never a silent empty result.
131
+ */
132
+ export declare function handleSpecshipJiraIssue(args: Record<string, unknown>): Promise<ToolResult>;
133
+ /**
134
+ * Handle `specship_jira_pick` (REQ-JIRA-004). Fetches a single issue by key
135
+ * (reusing the REQ-JIRA-003 path) and authors a well-formed SpecShip spec from
136
+ * it under `specs/`, idempotent on the issue key (A3). Independent of the code
137
+ * graph — talks only to the configured JIRA host. A missing/no-access key
138
+ * surfaces as a `JiraNotFoundError` → tool error, never a written empty spec.
139
+ *
140
+ * SECURITY: the issue summary/description/subtasks are untrusted content; the
141
+ * generator neutralizes any injected spec structure before embedding. No token
142
+ * appears in any output or error (REQ-JIRA-009).
143
+ */
144
+ export declare function handleSpecshipJiraPick(args: Record<string, unknown>): Promise<ToolResult>;
145
+ /**
146
+ * Completion hook for a JIRA-started run (REQ-JIRA-006). Fires only once the
147
+ * run has settled to `completed`. Raises a PR — traceable to the issue via the
148
+ * key in the branch name, PR title, AND body — ONLY when the run's verify leg
149
+ * ran and passed. On any PR-tooling failure it surfaces the reason and leaves
150
+ * the branch + worktree fully intact for a manual PR (A3); it NEVER auto-merges
151
+ * or closes the PR (the human owns "done"). A non-JIRA run is a silent no-op.
152
+ *
153
+ * SECURITY: no JIRA token/secret appears in the PR title/body/logs — only the
154
+ * public issue key (REQ-JIRA-009).
155
+ */
156
+ export declare function handleJiraRunCompletion(run: JiraStartRunLike, deps: JiraCompletionDeps): Promise<PullRequestOutcome | null>;
157
+ /**
158
+ * Handle `specship_jira_start` (REQ-JIRA-005). Drives the bundled
159
+ * `spec-implement` workflow on the spec `specship_jira_pick` authored for the
160
+ * issue key, in an isolated worktree, and runs it to the first pause — the
161
+ * plan/approve gate (A1). It does NOT block for the full implementation.
162
+ *
163
+ * On the non-failed path it pushes the "start" status back to JIRA
164
+ * (REQ-JIRA-007.A1): assigns the issue and transitions it toward "in progress".
165
+ * That push NEVER blocks the workflow — a JIRA hiccup (auth, network, a missing
166
+ * transition) is surfaced as a note, not an error. A failed/rejected run
167
+ * (REQ-JIRA-005.A2) raises no PR and is never advanced past "in progress"; the
168
+ * "in review" transition + PR comment (REQ-JIRA-007.A2) fire only once the run
169
+ * reaches `completed` with a verified, raised PR.
170
+ *
171
+ * SECURITY: the credential is handled only inside `JiraClient` and never
172
+ * echoed (REQ-JIRA-009); only the public issue key / PR URL are surfaced.
173
+ */
174
+ export declare function handleSpecshipJiraStart(args: Record<string, unknown>, deps: JiraStartDeps): Promise<ToolResult>;
175
+ /**
176
+ * The subset of `JiraClient` the tracking view (REQ-JIRA-008) reads through. A
177
+ * seam so tests inject a fake and the suite NEVER hits a real host (and no token
178
+ * is handled in tests). Both methods are the same live reads the list/detail
179
+ * tools use.
180
+ */
181
+ export interface JiraTrackClient {
182
+ listMyIssues(opts?: {
183
+ project?: string;
184
+ }): Promise<JiraIssueListResult>;
185
+ getIssue(key: string): Promise<JiraIssueResult>;
186
+ }
187
+ /**
188
+ * Dependencies for `handleSpecshipJiraTrack`. `specQueries` (the MCP session's
189
+ * open SpecShip handle) enumerates the workflow runs that record which issues
190
+ * entered the pipeline; `makeJiraClient` is the injectable live-read seam
191
+ * (default resolves creds + a real `JiraClient`). `limit` bounds how many recent
192
+ * runs are scanned.
193
+ */
194
+ export interface JiraTrackDeps {
195
+ /** SpecQueries handle from the MCP session's open SpecShip. */
196
+ specQueries: unknown;
197
+ /** Live-read client factory (default: resolve creds + new JiraClient). */
198
+ makeJiraClient?: () => JiraTrackClient;
199
+ /** How many recent runs to scan for JIRA-picked issues (default 200). */
200
+ limit?: number;
201
+ }
202
+ /** The SpecShip lifecycle work-state derived from a run (REQ-JIRA-008). */
203
+ export type JiraWorkState = 'spec authored' | 'implementing' | 'PR raised' | 'verified';
204
+ /**
205
+ * Map a workflow run to its SpecShip lifecycle work-state (REQ-JIRA-008). Pure
206
+ * — reads only the run's status + metadata, most-advanced stage first:
207
+ * - verify ran and passed → `verified` (the terminal success),
208
+ * - a raised-PR marker on the run → `PR raised`,
209
+ * - running/paused → `implementing`,
210
+ * - anything else (pending/failed/cancelled/completed-without-markers) → the
211
+ * spec exists but no implementation has landed → `spec authored`.
212
+ */
213
+ export declare function deriveWorkState(run: {
214
+ status?: string;
215
+ metadata?: unknown;
216
+ }): JiraWorkState;
217
+ /**
218
+ * Handle `specship_jira_track` (REQ-JIRA-008). A read-only view joining each
219
+ * picked issue's SpecShip work-state (from its workflow run) with its LIVE JIRA
220
+ * status (a fresh read at track time — never the pick-time cached metadata, so
221
+ * an issue moved outside SpecShip shows its current status). It never re-picks
222
+ * or re-starts anything.
223
+ *
224
+ * Runs are enumerated newest-first and deduped by issue key keeping the
225
+ * most-recent run. A JIRA read failure degrades PER ROW to a clear "unreachable"
226
+ * marker and never fails the whole view (degrade-gracefully, matching the
227
+ * sibling status tools).
228
+ *
229
+ * SECURITY: no token appears in any output or error (REQ-JIRA-009) — only public
230
+ * issue keys, titles, and statuses.
231
+ */
232
+ export declare function handleSpecshipJiraTrack(args: Record<string, unknown>, deps: JiraTrackDeps): Promise<ToolResult>;
233
+ export {};
234
+ //# sourceMappingURL=jira-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jira-tools.d.ts","sourceRoot":"","sources":["../../src/mcp/jira-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,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