specweave 0.23.16 → 0.24.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 (227) hide show
  1. package/.claude-plugin/marketplace.json +93 -38
  2. package/CLAUDE.md +159 -11
  3. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  4. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +57 -0
  5. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  6. package/dist/src/cli/commands/sync-spec-content.js +3 -0
  7. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  8. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
  9. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
  10. package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
  11. package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
  12. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
  13. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
  14. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
  15. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
  16. package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
  17. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
  18. package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
  19. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
  20. package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
  21. package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
  22. package/dist/src/cli/helpers/smart-filter.js +265 -0
  23. package/dist/src/cli/helpers/smart-filter.js.map +1 -0
  24. package/dist/src/core/progress/progress-tracker.d.ts +4 -1
  25. package/dist/src/core/progress/progress-tracker.d.ts.map +1 -1
  26. package/dist/src/core/progress/progress-tracker.js +33 -4
  27. package/dist/src/core/progress/progress-tracker.js.map +1 -1
  28. package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
  29. package/dist/src/core/qa/quality-gate-decider.js +2 -2
  30. package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
  31. package/dist/src/core/qa/risk-calculator.d.ts +2 -2
  32. package/dist/src/core/qa/risk-calculator.js +2 -2
  33. package/dist/src/core/spec-content-sync.d.ts +1 -1
  34. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  35. package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
  36. package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
  37. package/dist/src/core/validators/ac-presence-validator.js +149 -0
  38. package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
  39. package/dist/src/integrations/ado/ado-dependency-loader.d.ts +1 -1
  40. package/dist/src/integrations/ado/ado-dependency-loader.d.ts.map +1 -1
  41. package/dist/src/integrations/ado/ado-dependency-loader.js +39 -7
  42. package/dist/src/integrations/ado/ado-dependency-loader.js.map +1 -1
  43. package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
  44. package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
  45. package/dist/src/integrations/ado/area-path-mapper.js +267 -0
  46. package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
  47. package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
  48. package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
  49. package/dist/src/integrations/jira/filter-processor.js +207 -0
  50. package/dist/src/integrations/jira/filter-processor.js.map +1 -0
  51. package/dist/src/integrations/jira/jira-client.d.ts +13 -0
  52. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
  53. package/dist/src/integrations/jira/jira-client.js +33 -0
  54. package/dist/src/integrations/jira/jira-client.js.map +1 -1
  55. package/dist/src/utils/ac-embedder.d.ts +63 -0
  56. package/dist/src/utils/ac-embedder.d.ts.map +1 -0
  57. package/dist/src/utils/ac-embedder.js +217 -0
  58. package/dist/src/utils/ac-embedder.js.map +1 -0
  59. package/dist/src/utils/env-manager.d.ts +86 -0
  60. package/dist/src/utils/env-manager.d.ts.map +1 -0
  61. package/dist/src/utils/env-manager.js +188 -0
  62. package/dist/src/utils/env-manager.js.map +1 -0
  63. package/package.json +1 -1
  64. package/plugins/specweave/.claude-plugin/plugin.json +1 -1
  65. package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
  66. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
  67. package/plugins/specweave/commands/specweave-do.md +37 -0
  68. package/plugins/specweave/commands/specweave-done.md +159 -0
  69. package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
  70. package/plugins/specweave/commands/specweave-next.md +148 -3
  71. package/plugins/specweave/commands/specweave-qa.md +2 -2
  72. package/plugins/specweave/hooks/lib/migrate-increment-work.sh +1 -1
  73. package/plugins/specweave/hooks/lib/migrate-increment-work.sh.bak +245 -0
  74. package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
  75. package/plugins/specweave/hooks/lib/sync-spec-content.sh.bak +149 -0
  76. package/plugins/specweave/hooks/lib/update-status-line.sh +34 -4
  77. package/plugins/specweave/hooks/lib/validate-spec-status.sh +1 -1
  78. package/plugins/specweave/hooks/lib/validate-spec-status.sh.bak +163 -0
  79. package/plugins/specweave/hooks/post-first-increment.sh +1 -1
  80. package/plugins/specweave/hooks/post-first-increment.sh.bak +61 -0
  81. package/plugins/specweave/hooks/post-spec-update.sh +1 -1
  82. package/plugins/specweave/hooks/post-spec-update.sh.bak +158 -0
  83. package/plugins/specweave/hooks/post-user-story-complete.sh +1 -1
  84. package/plugins/specweave/hooks/post-user-story-complete.sh.bak +179 -0
  85. package/plugins/specweave/hooks/pre-command-deduplication.sh +1 -1
  86. package/plugins/specweave/hooks/pre-command-deduplication.sh.bak +83 -0
  87. package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
  88. package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
  89. package/plugins/specweave/hooks/user-prompt-submit.sh.bak +386 -0
  90. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  91. package/plugins/specweave/skills/specweave-framework/SKILL.md +1 -1
  92. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  93. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +23 -0
  94. package/plugins/specweave-ado/agents/ado-multi-project-mapper/AGENT.md +23 -0
  95. package/plugins/specweave-ado/agents/ado-sync-judge/AGENT.md +23 -0
  96. package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
  97. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
  98. package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
  99. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
  100. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
  101. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
  102. package/plugins/specweave-backend/agents/database-optimizer/AGENT.md +23 -0
  103. package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
  104. package/plugins/specweave-backend/commands/crud-generate.md +109 -0
  105. package/plugins/specweave-backend/commands/migration-generate.md +139 -0
  106. package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +23 -0
  107. package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
  108. package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
  109. package/plugins/specweave-confluent/commands/schema-register.md +123 -0
  110. package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
  111. package/plugins/specweave-core/commands/architecture-review.md +288 -0
  112. package/plugins/specweave-core/commands/code-review.md +213 -0
  113. package/plugins/specweave-core/commands/refactor-plan.md +249 -0
  114. package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
  115. package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
  116. package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
  117. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
  118. package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
  119. package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
  120. package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
  121. package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
  122. package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
  123. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  124. package/plugins/specweave-diagrams/agents/diagrams-architect/AGENT.md +23 -0
  125. package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
  126. package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
  127. package/plugins/specweave-docs/commands/docs-generate.md +441 -0
  128. package/plugins/specweave-docs/commands/docs-init.md +334 -0
  129. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
  130. package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
  131. package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
  132. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  133. package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
  134. package/plugins/specweave-figma/commands/figma-import.md +690 -0
  135. package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
  136. package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
  137. package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
  138. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +387 -0
  139. package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
  140. package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
  141. package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
  142. package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
  143. package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
  144. package/plugins/specweave-frontend/commands/component-generate.md +510 -0
  145. package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
  146. package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
  147. package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
  148. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
  149. package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
  150. package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
  151. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  152. package/plugins/specweave-github/agents/github-manager/AGENT.md +23 -0
  153. package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +25 -0
  154. package/plugins/specweave-github/agents/user-story-updater/AGENT.md +25 -0
  155. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +194 -0
  156. package/plugins/specweave-github/lib/github-spec-content-sync.js +49 -0
  157. package/plugins/specweave-github/lib/github-spec-content-sync.ts +67 -0
  158. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  159. package/plugins/specweave-infrastructure/agents/devops/AGENT.md +26 -0
  160. package/plugins/specweave-infrastructure/agents/network-engineer/AGENT.md +26 -0
  161. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +26 -0
  162. package/plugins/specweave-infrastructure/agents/performance-engineer/AGENT.md +26 -0
  163. package/plugins/specweave-infrastructure/agents/sre/AGENT.md +26 -0
  164. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  165. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +26 -0
  166. package/plugins/specweave-jira/commands/import-projects.js +183 -0
  167. package/plugins/specweave-jira/commands/import-projects.md +97 -0
  168. package/plugins/specweave-jira/commands/import-projects.ts +288 -0
  169. package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
  170. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  171. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +26 -0
  172. package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +26 -0
  173. package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +26 -0
  174. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  175. package/plugins/specweave-kubernetes/agents/kubernetes-architect/AGENT.md +26 -0
  176. package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
  177. package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
  178. package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
  179. package/plugins/specweave-ml/.claude-plugin/plugin.json +3 -3
  180. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +26 -0
  181. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +26 -0
  182. package/plugins/specweave-ml/agents/mlops-engineer/AGENT.md +26 -0
  183. package/plugins/specweave-mobile/agents/mobile-architect/AGENT.md +26 -0
  184. package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
  185. package/plugins/specweave-mobile/commands/build-config.md +256 -0
  186. package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
  187. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  188. package/plugins/specweave-payments/agents/payment-integration/AGENT.md +26 -0
  189. package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +20 -0
  190. package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
  191. package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
  192. package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
  193. package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
  194. package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
  195. package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
  196. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  197. package/plugins/specweave-release/agents/release-manager/AGENT.md +27 -0
  198. package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
  199. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
  200. package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
  201. package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +797 -0
  202. package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
  203. package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
  204. package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
  205. package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
  206. package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
  207. package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
  208. package/plugins/specweave-testing/commands/test-coverage.md +979 -0
  209. package/plugins/specweave-testing/commands/test-generate.md +1156 -0
  210. package/plugins/specweave-testing/commands/test-init.md +409 -0
  211. package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
  212. package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
  213. package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
  214. package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
  215. package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
  216. package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
  217. package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
  218. package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
  219. package/plugins/specweave-ui/commands/ui-automate.md +199 -0
  220. package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
  221. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
  222. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
  223. package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
  224. package/plugins/specweave/commands/check-hooks.md +0 -257
  225. package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
  226. package/plugins/specweave/skills/plugin-expert/SKILL.md +0 -340
  227. /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
@@ -0,0 +1,267 @@
1
+ /**
2
+ * Azure DevOps Area Path Mapper
3
+ *
4
+ * Fetches, parses, and maps ADO area paths to SpecWeave project IDs.
5
+ * Supports hierarchical area paths with granularity selection:
6
+ * - Top-level only (e.g., Backend, Frontend)
7
+ * - Two-level (e.g., Backend-API, Backend-Database)
8
+ * - Full tree (all levels)
9
+ *
10
+ * NEW (v0.24.0): Enables multi-project organization in ADO
11
+ *
12
+ * @module integrations/ado/area-path-mapper
13
+ */
14
+ import { consoleLogger } from '../../utils/logger.js';
15
+ /**
16
+ * Area Path Mapper for Azure DevOps
17
+ *
18
+ * Fetches hierarchical area path structures and maps them to SpecWeave project IDs.
19
+ */
20
+ export class AreaPathMapper {
21
+ constructor(options) {
22
+ this.apiVersion = '7.0'; // ADO API version
23
+ this.credentials = options.credentials;
24
+ this.project = options.project;
25
+ this.logger = options.logger ?? consoleLogger;
26
+ }
27
+ /**
28
+ * Fetch area path tree from ADO
29
+ *
30
+ * Fetches the full hierarchical area path structure for the project.
31
+ * Uses $depth=10 to get deep hierarchies.
32
+ *
33
+ * @returns Root area path node with children
34
+ */
35
+ async fetchAreaPaths() {
36
+ try {
37
+ const url = `https://dev.azure.com/${this.credentials.organization}/${this.project}/_apis/wit/classificationnodes/areas?$depth=10&api-version=${this.apiVersion}`;
38
+ const auth = Buffer.from(`:${this.credentials.pat}`).toString('base64');
39
+ const response = await fetch(url, {
40
+ headers: {
41
+ 'Authorization': `Basic ${auth}`,
42
+ 'Accept': 'application/json'
43
+ }
44
+ });
45
+ if (!response.ok) {
46
+ const errorText = await response.text();
47
+ throw new Error(`ADO API error (${response.status}): ${errorText}`);
48
+ }
49
+ const data = await response.json();
50
+ // Parse the tree structure
51
+ return this.parseAreaPathTree(data, 0, '');
52
+ }
53
+ catch (error) {
54
+ this.logger.error(`❌ Failed to fetch area paths: ${error.message}`);
55
+ throw error;
56
+ }
57
+ }
58
+ /**
59
+ * Parse area path tree recursively
60
+ *
61
+ * Converts ADO API response to normalized AreaPathNode tree structure.
62
+ *
63
+ * @param node - Raw ADO API node
64
+ * @param level - Current depth level (0 = root)
65
+ * @param parentPath - Parent area path
66
+ * @returns Parsed area path node
67
+ */
68
+ parseAreaPathTree(node, level, parentPath) {
69
+ const path = parentPath ? `${parentPath}/${node.name}` : node.name;
70
+ const parsed = {
71
+ id: node.id?.toString() || '',
72
+ name: node.name,
73
+ path,
74
+ level,
75
+ parentPath: parentPath || undefined,
76
+ hasChildren: Boolean(node.hasChildren === true || (node.children && node.children.length > 0))
77
+ };
78
+ // Recursively parse children
79
+ if (node.children && Array.isArray(node.children) && node.children.length > 0) {
80
+ parsed.children = node.children.map((child) => this.parseAreaPathTree(child, level + 1, path));
81
+ }
82
+ return parsed;
83
+ }
84
+ /**
85
+ * Map area path to SpecWeave project ID
86
+ *
87
+ * Converts hierarchical area path to kebab-case project ID.
88
+ * Excludes root project name.
89
+ *
90
+ * Examples:
91
+ * - "Platform/Backend/API" → "backend-api"
92
+ * - "Platform/Frontend" → "frontend"
93
+ * - "Platform" → "platform"
94
+ *
95
+ * @param areaPath - Full area path (e.g., "Platform/Backend/API")
96
+ * @returns Kebab-case project ID
97
+ */
98
+ mapToProjectId(areaPath) {
99
+ const parts = areaPath.split('/').filter(Boolean);
100
+ // If root only, return root in kebab-case
101
+ if (parts.length === 1) {
102
+ return this.toKebabCase(parts[0]);
103
+ }
104
+ // Exclude root, join remaining parts with dash
105
+ const relevantParts = parts.slice(1);
106
+ return relevantParts.map(p => this.toKebabCase(p)).join('-');
107
+ }
108
+ /**
109
+ * Convert string to kebab-case
110
+ *
111
+ * @param str - Input string
112
+ * @returns Kebab-case string
113
+ */
114
+ toKebabCase(str) {
115
+ return str
116
+ .trim()
117
+ .toLowerCase()
118
+ .replace(/[^a-z0-9]+/g, '-') // Replace non-alphanumeric with dash
119
+ .replace(/^-+|-+$/g, ''); // Trim leading/trailing dashes
120
+ }
121
+ /**
122
+ * Flatten area paths with granularity selection
123
+ *
124
+ * Extracts nodes at specific level(s) from the tree.
125
+ *
126
+ * @param root - Root area path node
127
+ * @param granularity - Desired granularity level
128
+ * @returns Flattened array of nodes
129
+ */
130
+ flattenAreaPaths(root, granularity) {
131
+ switch (granularity) {
132
+ case 'top-level':
133
+ return this.getNodesByLevel(root, 1);
134
+ case 'two-level':
135
+ return this.getNodesByLevel(root, 2);
136
+ case 'full-tree':
137
+ return this.getAllNodes(root);
138
+ default:
139
+ throw new Error(`Invalid granularity: ${granularity}`);
140
+ }
141
+ }
142
+ /**
143
+ * Get nodes at specific level
144
+ *
145
+ * Recursively collects nodes at the target depth level.
146
+ * If a branch doesn't reach the target level, includes the deepest node in that branch.
147
+ *
148
+ * @param node - Current node
149
+ * @param targetLevel - Target depth level
150
+ * @returns Nodes at target level (or deepest available)
151
+ */
152
+ getNodesByLevel(node, targetLevel) {
153
+ const results = [];
154
+ if (node.level === targetLevel) {
155
+ results.push(node);
156
+ return results;
157
+ }
158
+ // If node is at a level before target and has no children, include it
159
+ // (handles branches that don't reach target depth)
160
+ if (node.level < targetLevel && !node.children) {
161
+ results.push(node);
162
+ return results;
163
+ }
164
+ // Recurse into children
165
+ if (node.children) {
166
+ for (const child of node.children) {
167
+ results.push(...this.getNodesByLevel(child, targetLevel));
168
+ }
169
+ }
170
+ return results;
171
+ }
172
+ /**
173
+ * Get all nodes (flatten entire tree)
174
+ *
175
+ * @param node - Root node
176
+ * @returns All nodes in tree
177
+ */
178
+ getAllNodes(node) {
179
+ const results = [node];
180
+ if (node.children) {
181
+ for (const child of node.children) {
182
+ results.push(...this.getAllNodes(child));
183
+ }
184
+ }
185
+ return results;
186
+ }
187
+ /**
188
+ * Prompt user for granularity selection
189
+ *
190
+ * Interactive CLI prompt to select area path granularity.
191
+ *
192
+ * @param areaPathTree - Area path tree for preview
193
+ * @returns Selected granularity
194
+ */
195
+ async promptAreaPathGranularity(areaPathTree) {
196
+ const inquirer = (await import('inquirer')).default;
197
+ // Calculate counts for each granularity
198
+ const topLevelCount = this.getNodesByLevel(areaPathTree, 1).length;
199
+ const twoLevelCount = this.getNodesByLevel(areaPathTree, 2).length;
200
+ const fullTreeCount = this.getAllNodes(areaPathTree).length;
201
+ const { granularity } = await inquirer.prompt([
202
+ {
203
+ type: 'list',
204
+ name: 'granularity',
205
+ message: 'Select area path granularity for project organization:',
206
+ choices: [
207
+ {
208
+ name: `Top-level only (${topLevelCount} projects) - e.g., Backend, Frontend`,
209
+ value: 'top-level'
210
+ },
211
+ {
212
+ name: `Two-level (${twoLevelCount} projects) - e.g., Backend-API, Backend-Database`,
213
+ value: 'two-level'
214
+ },
215
+ {
216
+ name: `Full tree (${fullTreeCount} projects) - All levels`,
217
+ value: 'full-tree'
218
+ }
219
+ ],
220
+ default: 'two-level' // Most common use case
221
+ }
222
+ ]);
223
+ return granularity;
224
+ }
225
+ /**
226
+ * Get area path suggestions for project
227
+ *
228
+ * Analyzes area path tree and suggests best granularity based on structure.
229
+ *
230
+ * @param areaPathTree - Area path tree
231
+ * @returns Suggested granularity with reasoning
232
+ */
233
+ suggestGranularity(areaPathTree) {
234
+ const topLevelCount = this.getNodesByLevel(areaPathTree, 1).length;
235
+ const twoLevelCount = this.getNodesByLevel(areaPathTree, 2).length;
236
+ const fullTreeCount = this.getAllNodes(areaPathTree).length;
237
+ // Decision logic
238
+ if (topLevelCount <= 5) {
239
+ // Small tree: use top-level
240
+ return {
241
+ suggested: 'top-level',
242
+ reasoning: `Small hierarchy (${topLevelCount} top-level areas). Top-level is sufficient.`
243
+ };
244
+ }
245
+ else if (twoLevelCount <= 20) {
246
+ // Medium tree: use two-level
247
+ return {
248
+ suggested: 'two-level',
249
+ reasoning: `Balanced hierarchy (${twoLevelCount} two-level areas). Recommended granularity.`
250
+ };
251
+ }
252
+ else {
253
+ // Large/deep tree: might need two-level or top-level
254
+ if (fullTreeCount > 50) {
255
+ return {
256
+ suggested: 'top-level',
257
+ reasoning: `Large hierarchy (${fullTreeCount} total areas). Top-level keeps projects manageable.`
258
+ };
259
+ }
260
+ return {
261
+ suggested: 'two-level',
262
+ reasoning: `Complex hierarchy (${twoLevelCount} two-level areas). Two-level balances detail and simplicity.`
263
+ };
264
+ }
265
+ }
266
+ }
267
+ //# sourceMappingURL=area-path-mapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-path-mapper.js","sourceRoot":"","sources":["../../../../src/integrations/ado/area-path-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAyBtD;;;;GAIG;AACH,MAAM,OAAO,cAAc;IAMzB,YAAY,OAA8B;QAFlC,eAAU,GAAG,KAAK,CAAC,CAAC,kBAAkB;QAG5C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC;IAChD,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,cAAc;QAClB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,yBAAyB,IAAI,CAAC,WAAW,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,8DAA8D,IAAI,CAAC,UAAU,EAAE,CAAC;YAElK,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAExE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAChC,OAAO,EAAE;oBACP,eAAe,EAAE,SAAS,IAAI,EAAE;oBAChC,QAAQ,EAAE,kBAAkB;iBAC7B;aACF,CAAC,CAAC;YAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACxC,MAAM,IAAI,KAAK,CAAC,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AW;gBACtB,SAAS,EAAE,oBAAoB,aAAa,6CAA6C;aAC1F,CAAC;QACJ,CAAC;aAAM,IAAI,aAAa,IAAI,EAAE,EAAE,CAAC;YAC/B,6BAA6B;YAC7B,OAAO;gBACL,SAAS,EAAE,WAAW;gBACtB,SAAS,EAAE,uBAAuB,aAAa,6CAA6C;aAC7F,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,qDAAqD;YACrD,IAAI,aAAa,GAAG,EAAE,EAAE,CAAC;gBACvB,OAAO;oBACL,SAAS,EAAE,WAAW;oBACtB,SAAS,EAAE,oBAAoB,aAAa,qDAAqD;iBAClG,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,SAAS,EAAE,WAAW;gBACtB,SAAS,EAAE,sBAAsB,aAAa,8DAA8D;aAC7G,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * JIRA Filter Processor
3
+ *
4
+ * Smart filtering for JIRA projects with active/archived, type, lead, and JQL support.
5
+ *
6
+ * NEW (v0.24.0): Enables selective project imports with filter presets
7
+ *
8
+ * @module integrations/jira/filter-processor
9
+ */
10
+ import { JiraClient } from './jira-client.js';
11
+ import type { Logger } from '../../utils/logger.js';
12
+ export interface FilterOptions {
13
+ active?: boolean;
14
+ types?: string[];
15
+ lead?: string;
16
+ jql?: string;
17
+ excludeArchived?: boolean;
18
+ }
19
+ export interface FilterPreset {
20
+ name: string;
21
+ description: string;
22
+ filters: FilterOptions;
23
+ }
24
+ export interface JiraProject {
25
+ id: string;
26
+ key: string;
27
+ name: string;
28
+ projectTypeKey?: string;
29
+ lead?: {
30
+ displayName: string;
31
+ emailAddress: string;
32
+ };
33
+ archived?: boolean;
34
+ [key: string]: any;
35
+ }
36
+ /**
37
+ * Filter processor for JIRA projects
38
+ */
39
+ export declare class FilterProcessor {
40
+ private client;
41
+ private logger;
42
+ private presets;
43
+ constructor(client: JiraClient, options?: {
44
+ logger?: Logger;
45
+ });
46
+ /**
47
+ * Initialize default filter presets
48
+ */
49
+ private initializeDefaultPresets;
50
+ /**
51
+ * Add custom filter preset
52
+ */
53
+ addPreset(preset: FilterPreset): void;
54
+ /**
55
+ * Get filter preset by name
56
+ */
57
+ getPreset(name: string): FilterPreset | undefined;
58
+ /**
59
+ * List all available presets
60
+ */
61
+ listPresets(): FilterPreset[];
62
+ /**
63
+ * Apply filters to project list
64
+ *
65
+ * @param projects - List of JIRA projects
66
+ * @param options - Filter options
67
+ * @returns Filtered project list
68
+ */
69
+ applyFilters(projects: JiraProject[], options: FilterOptions): Promise<JiraProject[]>;
70
+ /**
71
+ * Filter active/archived projects
72
+ *
73
+ * @param projects - Project list
74
+ * @param activeOnly - If true, return only active projects
75
+ * @returns Filtered projects
76
+ */
77
+ filterActive(projects: JiraProject[], activeOnly?: boolean): JiraProject[];
78
+ /**
79
+ * Filter by project type
80
+ *
81
+ * @param projects - Project list
82
+ * @param types - Allowed types (e.g., 'software', 'business', 'service_desk')
83
+ * @returns Filtered projects
84
+ */
85
+ filterByType(projects: JiraProject[], types: string[]): JiraProject[];
86
+ /**
87
+ * Filter by project lead
88
+ *
89
+ * @param projects - Project list
90
+ * @param leadEmail - Lead email or display name
91
+ * @returns Filtered projects
92
+ */
93
+ filterByLead(projects: JiraProject[], leadEmail: string): JiraProject[];
94
+ /**
95
+ * Filter by custom JQL
96
+ *
97
+ * Uses JIRA Search API to execute JQL query
98
+ *
99
+ * @param projects - Original project list
100
+ * @param jql - JQL query string
101
+ * @returns Projects matching JQL
102
+ */
103
+ filterByJql(projects: JiraProject[], jql: string): Promise<JiraProject[]>;
104
+ /**
105
+ * Preview filter results
106
+ *
107
+ * @param projects - Project list
108
+ * @param options - Filter options
109
+ * @returns Preview summary
110
+ */
111
+ previewFilters(projects: JiraProject[], options: FilterOptions): Promise<{
112
+ original: number;
113
+ filtered: number;
114
+ reduction: number;
115
+ preview: string;
116
+ }>;
117
+ /**
118
+ * Load preset and apply filters
119
+ *
120
+ * @param projects - Project list
121
+ * @param presetName - Preset name
122
+ * @returns Filtered projects
123
+ */
124
+ applyPreset(projects: JiraProject[], presetName: string): Promise<JiraProject[]>;
125
+ }
126
+ //# sourceMappingURL=filter-processor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-processor.d.ts","sourceRoot":"","sources":["../../../../src/integrations/jira/filter-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE;QACL,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAA4B;gBAE/B,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAA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with active/archived, type, lead, and JQL support.
5
+ *
6
+ * NEW (v0.24.0): Enables selective project imports with filter presets
7
+ *
8
+ * @module integrations/jira/filter-processor
9
+ */
10
+ import { consoleLogger } from '../../utils/logger.js';
11
+ /**
12
+ * Filter processor for JIRA projects
13
+ */
14
+ export class FilterProcessor {
15
+ constructor(client, options = {}) {
16
+ this.client = client;
17
+ this.logger = options.logger ?? consoleLogger;
18
+ this.presets = new Map();
19
+ this.initializeDefaultPresets();
20
+ }
21
+ /**
22
+ * Initialize default filter presets
23
+ */
24
+ initializeDefaultPresets() {
25
+ this.addPreset({
26
+ name: 'production',
27
+ description: 'Active Agile projects (excludes TEST, SANDBOX)',
28
+ filters: {
29
+ active: true,
30
+ types: ['software'],
31
+ jql: 'project NOT IN (TEST, SANDBOX, DEMO)'
32
+ }
33
+ });
34
+ this.addPreset({
35
+ name: 'active-only',
36
+ description: 'All active projects',
37
+ filters: {
38
+ active: true,
39
+ excludeArchived: true
40
+ }
41
+ });
42
+ this.addPreset({
43
+ name: 'agile-only',
44
+ description: 'Agile/Scrum projects only',
45
+ filters: {
46
+ types: ['software', 'agile']
47
+ }
48
+ });
49
+ }
50
+ /**
51
+ * Add custom filter preset
52
+ */
53
+ addPreset(preset) {
54
+ this.presets.set(preset.name, preset);
55
+ }
56
+ /**
57
+ * Get filter preset by name
58
+ */
59
+ getPreset(name) {
60
+ return this.presets.get(name);
61
+ }
62
+ /**
63
+ * List all available presets
64
+ */
65
+ listPresets() {
66
+ return Array.from(this.presets.values());
67
+ }
68
+ /**
69
+ * Apply filters to project list
70
+ *
71
+ * @param projects - List of JIRA projects
72
+ * @param options - Filter options
73
+ * @returns Filtered project list
74
+ */
75
+ async applyFilters(projects, options) {
76
+ let filtered = [...projects];
77
+ // Filter: Active only (non-archived)
78
+ if (options.active !== undefined) {
79
+ filtered = this.filterActive(filtered, options.active);
80
+ this.logger.log(`After active filter: ${filtered.length} projects`);
81
+ }
82
+ // Filter: Exclude archived
83
+ if (options.excludeArchived) {
84
+ filtered = this.filterActive(filtered, true);
85
+ this.logger.log(`After exclude archived: ${filtered.length} projects`);
86
+ }
87
+ // Filter: By project type
88
+ if (options.types && options.types.length > 0) {
89
+ filtered = this.filterByType(filtered, options.types);
90
+ this.logger.log(`After type filter: ${filtered.length} projects`);
91
+ }
92
+ // Filter: By lead
93
+ if (options.lead) {
94
+ filtered = this.filterByLead(filtered, options.lead);
95
+ this.logger.log(`After lead filter: ${filtered.length} projects`);
96
+ }
97
+ // Filter: Custom JQL (requires API call)
98
+ if (options.jql) {
99
+ filtered = await this.filterByJql(filtered, options.jql);
100
+ this.logger.log(`After JQL filter: ${filtered.length} projects`);
101
+ }
102
+ return filtered;
103
+ }
104
+ /**
105
+ * Filter active/archived projects
106
+ *
107
+ * @param projects - Project list
108
+ * @param activeOnly - If true, return only active projects
109
+ * @returns Filtered projects
110
+ */
111
+ filterActive(projects, activeOnly = true) {
112
+ return projects.filter(p => {
113
+ const isArchived = p.archived === true;
114
+ return activeOnly ? !isArchived : isArchived;
115
+ });
116
+ }
117
+ /**
118
+ * Filter by project type
119
+ *
120
+ * @param projects - Project list
121
+ * @param types - Allowed types (e.g., 'software', 'business', 'service_desk')
122
+ * @returns Filtered projects
123
+ */
124
+ filterByType(projects, types) {
125
+ const normalizedTypes = types.map(t => t.toLowerCase());
126
+ return projects.filter(p => {
127
+ if (!p.projectTypeKey)
128
+ return false;
129
+ return normalizedTypes.includes(p.projectTypeKey.toLowerCase());
130
+ });
131
+ }
132
+ /**
133
+ * Filter by project lead
134
+ *
135
+ * @param projects - Project list
136
+ * @param leadEmail - Lead email or display name
137
+ * @returns Filtered projects
138
+ */
139
+ filterByLead(projects, leadEmail) {
140
+ const normalizedLead = leadEmail.toLowerCase();
141
+ return projects.filter(p => {
142
+ if (!p.lead)
143
+ return false;
144
+ const emailMatch = p.lead.emailAddress?.toLowerCase() === normalizedLead;
145
+ const nameMatch = p.lead.displayName?.toLowerCase().includes(normalizedLead);
146
+ return emailMatch || nameMatch;
147
+ });
148
+ }
149
+ /**
150
+ * Filter by custom JQL
151
+ *
152
+ * Uses JIRA Search API to execute JQL query
153
+ *
154
+ * @param projects - Original project list
155
+ * @param jql - JQL query string
156
+ * @returns Projects matching JQL
157
+ */
158
+ async filterByJql(projects, jql) {
159
+ try {
160
+ // Execute JQL search via JIRA API
161
+ const response = await this.client.searchWithJql(jql);
162
+ // Extract project keys from results
163
+ const matchingKeys = new Set(response.issues?.map((issue) => issue.fields?.project?.key).filter(Boolean) || []);
164
+ // Filter original list to matching projects
165
+ return projects.filter(p => matchingKeys.has(p.key));
166
+ }
167
+ catch (error) {
168
+ this.logger.error(`JQL filter failed: ${error.message}`);
169
+ throw new Error(`Invalid JQL query: ${jql}`);
170
+ }
171
+ }
172
+ /**
173
+ * Preview filter results
174
+ *
175
+ * @param projects - Project list
176
+ * @param options - Filter options
177
+ * @returns Preview summary
178
+ */
179
+ async previewFilters(projects, options) {
180
+ const original = projects.length;
181
+ const filtered = await this.applyFilters(projects, options);
182
+ const reduction = Math.round(((original - filtered.length) / original) * 100);
183
+ const preview = `
184
+ Filters will load ${filtered.length} projects (down from ${original})
185
+
186
+ Applied filters:
187
+ ${options.active ? ' ✓ Active projects only\n' : ''}${options.types ? ` ✓ Types: ${options.types.join(', ')}\n` : ''}${options.lead ? ` ✓ Lead: ${options.lead}\n` : ''}${options.jql ? ` ✓ JQL: ${options.jql}\n` : ''}
188
+ Reduction: ${reduction}% fewer projects`;
189
+ return { original, filtered: filtered.length, reduction, preview };
190
+ }
191
+ /**
192
+ * Load preset and apply filters
193
+ *
194
+ * @param projects - Project list
195
+ * @param presetName - Preset name
196
+ * @returns Filtered projects
197
+ */
198
+ async applyPreset(projects, presetName) {
199
+ const preset = this.getPreset(presetName);
200
+ if (!preset) {
201
+ throw new Error(`Filter preset not found: ${presetName}`);
202
+ }
203
+ this.logger.log(`Applying preset: ${preset.name} - ${preset.description}`);
204
+ return this.applyFilters(projects, preset.filters);
205
+ }
206
+ }
207
+ //# sourceMappingURL=filter-processor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-processor.js","sourceRoot":"","sources":["../../../../src/integrations/jira/filter-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AA6BtD;;GAEG;AACH,MAAM,OAAO,eAAe;IAK1B,YAAY,MAAkB,EAAE,UAA+B,EAAE;QAC/D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,wBAAwB,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,CAAC,SAAS,CAAC;YACb,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,CAAC,UAAU,CAAC;gBACnB,GAAG,EAAE,sCAAsC;aAC5C;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,CAAC;YACb,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,qBAAqB;YAClC,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI;gBACZ,eAAe,EAAE,IAAI;aACtB;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,CAAC;YACb,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,2BAA2B;YACxC,OAAO,EAAE;gBACP,KAAK,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;aAC7B;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,MAAoB;QAC5B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,SAAS,CA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Y,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;CACF"}
@@ -173,5 +173,18 @@ export declare class JiraClient {
173
173
  * POST /rest/api/3/issue/{issueIdOrKey}/comment
174
174
  */
175
175
  addComment(issueKey: string, comment: string): Promise<void>;
176
+ /**
177
+ * Execute raw JQL search query
178
+ *
179
+ * NEW (v0.24.0): Used by FilterProcessor for custom JQL filtering
180
+ *
181
+ * @param jql - JQL query string
182
+ * @param maxResults - Maximum results (default: 100)
183
+ * @returns Search response with issues
184
+ */
185
+ searchWithJql(jql: string, maxResults?: number): Promise<{
186
+ issues: JiraIssue[];
187
+ total: number;
188
+ }>;
176
189
  }
177
190
  //# sourceMappingURL=jira-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jira-client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/jira/jira-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,GAAG,CAAC;QAClB,SAAS,EAAE;YACT,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,MAAM,EAAE;YACN,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,QAAQ,CAAC,EAAE;YACT,SAAS,EAAE,MAAM,CAAC;YAClB,WAAW,EAAE,MAAM,CAAC;YACpB,YAAY,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,EAAE,EAAE,MAAM,CA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