@neobiotechlabs/neobiotech-dev-agent 0.1.18 → 0.1.20

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.
package/dist/index.js CHANGED
@@ -13423,7 +13423,7 @@ var init_adf = __esm({
13423
13423
  });
13424
13424
 
13425
13425
  // node_modules/marked/lib/marked.esm.js
13426
- function M() {
13426
+ function z() {
13427
13427
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
13428
13428
  }
13429
13429
  function N(l3) {
@@ -13523,13 +13523,13 @@ function ot(l3, e2, t2) {
13523
13523
  `);
13524
13524
  }
13525
13525
  function g(l3, e2) {
13526
- return z.parse(l3, e2);
13526
+ return M.parse(l3, e2);
13527
13527
  }
13528
- var T, _, Te, m2, Oe, we, ye, B, Pe, j, oe, ae, Se, F2, $e, U, Le, _e, H, K, ze, le, Me, Ee, Ie, W, se, Ae, Ce, Be, qe, ue, De, I, Z2, X, ve, pe, He, Ze, Ge, ce, Ne, Qe, he, je, Fe, Ue, Ke, We, Xe, Je, Ve, Ye, et, v, tt, ke, de, nt, ie, J, rt, Q, st, q, A2, it, ge, w, x2, y, L, b, P, D, z, Kt, Wt, Xt, Jt, Vt, en, tn;
13528
+ var T, _, Te, m2, Oe, we, ye, B, Pe, j, oe, ae, Se, F2, $e, U, Le, _e, H, K, Me, le, ze, Ee, Ce, W, se, Ae, Ie, Be, qe, ue, De, C, Z2, X, ve, pe, He, Ze, Ge, ce, Ne, Qe, he, je, Fe, Ue, Ke, We, Xe, Je, Ve, Ye, et, v, tt, ke, de, nt, ie, J, rt, Q, st, q, A2, it, ge, w, x2, y, L, b, P, D, M, Kt, Wt, Xt, Jt, Vt, en, tn;
13529
13529
  var init_marked_esm = __esm({
13530
13530
  "node_modules/marked/lib/marked.esm.js"() {
13531
13531
  "use strict";
13532
- T = M();
13532
+ T = z();
13533
13533
  _ = { exec: () => null };
13534
13534
  Te = ((l3 = "") => {
13535
13535
  try {
@@ -13546,30 +13546,30 @@ var init_marked_esm = __esm({
13546
13546
  Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
13547
13547
  j = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
13548
13548
  oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
13549
- ae = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
13550
- Se = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
13551
- F2 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
13549
+ ae = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
13550
+ Se = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
13551
+ F2 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
13552
13552
  $e = /^[^\n]+/;
13553
13553
  U = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
13554
13554
  Le = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", U).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
13555
13555
  _e = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, j).getRegex();
13556
13556
  H = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
13557
13557
  K = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
13558
- ze = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", K).replace("tag", H).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
13559
- le = (l3) => d(F2).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", l3).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
13560
- Me = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
13561
- Ee = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/);
13562
- Ie = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ee).getRegex();
13563
- W = { blockquote: Ie, code: we, def: Le, fences: ye, heading: Pe, hr: B, html: ze, lheading: ae, list: _e, newline: Oe, paragraph: Me, table: _, text: $e };
13564
- se = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
13565
- Ae = { ...W, lheading: Se, table: se, paragraph: d(F2).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex() };
13566
- Ce = { ...W, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", K).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(F2).replace("hr", B).replace("heading", ` *#{1,6} *[^
13558
+ Me = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", K).replace("tag", H).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
13559
+ le = (l3) => d(F2).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", l3).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
13560
+ ze = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
13561
+ Ee = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
13562
+ Ce = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ee).getRegex();
13563
+ W = { blockquote: Ce, code: we, def: Le, fences: ye, heading: Pe, hr: B, html: Me, lheading: ae, list: _e, newline: Oe, paragraph: ze, table: _, text: $e };
13564
+ se = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
13565
+ Ae = { ...W, lheading: Se, table: se, paragraph: d(F2).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex() };
13566
+ Ie = { ...W, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", K).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(F2).replace("hr", B).replace("heading", ` *#{1,6} *[^
13567
13567
  ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
13568
13568
  Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
13569
13569
  qe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
13570
13570
  ue = /^( {2,}|\\)\n(?!\s*$)/;
13571
13571
  De = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
13572
- I = /[\p{P}\p{S}]/u;
13572
+ C = /[\p{P}\p{S}]/u;
13573
13573
  Z2 = /[\s\p{P}\p{S}]/u;
13574
13574
  X = /[^\s\p{P}\p{S}]/u;
13575
13575
  ve = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Z2).getRegex();
@@ -13578,16 +13578,16 @@ var init_marked_esm = __esm({
13578
13578
  Ze = /(?:[^\s\p{P}\p{S}]|~)/u;
13579
13579
  Ge = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Te ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
13580
13580
  ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
13581
- Ne = d(ce, "u").replace(/punct/g, I).getRegex();
13581
+ Ne = d(ce, "u").replace(/punct/g, C).getRegex();
13582
13582
  Qe = d(ce, "u").replace(/punct/g, pe).getRegex();
13583
13583
  he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
13584
- je = d(he, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, I).getRegex();
13584
+ je = d(he, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, C).getRegex();
13585
13585
  Fe = d(he, "gu").replace(/notPunctSpace/g, Ze).replace(/punctSpace/g, He).replace(/punct/g, pe).getRegex();
13586
- Ue = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, I).getRegex();
13587
- Ke = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, I).getRegex();
13586
+ Ue = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, C).getRegex();
13587
+ Ke = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, C).getRegex();
13588
13588
  We = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
13589
- Xe = d(We, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, I).getRegex();
13590
- Je = d(/\\(punct)/, "gu").replace(/punct/g, I).getRegex();
13589
+ Xe = d(We, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z2).replace(/punct/g, C).getRegex();
13590
+ Je = d(/\\(punct)/, "gu").replace(/punct/g, C).getRegex();
13591
13591
  Ve = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
13592
13592
  Ye = d(K).replace("(?:-->|$)", "-->").getRegex();
13593
13593
  et = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ye).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
@@ -13599,9 +13599,9 @@ var init_marked_esm = __esm({
13599
13599
  ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
13600
13600
  J = { _backpedal: _, anyPunctuation: Je, autolink: Ve, blockSkip: Ge, br: ue, code: qe, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: Ne, emStrongRDelimAst: je, emStrongRDelimUnd: Ue, escape: Be, link: tt, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: nt, tag: et, text: De, url: _ };
13601
13601
  rt = { ...J, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", v).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", v).getRegex() };
13602
- Q = { ...J, emStrongRDelimAst: Fe, emStrongLDelim: Qe, delLDelim: Ke, delRDelim: Xe, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
13602
+ Q = { ...J, emStrongRDelimAst: Fe, emStrongLDelim: Qe, delLDelim: Ke, delRDelim: Xe, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
13603
13603
  st = { ...Q, br: d(ue).replace("{2,}", "*").getRegex(), text: d(Q.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
13604
- q = { normal: W, gfm: Ae, pedantic: Ce };
13604
+ q = { normal: W, gfm: Ae, pedantic: Ie };
13605
13605
  A2 = { normal: J, gfm: Q, breaks: st, pedantic: rt };
13606
13606
  it = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
13607
13607
  ge = (l3) => it[l3];
@@ -13659,27 +13659,27 @@ var init_marked_esm = __esm({
13659
13659
  else if (!o) u.push(n[a]);
13660
13660
  else break;
13661
13661
  n = n.slice(a);
13662
- let c = u.join(`
13663
- `), p = c.replace(this.rules.other.blockquoteSetextReplace, `
13662
+ let p = u.join(`
13663
+ `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
13664
13664
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
13665
13665
  s2 = s2 ? `${s2}
13666
- ${c}` : c, r2 = r2 ? `${r2}
13667
- ${p}` : p;
13668
- let k = this.lexer.state.top;
13669
- if (this.lexer.state.top = true, this.lexer.blockTokens(p, i2, true), this.lexer.state.top = k, n.length === 0) break;
13670
- let h2 = i2.at(-1);
13671
- if (h2?.type === "code") break;
13672
- if (h2?.type === "blockquote") {
13673
- let R = h2, f3 = R.raw + `
13666
+ ${p}` : p, r2 = r2 ? `${r2}
13667
+ ${c}` : c;
13668
+ let h2 = this.lexer.state.top;
13669
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c, i2, true), this.lexer.state.top = h2, n.length === 0) break;
13670
+ let k = i2.at(-1);
13671
+ if (k?.type === "code") break;
13672
+ if (k?.type === "blockquote") {
13673
+ let R = k, f3 = R.raw + `
13674
13674
  ` + n.join(`
13675
13675
  `), S2 = this.blockquote(f3);
13676
13676
  i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - R.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.text.length) + S2.text;
13677
13677
  break;
13678
- } else if (h2?.type === "list") {
13679
- let R = h2, f3 = R.raw + `
13678
+ } else if (k?.type === "list") {
13679
+ let R = k, f3 = R.raw + `
13680
13680
  ` + n.join(`
13681
13681
  `), S2 = this.list(f3);
13682
- i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - h2.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.raw.length) + S2.raw, n = f3.substring(i2.at(-1).raw.length).split(`
13682
+ i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - k.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.raw.length) + S2.raw, n = f3.substring(i2.at(-1).raw.length).split(`
13683
13683
  `);
13684
13684
  continue;
13685
13685
  }
@@ -13694,31 +13694,31 @@ ${p}` : p;
13694
13694
  n = s2 ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s2 ? n : "[*+-]");
13695
13695
  let i2 = this.rules.other.listItemRegex(n), o = false;
13696
13696
  for (; e2; ) {
13697
- let a = false, c = "", p = "";
13697
+ let a = false, p = "", c = "";
13698
13698
  if (!(t2 = i2.exec(e2)) || this.rules.block.hr.test(e2)) break;
13699
- c = t2[0], e2 = e2.substring(c.length);
13700
- let k = me(t2[2].split(`
13701
- `, 1)[0], t2[1].length), h2 = e2.split(`
13702
- `, 1)[0], R = !k.trim(), f3 = 0;
13703
- if (this.options.pedantic ? (f3 = 2, p = k.trimStart()) : R ? f3 = t2[1].length + 1 : (f3 = k.search(this.rules.other.nonSpaceChar), f3 = f3 > 4 ? 1 : f3, p = k.slice(f3), f3 += t2[1].length), R && this.rules.other.blankLine.test(h2) && (c += h2 + `
13704
- `, e2 = e2.substring(h2.length + 1), a = true), !a) {
13699
+ p = t2[0], e2 = e2.substring(p.length);
13700
+ let h2 = me(t2[2].split(`
13701
+ `, 1)[0], t2[1].length), k = e2.split(`
13702
+ `, 1)[0], R = !h2.trim(), f3 = 0;
13703
+ if (this.options.pedantic ? (f3 = 2, c = h2.trimStart()) : R ? f3 = t2[1].length + 1 : (f3 = h2.search(this.rules.other.nonSpaceChar), f3 = f3 > 4 ? 1 : f3, c = h2.slice(f3), f3 += t2[1].length), R && this.rules.other.blankLine.test(k) && (p += k + `
13704
+ `, e2 = e2.substring(k.length + 1), a = true), !a) {
13705
13705
  let S2 = this.rules.other.nextBulletRegex(f3), te = this.rules.other.hrRegex(f3), ne = this.rules.other.fencesBeginRegex(f3), re = this.rules.other.headingBeginRegex(f3), be = this.rules.other.htmlBeginRegex(f3), Re = this.rules.other.blockquoteBeginRegex(f3);
13706
13706
  for (; e2; ) {
13707
13707
  let G = e2.split(`
13708
- `, 1)[0], C;
13709
- if (h2 = G, this.options.pedantic ? (h2 = h2.replace(this.rules.other.listReplaceNesting, " "), C = h2) : C = h2.replace(this.rules.other.tabCharGlobal, " "), ne.test(h2) || re.test(h2) || be.test(h2) || Re.test(h2) || S2.test(h2) || te.test(h2)) break;
13710
- if (C.search(this.rules.other.nonSpaceChar) >= f3 || !h2.trim()) p += `
13711
- ` + C.slice(f3);
13708
+ `, 1)[0], I;
13709
+ if (k = G, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), I = k) : I = k.replace(this.rules.other.tabCharGlobal, " "), ne.test(k) || re.test(k) || be.test(k) || Re.test(k) || S2.test(k) || te.test(k)) break;
13710
+ if (I.search(this.rules.other.nonSpaceChar) >= f3 || !k.trim()) c += `
13711
+ ` + I.slice(f3);
13712
13712
  else {
13713
- if (R || k.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(k) || re.test(k) || te.test(k)) break;
13714
- p += `
13715
- ` + h2;
13713
+ if (R || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || te.test(h2)) break;
13714
+ c += `
13715
+ ` + k;
13716
13716
  }
13717
- R = !h2.trim(), c += G + `
13718
- `, e2 = e2.substring(G.length + 1), k = C.slice(f3);
13717
+ R = !k.trim(), p += G + `
13718
+ `, e2 = e2.substring(G.length + 1), h2 = I.slice(f3);
13719
13719
  }
13720
13720
  }
13721
- r2.loose || (o ? r2.loose = true : this.rules.other.doubleBlankLine.test(c) && (o = true)), r2.items.push({ type: "list_item", raw: c, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: false, text: p, tokens: [] }), r2.raw += c;
13721
+ r2.loose || (o ? r2.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true)), r2.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), r2.raw += p;
13722
13722
  }
13723
13723
  let u = r2.items.at(-1);
13724
13724
  if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
@@ -13726,27 +13726,27 @@ ${p}` : p;
13726
13726
  r2.raw = r2.raw.trimEnd();
13727
13727
  for (let a of r2.items) {
13728
13728
  this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []);
13729
- let c = a.tokens[0];
13730
- if (a.task && (c?.type === "text" || c?.type === "paragraph")) {
13731
- a.text = a.text.replace(this.rules.other.listReplaceTask, ""), c.raw = c.raw.replace(this.rules.other.listReplaceTask, ""), c.text = c.text.replace(this.rules.other.listReplaceTask, "");
13732
- for (let k = this.lexer.inlineQueue.length - 1; k >= 0; k--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)) {
13733
- this.lexer.inlineQueue[k].src = this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask, "");
13729
+ let p = a.tokens[0];
13730
+ if (a.task && (p?.type === "text" || p?.type === "paragraph")) {
13731
+ a.text = a.text.replace(this.rules.other.listReplaceTask, ""), p.raw = p.raw.replace(this.rules.other.listReplaceTask, ""), p.text = p.text.replace(this.rules.other.listReplaceTask, "");
13732
+ for (let h2 = this.lexer.inlineQueue.length - 1; h2 >= 0; h2--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h2].src)) {
13733
+ this.lexer.inlineQueue[h2].src = this.lexer.inlineQueue[h2].src.replace(this.rules.other.listReplaceTask, "");
13734
13734
  break;
13735
13735
  }
13736
- let p = this.rules.other.listTaskCheckbox.exec(a.raw);
13737
- if (p) {
13738
- let k = { type: "checkbox", raw: p[0] + " ", checked: p[0] !== "[ ]" };
13739
- a.checked = k.checked, r2.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = k.raw + a.tokens[0].raw, a.tokens[0].text = k.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(k)) : a.tokens.unshift({ type: "paragraph", raw: k.raw, text: k.raw, tokens: [k] }) : a.tokens.unshift(k);
13736
+ let c = this.rules.other.listTaskCheckbox.exec(a.raw);
13737
+ if (c) {
13738
+ let h2 = { type: "checkbox", raw: c[0] + " ", checked: c[0] !== "[ ]" };
13739
+ a.checked = h2.checked, r2.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = h2.raw + a.tokens[0].raw, a.tokens[0].text = h2.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(h2)) : a.tokens.unshift({ type: "paragraph", raw: h2.raw, text: h2.raw, tokens: [h2] }) : a.tokens.unshift(h2);
13740
13740
  }
13741
13741
  } else a.task && (a.task = false);
13742
13742
  if (!r2.loose) {
13743
- let p = a.tokens.filter((h2) => h2.type === "space"), k = p.length > 0 && p.some((h2) => this.rules.other.anyLine.test(h2.raw));
13744
- r2.loose = k;
13743
+ let c = a.tokens.filter((k) => k.type === "space"), h2 = c.length > 0 && c.some((k) => this.rules.other.anyLine.test(k.raw));
13744
+ r2.loose = h2;
13745
13745
  }
13746
13746
  }
13747
13747
  if (r2.loose) for (let a of r2.items) {
13748
13748
  a.loose = true;
13749
- for (let c of a.tokens) c.type === "text" && (c.type = "paragraph");
13749
+ for (let p of a.tokens) p.type === "text" && (p.type = "paragraph");
13750
13750
  }
13751
13751
  return r2;
13752
13752
  }
@@ -13846,25 +13846,25 @@ ${p}` : p;
13846
13846
  let s2 = this.rules.inline.emStrongLDelim.exec(e2);
13847
13847
  if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
13848
13848
  if (!(s2[1] || s2[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
13849
- let i2 = [...s2[0]].length - 1, o, u, a = i2, c = 0, p = s2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
13850
- for (p.lastIndex = 0, t2 = t2.slice(-1 * e2.length + i2); (s2 = p.exec(t2)) !== null; ) {
13849
+ let i2 = [...s2[0]].length - 1, o, u, a = i2, p = 0, c = s2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
13850
+ for (c.lastIndex = 0, t2 = t2.slice(-1 * e2.length + i2); (s2 = c.exec(t2)) !== null; ) {
13851
13851
  if (o = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o) continue;
13852
13852
  if (u = [...o].length, s2[3] || s2[4]) {
13853
13853
  a += u;
13854
13854
  continue;
13855
13855
  } else if ((s2[5] || s2[6]) && i2 % 3 && !((i2 + u) % 3)) {
13856
- c += u;
13856
+ p += u;
13857
13857
  continue;
13858
13858
  }
13859
13859
  if (a -= u, a > 0) continue;
13860
- u = Math.min(u, u + a + c);
13861
- let k = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + k + u);
13860
+ u = Math.min(u, u + a + p);
13861
+ let h2 = [...s2[0]][0].length, k = e2.slice(0, i2 + s2.index + h2 + u);
13862
13862
  if (Math.min(i2, u) % 2) {
13863
- let f3 = h2.slice(1, -1);
13864
- return { type: "em", raw: h2, text: f3, tokens: this.lexer.inlineTokens(f3) };
13863
+ let f3 = k.slice(1, -1);
13864
+ return { type: "em", raw: k, text: f3, tokens: this.lexer.inlineTokens(f3) };
13865
13865
  }
13866
- let R = h2.slice(2, -2);
13867
- return { type: "strong", raw: h2, text: R, tokens: this.lexer.inlineTokens(R) };
13866
+ let R = k.slice(2, -2);
13867
+ return { type: "strong", raw: k, text: R, tokens: this.lexer.inlineTokens(R) };
13868
13868
  }
13869
13869
  }
13870
13870
  }
@@ -13883,8 +13883,8 @@ ${p}` : p;
13883
13883
  let s2 = this.rules.inline.delLDelim.exec(e2);
13884
13884
  if (!s2) return;
13885
13885
  if (!(s2[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
13886
- let i2 = [...s2[0]].length - 1, o, u, a = i2, c = this.rules.inline.delRDelim;
13887
- for (c.lastIndex = 0, t2 = t2.slice(-1 * e2.length + i2); (s2 = c.exec(t2)) !== null; ) {
13886
+ let i2 = [...s2[0]].length - 1, o, u, a = i2, p = this.rules.inline.delRDelim;
13887
+ for (p.lastIndex = 0, t2 = t2.slice(-1 * e2.length + i2); (s2 = p.exec(t2)) !== null; ) {
13888
13888
  if (o = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o || (u = [...o].length, u !== i2)) continue;
13889
13889
  if (s2[3] || s2[4]) {
13890
13890
  a += u;
@@ -13892,8 +13892,8 @@ ${p}` : p;
13892
13892
  }
13893
13893
  if (a -= u, a > 0) continue;
13894
13894
  u = Math.min(u, u + a);
13895
- let p = [...s2[0]][0].length, k = e2.slice(0, i2 + s2.index + p + u), h2 = k.slice(i2, -i2);
13896
- return { type: "del", raw: k, text: h2, tokens: this.lexer.inlineTokens(h2) };
13895
+ let c = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + c + u), k = h2.slice(i2, -i2);
13896
+ return { type: "del", raw: h2, text: k, tokens: this.lexer.inlineTokens(k) };
13897
13897
  }
13898
13898
  }
13899
13899
  }
@@ -14027,8 +14027,8 @@ ${p}` : p;
14027
14027
  let i2 = e2;
14028
14028
  if (this.options.extensions?.startBlock) {
14029
14029
  let o = 1 / 0, u = e2.slice(1), a;
14030
- this.options.extensions.startBlock.forEach((c) => {
14031
- a = c.call({ lexer: this }, u), typeof a == "number" && a >= 0 && (o = Math.min(o, a));
14030
+ this.options.extensions.startBlock.forEach((p) => {
14031
+ a = p.call({ lexer: this }, u), typeof a == "number" && a >= 0 && (o = Math.min(o, a));
14032
14032
  }), o < 1 / 0 && o >= 0 && (i2 = e2.substring(0, o + 1));
14033
14033
  }
14034
14034
  if (this.state.top && (r2 = this.tokenizer.paragraph(i2))) {
@@ -14060,78 +14060,78 @@ ${p}` : p;
14060
14060
  }
14061
14061
  inlineTokens(e2, t2 = []) {
14062
14062
  this.tokenizer.lexer = this;
14063
- let n = e2, s2 = null;
14063
+ let n = e2;
14064
14064
  if (this.tokens.links) {
14065
- let a = Object.keys(this.tokens.links);
14066
- if (a.length > 0) for (; (s2 = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null; ) a.includes(s2[0].slice(s2[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, s2.index) + "[" + "a".repeat(s2[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
14067
- }
14068
- for (; (s2 = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null; ) n = n.slice(0, s2.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
14069
- let r2;
14070
- for (; (s2 = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null; ) r2 = s2[2] ? s2[2].length : 0, n = n.slice(0, s2.index + r2) + "[" + "a".repeat(s2[0].length - r2 - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
14071
- n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
14072
- let i2 = false, o = "", u = 1 / 0;
14065
+ let o = Object.keys(this.tokens.links);
14066
+ o.length > 0 && (n = n.replace(this.tokenizer.rules.inline.reflinkSearch, (u) => o.includes(u.slice(u.lastIndexOf("[") + 1, -1)) ? "[" + "a".repeat(u.length - 2) + "]" : u));
14067
+ }
14068
+ n = n.replace(this.tokenizer.rules.inline.anyPunctuation, "++"), n = n.replace(this.tokenizer.rules.inline.blockSkip, (o, u, a) => {
14069
+ let p = a ? a.length : 0;
14070
+ return o.slice(0, p) + "[" + "a".repeat(o.length - p - 2) + "]";
14071
+ }), n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
14072
+ let s2 = false, r2 = "", i2 = 1 / 0;
14073
14073
  for (; e2; ) {
14074
- if (e2.length < u) u = e2.length;
14074
+ if (e2.length < i2) i2 = e2.length;
14075
14075
  else {
14076
14076
  this.infiniteLoopError(e2.charCodeAt(0));
14077
14077
  break;
14078
14078
  }
14079
- i2 || (o = ""), i2 = false;
14080
- let a;
14081
- if (this.options.extensions?.inline?.some((p) => (a = p.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(a.raw.length), t2.push(a), true) : false)) continue;
14082
- if (a = this.tokenizer.escape(e2)) {
14083
- e2 = e2.substring(a.raw.length), t2.push(a);
14079
+ s2 || (r2 = ""), s2 = false;
14080
+ let o;
14081
+ if (this.options.extensions?.inline?.some((a) => (o = a.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(o.raw.length), t2.push(o), true) : false)) continue;
14082
+ if (o = this.tokenizer.escape(e2)) {
14083
+ e2 = e2.substring(o.raw.length), t2.push(o);
14084
14084
  continue;
14085
14085
  }
14086
- if (a = this.tokenizer.tag(e2)) {
14087
- e2 = e2.substring(a.raw.length), t2.push(a);
14086
+ if (o = this.tokenizer.tag(e2)) {
14087
+ e2 = e2.substring(o.raw.length), t2.push(o);
14088
14088
  continue;
14089
14089
  }
14090
- if (a = this.tokenizer.link(e2)) {
14091
- e2 = e2.substring(a.raw.length), t2.push(a);
14090
+ if (o = this.tokenizer.link(e2)) {
14091
+ e2 = e2.substring(o.raw.length), t2.push(o);
14092
14092
  continue;
14093
14093
  }
14094
- if (a = this.tokenizer.reflink(e2, this.tokens.links)) {
14095
- e2 = e2.substring(a.raw.length);
14096
- let p = t2.at(-1);
14097
- a.type === "text" && p?.type === "text" ? (p.raw += a.raw, p.text += a.text) : t2.push(a);
14094
+ if (o = this.tokenizer.reflink(e2, this.tokens.links)) {
14095
+ e2 = e2.substring(o.raw.length);
14096
+ let a = t2.at(-1);
14097
+ o.type === "text" && a?.type === "text" ? (a.raw += o.raw, a.text += o.text) : t2.push(o);
14098
14098
  continue;
14099
14099
  }
14100
- if (a = this.tokenizer.emStrong(e2, n, o)) {
14101
- e2 = e2.substring(a.raw.length), t2.push(a);
14100
+ if (o = this.tokenizer.emStrong(e2, n, r2)) {
14101
+ e2 = e2.substring(o.raw.length), t2.push(o);
14102
14102
  continue;
14103
14103
  }
14104
- if (a = this.tokenizer.codespan(e2)) {
14105
- e2 = e2.substring(a.raw.length), t2.push(a);
14104
+ if (o = this.tokenizer.codespan(e2)) {
14105
+ e2 = e2.substring(o.raw.length), t2.push(o);
14106
14106
  continue;
14107
14107
  }
14108
- if (a = this.tokenizer.br(e2)) {
14109
- e2 = e2.substring(a.raw.length), t2.push(a);
14108
+ if (o = this.tokenizer.br(e2)) {
14109
+ e2 = e2.substring(o.raw.length), t2.push(o);
14110
14110
  continue;
14111
14111
  }
14112
- if (a = this.tokenizer.del(e2, n, o)) {
14113
- e2 = e2.substring(a.raw.length), t2.push(a);
14112
+ if (o = this.tokenizer.del(e2, n, r2)) {
14113
+ e2 = e2.substring(o.raw.length), t2.push(o);
14114
14114
  continue;
14115
14115
  }
14116
- if (a = this.tokenizer.autolink(e2)) {
14117
- e2 = e2.substring(a.raw.length), t2.push(a);
14116
+ if (o = this.tokenizer.autolink(e2)) {
14117
+ e2 = e2.substring(o.raw.length), t2.push(o);
14118
14118
  continue;
14119
14119
  }
14120
- if (!this.state.inLink && (a = this.tokenizer.url(e2))) {
14121
- e2 = e2.substring(a.raw.length), t2.push(a);
14120
+ if (!this.state.inLink && (o = this.tokenizer.url(e2))) {
14121
+ e2 = e2.substring(o.raw.length), t2.push(o);
14122
14122
  continue;
14123
14123
  }
14124
- let c = e2;
14124
+ let u = e2;
14125
14125
  if (this.options.extensions?.startInline) {
14126
- let p = 1 / 0, k = e2.slice(1), h2;
14127
- this.options.extensions.startInline.forEach((R) => {
14128
- h2 = R.call({ lexer: this }, k), typeof h2 == "number" && h2 >= 0 && (p = Math.min(p, h2));
14129
- }), p < 1 / 0 && p >= 0 && (c = e2.substring(0, p + 1));
14130
- }
14131
- if (a = this.tokenizer.inlineText(c)) {
14132
- e2 = e2.substring(a.raw.length), a.raw.slice(-1) !== "_" && (o = a.raw.slice(-1)), i2 = true;
14133
- let p = t2.at(-1);
14134
- p?.type === "text" ? (p.raw += a.raw, p.text += a.text) : t2.push(a);
14126
+ let a = 1 / 0, p = e2.slice(1), c;
14127
+ this.options.extensions.startInline.forEach((h2) => {
14128
+ c = h2.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
14129
+ }), a < 1 / 0 && a >= 0 && (u = e2.substring(0, a + 1));
14130
+ }
14131
+ if (o = this.tokenizer.inlineText(u)) {
14132
+ e2 = e2.substring(o.raw.length), o.raw.slice(-1) !== "_" && (r2 = o.raw.slice(-1)), s2 = true;
14133
+ let a = t2.at(-1);
14134
+ a?.type === "text" ? (a.raw += o.raw, a.text += o.text) : t2.push(o);
14135
14135
  continue;
14136
14136
  }
14137
14137
  if (e2) {
@@ -14477,7 +14477,7 @@ ${e2}</tr>
14477
14477
  }
14478
14478
  };
14479
14479
  D = class {
14480
- defaults = M();
14480
+ defaults = z();
14481
14481
  options = this.setOptions;
14482
14482
  parse = this.parseMarkdown(true);
14483
14483
  parseInline = this.parseMarkdown(false);
@@ -14539,9 +14539,9 @@ ${e2}</tr>
14539
14539
  if (!(i2 in r2)) throw new Error(`renderer '${i2}' does not exist`);
14540
14540
  if (["options", "parser"].includes(i2)) continue;
14541
14541
  let o = i2, u = n.renderer[o], a = r2[o];
14542
- r2[o] = (...c) => {
14543
- let p = u.apply(r2, c);
14544
- return p === false && (p = a.apply(r2, c)), p || "";
14542
+ r2[o] = (...p) => {
14543
+ let c = u.apply(r2, p);
14544
+ return c === false && (c = a.apply(r2, p)), c || "";
14545
14545
  };
14546
14546
  }
14547
14547
  s2.renderer = r2;
@@ -14552,9 +14552,9 @@ ${e2}</tr>
14552
14552
  if (!(i2 in r2)) throw new Error(`tokenizer '${i2}' does not exist`);
14553
14553
  if (["options", "rules", "lexer"].includes(i2)) continue;
14554
14554
  let o = i2, u = n.tokenizer[o], a = r2[o];
14555
- r2[o] = (...c) => {
14556
- let p = u.apply(r2, c);
14557
- return p === false && (p = a.apply(r2, c)), p;
14555
+ r2[o] = (...p) => {
14556
+ let c = u.apply(r2, p);
14557
+ return c === false && (c = a.apply(r2, p)), c;
14558
14558
  };
14559
14559
  }
14560
14560
  s2.tokenizer = r2;
@@ -14565,20 +14565,20 @@ ${e2}</tr>
14565
14565
  if (!(i2 in r2)) throw new Error(`hook '${i2}' does not exist`);
14566
14566
  if (["options", "block"].includes(i2)) continue;
14567
14567
  let o = i2, u = n.hooks[o], a = r2[o];
14568
- P.passThroughHooks.has(i2) ? r2[o] = (c) => {
14568
+ P.passThroughHooks.has(i2) ? r2[o] = (p) => {
14569
14569
  if (this.defaults.async && P.passThroughHooksRespectAsync.has(i2)) return (async () => {
14570
- let k = await u.call(r2, c);
14571
- return a.call(r2, k);
14570
+ let h2 = await u.call(r2, p);
14571
+ return a.call(r2, h2);
14572
14572
  })();
14573
- let p = u.call(r2, c);
14574
- return a.call(r2, p);
14575
- } : r2[o] = (...c) => {
14573
+ let c = u.call(r2, p);
14574
+ return a.call(r2, c);
14575
+ } : r2[o] = (...p) => {
14576
14576
  if (this.defaults.async) return (async () => {
14577
- let k = await u.apply(r2, c);
14578
- return k === false && (k = await a.apply(r2, c)), k;
14577
+ let h2 = await u.apply(r2, p);
14578
+ return h2 === false && (h2 = await a.apply(r2, p)), h2;
14579
14579
  })();
14580
- let p = u.apply(r2, c);
14581
- return p === false && (p = a.apply(r2, c)), p;
14580
+ let c = u.apply(r2, p);
14581
+ return c === false && (c = a.apply(r2, p)), c;
14582
14582
  };
14583
14583
  }
14584
14584
  s2.hooks = r2;
@@ -14609,17 +14609,17 @@ ${e2}</tr>
14609
14609
  if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
14610
14610
  if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
14611
14611
  if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e2), i2.async) return (async () => {
14612
- let u = i2.hooks ? await i2.hooks.preprocess(n) : n, c = await (i2.hooks ? await i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u, i2), p = i2.hooks ? await i2.hooks.processAllTokens(c) : c;
14613
- i2.walkTokens && await Promise.all(this.walkTokens(p, i2.walkTokens));
14614
- let h2 = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(p, i2);
14615
- return i2.hooks ? await i2.hooks.postprocess(h2) : h2;
14612
+ let u = i2.hooks ? await i2.hooks.preprocess(n) : n, p = await (i2.hooks ? await i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u, i2), c = i2.hooks ? await i2.hooks.processAllTokens(p) : p;
14613
+ i2.walkTokens && await Promise.all(this.walkTokens(c, i2.walkTokens));
14614
+ let k = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(c, i2);
14615
+ return i2.hooks ? await i2.hooks.postprocess(k) : k;
14616
14616
  })().catch(o);
14617
14617
  try {
14618
14618
  i2.hooks && (n = i2.hooks.preprocess(n));
14619
14619
  let a = (i2.hooks ? i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(n, i2);
14620
14620
  i2.hooks && (a = i2.hooks.processAllTokens(a)), i2.walkTokens && this.walkTokens(a, i2.walkTokens);
14621
- let p = (i2.hooks ? i2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(a, i2);
14622
- return i2.hooks && (p = i2.hooks.postprocess(p)), p;
14621
+ let c = (i2.hooks ? i2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(a, i2);
14622
+ return i2.hooks && (c = i2.hooks.postprocess(c)), c;
14623
14623
  } catch (u) {
14624
14624
  return o(u);
14625
14625
  }
@@ -14637,19 +14637,19 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
14637
14637
  };
14638
14638
  }
14639
14639
  };
14640
- z = new D();
14640
+ M = new D();
14641
14641
  g.options = g.setOptions = function(l3) {
14642
- return z.setOptions(l3), g.defaults = z.defaults, N(g.defaults), g;
14642
+ return M.setOptions(l3), g.defaults = M.defaults, N(g.defaults), g;
14643
14643
  };
14644
- g.getDefaults = M;
14644
+ g.getDefaults = z;
14645
14645
  g.defaults = T;
14646
14646
  g.use = function(...l3) {
14647
- return z.use(...l3), g.defaults = z.defaults, N(g.defaults), g;
14647
+ return M.use(...l3), g.defaults = M.defaults, N(g.defaults), g;
14648
14648
  };
14649
14649
  g.walkTokens = function(l3, e2) {
14650
- return z.walkTokens(l3, e2);
14650
+ return M.walkTokens(l3, e2);
14651
14651
  };
14652
- g.parseInline = z.parseInline;
14652
+ g.parseInline = M.parseInline;
14653
14653
  g.Parser = b;
14654
14654
  g.parser = b.parse;
14655
14655
  g.Renderer = y;
@@ -159665,6 +159665,13 @@ var RiskClient = class {
159665
159665
  if (!classifier) throw new Error(`Unknown classifier: ${classifierName}`);
159666
159666
  const optionId = classifier.options[optionName];
159667
159667
  if (!optionId) throw new Error(`Unknown option: ${optionName} for ${classifierName}`);
159668
+ if (!this.riskAuthToken) {
159669
+ return {
159670
+ ok: false,
159671
+ status: 0,
159672
+ error: "RISK_PLUGIN_AUTH_TOKEN not configured (x-trigger-authentication header would be empty)"
159673
+ };
159674
+ }
159668
159675
  const payload = {
159669
159676
  issueKey,
159670
159677
  author: riskConfig.author,
@@ -159675,15 +159682,28 @@ var RiskClient = class {
159675
159682
  optionId
159676
159683
  }
159677
159684
  };
159678
- const resp = await fetch(riskConfig.endpoint, {
159679
- method: "POST",
159680
- headers: {
159681
- "x-trigger-authentication": this.riskAuthToken,
159682
- "Content-Type": "application/json"
159683
- },
159684
- body: JSON.stringify(payload)
159685
- });
159686
- return resp.ok;
159685
+ try {
159686
+ const resp = await fetch(riskConfig.endpoint, {
159687
+ method: "POST",
159688
+ headers: {
159689
+ "x-trigger-authentication": this.riskAuthToken,
159690
+ "Content-Type": "application/json"
159691
+ },
159692
+ body: JSON.stringify(payload)
159693
+ });
159694
+ const body = await resp.text();
159695
+ return {
159696
+ ok: resp.ok,
159697
+ status: resp.status,
159698
+ body: body ? body.slice(0, 500) : void 0
159699
+ };
159700
+ } catch (e2) {
159701
+ return {
159702
+ ok: false,
159703
+ status: 0,
159704
+ error: `fetch failed: ${e2?.message ?? String(e2)}`
159705
+ };
159706
+ }
159687
159707
  }
159688
159708
  };
159689
159709
 
@@ -160108,6 +160128,11 @@ function getRiskConfig(_projectKey) {
160108
160128
  }
160109
160129
 
160110
160130
  // src/tools/risk.ts
160131
+ function formatRiskResult(name, value, r2) {
160132
+ const tag = r2.ok ? "OK" : "FAILED";
160133
+ const detail = r2.error ? `status=${r2.status}, error=${r2.error}` : `status=${r2.status}${r2.body ? `, body=${r2.body}` : ""}`;
160134
+ return `${name}=${value}: ${tag} (${detail})`;
160135
+ }
160111
160136
  var registerRiskTools = (ctx2) => {
160112
160137
  const { server: server2, risk: risk2, jira: jira2 } = ctx2;
160113
160138
  server2.tool("risk_activate_panel", "Activate Risk Management Plugin panel on an issue", {
@@ -160125,7 +160150,7 @@ var registerRiskTools = (ctx2) => {
160125
160150
  risk_set: external_exports.enum(["initial", "current"]).default("current").describe("Which risk set to update")
160126
160151
  }, async ({ issue_key, project_key, severity, p1, p2, risk_set }) => {
160127
160152
  const riskConfig = getRiskConfig(project_key);
160128
- if (!riskConfig) return { content: [{ type: "text", text: `No risk management config for project ${project_key}. Check PROJECT_CONFIG_PATH.` }] };
160153
+ if (!riskConfig) return { content: [{ type: "text", text: `No risk management config for project ${project_key}. (\uD604\uC7AC \uC774 \uC11C\uBC84\uB294 \uB2E8\uC77C Risk \uC124\uC815\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 \u2014 PROJECT_CONFIG_PATH \uB294 \uBBF8\uAD6C\uD604 \uC0C1\uD0DC\uC785\uB2C8\uB2E4.)` }] };
160129
160154
  const riskSetId = riskConfig.risk_sets[risk_set];
160130
160155
  const configForSet = {
160131
160156
  endpoint: riskConfig.endpoint,
@@ -160137,8 +160162,8 @@ var registerRiskTools = (ctx2) => {
160137
160162
  const results = [];
160138
160163
  for (const [name, value] of [["severity", severity], ["p1", p1], ["p2", p2]]) {
160139
160164
  if (value) {
160140
- const ok = await risk2.setRiskValue(issue_key, configForSet, name, value);
160141
- results.push(`${name}=${value}: ${ok ? "OK" : "FAILED"}`);
160165
+ const r2 = await risk2.setRiskValue(issue_key, configForSet, name, value);
160166
+ results.push(formatRiskResult(name, value, r2));
160142
160167
  }
160143
160168
  }
160144
160169
  return { content: [{ type: "text", text: `Risk values for ${issue_key} (${risk_set} set):
@@ -160152,7 +160177,10 @@ ${results.join("\n")}` }] };
160152
160177
  return { content: [{ type: "text", text: JSON.stringify({
160153
160178
  risk_model_key: config2.risk_model_key,
160154
160179
  risk_sets: config2.risk_sets,
160155
- classifiers: Object.fromEntries(Object.entries(config2.classifiers).map(([k, v2]) => [k, { id: v2.id, options: Object.keys(v2.options) }]))
160180
+ classifiers: Object.fromEntries(Object.entries(config2.classifiers).map(([k, v2]) => [k, { id: v2.id, options: Object.keys(v2.options) }])),
160181
+ // 주의: 이 값은 하드코딩된 RISK_DEFAULTS 출력이지, project_key 에 해당하는
160182
+ // 실제 Risk 앱 설정 조회가 아니다. set_values 실패 시 endpoint/token 문제일 수 있음.
160183
+ diagnostic_note: "\uC774 \uC751\uB2F5\uC740 \uD558\uB4DC\uCF54\uB529\uB41C \uB2E8\uC77C \uC124\uC815 \uCD9C\uB825\uC784. \uC2E4\uC81C endpoint/token \uACFC \uC77C\uCE58\uD558\uB294\uC9C0 \uBCC4\uB3C4 \uD655\uC778 \uD544\uC694."
160156
160184
  }, null, 2) }] };
160157
160185
  });
160158
160186
  server2.tool("risk_create_hazards", "Batch create Hazard tickets with Risk panel activation, risk values, and Risk Source links. Migrated from rmr_create_hazards.py.", {
@@ -160187,6 +160215,8 @@ ${results.join("\n")}` }] };
160187
160215
  continue;
160188
160216
  }
160189
160217
  await risk2.activateRiskPanel(issueKey);
160218
+ let riskOk = true;
160219
+ const riskDetails = [];
160190
160220
  if (riskConfig) {
160191
160221
  for (const setName of ["initial", "current"]) {
160192
160222
  const setConfig = {
@@ -160197,15 +160227,20 @@ ${results.join("\n")}` }] };
160197
160227
  classifiers: riskConfig.classifiers
160198
160228
  };
160199
160229
  for (const [name, value] of [["severity", h2.severity], ["p1", h2.p1], ["p2", h2.p2]]) {
160200
- await risk2.setRiskValue(issueKey, setConfig, name, value);
160230
+ const r2 = await risk2.setRiskValue(issueKey, setConfig, name, value);
160231
+ if (!r2.ok) riskOk = false;
160232
+ riskDetails.push(`${setName}.${name}=${value}: ${r2.ok ? "OK" : "FAILED"} (${r2.error ?? `status=${r2.status}${r2.body ? `, body=${r2.body}` : ""}`})`);
160201
160233
  }
160202
160234
  }
160235
+ } else {
160236
+ riskOk = false;
160237
+ riskDetails.push("no risk config for project");
160203
160238
  }
160204
160239
  for (const srcKey of h2.source_keys) {
160205
160240
  await jira2.createLink("Risk Source", issueKey, srcKey);
160206
160241
  }
160207
160242
  await jira2.createLink("Relates", issueKey, rmr_key);
160208
- results.push({ key: issueKey, summary: h2.summary, status: "created" });
160243
+ results.push({ key: issueKey, summary: h2.summary, status: "created", risk_values: { ok: riskOk, details: riskDetails } });
160209
160244
  } catch (e2) {
160210
160245
  errors.push(`${h2.summary}: ${e2.message}`);
160211
160246
  }
@@ -160262,9 +160297,11 @@ ${results.join("\n")}` }] };
160262
160297
  classifiers: riskConfig.classifiers
160263
160298
  };
160264
160299
  for (const [hazKey, update] of Object.entries(hazard_risk_updates)) {
160265
- const ok = await risk2.setRiskValue(hazKey, currentConfig, "p2", update.p2);
160266
- riskUpdates.push(`${hazKey} P2\u2192${update.p2}: ${ok ? "OK" : "FAILED"}`);
160300
+ const r2 = await risk2.setRiskValue(hazKey, currentConfig, "p2", update.p2);
160301
+ riskUpdates.push(`${hazKey} P2\u2192${update.p2}: ${r2.ok ? "OK" : "FAILED"} (${r2.error ?? `status=${r2.status}${r2.body ? `, body=${r2.body}` : ""}`})`);
160267
160302
  }
160303
+ } else {
160304
+ riskUpdates.push("no risk config for project \u2014 P2 update skipped");
160268
160305
  }
160269
160306
  return { content: [{ type: "text", text: JSON.stringify({ requirements_created: results.length, results, risk_updates: riskUpdates, errors }, null, 2) }] };
160270
160307
  });
@@ -160549,14 +160586,18 @@ var EA_DOCUMENTS = [
160549
160586
  "[Risk Management Report]",
160550
160587
  "[SW Requirements Specification]",
160551
160588
  "[SW Architecture Document]",
160552
- "[SW Detailed Design Document]"
160589
+ "[SW Detailed Design Document]",
160590
+ "[SOUP List]",
160591
+ "[Usability Evaluation Plan]",
160592
+ "[Clinical Evaluation Plan]",
160593
+ "[List of Hazard-Related Use Scenarios]"
160553
160594
  ];
160554
160595
  var LINK_GUIDE = '\n\nIMPORTANT - Link type rules:\n\u2022 Document \u2192 Gate: jira_create_link("Blocks", gateKey, documentKey) \u2014 Document blocks Gate\n\u2022 Sub-ticket \u2192 Document: jira_create_link("Relates", documentKey, subTicketKey) \u2014 Relates is bidirectional\n\u2022 Hazard \u2192 IU/SyRS: jira_create_link("Risk Source", hazardKey, syrsKey) \u2014 SyRS gives rise to Hazard\n\u2022 Requirement \u2192 Hazard: jira_create_link("Mitigates", requirementKey, hazardKey) \u2014 Requirement mitigates Hazard\n\u2022 Requirement \u2192 System Requirement: jira_create_link("Implements", requirementKey, syrsKey)\n\u2022 Architecture \u2192 Requirement: jira_create_link("Implements", architectureKey, requirementKey)\n\u2022 Detailed Design \u2192 Requirement/Architecture: jira_create_link("Implements", ddKey, targetKey)\n\u2022 Task \u2192 Detailed Design: jira_create_link("Implements", taskKey, ddKey)\n\u2022 \uC120\uD589 Task \u2192 \uD6C4\uD589 Task: jira_create_link("Blocks", \uD6C4\uD589taskKey, \uC120\uD589taskKey) \u2014 \uC120\uD589\uC774 \uD6C4\uD589\uC744 block\n\nIMPORTANT - Git commit message rules:\n\u2022 Every commit MUST start with the Jira ticket key: "SCW-xxx type: message"\n\u2022 Example: "SCW-77 feat: set up project scaffold and dev environment"\n\u2022 Multiple tickets: "SCW-30 SCW-69 chore: add dental 3D scan test files"\n\u2022 This enables Jira to auto-link commits to tickets\n\u2022 Commit after each meaningful change (document written, task completed, bug fixed)\n\u2022 Push after each commit or group of related commits\n\nIMPORTANT - Scope of action rules:\n\u2022 "\uAC8C\uC774\uD2B8 \uB9CC\uB4E4\uC5B4" \u2192 ONLY create the Gate. Do NOT create Document tickets.\n\u2022 "\uBB38\uC11C \uB9CC\uB4E4\uC5B4" \u2192 ONLY create the specified Documents. Do NOT create sub-tickets.\n\u2022 Do NOT chain-create beyond what the user explicitly asked for.\n\u2022 When in doubt, ask the user before creating additional items.\n\nIMPORTANT - Ticket creation rules:\n\u2022 Before creating a ticket, search JQL for existing similar tickets to avoid duplicates.\n\u2022 Bug description format: \u{1F629} Problem \u2192 \u{1F50E} Root Cause \u2192 \u{1F527} Fix \u2192 \u{1F41B} Reproduction\n\u2022 Task/Feature description format: \u{1F3AF} Goal \u2192 \u{1F4CB} Tasks \u2192 \u2705 Acceptance Criteria\n\u2022 Do NOT auto-transition ticket status (e.g. In Progress \u2192 Done) unless explicitly asked.\n\u2022 When creating 3+ tickets at once, show the plan first and wait for user approval.\n\nIMPORTANT - Commit-ticket linking:\n\u2022 After pushing commits, verify the ticket has the commit linked (auto-linked via ticket key in message).\n\u2022 If commits are not linked, add a comment to the ticket with the commit details.';
160555
160596
  var registerIecTools = (ctx2) => {
160556
160597
  const { server: server2, jira: jira2 } = ctx2;
160557
160598
  server2.tool("iec_create_gate", "Create a PA or EA Gate with all required Document tickets and Blocks links. Based on IEC 62304 lifecycle.", {
160558
160599
  project_key: external_exports.string().describe("Project key"),
160559
- phase: external_exports.enum(["PA", "EA"]).describe("Phase: PA (7 documents) or EA (4 documents)"),
160600
+ phase: external_exports.enum(["PA", "EA"]).describe("Phase: PA (7 documents) or EA (8 documents)"),
160560
160601
  gate_summary: external_exports.string().optional().describe('Gate summary (default: "PA Gate" or "EA Gate")')
160561
160602
  }, async ({ project_key, phase, gate_summary }) => {
160562
160603
  const summary = gate_summary || `${phase} Gate`;
@@ -160604,10 +160645,15 @@ var registerIecTools = (ctx2) => {
160604
160645
  steps.push("[Classification] \u2192 Create 1 Classification ticket, link with Relates");
160605
160646
  steps.push("[Risk Management Plan] through [Configuration Management Plan] \u2192 Generate document content");
160606
160647
  } else if (summary.includes("EA")) {
160607
- steps.push("[Risk Management Report] \u2192 Use risk_create_hazards to create Hazard tickets");
160608
- steps.push("[SW Requirements Spec] \u2192 Organize FR/NFR, use risk_create_mitigation to create Requirements");
160609
- steps.push("[SW Architecture Document] \u2192 Create Architecture Design tickets (architecture decisions, tech stack, deployment)");
160610
- steps.push("[SW Detailed Design Document] \u2192 Create Detailed Design tickets referencing SRS + SAD, then bottom-up Tasks");
160648
+ steps.push("EA Gate \u2014 8\uAC1C living documents (EA \uCD08\uAE30 \uACB0\uC815\xB7\uC2B9\uC778 \u2192 ER \uAC1C\uBC1C\xB7\uAC80\uC99D \uC911 \uAC31\uC2E0 \u2192 CA \uCD5C\uC885 \uD655\uC815).");
160649
+ steps.push("[Risk Management Report] \u2192 risk_create_hazards (FMEA \uC704\uD5D8 \uC2DD\uBCC4; \uC0C8 \uC704\uD5D8\xB7\uD1B5\uC81C \uCD94\uAC00 \uC2DC \uAC31\uC2E0)");
160650
+ steps.push("[SW Requirements Spec] \u2192 FR/NFR \uC815\uB9AC + risk_create_mitigation (\uC694\uAD6C\uC0AC\uD56D \uBCC0\uACBD\xB7\uCD94\uAC00 \uC2DC \uAC31\uC2E0)");
160651
+ steps.push("[SW Architecture Document] \u2192 \uC544\uD0A4\uD14D\uCC98 \uACB0\uC815 \uD2F0\uCF13 (\uBCC0\uACBD\xB7\uC0C1\uC138\uD654 \uC2DC \uAC31\uC2E0)");
160652
+ steps.push("[SW Detailed Design Document] \u2192 \uC720\uB2DB \uC0C1\uC138\uC124\uACC4 \uD2F0\uCF13 + bottom-up Tasks (sprint\uB9C8\uB2E4 \uC720\uB2DB \uCD94\uAC00\xB7\uC0C1\uC138\uD654 \uC2DC \uAC31\uC2E0)");
160653
+ steps.push("[SOUP List] \u2192 SOUP \uC2DD\uBCC4 (\uC2E4\uC81C \uC758\uC874\uC131 \uCD94\uAC00/\uC81C\uAC70/\uBC84\uC804\uC5C5 \uC2DC \uAC31\uC2E0; CA \uCD5C\uC885 SBOM \uAE30\uBC18 \uD655\uC815)");
160654
+ steps.push("[Usability Evaluation Plan] \u2192 \uC0AC\uC6A9\uC131 \uD3C9\uAC00 \uACC4\uD68D (\uD3C9\uAC00 \uACB0\uACFC \uBC18\uC601\xB7\uACC4\uD68D \uC870\uC815 \uC2DC \uAC31\uC2E0)");
160655
+ steps.push("[Clinical Evaluation Plan] \u2192 \uC784\uC0C1 \uD3C9\uAC00 \uACC4\uD68D (\uD3C9\uAC00 \uACB0\uACFC \uBC18\uC601\xB7\uACC4\uD68D \uC870\uC815 \uC2DC \uAC31\uC2E0)");
160656
+ steps.push("[List of Hazard-Related Use Scenarios] \u2192 \uC704\uD5D8 \uAD00\uB828 \uC0AC\uC6A9 \uC2DC\uB098\uB9AC\uC624 \uC2DD\uBCC4 (\uC0C8 \uC2DC\uB098\uB9AC\uC624 \uC2DD\uBCC4 \uC2DC \uAC31\uC2E0)");
160611
160657
  }
160612
160658
  } else if (type === "Document") {
160613
160659
  if (summary.includes("Intended Use")) {
@@ -160639,6 +160685,17 @@ var registerIecTools = (ctx2) => {
160639
160685
  steps.push("Include: component interfaces, algorithms, data structures, API specs");
160640
160686
  steps.push('Link: jira_create_link("Implements", ddKey, architectureKey) and jira_create_link("Implements", ddKey, requirementKey)');
160641
160687
  steps.push('Also link: jira_create_link("Relates", thisDocumentKey, ddKey)');
160688
+ } else if (summary.includes("SOUP")) {
160689
+ steps.push('\uC2DD\uBCC4\uB41C SOUP(third-party \uC758\uC874\uC131) \uBAA9\uB85D\uD654 \u2014 doc_render(template="soup_list")\uB85C \uB80C\uB354');
160690
+ steps.push("CA \uCD5C\uC885 \uD655\uC815 \uC804\uAE4C\uC9C0 \uC758\uC874\uC131 \uBCC0\uACBD(\uCD94\uAC00/\uC81C\uAC70/\uBC84\uC804\uC5C5)\uB9C8\uB2E4 \uAC31\uC2E0");
160691
+ } else if (summary.includes("Usability Evaluation Plan")) {
160692
+ steps.push("\uC0AC\uC6A9\uC131 \uD3C9\uAC00 \uACC4\uD68D \uC218\uB9BD \u2014 usability_create_use_spec / usability_create_scenarios\uC640 \uC5F0\uACC4");
160693
+ steps.push('doc_render(template="usability_evaluation_plan")\uB85C \uB80C\uB354');
160694
+ } else if (summary.includes("Clinical Evaluation Plan")) {
160695
+ steps.push('\uC784\uC0C1 \uD3C9\uAC00 \uACC4\uD68D \uC218\uB9BD \u2014 doc_render(template="clinical_evaluation_plan")\uB85C \uB80C\uB354');
160696
+ } else if (summary.includes("Hazard-Related")) {
160697
+ steps.push('\uC704\uD5D8 \uAD00\uB828 \uC0AC\uC6A9 \uC2DC\uB098\uB9AC\uC624 \uC2DD\uBCC4 \u2014 usability_create_scenarios(type="abnormal")\uC640 \uC5F0\uACC4');
160698
+ steps.push('doc_render(template="list_of_hazard_related_use_scenarios")\uB85C \uB80C\uB354');
160642
160699
  } else {
160643
160700
  steps.push("Generate document content based on referenced sources");
160644
160701
  steps.push("Use doc_update_description to update the ticket");
@@ -160787,21 +160844,32 @@ var WORKFLOWS = {
160787
160844
  ea: [
160788
160845
  "=== EA Gate \uC6CC\uD06C\uD50C\uB85C\uC6B0 ===",
160789
160846
  "",
160790
- "1. iec_create_gate \u2192 EA Gate + 4\uAC1C Document \uD2F0\uCF13 \uC0DD\uC131",
160791
- "2. [Risk Management Report]",
160792
- " - risk_create_hazards \u2192 Hazard \uC77C\uAD04 \uC0DD\uC131",
160793
- " - usability_link_to_hazard \u2192 \uC0AC\uC6A9 \uC2DC\uB098\uB9AC\uC624 \u2192 Hazard \uC5F0\uACB0",
160794
- "3. [SW Requirements Spec]",
160795
- " - FR/NFR \uC815\uB9AC",
160796
- " - risk_create_mitigation \u2192 \uC644\uD654 Requirement \uC0DD\uC131 + P2 \uC5C5\uB370\uC774\uD2B8",
160797
- "4. [SW Architecture Document] \u2192 \uC544\uD0A4\uD14D\uCC98 \uC124\uACC4",
160798
- "5. [SW Detailed Design Document] \u2192 \uC0C1\uC138 \uC124\uACC4 + Task \uC0DD\uC131",
160847
+ "1. iec_create_gate \u2192 EA Gate + 8\uAC1C Document \uD2F0\uCF13 \uC0DD\uC131 (living documents)",
160848
+ "2. [Risk Management Report] \u2192 risk_create_hazards (FMEA) + usability_link_to_hazard",
160849
+ "3. [SW Requirements Spec] \u2192 FR/NFR \uC815\uB9AC + risk_create_mitigation",
160850
+ "4. [SW Architecture Document] \u2192 \uC544\uD0A4\uD14D\uCC98 \uACB0\uC815",
160851
+ "5. [SW Detailed Design Document] \u2192 \uC720\uB2DB \uC0C1\uC138\uC124\uACC4 + bottom-up Tasks",
160852
+ "6. [SOUP List] \u2192 doc_render(soup_list)",
160853
+ "7. [Usability Evaluation Plan] \u2192 usability_create_use_spec/scenarios \uC5F0\uACC4 + doc_render",
160854
+ "8. [Clinical Evaluation Plan] \u2192 doc_render(clinical_evaluation_plan)",
160855
+ "9. [List of Hazard-Related Use Scenarios] \u2192 usability_create_scenarios(abnormal) \uC5F0\uACC4",
160856
+ "",
160857
+ "EA 8\uAC1C \uBB38\uC11C = living document (IEC 62304 evolutionary \uBAA8\uB378):",
160858
+ " \u2022 EA: \uCD08\uAE30 \uACB0\uC815\xB7\uC2B9\uC778 / ER: \uAC1C\uBC1C\xB7\uAC80\uC99D \uC911 \uAC31\uC2E0 / CA: \uCD5C\uC885 \uD655\uC815",
160859
+ " \u2022 \uAC31\uC2E0 \uD2B8\uB9AC\uAC70:",
160860
+ " - SRS: \uC694\uAD6C\uC0AC\uD56D \uBCC0\uACBD/\uCD94\uAC00 (change-evaluation-list \uC5F0\uACC4)",
160861
+ " - SAD: \uC544\uD0A4\uD14D\uCC98 \uBCC0\uACBD/\uC0C1\uC138\uD654 (architecture-checklist)",
160862
+ " - SDD: sprint \uC720\uB2DB \uCD94\uAC00/\uC0C1\uC138\uD654",
160863
+ " - FMEA Risk Table: \uC0C8 \uC704\uD5D8\xB7\uD1B5\uC81C \uC2DD\uBCC4 (hazard \uCD94\uAC00)",
160864
+ " - SOUP List: \uC758\uC874\uC131 \uBCC0\uACBD (\u2192 CA \uCD5C\uC885 SBOM \uAE30\uBC18 \uD655\uC815)",
160865
+ " - Usability/Clinical Eval Plan: \uD3C9\uAC00 \uACB0\uACFC \uBC18\uC601\xB7\uACC4\uD68D \uC870\uC815",
160866
+ " - Hazard-Related Use Scenarios: \uC0C8 \uC2DC\uB098\uB9AC\uC624 \uC2DD\uBCC4",
160799
160867
  "",
160800
160868
  "\uAC80\uC99D:",
160801
- "6. xray_create_test \u2192 \uD14C\uC2A4\uD2B8 \uCF00\uC774\uC2A4 \uC0DD\uC131",
160802
- "7. usability_create_validation \u2192 \uC0AC\uC6A9\uC131 \uAC80\uC99D",
160803
- "8. doc_check_completeness \u2192 \uAE30\uC220 \uBB38\uC11C \uC644\uC804\uC131 \uAC80\uC99D",
160804
- "9. doc_generate_evidence \u2192 NB \uC2EC\uC0AC\uC6A9 \uC99D\uAC70 \uD328\uD0A4\uC9C0 \uC0DD\uC131"
160869
+ "10. xray_create_test \u2192 \uD14C\uC2A4\uD2B8 \uCF00\uC774\uC2A4 \uC0DD\uC131",
160870
+ "11. usability_create_validation \u2192 \uC0AC\uC6A9\uC131 \uAC80\uC99D",
160871
+ "12. doc_check_completeness \u2192 \uAE30\uC220 \uBB38\uC11C \uC644\uC804\uC131 \uAC80\uC99D",
160872
+ "13. doc_generate_evidence \u2192 NB \uC2EC\uC0AC\uC6A9 \uC99D\uAC70 \uD328\uD0A4\uC9C0 \uC0DD\uC131"
160805
160873
  ].join("\n"),
160806
160874
  risk: [
160807
160875
  "=== \uB9AC\uC2A4\uD06C \uAD00\uB9AC \uC6CC\uD06C\uD50C\uB85C\uC6B0 ===",
@@ -161482,6 +161550,7 @@ var TEMPLATE_PATHS = {
161482
161550
  // mdr_docs — EA gate (IEC 62304 Evolutionary Assessment 산출물)
161483
161551
  software_requirements_list: { path: "mdr_docs/EA/software-requirements-list.md", mode: "freeform", domain: "mdr", gate: "EA" },
161484
161552
  software_architecture_description: { path: "mdr_docs/EA/software-architecture-description.md", mode: "freeform", domain: "mdr", gate: "EA" },
161553
+ software_detailed_design: { path: "mdr_docs/EA/software-detailed-design.md", mode: "freeform", domain: "mdr", gate: "EA" },
161485
161554
  risk_table_fmea: { path: "mdr_docs/EA/risk-table-fmea.md", mode: "freeform", domain: "mdr", gate: "EA" },
161486
161555
  soup_list: { path: "mdr_docs/EA/soup-list.md", mode: "freeform", domain: "mdr", gate: "EA" },
161487
161556
  usability_evaluation_plan: { path: "mdr_docs/EA/usability-evaluation-plan.md", mode: "freeform", domain: "mdr", gate: "EA" },
@@ -161489,7 +161558,7 @@ var TEMPLATE_PATHS = {
161489
161558
  list_of_hazard_related_use_scenarios: { path: "mdr_docs/EA/list-of-hazard-related-use-scenarios.md", mode: "freeform", domain: "mdr", gate: "EA" }
161490
161559
  };
161491
161560
  var TEMPLATE_NAMES = Object.keys(TEMPLATE_PATHS);
161492
- var TEMPLATE_VERSION = "b1dbcb6";
161561
+ var TEMPLATE_VERSION = "17d0c4e";
161493
161562
 
161494
161563
  // src/tools/doc-render.ts
161495
161564
  init_adf();
@@ -161870,14 +161939,14 @@ var SHA256 = class extends HashMD {
161870
161939
  this.H = SHA256_IV[7] | 0;
161871
161940
  }
161872
161941
  get() {
161873
- const { A: A3, B: B2, C, D: D2, E: E2, F: F3, G, H: H2 } = this;
161874
- return [A3, B2, C, D2, E2, F3, G, H2];
161942
+ const { A: A3, B: B2, C: C2, D: D2, E: E2, F: F3, G, H: H2 } = this;
161943
+ return [A3, B2, C2, D2, E2, F3, G, H2];
161875
161944
  }
161876
161945
  // prettier-ignore
161877
- set(A3, B2, C, D2, E2, F3, G, H2) {
161946
+ set(A3, B2, C2, D2, E2, F3, G, H2) {
161878
161947
  this.A = A3 | 0;
161879
161948
  this.B = B2 | 0;
161880
- this.C = C | 0;
161949
+ this.C = C2 | 0;
161881
161950
  this.D = D2 | 0;
161882
161951
  this.E = E2 | 0;
161883
161952
  this.F = F3 | 0;
@@ -161894,30 +161963,30 @@ var SHA256 = class extends HashMD {
161894
161963
  const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;
161895
161964
  SHA256_W[i2] = s1 + SHA256_W[i2 - 7] + s0 + SHA256_W[i2 - 16] | 0;
161896
161965
  }
161897
- let { A: A3, B: B2, C, D: D2, E: E2, F: F3, G, H: H2 } = this;
161966
+ let { A: A3, B: B2, C: C2, D: D2, E: E2, F: F3, G, H: H2 } = this;
161898
161967
  for (let i2 = 0; i2 < 64; i2++) {
161899
161968
  const sigma1 = rotr(E2, 6) ^ rotr(E2, 11) ^ rotr(E2, 25);
161900
161969
  const T1 = H2 + sigma1 + Chi(E2, F3, G) + SHA256_K[i2] + SHA256_W[i2] | 0;
161901
161970
  const sigma0 = rotr(A3, 2) ^ rotr(A3, 13) ^ rotr(A3, 22);
161902
- const T2 = sigma0 + Maj(A3, B2, C) | 0;
161971
+ const T2 = sigma0 + Maj(A3, B2, C2) | 0;
161903
161972
  H2 = G;
161904
161973
  G = F3;
161905
161974
  F3 = E2;
161906
161975
  E2 = D2 + T1 | 0;
161907
- D2 = C;
161908
- C = B2;
161976
+ D2 = C2;
161977
+ C2 = B2;
161909
161978
  B2 = A3;
161910
161979
  A3 = T1 + T2 | 0;
161911
161980
  }
161912
161981
  A3 = A3 + this.A | 0;
161913
161982
  B2 = B2 + this.B | 0;
161914
- C = C + this.C | 0;
161983
+ C2 = C2 + this.C | 0;
161915
161984
  D2 = D2 + this.D | 0;
161916
161985
  E2 = E2 + this.E | 0;
161917
161986
  F3 = F3 + this.F | 0;
161918
161987
  G = G + this.G | 0;
161919
161988
  H2 = H2 + this.H | 0;
161920
- this.set(A3, B2, C, D2, E2, F3, G, H2);
161989
+ this.set(A3, B2, C2, D2, E2, F3, G, H2);
161921
161990
  }
161922
161991
  roundClean() {
161923
161992
  clean(SHA256_W);
@@ -177387,10 +177456,10 @@ var PDFTree = class {
177387
177456
  }
177388
177457
  };
177389
177458
  var SpotColor = class {
177390
- constructor(doc, name, C, M2, Y2, K2) {
177459
+ constructor(doc, name, C2, M2, Y2, K2) {
177391
177460
  this.id = "CS" + Object.keys(doc.spotColors).length;
177392
177461
  this.name = name;
177393
- this.values = [C, M2, Y2, K2];
177462
+ this.values = [C2, M2, Y2, K2];
177394
177463
  this.ref = doc.ref(["Separation", escapeName(this.name), "DeviceCMYK", {
177395
177464
  Range: [0, 1, 0, 1, 0, 1, 0, 1],
177396
177465
  C0: [0, 0, 0, 0],
@@ -178675,8 +178744,8 @@ var ColorMixin = {
178675
178744
  pattern(bbox, xStep, yStep, stream2) {
178676
178745
  return new PDFTilingPattern2(this, bbox, xStep, yStep, stream2);
178677
178746
  },
178678
- addSpotColor(name, C, M2, Y2, K2) {
178679
- const color = new SpotColor(this, name, C, M2, Y2, K2);
178747
+ addSpotColor(name, C2, M2, Y2, K2) {
178748
+ const color = new SpotColor(this, name, C2, M2, Y2, K2);
178680
178749
  this.spotColors[name] = color;
178681
178750
  return this;
178682
178751
  }
@@ -184691,7 +184760,7 @@ var xrayClientSecret = process.env.XRAY_CLIENT_SECRET || "";
184691
184760
  var xray = xrayClientId && xrayClientSecret ? new XrayClient(xrayClientId, xrayClientSecret, jiraUrl, jiraEmail, jiraToken) : null;
184692
184761
  var server = new McpServer({
184693
184762
  name: "jira-confluence",
184694
- version: "0.1.18"
184763
+ version: "0.1.20"
184695
184764
  });
184696
184765
  var ctx = { server, jira, confluence, risk, xray };
184697
184766
  registerJiraCrudTools(ctx);