@crypto512/jicon-mcp 2.3.19 → 2.3.21

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 (44) hide show
  1. package/README.md +1 -1
  2. package/TOOL_LIST.md +45 -8
  3. package/dist/confluence/client.d.ts +4 -0
  4. package/dist/confluence/client.d.ts.map +1 -1
  5. package/dist/confluence/client.js +19 -0
  6. package/dist/confluence/client.js.map +1 -1
  7. package/dist/confluence/formatters.d.ts +10 -0
  8. package/dist/confluence/formatters.d.ts.map +1 -1
  9. package/dist/confluence/formatters.js +81 -0
  10. package/dist/confluence/formatters.js.map +1 -1
  11. package/dist/confluence/tools.d.ts +15 -11
  12. package/dist/confluence/tools.d.ts.map +1 -1
  13. package/dist/confluence/tools.js +88 -20
  14. package/dist/confluence/tools.js.map +1 -1
  15. package/dist/permissions/tool-registry.d.ts +5 -5
  16. package/dist/permissions/tool-registry.d.ts.map +1 -1
  17. package/dist/permissions/tool-registry.js +1 -1
  18. package/dist/permissions/tool-registry.js.map +1 -1
  19. package/dist/utils/buffer-tools.d.ts.map +1 -1
  20. package/dist/utils/buffer-tools.js +29 -17
  21. package/dist/utils/buffer-tools.js.map +1 -1
  22. package/dist/utils/jicon-help.d.ts +1 -1
  23. package/dist/utils/jicon-help.d.ts.map +1 -1
  24. package/dist/utils/jicon-help.js +16 -4
  25. package/dist/utils/jicon-help.js.map +1 -1
  26. package/dist/utils/response-formatter.d.ts.map +1 -1
  27. package/dist/utils/response-formatter.js +11 -6
  28. package/dist/utils/response-formatter.js.map +1 -1
  29. package/dist/utils/sandbox/formatters.d.ts +1 -1
  30. package/dist/utils/sandbox/formatters.d.ts.map +1 -1
  31. package/dist/utils/sandbox/formatters.js +19 -0
  32. package/dist/utils/sandbox/formatters.js.map +1 -1
  33. package/dist/utils/schemas/confluence.d.ts +7 -2
  34. package/dist/utils/schemas/confluence.d.ts.map +1 -1
  35. package/dist/utils/schemas/confluence.js +22 -2
  36. package/dist/utils/schemas/confluence.js.map +1 -1
  37. package/dist/utils/whoami-tools.d.ts.map +1 -1
  38. package/dist/utils/whoami-tools.js +9 -4
  39. package/dist/utils/whoami-tools.js.map +1 -1
  40. package/package.json +3 -3
  41. package/.jicon.json.custom +0 -21
  42. package/.jicon.json.example +0 -15
  43. package/.jicon.json.readonly +0 -15
  44. package/.jicon.json.safewrite +0 -17
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * Note: JIRA_URL and CONFLUENCE_URL are injected separately as context variables.
19
19
  */
20
- export declare const FORMATTER_FUNCTIONS_JS = "\n// ============================================================================\n// XML Escaping\n// ============================================================================\n\n/**\n * Escape XML special characters\n */\nfunction escapeXml(str) {\n if (str == null) return '';\n return String(str)\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&apos;');\n}\n\n// ============================================================================\n// Conditional Formatting\n// ============================================================================\n\n/**\n * Evaluate a single filter condition\n */\nfunction evaluateCondition(item, condition) {\n const value = get(item, condition.field);\n const compareValue = condition.value;\n\n let matches = false;\n\n switch (condition.operator) {\n case 'eq':\n matches = value == compareValue;\n break;\n case 'ne':\n matches = value != compareValue;\n break;\n case 'gt':\n matches = value > compareValue;\n break;\n case 'lt':\n matches = value < compareValue;\n break;\n case 'gte':\n matches = value >= compareValue;\n break;\n case 'lte':\n matches = value <= compareValue;\n break;\n case 'contains':\n matches = String(value ?? '').toLowerCase().includes(String(compareValue ?? '').toLowerCase());\n break;\n case 'startsWith':\n matches = String(value ?? '').toLowerCase().startsWith(String(compareValue ?? '').toLowerCase());\n break;\n case 'endsWith':\n matches = String(value ?? '').toLowerCase().endsWith(String(compareValue ?? '').toLowerCase());\n break;\n case 'in':\n matches = Array.isArray(compareValue) && compareValue.includes(value);\n break;\n case 'notIn':\n matches = !Array.isArray(compareValue) || !compareValue.includes(value);\n break;\n case 'exists':\n matches = value !== null && value !== undefined;\n break;\n case 'notExists':\n matches = value === null || value === undefined;\n break;\n case 'regex':\n try {\n matches = new RegExp(compareValue).test(String(value ?? ''));\n } catch (e) {\n matches = false;\n }\n break;\n case 'empty':\n matches = value == null || value === '' || (Array.isArray(value) && value.length === 0);\n break;\n case 'notEmpty':\n matches = value != null && value !== '' && (!Array.isArray(value) || value.length > 0);\n break;\n default:\n matches = false;\n }\n\n // Handle OR conditions\n if (!matches && condition.or && Array.isArray(condition.or)) {\n for (const orCondition of condition.or) {\n if (evaluateCondition(item, orCondition)) {\n matches = true;\n break;\n }\n }\n }\n\n return matches;\n}\n\n/**\n * Evaluate format rules and return styles\n */\nfunction evaluateFormats(item, formats) {\n const fieldStyles = {};\n let rowStyle = {};\n\n if (!formats || !Array.isArray(formats)) {\n return { fieldStyles, rowStyle };\n }\n\n for (const format of formats) {\n if (evaluateCondition(item, format.condition)) {\n if (format.fields && format.fields.length > 0) {\n // Apply to specific fields\n for (const field of format.fields) {\n fieldStyles[field] = { ...(fieldStyles[field] || {}), ...format.style };\n }\n } else {\n // Apply to entire row\n rowStyle = { ...rowStyle, ...format.style };\n }\n }\n }\n\n return { fieldStyles, rowStyle };\n}\n\n/**\n * Convert style config to inline CSS\n */\nfunction styleToInlineCss(style) {\n if (!style) return '';\n const parts = [];\n if (style.color) parts.push('color: ' + style.color);\n if (style.backgroundColor) parts.push('background-color: ' + style.backgroundColor);\n if (style.bold) parts.push('font-weight: bold');\n if (style.italic) parts.push('font-style: italic');\n return parts.join('; ');\n}\n\n/**\n * Apply text decorations (prefix, suffix, icon)\n */\nfunction applyTextDecorations(value, style) {\n if (!style) return value;\n let result = value;\n if (style.icon) result = style.icon + ' ' + result;\n if (style.prefix) result = style.prefix + result;\n if (style.suffix) result = result + style.suffix;\n return result;\n}\n\n/**\n * Format cell value with styling\n */\nfunction formatCellXhtml(value, style) {\n // Convert value to string\n let strValue;\n if (value == null) {\n strValue = '';\n } else if (Array.isArray(value)) {\n strValue = value.join(', ');\n } else if (typeof value === 'object') {\n strValue = JSON.stringify(value);\n } else {\n strValue = String(value);\n }\n\n // Escape HTML\n strValue = escapeXml(strValue);\n\n // Apply decorations\n if (style) {\n strValue = applyTextDecorations(strValue, style);\n }\n\n // Wrap in styled span if needed\n if (style) {\n const inlineCss = styleToInlineCss(style);\n if (inlineCss || style.cssClass) {\n const attrs = [];\n if (style.cssClass) attrs.push('class=\"' + escapeXml(style.cssClass) + '\"');\n if (inlineCss) attrs.push('style=\"' + escapeXml(inlineCss) + '\"');\n return '<span ' + attrs.join(' ') + '>' + strValue + '</span>';\n }\n }\n\n return strValue;\n}\n\n/**\n * Get effective style for a field (merge row and field styles)\n */\nfunction getEffectiveStyle(fieldStyles, rowStyle, field) {\n const fieldStyle = fieldStyles[field];\n if (!fieldStyle && !rowStyle) return null;\n if (!fieldStyle) return rowStyle;\n if (!rowStyle) return fieldStyle;\n return { ...rowStyle, ...fieldStyle };\n}\n\n// ============================================================================\n// Link Generation\n// ============================================================================\n\n/**\n * Generate link URL based on config\n */\nfunction generateLinkUrl(value, item, link) {\n const strValue = value == null ? '' : String(value);\n if (!strValue) return null;\n\n switch (link.type) {\n case 'jira':\n if (typeof JIRA_URL !== 'undefined' && JIRA_URL) {\n return JIRA_URL + '/browse/' + strValue;\n }\n return null;\n case 'confluence':\n if (typeof CONFLUENCE_URL !== 'undefined' && CONFLUENCE_URL) {\n return CONFLUENCE_URL + '/pages/viewpage.action?pageId=' + strValue;\n }\n return null;\n case 'tempo':\n return null;\n case 'custom':\n if (link.template) {\n let url = link.template;\n const placeholders = url.match(/\\{\\{(\\w+(?:\\.\\w+)*)\\}\\}/g) || [];\n for (const placeholder of placeholders) {\n const fieldPath = placeholder.slice(2, -2);\n const fieldValue = fieldPath === 'value' ? strValue : get(item, fieldPath);\n url = url.replace(placeholder, encodeURIComponent(String(fieldValue ?? '')));\n }\n return url;\n }\n return null;\n default:\n return null;\n }\n}\n\n// ============================================================================\n// toTable() - Confluence Table Generator\n// ============================================================================\n\n/**\n * Generate XHTML table from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - Table configuration\n * @param {string} [config.title] - Optional h2 title above table\n * @param {Array} config.columns - Column definitions\n * @param {string} config.columns[].field - Field path (dot notation supported)\n * @param {string} config.columns[].header - Column header text\n * @param {Object} [config.columns[].link] - Link configuration\n * @param {string} [config.columns[].width] - CSS width\n * @param {string} [config.columns[].align] - Text alignment\n * @param {boolean} [config.showRowNumbers] - Add row number column\n * @param {string} [config.tableClass] - CSS class for table\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __xhtml: true, content: string }\n */\nfunction toTable(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toTable: first argument must be an array');\n }\n if (!config || !config.columns || !Array.isArray(config.columns)) {\n throw new Error('toTable: config.columns is required and must be an array');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('<h2>' + escapeXml(config.title) + '</h2>');\n }\n\n // Table attributes\n const tableAttrs = config.tableClass ? ' class=\"' + escapeXml(config.tableClass) + '\"' : '';\n\n // Table start\n lines.push('<table' + tableAttrs + '>');\n\n // Header row\n lines.push('<thead>');\n const headerCells = [];\n if (config.showRowNumbers) {\n headerCells.push('<th style=\"text-align: right; width: 30px\">#</th>');\n }\n for (const col of config.columns) {\n const attrs = [];\n if (col.align && col.align !== 'left') {\n attrs.push('style=\"text-align: ' + col.align + '\"');\n }\n if (col.width) {\n const existingStyle = attrs.find(a => a.startsWith('style='));\n if (existingStyle) {\n const idx = attrs.indexOf(existingStyle);\n attrs[idx] = existingStyle.replace('style=\"', 'style=\"width: ' + col.width + '; ');\n } else {\n attrs.push('style=\"width: ' + col.width + '\"');\n }\n }\n const attrStr = attrs.length > 0 ? ' ' + attrs.join(' ') : '';\n headerCells.push('<th' + attrStr + '>' + escapeXml(col.header) + '</th>');\n }\n lines.push('<tr>' + headerCells.join('') + '</tr>');\n lines.push('</thead>');\n\n // Body rows\n lines.push('<tbody>');\n array.forEach(function(item, index) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n const cells = [];\n\n // Row number\n if (config.showRowNumbers) {\n cells.push('<td style=\"text-align: right; width: 30px\">' + (index + 1) + '</td>');\n }\n\n // Data cells\n for (const col of config.columns) {\n const value = get(item, col.field);\n const style = getEffectiveStyle(fieldStyles, rowStyle, col.field);\n let content = formatCellXhtml(value, style);\n\n // Add link if configured\n if (col.link) {\n const url = generateLinkUrl(value, item, col.link);\n if (url) {\n content = '<a href=\"' + escapeXml(url) + '\">' + content + '</a>';\n }\n }\n\n // Cell attributes\n const cellAttrs = [];\n if (col.align && col.align !== 'left') {\n cellAttrs.push('style=\"text-align: ' + col.align + '\"');\n }\n if (col.width) {\n const existingStyle = cellAttrs.find(a => a.startsWith('style='));\n if (existingStyle) {\n const idx = cellAttrs.indexOf(existingStyle);\n cellAttrs[idx] = existingStyle.replace('style=\"', 'style=\"width: ' + col.width + '; ');\n } else {\n cellAttrs.push('style=\"width: ' + col.width + '\"');\n }\n }\n const cellAttrStr = cellAttrs.length > 0 ? ' ' + cellAttrs.join(' ') : '';\n cells.push('<td' + cellAttrStr + '>' + content + '</td>');\n }\n\n // Row attributes\n let rowAttrs = '';\n if (rowStyle) {\n const rowCss = styleToInlineCss(rowStyle);\n if (rowCss) rowAttrs = ' style=\"' + escapeXml(rowCss) + '\"';\n if (rowStyle.cssClass) rowAttrs += ' class=\"' + escapeXml(rowStyle.cssClass) + '\"';\n }\n\n lines.push('<tr' + rowAttrs + '>' + cells.join('') + '</tr>');\n });\n lines.push('</tbody>');\n\n // Table end\n lines.push('</table>');\n\n // Return marked XHTML object with toString for string concatenation\n const xhtml = lines.join('\\n');\n return { __xhtml: true, content: xhtml, toString: function() { return xhtml; } };\n}\n\n// ============================================================================\n// toList() - Confluence List Generator\n// ============================================================================\n\n/**\n * Generate XHTML list from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - List configuration\n * @param {string} [config.title] - Optional h2 title above list\n * @param {string} config.template - Template with {{field}} placeholders\n * @param {string} [config.style] - List style: \"bullet\", \"numbered\", \"none\"\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __xhtml: true, content: string }\n */\nfunction toList(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toList: first argument must be an array');\n }\n if (!config || typeof config.template !== 'string') {\n throw new Error('toList: config.template is required and must be a string');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('<h2>' + escapeXml(config.title) + '</h2>');\n }\n\n // Determine list tag\n const listStyle = config.style || 'bullet';\n const listTag = listStyle === 'numbered' ? 'ol' : 'ul';\n const listAttr = listStyle === 'none' ? ' style=\"list-style-type: none\"' : '';\n\n // List start\n lines.push('<' + listTag + listAttr + '>');\n\n // List items\n for (const item of array) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n\n // Process template\n let content = config.template;\n const placeholders = content.match(/\\{\\{(\\w+(?:\\.\\w+)*)\\}\\}/g) || [];\n for (const placeholder of placeholders) {\n const fieldPath = placeholder.slice(2, -2);\n const value = get(item, fieldPath);\n const style = getEffectiveStyle(fieldStyles, rowStyle, fieldPath);\n const formattedValue = formatCellXhtml(value, style);\n content = content.replace(placeholder, formattedValue);\n }\n\n // Item attributes\n let liAttrs = '';\n if (rowStyle) {\n const css = styleToInlineCss(rowStyle);\n if (css) liAttrs = ' style=\"' + escapeXml(css) + '\"';\n if (rowStyle.cssClass) liAttrs += ' class=\"' + escapeXml(rowStyle.cssClass) + '\"';\n }\n\n lines.push('<li' + liAttrs + '>' + content + '</li>');\n }\n\n // List end\n lines.push('</' + listTag + '>');\n\n // Return marked XHTML object with toString for string concatenation\n const xhtml = lines.join('\\n');\n return { __xhtml: true, content: xhtml, toString: function() { return xhtml; } };\n}\n\n// ============================================================================\n// Markdown Formatters\n// ============================================================================\n\n/**\n * Escape Markdown special characters in text\n * Note: We intentionally do NOT escape [ and ] because:\n * 1. They don't break markdown tables (only | does)\n * 2. Some frontends interpret \\[...\\] as LaTeX math mode\n */\nfunction escapeMd(str) {\n if (str == null) return '';\n return String(str)\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\|/g, '\\\\|')\n .replace(/\\n/g, ' ');\n}\n\n/**\n * Format cell value for Markdown with optional styling\n */\nfunction formatCellMarkdown(value, style) {\n // Convert value to string\n let strValue;\n if (value == null) {\n strValue = '';\n } else if (Array.isArray(value)) {\n strValue = value.join(', ');\n } else if (typeof value === 'object') {\n strValue = JSON.stringify(value);\n } else {\n strValue = String(value);\n }\n\n // Escape markdown special chars\n strValue = escapeMd(strValue);\n\n // Apply decorations\n if (style) {\n strValue = applyTextDecorations(strValue, style);\n\n // Apply markdown formatting\n if (style.bold) {\n strValue = '**' + strValue + '**';\n }\n if (style.italic) {\n strValue = '_' + strValue + '_';\n }\n }\n\n return strValue;\n}\n\n/**\n * Generate Markdown link\n */\nfunction generateMarkdownLink(value, item, link) {\n const url = generateLinkUrl(value, item, link);\n if (!url) return null;\n return { url, text: value == null ? '' : String(value) };\n}\n\n/**\n * Generate Markdown table from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - Table configuration\n * @param {string} [config.title] - Optional title above table\n * @param {Array} config.columns - Column definitions\n * @param {string} config.columns[].field - Field path (dot notation supported)\n * @param {string} config.columns[].header - Column header text\n * @param {Object} [config.columns[].link] - Link configuration\n * @param {string} [config.columns[].align] - Text alignment (left, center, right)\n * @param {boolean} [config.showRowNumbers] - Add row number column\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __markdown: true, content: string }\n */\nfunction toMarkdownTable(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toMarkdownTable: first argument must be an array');\n }\n if (!config || !config.columns || !Array.isArray(config.columns)) {\n throw new Error('toMarkdownTable: config.columns is required and must be an array');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('## ' + config.title);\n lines.push('');\n }\n\n // Build header row\n const headers = [];\n const separators = [];\n\n if (config.showRowNumbers) {\n headers.push('#');\n separators.push('--:'); // Right-aligned for numbers\n }\n\n for (const col of config.columns) {\n headers.push(escapeMd(col.header));\n // Alignment separator\n if (col.align === 'center') {\n separators.push(':--:');\n } else if (col.align === 'right') {\n separators.push('--:');\n } else {\n separators.push('---');\n }\n }\n\n lines.push('| ' + headers.join(' | ') + ' |');\n lines.push('| ' + separators.join(' | ') + ' |');\n\n // Body rows\n array.forEach(function(item, index) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n const cells = [];\n\n // Row number\n if (config.showRowNumbers) {\n cells.push(String(index + 1));\n }\n\n // Data cells\n for (const col of config.columns) {\n const value = get(item, col.field);\n const style = getEffectiveStyle(fieldStyles, rowStyle, col.field);\n let content = formatCellMarkdown(value, style);\n\n // Add link if configured\n if (col.link) {\n const linkInfo = generateMarkdownLink(value, item, col.link);\n if (linkInfo && linkInfo.url) {\n content = '[' + escapeMd(linkInfo.text) + '](' + linkInfo.url + ')';\n }\n }\n\n cells.push(content);\n }\n\n lines.push('| ' + cells.join(' | ') + ' |');\n });\n\n // Return marked Markdown object with toString for string concatenation\n const md = lines.join('\\n');\n return { __markdown: true, content: md, toString: function() { return md; } };\n}\n\n/**\n * Generate Markdown list from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - List configuration\n * @param {string} [config.title] - Optional title above list\n * @param {string} config.template - Template with {{field}} placeholders\n * @param {string} [config.style] - List style: \"bullet\", \"numbered\", \"task\"\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __markdown: true, content: string }\n */\nfunction toMarkdownList(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toMarkdownList: first argument must be an array');\n }\n if (!config || typeof config.template !== 'string') {\n throw new Error('toMarkdownList: config.template is required and must be a string');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('## ' + config.title);\n lines.push('');\n }\n\n // Determine list prefix\n const listStyle = config.style || 'bullet';\n let counter = 1;\n\n // List items\n for (const item of array) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n\n // Process template\n let content = config.template;\n const placeholders = content.match(/\\{\\{(\\w+(?:\\.\\w+)*)\\}\\}/g) || [];\n for (const placeholder of placeholders) {\n const fieldPath = placeholder.slice(2, -2);\n const value = get(item, fieldPath);\n const style = getEffectiveStyle(fieldStyles, rowStyle, fieldPath);\n const formattedValue = formatCellMarkdown(value, style);\n content = content.replace(placeholder, formattedValue);\n }\n\n // Format list item\n let prefix;\n if (listStyle === 'numbered') {\n prefix = counter + '. ';\n counter++;\n } else if (listStyle === 'task') {\n prefix = '- [ ] ';\n } else {\n prefix = '- ';\n }\n\n lines.push(prefix + content);\n }\n\n // Return marked Markdown object with toString for string concatenation\n const md = lines.join('\\n');\n return { __markdown: true, content: md, toString: function() { return md; } };\n}\n";
20
+ export declare const FORMATTER_FUNCTIONS_JS = "\n// ============================================================================\n// XML Escaping\n// ============================================================================\n\n/**\n * Escape XML special characters\n */\nfunction escapeXml(str) {\n if (str == null) return '';\n return String(str)\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&apos;');\n}\n\n// ============================================================================\n// Conditional Formatting\n// ============================================================================\n\n/**\n * Evaluate a single filter condition\n */\nfunction evaluateCondition(item, condition) {\n const value = get(item, condition.field);\n const compareValue = condition.value;\n\n let matches = false;\n\n switch (condition.operator) {\n case 'eq':\n matches = value == compareValue;\n break;\n case 'ne':\n matches = value != compareValue;\n break;\n case 'gt':\n matches = value > compareValue;\n break;\n case 'lt':\n matches = value < compareValue;\n break;\n case 'gte':\n matches = value >= compareValue;\n break;\n case 'lte':\n matches = value <= compareValue;\n break;\n case 'contains':\n matches = String(value ?? '').toLowerCase().includes(String(compareValue ?? '').toLowerCase());\n break;\n case 'startsWith':\n matches = String(value ?? '').toLowerCase().startsWith(String(compareValue ?? '').toLowerCase());\n break;\n case 'endsWith':\n matches = String(value ?? '').toLowerCase().endsWith(String(compareValue ?? '').toLowerCase());\n break;\n case 'in':\n matches = Array.isArray(compareValue) && compareValue.includes(value);\n break;\n case 'notIn':\n matches = !Array.isArray(compareValue) || !compareValue.includes(value);\n break;\n case 'exists':\n matches = value !== null && value !== undefined;\n break;\n case 'notExists':\n matches = value === null || value === undefined;\n break;\n case 'regex':\n try {\n matches = new RegExp(compareValue).test(String(value ?? ''));\n } catch (e) {\n matches = false;\n }\n break;\n case 'empty':\n matches = value == null || value === '' || (Array.isArray(value) && value.length === 0);\n break;\n case 'notEmpty':\n matches = value != null && value !== '' && (!Array.isArray(value) || value.length > 0);\n break;\n default:\n matches = false;\n }\n\n // Handle OR conditions\n if (!matches && condition.or && Array.isArray(condition.or)) {\n for (const orCondition of condition.or) {\n if (evaluateCondition(item, orCondition)) {\n matches = true;\n break;\n }\n }\n }\n\n return matches;\n}\n\n/**\n * Evaluate format rules and return styles\n */\nfunction evaluateFormats(item, formats) {\n const fieldStyles = {};\n let rowStyle = {};\n\n if (!formats || !Array.isArray(formats)) {\n return { fieldStyles, rowStyle };\n }\n\n for (const format of formats) {\n if (evaluateCondition(item, format.condition)) {\n if (format.fields && format.fields.length > 0) {\n // Apply to specific fields\n for (const field of format.fields) {\n fieldStyles[field] = { ...(fieldStyles[field] || {}), ...format.style };\n }\n } else {\n // Apply to entire row\n rowStyle = { ...rowStyle, ...format.style };\n }\n }\n }\n\n return { fieldStyles, rowStyle };\n}\n\n/**\n * Convert style config to inline CSS\n */\nfunction styleToInlineCss(style) {\n if (!style) return '';\n const parts = [];\n if (style.color) parts.push('color: ' + style.color);\n if (style.backgroundColor) parts.push('background-color: ' + style.backgroundColor);\n if (style.bold) parts.push('font-weight: bold');\n if (style.italic) parts.push('font-style: italic');\n return parts.join('; ');\n}\n\n/**\n * Apply text decorations (prefix, suffix, icon)\n */\nfunction applyTextDecorations(value, style) {\n if (!style) return value;\n let result = value;\n if (style.icon) result = style.icon + ' ' + result;\n if (style.prefix) result = style.prefix + result;\n if (style.suffix) result = result + style.suffix;\n return result;\n}\n\n/**\n * Format cell value with styling\n */\nfunction formatCellXhtml(value, style) {\n // Convert value to string\n let strValue;\n if (value == null) {\n strValue = '';\n } else if (Array.isArray(value)) {\n strValue = value.join(', ');\n } else if (typeof value === 'object') {\n strValue = JSON.stringify(value);\n } else {\n strValue = String(value);\n }\n\n // Escape HTML\n strValue = escapeXml(strValue);\n\n // Apply decorations\n if (style) {\n strValue = applyTextDecorations(strValue, style);\n }\n\n // Wrap in styled span if needed\n if (style) {\n const inlineCss = styleToInlineCss(style);\n if (inlineCss || style.cssClass) {\n const attrs = [];\n if (style.cssClass) attrs.push('class=\"' + escapeXml(style.cssClass) + '\"');\n if (inlineCss) attrs.push('style=\"' + escapeXml(inlineCss) + '\"');\n return '<span ' + attrs.join(' ') + '>' + strValue + '</span>';\n }\n }\n\n return strValue;\n}\n\n/**\n * Get effective style for a field (merge row and field styles)\n */\nfunction getEffectiveStyle(fieldStyles, rowStyle, field) {\n const fieldStyle = fieldStyles[field];\n if (!fieldStyle && !rowStyle) return null;\n if (!fieldStyle) return rowStyle;\n if (!rowStyle) return fieldStyle;\n return { ...rowStyle, ...fieldStyle };\n}\n\n// ============================================================================\n// Link Generation\n// ============================================================================\n\n/**\n * Generate link URL based on config\n */\nfunction generateLinkUrl(value, item, link) {\n const strValue = value == null ? '' : String(value);\n if (!strValue) return null;\n\n switch (link.type) {\n case 'jira':\n if (typeof JIRA_URL !== 'undefined' && JIRA_URL) {\n return JIRA_URL + '/browse/' + strValue;\n }\n return null;\n case 'confluence':\n if (typeof CONFLUENCE_URL !== 'undefined' && CONFLUENCE_URL) {\n return CONFLUENCE_URL + '/pages/viewpage.action?pageId=' + strValue;\n }\n return null;\n case 'tempo':\n return null;\n case 'custom':\n if (link.template) {\n let url = link.template;\n const placeholders = url.match(/\\{\\{(\\w+(?:\\.\\w+)*)\\}\\}/g) || [];\n for (const placeholder of placeholders) {\n const fieldPath = placeholder.slice(2, -2);\n const fieldValue = fieldPath === 'value' ? strValue : get(item, fieldPath);\n url = url.replace(placeholder, encodeURIComponent(String(fieldValue ?? '')));\n }\n return url;\n }\n return null;\n default:\n return null;\n }\n}\n\n// ============================================================================\n// toTable() - Confluence Table Generator\n// ============================================================================\n\n/**\n * Generate XHTML table from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - Table configuration\n * @param {string} [config.title] - Optional h2 title above table\n * @param {Array} config.columns - Column definitions\n * @param {string} config.columns[].field - Field path (dot notation supported)\n * @param {string} config.columns[].header - Column header text\n * @param {Object} [config.columns[].link] - Link configuration\n * @param {string} [config.columns[].width] - CSS width\n * @param {string} [config.columns[].align] - Text alignment\n * @param {boolean} [config.showRowNumbers] - Add row number column\n * @param {string} [config.tableClass] - CSS class for table\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __xhtml: true, content: string }\n */\nfunction toTable(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toTable: first argument must be an array');\n }\n if (!config || !config.columns || !Array.isArray(config.columns)) {\n throw new Error('toTable: config.columns is required and must be an array');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('<h2>' + escapeXml(config.title) + '</h2>');\n }\n\n // Table attributes\n const tableAttrs = config.tableClass ? ' class=\"' + escapeXml(config.tableClass) + '\"' : '';\n\n // Table start\n lines.push('<table' + tableAttrs + '>');\n\n // Header row\n lines.push('<thead>');\n const headerCells = [];\n if (config.showRowNumbers) {\n headerCells.push('<th style=\"text-align: right; width: 30px\">#</th>');\n }\n for (const col of config.columns) {\n const attrs = [];\n if (col.align && col.align !== 'left') {\n attrs.push('style=\"text-align: ' + col.align + '\"');\n }\n if (col.width) {\n const existingStyle = attrs.find(a => a.startsWith('style='));\n if (existingStyle) {\n const idx = attrs.indexOf(existingStyle);\n attrs[idx] = existingStyle.replace('style=\"', 'style=\"width: ' + col.width + '; ');\n } else {\n attrs.push('style=\"width: ' + col.width + '\"');\n }\n }\n const attrStr = attrs.length > 0 ? ' ' + attrs.join(' ') : '';\n headerCells.push('<th' + attrStr + '>' + escapeXml(col.header) + '</th>');\n }\n lines.push('<tr>' + headerCells.join('') + '</tr>');\n lines.push('</thead>');\n\n // Body rows\n lines.push('<tbody>');\n array.forEach(function(item, index) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n const cells = [];\n\n // Row number\n if (config.showRowNumbers) {\n cells.push('<td style=\"text-align: right; width: 30px\">' + (index + 1) + '</td>');\n }\n\n // Data cells\n for (const col of config.columns) {\n const value = get(item, col.field);\n const style = getEffectiveStyle(fieldStyles, rowStyle, col.field);\n let content = formatCellXhtml(value, style);\n\n // Add link if configured\n if (col.link) {\n const url = generateLinkUrl(value, item, col.link);\n if (url) {\n content = '<a href=\"' + escapeXml(url) + '\">' + content + '</a>';\n }\n }\n\n // Cell attributes\n const cellAttrs = [];\n if (col.align && col.align !== 'left') {\n cellAttrs.push('style=\"text-align: ' + col.align + '\"');\n }\n if (col.width) {\n const existingStyle = cellAttrs.find(a => a.startsWith('style='));\n if (existingStyle) {\n const idx = cellAttrs.indexOf(existingStyle);\n cellAttrs[idx] = existingStyle.replace('style=\"', 'style=\"width: ' + col.width + '; ');\n } else {\n cellAttrs.push('style=\"width: ' + col.width + '\"');\n }\n }\n const cellAttrStr = cellAttrs.length > 0 ? ' ' + cellAttrs.join(' ') : '';\n cells.push('<td' + cellAttrStr + '>' + content + '</td>');\n }\n\n // Row attributes\n let rowAttrs = '';\n if (rowStyle) {\n const rowCss = styleToInlineCss(rowStyle);\n if (rowCss) rowAttrs = ' style=\"' + escapeXml(rowCss) + '\"';\n if (rowStyle.cssClass) rowAttrs += ' class=\"' + escapeXml(rowStyle.cssClass) + '\"';\n }\n\n lines.push('<tr' + rowAttrs + '>' + cells.join('') + '</tr>');\n });\n lines.push('</tbody>');\n\n // Table end\n lines.push('</table>');\n\n // Return marked XHTML object with toString for string concatenation\n const xhtml = lines.join('\\n');\n return { __xhtml: true, content: xhtml, toString: function() { return xhtml; } };\n}\n\n// ============================================================================\n// toList() - Confluence List Generator\n// ============================================================================\n\n/**\n * Generate XHTML list from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - List configuration\n * @param {string} [config.title] - Optional h2 title above list\n * @param {string} config.template - Template with {{field}} placeholders\n * @param {string} [config.style] - List style: \"bullet\", \"numbered\", \"none\"\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __xhtml: true, content: string }\n */\nfunction toList(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toList: first argument must be an array');\n }\n if (!config || typeof config.template !== 'string') {\n throw new Error('toList: config.template is required and must be a string');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('<h2>' + escapeXml(config.title) + '</h2>');\n }\n\n // Determine list tag\n const listStyle = config.style || 'bullet';\n const listTag = listStyle === 'numbered' ? 'ol' : 'ul';\n const listAttr = listStyle === 'none' ? ' style=\"list-style-type: none\"' : '';\n\n // List start\n lines.push('<' + listTag + listAttr + '>');\n\n // List items\n for (const item of array) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n\n // Process template\n let content = config.template;\n const placeholders = content.match(/\\{\\{(\\w+(?:\\.\\w+)*)\\}\\}/g) || [];\n for (const placeholder of placeholders) {\n const fieldPath = placeholder.slice(2, -2);\n const value = get(item, fieldPath);\n const style = getEffectiveStyle(fieldStyles, rowStyle, fieldPath);\n const formattedValue = formatCellXhtml(value, style);\n content = content.replace(placeholder, formattedValue);\n }\n\n // Item attributes\n let liAttrs = '';\n if (rowStyle) {\n const css = styleToInlineCss(rowStyle);\n if (css) liAttrs = ' style=\"' + escapeXml(css) + '\"';\n if (rowStyle.cssClass) liAttrs += ' class=\"' + escapeXml(rowStyle.cssClass) + '\"';\n }\n\n lines.push('<li' + liAttrs + '>' + content + '</li>');\n }\n\n // List end\n lines.push('</' + listTag + '>');\n\n // Return marked XHTML object with toString for string concatenation\n const xhtml = lines.join('\\n');\n return { __xhtml: true, content: xhtml, toString: function() { return xhtml; } };\n}\n\n// ============================================================================\n// Markdown Formatters\n// ============================================================================\n\n/**\n * Escape Markdown special characters in text\n * Note: We intentionally do NOT escape [ and ] because:\n * 1. They don't break markdown tables (only | does)\n * 2. Some frontends interpret \\[...\\] as LaTeX math mode\n */\nfunction escapeMd(str) {\n if (str == null) return '';\n return String(str)\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\|/g, '\\\\|')\n .replace(/\\n/g, ' ');\n}\n\n/**\n * Format cell value for Markdown with optional styling\n */\nfunction formatCellMarkdown(value, style) {\n // Convert value to string\n let strValue;\n if (value == null) {\n strValue = '';\n } else if (Array.isArray(value)) {\n strValue = value.join(', ');\n } else if (typeof value === 'object') {\n strValue = JSON.stringify(value);\n } else {\n strValue = String(value);\n }\n\n // Escape markdown special chars\n strValue = escapeMd(strValue);\n\n // Apply decorations\n if (style) {\n strValue = applyTextDecorations(strValue, style);\n\n // Apply markdown formatting\n if (style.bold) {\n strValue = '**' + strValue + '**';\n }\n if (style.italic) {\n strValue = '_' + strValue + '_';\n }\n }\n\n return strValue;\n}\n\n/**\n * Generate Markdown link\n */\nfunction generateMarkdownLink(value, item, link) {\n const url = generateLinkUrl(value, item, link);\n if (!url) return null;\n return { url, text: value == null ? '' : String(value) };\n}\n\n/**\n * Generate Markdown table from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - Table configuration\n * @param {string} [config.title] - Optional title above table\n * @param {Array} config.columns - Column definitions\n * @param {string} config.columns[].field - Field path (dot notation supported)\n * @param {string} config.columns[].header - Column header text\n * @param {Object} [config.columns[].link] - Link configuration\n * @param {string} [config.columns[].align] - Text alignment (left, center, right)\n * @param {boolean} [config.showRowNumbers] - Add row number column\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __markdown: true, content: string }\n */\nfunction toMarkdownTable(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toMarkdownTable: first argument must be an array');\n }\n if (!config || !config.columns || !Array.isArray(config.columns)) {\n throw new Error('toMarkdownTable: config.columns is required and must be an array');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('## ' + config.title);\n lines.push('');\n }\n\n // Build header row\n const headers = [];\n const separators = [];\n\n if (config.showRowNumbers) {\n headers.push('#');\n separators.push('--:'); // Right-aligned for numbers\n }\n\n for (const col of config.columns) {\n headers.push(escapeMd(col.header));\n // Alignment separator\n if (col.align === 'center') {\n separators.push(':--:');\n } else if (col.align === 'right') {\n separators.push('--:');\n } else {\n separators.push('---');\n }\n }\n\n lines.push('| ' + headers.join(' | ') + ' |');\n lines.push('| ' + separators.join(' | ') + ' |');\n\n // Body rows\n array.forEach(function(item, index) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n const cells = [];\n\n // Row number\n if (config.showRowNumbers) {\n cells.push(String(index + 1));\n }\n\n // Data cells\n for (const col of config.columns) {\n const value = get(item, col.field);\n const style = getEffectiveStyle(fieldStyles, rowStyle, col.field);\n let content = formatCellMarkdown(value, style);\n\n // Add link if configured\n if (col.link) {\n const linkInfo = generateMarkdownLink(value, item, col.link);\n if (linkInfo && linkInfo.url) {\n content = '[' + escapeMd(linkInfo.text) + '](' + linkInfo.url + ')';\n }\n }\n\n cells.push(content);\n }\n\n lines.push('| ' + cells.join(' | ') + ' |');\n });\n\n // Return marked Markdown object with toString for string concatenation\n const md = lines.join('\\n');\n return { __markdown: true, content: md, toString: function() { return md; } };\n}\n\n/**\n * Generate Markdown list from array of objects\n *\n * @param {Array} array - Array of objects to display\n * @param {Object} config - List configuration\n * @param {string} [config.title] - Optional title above list\n * @param {string} config.template - Template with {{field}} placeholders\n * @param {string} [config.style] - List style: \"bullet\", \"numbered\", \"task\"\n * @param {Array} [config.format] - Conditional formatting rules\n * @returns {Object} { __markdown: true, content: string }\n */\nfunction toMarkdownList(array, config) {\n if (!Array.isArray(array)) {\n throw new Error('toMarkdownList: first argument must be an array');\n }\n if (!config || typeof config.template !== 'string') {\n throw new Error('toMarkdownList: config.template is required and must be a string');\n }\n\n const lines = [];\n\n // Add title if present\n if (config.title) {\n lines.push('## ' + config.title);\n lines.push('');\n }\n\n // Determine list prefix\n const listStyle = config.style || 'bullet';\n let counter = 1;\n\n // List items\n for (const item of array) {\n const { fieldStyles, rowStyle } = evaluateFormats(item, config.format);\n\n // Process template\n let content = config.template;\n const placeholders = content.match(/\\{\\{(\\w+(?:\\.\\w+)*)\\}\\}/g) || [];\n for (const placeholder of placeholders) {\n const fieldPath = placeholder.slice(2, -2);\n const value = get(item, fieldPath);\n const style = getEffectiveStyle(fieldStyles, rowStyle, fieldPath);\n const formattedValue = formatCellMarkdown(value, style);\n content = content.replace(placeholder, formattedValue);\n }\n\n // Format list item\n let prefix;\n if (listStyle === 'numbered') {\n prefix = counter + '. ';\n counter++;\n } else if (listStyle === 'task') {\n prefix = '- [ ] ';\n } else {\n prefix = '- ';\n }\n\n lines.push(prefix + content);\n }\n\n // Return marked Markdown object with toString for string concatenation\n const md = lines.join('\\n');\n return { __markdown: true, content: md, toString: function() { return md; } };\n}\n\n// ============================================================================\n// toMarkdown() - Freeform Markdown wrapper\n// ============================================================================\n\n/**\n * Wrap a freeform markdown string for direct display.\n * Use this instead of `return someString` to get the output displayed\n * directly (small output) or get a clear error if too large.\n *\n * @param {string} content - Markdown string\n * @returns {Object} { __markdown: true, content: string }\n */\nfunction toMarkdown(content) {\n if (typeof content !== 'string') {\n throw new Error('toMarkdown: argument must be a string');\n }\n return { __markdown: true, content: content, toString: function() { return content; } };\n}\n";
21
21
  /**
22
22
  * Get the JavaScript code for formatter functions
23
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/utils/sandbox/formatters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,kspBAupBlC,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAElD"}
1
+ {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/utils/sandbox/formatters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,q7qBA0qBlC,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAElD"}
@@ -680,6 +680,25 @@ function toMarkdownList(array, config) {
680
680
  const md = lines.join('\\n');
681
681
  return { __markdown: true, content: md, toString: function() { return md; } };
682
682
  }
683
+
684
+ // ============================================================================
685
+ // toMarkdown() - Freeform Markdown wrapper
686
+ // ============================================================================
687
+
688
+ /**
689
+ * Wrap a freeform markdown string for direct display.
690
+ * Use this instead of \`return someString\` to get the output displayed
691
+ * directly (small output) or get a clear error if too large.
692
+ *
693
+ * @param {string} content - Markdown string
694
+ * @returns {Object} { __markdown: true, content: string }
695
+ */
696
+ function toMarkdown(content) {
697
+ if (typeof content !== 'string') {
698
+ throw new Error('toMarkdown: argument must be a string');
699
+ }
700
+ return { __markdown: true, content: content, toString: function() { return content; } };
701
+ }
683
702
  `;
684
703
  /**
685
704
  * Get the JavaScript code for formatter functions
@@ -1 +1 @@
1
- {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/utils/sandbox/formatters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0qBrC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,sBAAsB,CAAC;AAChC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Confluence Schema Definitions
3
3
  *
4
4
  * Defines schemas for Confluence data types used by:
5
- * - confluence_search, confluence_get_children
5
+ * - confluence_search_content, confluence_get_pages
6
6
  * - confluence_list_spaces, confluence_get_space
7
7
  * - confluence_get_comments
8
8
  * - confluence_list_attachments
@@ -11,7 +11,7 @@
11
11
  import type { SchemaDefinition } from "./index.js";
12
12
  /**
13
13
  * Confluence Page schema
14
- * Used by: confluence_search, confluence_get_children
14
+ * Used by: confluence_search_content
15
15
  */
16
16
  export declare const CONFLUENCE_PAGE_SCHEMA: SchemaDefinition;
17
17
  /**
@@ -34,6 +34,11 @@ export declare const CONFLUENCE_ATTACHMENT_SCHEMA: SchemaDefinition;
34
34
  * Used by: confluence_list_drafts
35
35
  */
36
36
  export declare const CONFLUENCE_DRAFT_SCHEMA: SchemaDefinition;
37
+ /**
38
+ * Confluence Page Content schema (for batch reading with body text)
39
+ * Used by: confluence_get_pages
40
+ */
41
+ export declare const CONFLUENCE_PAGE_CONTENT_SCHEMA: SchemaDefinition;
37
42
  /**
38
43
  * Export all Confluence schemas as a record
39
44
  */
@@ -1 +1 @@
1
- {"version":3,"file":"confluence.d.ts","sourceRoot":"","sources":["../../../src/utils/schemas/confluence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBAepC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAWrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAUvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,gBAY1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAWrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAM/D,CAAC"}
1
+ {"version":3,"file":"confluence.d.ts","sourceRoot":"","sources":["../../../src/utils/schemas/confluence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBAepC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAWrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAUvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,gBAY1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAWrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,gBAc5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAO/D,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Confluence Schema Definitions
3
3
  *
4
4
  * Defines schemas for Confluence data types used by:
5
- * - confluence_search, confluence_get_children
5
+ * - confluence_search_content, confluence_get_pages
6
6
  * - confluence_list_spaces, confluence_get_space
7
7
  * - confluence_get_comments
8
8
  * - confluence_list_attachments
@@ -10,7 +10,7 @@
10
10
  */
11
11
  /**
12
12
  * Confluence Page schema
13
- * Used by: confluence_search, confluence_get_children
13
+ * Used by: confluence_search_content
14
14
  */
15
15
  export const CONFLUENCE_PAGE_SCHEMA = {
16
16
  schemaType: "confluence_page",
@@ -92,6 +92,25 @@ export const CONFLUENCE_DRAFT_SCHEMA = {
92
92
  lastModified: { type: "string", required: true, description: "Last modification date (ISO)" },
93
93
  },
94
94
  };
95
+ /**
96
+ * Confluence Page Content schema (for batch reading with body text)
97
+ * Used by: confluence_get_pages
98
+ */
99
+ export const CONFLUENCE_PAGE_CONTENT_SCHEMA = {
100
+ schemaType: "confluence_page_content",
101
+ description: "Confluence page with text content (for batch reading/summarization)",
102
+ fields: {
103
+ id: { type: "string", required: true, description: "Page ID" },
104
+ title: { type: "string", required: true, description: "Page title" },
105
+ spaceKey: { type: "string", required: true, description: "Space key" },
106
+ url: { type: "string", required: false, optional: true, description: "Web URL to view page" },
107
+ version: { type: "number", required: false, optional: true, description: "Current version number" },
108
+ lastModifiedBy: { type: "string", required: false, optional: true, description: "Last modifier display name" },
109
+ lastModifiedDate: { type: "string", required: false, optional: true, description: "Last modification date (ISO)" },
110
+ content: { type: "string", required: true, description: "Page body as plain text (XHTML stripped, markers: [OK] [WIP] [WAIT])" },
111
+ contentLength: { type: "number", required: true, description: "Content length in characters" },
112
+ },
113
+ };
95
114
  /**
96
115
  * Export all Confluence schemas as a record
97
116
  */
@@ -101,5 +120,6 @@ export const CONFLUENCE_SCHEMAS = {
101
120
  confluence_comment: CONFLUENCE_COMMENT_SCHEMA,
102
121
  confluence_attachment: CONFLUENCE_ATTACHMENT_SCHEMA,
103
122
  confluence_draft: CONFLUENCE_DRAFT_SCHEMA,
123
+ confluence_page_content: CONFLUENCE_PAGE_CONTENT_SCHEMA,
104
124
  };
105
125
  //# sourceMappingURL=confluence.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"confluence.js","sourceRoot":"","sources":["../../../src/utils/schemas/confluence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAqB;IACtD,UAAU,EAAE,i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EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE;QAClH,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sEAAsE,EAAE;QAChI,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE;KAC/F;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAqC;IAClE,eAAe,EAAE,sBAAsB;IACvC,gBAAgB,EAAE,uBAAuB;IACzC,kBAAkB,EAAE,yBAAyB;IAC7C,qBAAqB,EAAE,4BAA4B;IACnD,gBAAgB,EAAE,uBAAuB;IACzC,uBAAuB,EAAE,8BAA8B;CACxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"whoami-tools.d.ts","sourceRoot":"","sources":["../../src/utils/whoami-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,wBAAgB,iBAAiB;;;;uBAWR,OAAO,CAAC,UAAU,CAAC;;EAuE3C"}
1
+ {"version":3,"file":"whoami-tools.d.ts","sourceRoot":"","sources":["../../src/utils/whoami-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,wBAAgB,iBAAiB;;;;uBAgBR,OAAO,CAAC,UAAU,CAAC;;EAuE3C"}
@@ -11,13 +11,18 @@ import { getSessionJiraClient, getSessionConfluenceClient, } from "../session/co
11
11
  export function createWhoamiTools() {
12
12
  return {
13
13
  whoami: {
14
- description: `Get the currently authenticated user from all configured services.
14
+ description: `Get the currently authenticated user and their personal space.
15
15
 
16
16
  Returns user identity from Jira and Confluence (whichever are configured).
17
- For Confluence, also returns personal space info (spaceKey, homePageId).
18
- Useful for verifying credentials, getting user keys for queries, or confirming access.
17
+ For Confluence: returns personal space info (spaceKey, homePageId).
19
18
 
20
- Example: whoami()`,
19
+ Use this tool when you need:
20
+ - "Who am I?" / current user identity
21
+ - "My space" / "my personal space" / user's Confluence space key
22
+ - spaceKey for creating pages in user's personal space
23
+ - workerKey/username for Tempo or JQL queries (assignee, reporter)
24
+
25
+ Example: whoami() → { jira: { name, displayName }, confluence: { username, personalSpace: { spaceKey, homePageId } } }`,
21
26
  inputSchema: z.object({}),
22
27
  handler: async () => {
23
28
  const result = {};
@@ -1 +1 @@
1
- {"version":3,"file":"whoami-tools.js","sourceRoot":"","sources":["../../src/utils/whoami-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAG/B;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,MAAM,EAAE;YACN,WAAW,EAAE;;;;;;kBAMD;YACZ,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,IAAyB,EAAE;gBACvC,MAAM,MAAM,GAA4B,EAAE,CAAC;gBAC3C,MAAM,MAAM,GAAa,EAAE,CAAC;gBAE5B,gBAAgB;gBAChB,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;gBAC1C,IAAI,UAAU,EAAE,CAAC;oBACf,IAAI,CAAC;wBACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,cAAc,E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AS,CAAC,IAAI;oCACzB,SAAS,EAAE,SAAS,CAAC,IAAI;oCACzB,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE;oCAClC,aAAa,EAAE,SAAS,CAAC,QAAQ,EAAE,KAAK;iCACzC,CAAC;4BACJ,CAAC;wBACH,CAAC;wBAAC,MAAM,CAAC;4BACP,2CAA2C;wBAC7C,CAAC;wBAED,MAAM,CAAC,UAAU,GAAG,cAAc,CAAC;oBACrC,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACf,MAAM,CAAC,IAAI,CAAC,eAAe,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;oBAClF,CAAC;gBACH,CAAC;gBAED,qCAAqC;gBACrC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC5D,OAAO,WAAW,CAAC;wBACjB,KAAK,EAAE,IAAI;wBACX,OAAO,EAAE,mEAAmE;wBAC5E,UAAU,EAAE,GAAG;qBAChB,CAAC,CAAC;gBACL,CAAC;gBAED,uCAAuC;gBACvC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACtB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;gBACzB,CAAC;gBAED,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;YAC/B,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypto512/jicon-mcp",
3
- "version": "2.3.19",
3
+ "version": "2.3.21",
4
4
  "description": "Model Context Protocol server for Jira, Confluence, and Tempo integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  "license": "MIT",
41
41
  "dependencies": {
42
42
  "@modelcontextprotocol/sdk": "^1.26.0",
43
- "axios": "^1.13.4",
43
+ "axios": "^1.13.5",
44
44
  "express": "^4.22.1",
45
45
  "form-data": "^4.0.5",
46
46
  "linkedom": "^0.18.12",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/express": "^5.0.6",
52
- "@types/node": "^22.19.9",
52
+ "@types/node": "^22.19.11",
53
53
  "typescript": "^5.9.3"
54
54
  },
55
55
  "engines": {
@@ -1,21 +0,0 @@
1
- {
2
- "jira": {
3
- "url": "https://jira.example.com",
4
- "username": "your-email@example.com",
5
- "token": "your-jira-api-token"
6
- },
7
- "confluence": {
8
- "url": "https://confluence.example.com",
9
- "username": "your-email@example.com",
10
- "token": "your-confluence-api-token"
11
- },
12
- "permissions": {
13
- "mode": "custom",
14
- "whitelist": [
15
- "jira_read",
16
- "jira_create_issue",
17
- "confluence_read"
18
- ],
19
- "blacklist": []
20
- }
21
- }
@@ -1,15 +0,0 @@
1
- {
2
- "jira": {
3
- "url": "https://jira.example.com",
4
- "username": "your-email@example.com",
5
- "token": "your-jira-api-token"
6
- },
7
- "confluence": {
8
- "url": "https://confluence.example.com",
9
- "username": "your-email@example.com",
10
- "token": "your-confluence-api-token"
11
- },
12
- "permissions": {
13
- "mode": "full"
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- {
2
- "jira": {
3
- "url": "https://jira.example.com",
4
- "username": "your-email@example.com",
5
- "token": "your-jira-api-token"
6
- },
7
- "confluence": {
8
- "url": "https://confluence.example.com",
9
- "username": "your-email@example.com",
10
- "token": "your-confluence-api-token"
11
- },
12
- "permissions": {
13
- "mode": "readonly"
14
- }
15
- }
@@ -1,17 +0,0 @@
1
- {
2
- "jira": {
3
- "url": "https://jira.example.com",
4
- "username": "your-email@example.com",
5
- "token": "your-jira-api-token"
6
- },
7
- "confluence": {
8
- "url": "https://confluence.example.com",
9
- "username": "your-email@example.com",
10
- "token": "your-confluence-api-token"
11
- },
12
- "permissions": {
13
- "mode": "custom",
14
- "whitelist": ["jira_read", "confluence_write", "tempo_read"],
15
- "confluenceWriteHome": true
16
- }
17
- }