@unbrained/pm-cli 2026.11.2 → 2026.11.3

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 (148) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/dist/cli/error-guidance.d.ts +9 -0
  4. package/dist/cli/error-guidance.js +4 -3
  5. package/dist/cli/main.js +1 -1
  6. package/dist/cli/runtime/field-route-retry.d.ts +15 -0
  7. package/dist/cli/runtime/field-route-retry.js +2 -0
  8. package/dist/cli-bundle/bundle-manifest.json +1 -1
  9. package/dist/cli-bundle/chunks/{chunk-533L6D2N.js → chunk-2CBHQXYJ.js} +3 -3
  10. package/dist/cli-bundle/chunks/chunk-32BCU6HN.js +115 -0
  11. package/dist/cli-bundle/chunks/{chunk-HOGKWJU5.js → chunk-5IPXDZKU.js} +42 -42
  12. package/dist/cli-bundle/chunks/{chunk-JRXD7SIL.js → chunk-5JZMF4M5.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-4HW253W2.js → chunk-7ZEFHFAU.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-QHHFXNSQ.js → chunk-B6UTLYLM.js} +2 -2
  15. package/dist/cli-bundle/chunks/{chunk-KJLGBLR3.js → chunk-DEJHTFEF.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-EN27ZQSV.js → chunk-HBKD5HZB.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-VEOFWE32.js → chunk-JPKIUWLG.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-DAZFCSDV.js → chunk-L6LCLC37.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-RGHLQGEX.js → chunk-MQJXZX3Q.js} +2 -2
  20. package/dist/cli-bundle/chunks/chunk-NR4KABHC.js +31 -0
  21. package/dist/cli-bundle/chunks/{chunk-J3JM36EH.js → chunk-O4ZLEN4T.js} +2 -2
  22. package/dist/cli-bundle/chunks/{chunk-4OELCF3O.js → chunk-PWD5RY2D.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-D52QQ7LP.js → chunk-RSAN2YUU.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-ABFFRQRO.js → chunk-TZ3D3DPQ.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-GK2CHAT3.js → chunk-UJMQP2HP.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-3A4NVHYS.js → chunk-UYNMKUGA.js} +2 -2
  27. package/dist/cli-bundle/chunks/{chunk-3ZQQVJT2.js → chunk-XRMYA4R7.js} +3 -3
  28. package/dist/cli-bundle/chunks/{chunk-NGRPD3ZO.js → chunk-Y7H55PCY.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-K46GDAKX.js → chunk-YWS4XV4I.js} +4 -4
  30. package/dist/cli-bundle/chunks/{chunk-ZNWDYDFF.js → chunk-ZOAJNPBL.js} +43 -43
  31. package/dist/cli-bundle/chunks/{indexed-receipt-blobs-IEJ2QOW3.js → indexed-receipt-blobs-I6RQGD6Y.js} +2 -2
  32. package/dist/cli-bundle/chunks/item-transaction-ZHLJTBD7.js +2 -0
  33. package/dist/cli-bundle/chunks/{mutation-admission-QUNQZCZ5.js → mutation-admission-ZQMRMGIB.js} +2 -2
  34. package/dist/cli-bundle/chunks/{register-list-query-NZTK3AXA.js → register-list-query-I6AZA3IX.js} +2 -2
  35. package/dist/cli-bundle/chunks/{register-mutation-2OFAMOVH.js → register-mutation-3DAXCLXR.js} +2 -2
  36. package/dist/cli-bundle/chunks/{register-operations-RFMM5KZ6.js → register-operations-G3QGGQ5Z.js} +2 -2
  37. package/dist/cli-bundle/chunks/{register-setup-6B6Q7M5L.js → register-setup-LDXHMNOT.js} +2 -2
  38. package/dist/cli-bundle/chunks/{settlement-hook-UTCEZBFT.js → settlement-hook-JHXLUBEN.js} +2 -2
  39. package/dist/cli-bundle/chunks/{stage-VLI4OBVX.js → stage-7H36OTDJ.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/chunk-3XGKBVJ3.js +2 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-SGWYNU7T.js → chunk-4HY6EGPB.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{chunk-B6OOKKOX.js → chunk-D4XQOMG4.js} +3 -3
  43. package/dist/cli-bundle/focused-chunks/{chunk-I4Z2SCV5.js → chunk-F3X6UWMI.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/{chunk-QVFE5LIX.js → chunk-G6ERMFJ5.js} +2 -2
  45. package/dist/cli-bundle/focused-chunks/{chunk-Q23K6WLV.js → chunk-HJ27QLZV.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-3UD6F2KQ.js → chunk-HOXIIZEO.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/chunk-HUXZCPWT.js +26 -0
  48. package/dist/cli-bundle/focused-chunks/{chunk-QNXXOFLQ.js → chunk-I5FODKYB.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-MQVBWFJF.js → chunk-IDAYTYNN.js} +2 -2
  50. package/dist/cli-bundle/focused-chunks/{chunk-5UDDRPYR.js → chunk-IKXJ57XA.js} +2 -2
  51. package/dist/cli-bundle/focused-chunks/{chunk-745IDMTD.js → chunk-LKN2WGGB.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/chunk-MOY6KZGJ.js +44 -0
  53. package/dist/cli-bundle/focused-chunks/{chunk-4UUE3YXZ.js → chunk-PWUTFKSI.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/chunk-PZRB7IXH.js +91 -0
  55. package/dist/cli-bundle/focused-chunks/chunk-RY4QEMAE.js +2 -0
  56. package/dist/cli-bundle/focused-chunks/{chunk-NJFMG3IK.js → chunk-TYHDZUL4.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/chunk-WSYPVBKS.js +80 -0
  58. package/dist/cli-bundle/focused-chunks/{chunk-HMXVTWIV.js → chunk-WXLG7HZ5.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{chunk-4NVPDZLX.js → chunk-WZDFCVLX.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{chunk-RUCG6UWN.js → chunk-YGO3FWA2.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/chunk-YVLAP3BL.js +23 -0
  62. package/dist/cli-bundle/focused-chunks/{chunk-PCCZ72C3.js → chunk-ZQRCVRGS.js} +52 -52
  63. package/dist/cli-bundle/focused-chunks/chunk-ZYXQACPB.js +2 -0
  64. package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-FT3KF6VJ.js → indexed-receipt-blobs-7XGVHYAO.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{item-transaction-F4SN7TXJ.js → item-transaction-PZ2FQ6B2.js} +2 -2
  66. package/dist/cli-bundle/focused-chunks/{mutation-admission-7R2FXJ5O.js → mutation-admission-XOOK6XFH.js} +2 -2
  67. package/dist/cli-bundle/focused-chunks/{settlement-hook-KMIBD4F2.js → settlement-hook-H56537UV.js} +2 -2
  68. package/dist/cli-bundle/focused-chunks/{stage-6B3O2GZ6.js → stage-4SQHVI3O.js} +2 -2
  69. package/dist/cli-bundle/main.js +30 -29
  70. package/dist/cli-bundle/sdk-authoring.js +1 -1
  71. package/dist/cli-bundle/sdk-contracts.js +1 -1
  72. package/dist/cli-bundle/sdk-core.js +1 -1
  73. package/dist/cli-bundle/sdk-governance.js +1 -1
  74. package/dist/cli-bundle/sdk-graph.js +1 -1
  75. package/dist/cli-bundle/sdk-merge.js +44 -44
  76. package/dist/cli-bundle/sdk-query.js +1 -1
  77. package/dist/cli-bundle/sdk-runtime.js +1 -1
  78. package/dist/cli-bundle/sdk-testing.js +1 -1
  79. package/dist/cli-bundle/sdk.js +11 -11
  80. package/dist/core/extensions/extension-hook-runtime.js +1 -1
  81. package/dist/core/extensions/item-fields.d.ts +1 -1
  82. package/dist/core/extensions/item-fields.js +1 -1
  83. package/dist/core/schema/runtime-field-values.d.ts +30 -0
  84. package/dist/core/schema/runtime-field-values.js +1 -1
  85. package/dist/core/sentry/helpers.js +1 -1
  86. package/dist/core/sentry/instrument.js +1 -1
  87. package/dist/core/shared/error-details.d.ts +98 -0
  88. package/dist/core/shared/error-details.js +2 -0
  89. package/dist/core/shared/errors.d.ts +37 -0
  90. package/dist/core/shared/errors.js +1 -1
  91. package/dist/mcp/server.js +2 -2
  92. package/dist/sdk/errors.d.ts +6 -2
  93. package/dist/sdk/errors.js +1 -1
  94. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  95. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  96. package/dist/sdk/index.d.ts +1 -1
  97. package/dist/sdk/index.js +1 -1
  98. package/dist/sdk/lifecycle/core-field-recovery.d.ts +26 -0
  99. package/dist/sdk/lifecycle/core-field-recovery.js +1 -1
  100. package/dist/sdk/lifecycle/create.js +1 -1
  101. package/dist/sdk/lifecycle/update.js +2 -2
  102. package/dist/sdk/public-surface.json +1 -1
  103. package/dist/sdk/runtime.d.ts +1 -1
  104. package/dist/sdk/runtime.js +1 -1
  105. package/dist/sdk/test/entry.d.ts +5 -0
  106. package/dist/sdk/test/entry.js +2 -2
  107. package/dist/sdk/test/execution.d.ts +1 -2
  108. package/dist/sdk/test/execution.js +2 -2
  109. package/dist/sdk/test/linked-command-detection.d.ts +10 -0
  110. package/dist/sdk/test/linked-command-detection.js +1 -1
  111. package/dist/sdk/test/update.d.ts +2 -0
  112. package/dist/sdk/test/update.js +1 -1
  113. package/docs/EXTENSIONS.md +2 -2
  114. package/docs/LINKED_TEST_EDITS.md +38 -5
  115. package/docs/SDK.md +75 -0
  116. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +6 -3
  117. package/marketplace.json +1 -1
  118. package/package.json +1 -1
  119. package/packages/pm-beads/package.json +1 -1
  120. package/packages/pm-calendar/package.json +1 -1
  121. package/packages/pm-command-kit/package.json +1 -1
  122. package/packages/pm-digital-twin/package.json +1 -1
  123. package/packages/pm-governance-audit/package.json +1 -1
  124. package/packages/pm-guide-shell/package.json +1 -1
  125. package/packages/pm-kanban/package.json +1 -1
  126. package/packages/pm-lifecycle-hooks/package.json +1 -1
  127. package/packages/pm-linked-test-adapters/package.json +1 -1
  128. package/packages/pm-search-advanced/package.json +1 -1
  129. package/packages/pm-templates/package.json +1 -1
  130. package/packages/pm-todos/package.json +1 -1
  131. package/packages/pm-vcs/package.json +1 -1
  132. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  133. package/plugins/pm-claude/package.json +1 -1
  134. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  135. package/plugins/pm-codex/package.json +1 -1
  136. package/plugins/pm-codex/plugin.json +1 -1
  137. package/runtime-dependencies.json +1 -1
  138. package/dist/cli-bundle/chunks/chunk-BFZUJ5QP.js +0 -115
  139. package/dist/cli-bundle/chunks/chunk-OJR2YGXF.js +0 -31
  140. package/dist/cli-bundle/chunks/item-transaction-JHPBH6N7.js +0 -2
  141. package/dist/cli-bundle/focused-chunks/chunk-EJJWOFP5.js +0 -91
  142. package/dist/cli-bundle/focused-chunks/chunk-FUGYXUUL.js +0 -80
  143. package/dist/cli-bundle/focused-chunks/chunk-JLN5CFYM.js +0 -2
  144. package/dist/cli-bundle/focused-chunks/chunk-K4FMZB4Y.js +0 -23
  145. package/dist/cli-bundle/focused-chunks/chunk-PF553UVP.js +0 -44
  146. package/dist/cli-bundle/focused-chunks/chunk-TGS5RXBY.js +0 -26
  147. package/dist/cli-bundle/focused-chunks/chunk-WD43E7RU.js +0 -2
  148. package/dist/cli-bundle/focused-chunks/chunk-YM4AMP7H.js +0 -2
@@ -0,0 +1,23 @@
1
+ import{F as dt,G as lt,f as be}from"./chunk-PZRB7IXH.js";import{$a as ur,B as ge,C as it,Ca as cr,Ja as dr,Ua as at,Wa as lr,Za as Ee,_a as ct,bb as we,eb as Se,fa as ye,fb as P,gb as Te,ha as st,k as nt,l as ar,v as ot}from"./chunk-WSYPVBKS.js";import{b as or}from"./chunk-HJ27QLZV.js";import{$ as b,Aa as et,Ac as rt,Ba as rr,Ga as oe,Ja as nr,Nc as sr,Ob as _e,Od as M,a as Xe,ba as re,be as he,ca as J,da as E,fa as tr,lc as ir,qa as Ze,uc as tt,ya as ne,yc as Q,za as X}from"./chunk-HUXZCPWT.js";import{A as m,C as W,E as K,F as T,I as v,K as pe,t as Qe,z as l}from"./chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cef883fa-81be-5092-a07b-7a5ca961fbc7")}catch{}})();var ve=new WeakSet,ut=new WeakMap,mr=new WeakSet;function fr(e){return mr.add(e),e}function mt(e){return mr.has(e)}function ie(e){ve.add(e);for(let[t,r]of Object.entries(e)){if(!Array.isArray(r))continue;let n=[...r];Reflect.set(e,t,n),ve.add(n)}return e}function eo(e,t){return ve.has(e)||t!==void 0&&ut.get(e)?.has(t)===!0}function to(e,t){let r=new Set(t);ut.set(e,r);for(let n of r){let o=Reflect.get(e,n);if(!Array.isArray(o))continue;let i=[...o];Reflect.set(e,n,i),ve.add(i)}return e}function pr(e,t){if(mt(e)&&fr(t),eo(e))return ie(t);let r=ut.get(e);return r?to(t,r):t}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e35626b8-0818-5b4b-8fc2-57426b51a2d1")}catch{}})();var L="-",ro=/^[A-Za-z0-9_.-]+$/u,ft=new Set(["actual_result","body","cmd","command","customer_impact","description","environment","expected_result","impact","location","message","note","outcome","repro_steps","resolution","text","title","unblock_note","value","why_now"]);function hr(e,t){if(e.startsWith("```")||e.includes(`
2
+ `))return!0;let r=t.map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(`^(?:[-*+]\\s+)?(?:${r})\\s*[:=]`,"i").test(e)}function gr(e){let t=e.trim();if(t==="")return[];let r=(ao(t)??t.split(",")).map(n=>n.trim()).filter(Boolean).map(n=>n.toLowerCase());return Array.from(new Set(r)).sort((n,o)=>n.localeCompare(o))}function yr(e){if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let r of e)if(typeof r=="string")for(let n of gr(r))t.push(n);return Array.from(new Set(t)).sort((r,n)=>r.localeCompare(n))}function br(e){return Array.isArray(e)?e.filter(t=>typeof t=="string").map(t=>t.trim().toLowerCase()).filter(Boolean):[]}function no(e){return typeof e!="string"?[]:e.split(";").map(t=>t.trim()).filter(Boolean)}function oo(e,t,r){let n=e.map(s=>s.trim()).filter(Boolean);for(let s of t??[]){let a=s.trim();if(a.includes(";"))throw new m('Acceptance criteria added with --add-ac cannot contain ";" because semicolons delimit stored criteria',l.USAGE,{code:"acceptance_criteria_semicolon_forbidden",required:"Pass one semicolon-free criterion per --add-ac value",why:"A semicolon inside one criterion would be re-read as multiple criteria",nextSteps:["Split the text into repeated --add-ac values, or replace the semicolon with punctuation that is not the storage delimiter"]});a.length>0&&!n.includes(a)&&n.push(a)}let o=[],i=n;for(let s of r??[]){let a=s.trim();if(a.length!==0){if(!i.includes(a)){o.push(a);continue}i=i.filter(c=>c!==a)}}return{criteria:i,unmatchedRemovals:o}}function io(e,t){let r=br(e);if(!t||t.length===0)return Array.from(new Set(r)).sort((o,i)=>o.localeCompare(i));let n=new Set(r);for(let o of yr(t))n.add(o);return Array.from(n).sort((o,i)=>o.localeCompare(i))}function so(e,t){let r=Array.from(new Set(br(e))).sort((o,i)=>o.localeCompare(i));if(!t||t.length===0)return r;let n=new Set(yr(t));return n.size===0?r:r.filter(o=>!n.has(o))}function ao(e){if(!e.startsWith("["))return null;let t;try{t=JSON.parse(e)}catch{return null}return t.map(r=>typeof r=="string"||typeof r=="number"||typeof r=="boolean"?String(r):"").filter(r=>r.length>0)}function pt(e){return e.replace(/\r\n/g,`
3
+ `)}function Er(e){let t=pt(e).trim();if(!t.startsWith("```"))return e;let r=t.split(`
4
+ `);return r.length<2||r.at(-1)?.trim()!=="```"?e:r.slice(1,-1).join(`
5
+ `)}function co(e){let t=[],r="",n=!1;for(let o=0;o<e.length;o+=1){let i=e[o];if(i==="\\"&&e[o+1]===","){r+=",",o+=1;continue}if(i==="\\"&&e[o+1]!==void 0){r+=`${i}${e[o+1]}`,o+=1;continue}if(i==='"'){n=!n,r+=i;continue}if(i===","&&!n){t.push(r),r="";continue}r+=i}return r.trim()&&t.push(r),t}function wr(e){let t=e.trim();if(t.startsWith('"')&&t.endsWith('"')){try{let r=JSON.parse(t);if(typeof r=="string")return r}catch{}return t.slice(1,-1).replace(/\\"/g,'"')}return e}function lo(e){let t=e.indexOf("="),r=e.indexOf(":"),n=t>=0,o=r>=0;return n&&o?Math.min(t,r):n?t:o?r:-1}function uo(e,t){if((t==="--add"||t==="--add-glob")&&(/[./\\]/.test(e)||/\.[a-z]{1,6}$/i.test(e.trim())))return"For file/doc paths use: path=<file-path>[,scope=project|global]. The scope field is optional and defaults to project (example: path=src/api.ts or path=README.md,scope=project). ";if(t!=="--event")return"";let r=e.toLowerCase(),n=r.includes("recur_")||r.includes("recurrence")?' Recurrence list values must stay in one field and use "|" delimiters (for example recur_by_weekday=mon|wed or recur_by_month_day=1|15).':"",o=r.includes("recur_byweekday")?" Use recur_by_weekday (with underscores) for weekday recurrence filters.":"";return`${n}${o}`}function _r(e,t){let r=e.replaceAll(/\s+/g," ").trim(),n=r.length>160?`${r.slice(0,157)}...`:r,o=uo(e,t);return`Invalid ${t} value "${n}". Expected key=value entries separated by commas. `+o+`Also accepts markdown-style key/value lines (for example "- path: README.md"). Use ${t} ${L} to read piped stdin input.`}function mo(e){let t=Er(e).trim();if(t.length===0||!t.includes(`
6
+ `)&&!t.startsWith("-")&&!t.startsWith("*")&&!t.startsWith("+"))return null;let r={},n,o=pt(t).split(`
7
+ `).map(i=>i.trim()).filter(i=>i.length>0);for(let i of o){let s=i.match(/^(?:[-*+]\s+)?([a-zA-Z0-9_.-]+)\s*(=|:)\s*(.*)$/);if(s){let a=s[1].trim();r[a]=wr(s[3].trim()),n=a;continue}if(n&&ft.has(n.toLowerCase())){r[n]=`${r[n]}
8
+ ${i}`;continue}return null}return r}function Sr(e,t){let r=Er(e).trim();if(!r)throw new m(`${t} cannot be empty`,l.USAGE);let n=mo(r);if(n)return n;let o={},i,s=co(r);for(let a of s){let c=lo(a),d=a.slice(0,Math.max(c,0)).trim();if(d!==""&&i!==void 0&&ft.has(i.toLowerCase())&&!ro.test(d)){o[i]=`${o[i]},${a}`;continue}if(c>=0){let u=a.slice(0,c).trim();if(!u)throw new m(_r(e,t),l.USAGE);let f=wr(a.slice(c+1).trim());o[u]=f,i=u;continue}if(i&&ft.has(i.toLowerCase())){o[i]=`${o[i]},${a}`;continue}throw new m(_r(e,t),l.USAGE)}return o}var fo=/^[A-Za-z]:[\\/]/,po=/^(?:[-*+]\s+)?[A-Za-z_][A-Za-z0-9_.-]*\s*=/;function _o(e){let t=e.trim();return fo.test(t)?!1:po.test(t)}function Nc(e,t,r,n){if(!(n||!e.includes(",")))throw new m(`${t} received an ambiguous comma-bearing bare ${r}. Repeat ${t} for multiple values, or quote or escape literal commas in a structured key=<value> entry.`,l.USAGE,{code:"bare_comma_entry_ambiguous",required:`Use one ${t} per bare ${r}, or quote or escape literal commas in a structured key=<value> entry.`})}function ho(e,t,r){let n=new Set(r.map(i=>i.toLowerCase())),o=Object.keys(e).filter(i=>!n.has(i.toLowerCase()));if(o.length>0)throw new m(`${t} does not recognize key${o.length>1?"s":""} ${o.map(i=>`"${i}"`).join(", ")}. Allowed keys: ${r.join(", ")}.`,l.USAGE);for(let i of Object.keys(e)){let s=i.toLowerCase();if(s!==i){if(Object.hasOwn(e,s))throw new m(`${t} provides key "${i}" more than once after case normalization.`,l.USAGE);e[s]=e[i],delete e[i]}}}async function go(e){if(process.stdin.isTTY===!0)throw new m(`${e} value "${L}" requires piped stdin input. Pipe content into the command, or end manual stdin with Ctrl+D (Unix/macOS) or Ctrl+Z then Enter (Windows).`,l.USAGE);return process.stdin.setEncoding("utf8"),await new Promise((t,r)=>{let n="";process.stdin.on("data",o=>{n+=o}),process.stdin.on("end",()=>{t(pt(n))}),process.stdin.on("error",o=>{r(o)})})}var $=Symbol("all-mutation-stdin-fields"),I=new WeakMap;function Pc(e){return mt(e)?e:ie(se({...e}))}function se(e){return I.set(e,$),e}function yo(e,t){let r=I.get(e);return r===$||I.set(e,new Set([...r??[],...t])),e}function Ae(e,t){pr(e,t);let r=I.get(e);return r===void 0||I.set(t,r===$?r:new Set(r)),t}function $c(e,t){let r=I.get(e),n=I.get(t);return r===void 0||n===$?t:r===$?(I.set(t,r),t):(I.set(t,new Set([...n??[],...r])),t)}function bo(e){return I.get(e)!==$}function Ie(e,t){let r=I.get(e);return r!==$&&!r?.has(t)}function Eo(e){let t;for(let r of e){if(r.resolveToken===!1||r.value===void 0)continue;let n=(Array.isArray(r.value)?r.value:[r.value]).filter(o=>o.trim()===L).length;if(n>1)throw new m(`${r.optionName} accepts "${L}" stdin token at most once per command invocation`,l.USAGE);if(n!==0){if(t!==void 0&&t!==r.optionName)throw new m(`Only one option may use "${L}" stdin token per command invocation. Already used by ${t}.`,l.USAGE);t=r.optionName}}}async function zc(e,t,r){let n=e,o=[...t,...r];Eo(o.map(([a,c])=>({value:n[a],optionName:c,resolveToken:Ie(e,a)})));let i=Ce(),s={...n};for(let[a,c]of t)s[a]=await i.resolveValue(n[a],c,Ie(e,a));for(let[a,c]of r)s[a]=await i.resolveList(n[a],c,Ie(e,a));return se(Ae(e,s))}function Ce(){let e,t,r=async n=>{if(t&&t!==n)throw new m(`Only one option may use "${L}" stdin token per command invocation. Already used by ${t}.`,l.USAGE);return t=n,e||(e=go(n)),await e};return{resolveValue:async(n,o,i=!0)=>{if(!i)return n;if(n!==void 0)return n.trim()!==L?n:await r(o)},resolveList:async(n,o,i=!0)=>{if(!i)return n;if(!n)return;let s=n.map((d,u)=>d.trim()===L?u:-1).filter(d=>d>=0);if(s.length===0)return n;if(s.length>1)throw new m(`${o} accepts "${L}" stdin token at most once per command invocation`,l.USAGE);let a=await r(o),c=[...n];return c[s[0]]=a,c}}}function wo(e,t){let r=Number(e);if(!Number.isFinite(r))throw new m(`Invalid ${t} value "${e}"`,l.USAGE);return r}function So(e,t){let r=e.trim(),n=Number(r);if(r===""||!Number.isInteger(n)||n<0)throw new m(`Invalid ${t} value "${e}". Expected a non-negative integer.`,l.USAGE);return n}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b84fee06-5bbd-57f9-9643-f283d6c87afa")}catch{}})();function To(e,t="--limit"){if(e===void 0)return;let r=Number(e);if(!Number.isFinite(r)||r<0)throw new m(`${t} must be a non-negative number`,l.USAGE);return Math.floor(r)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9b58b44d-819c-5115-b011-f9dfa8e2ab41")}catch{}})();var vo=3e4,ae=class extends Error{status;constructor(t,r){super(t),this.name="SearchHttpError",this.status=r}};function z(e,t,r=vo){let n=e??r;if(!Number.isFinite(n)||n<=0)throw new Error(`${t} timeout must be a positive finite number`);return Math.floor(n)}function F(e,t){if(e)return e;if(typeof globalThis.fetch=="function")return globalThis.fetch.bind(globalThis);throw new Error(`${t} execution requires a fetch implementation`)}async function Io(e){try{return(await e.text()).replaceAll(/\s+/g," ").trim()}catch(t){return`(failed to read response body: ${E(t)})`}}async function xe(e){let t=new AbortController,r=setTimeout(()=>{t.abort()},e.timeoutMs);try{let n;try{n=await e.fetcher(e.endpoint,{method:e.method,headers:e.headers,body:JSON.stringify(e.body),signal:t.signal})}catch(o){throw o instanceof Error&&o.name==="AbortError"?new Error(`${e.requestLabel} timed out after ${e.timeoutMs}ms`):new Error(`${e.requestLabel} execution failed: ${E(o)}`)}if(!n.ok){let o=await Io(n),i=o.length>0?`: ${o}`:"";throw new ae(`${e.requestLabel} failed with status ${n.status} ${n.statusText}${i}`,n.status)}try{return await n.json()}catch(o){throw new Error(`${e.responseLabel} JSON parse failed: ${E(o)}`)}}finally{clearTimeout(r)}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8e3bb919-c8f9-50b5-8e41-b6719d17bd21")}catch{}})();function Gc(e,t){let r=b(e);if(!r)return"unconfigured";let n=b(t);return n&&n.toLowerCase()===r.toLowerCase()?"configured":"auto-detected"}function Ao(e){let t=re(e),r=t.toLowerCase();return r.endsWith("/embeddings")?t:r.endsWith("/v1")?`${t}/embeddings`:`${t}/v1/embeddings`}function vr(e){let t=e.search?.embedding_model;return b(t)||null}function Co(e){let t=b(e.providers?.openai?.base_url),r=b(e.providers?.openai?.model);if(!t||!r)return null;let n=vr(e),o=b(e.providers?.openai?.api_key);return{name:"openai",base_url:t,model:n??r,...o?{api_key:o}:{}}}function xo(e){let t=b(e.providers?.ollama?.base_url),r=b(e.providers?.ollama?.model);if(!t||!r)return null;let n=vr(e);return{name:"ollama",base_url:t,model:n??r}}function Ir(e){let t=(Array.isArray(e)?e:[e]).map(r=>r.trim()).filter(r=>r.length>0);if(t.length===0)throw new Error("Embedding input must include at least one non-empty string");return t}function ko(e){let t=[],r=[],n=new Map;for(let o of e){let i=n.get(o);if(i===void 0){let s=t.length;t.push(o),n.set(o,s),r.push(s);continue}r.push(i)}return{uniqueInputs:t,originalToUniqueIndex:r}}function Ro(e){let t=e.map((r,n)=>({embedding:r.embedding,index:r.index,position:n}));if(t.some(r=>r.index!==void 0)){for(let r of t)if(!Number.isInteger(r.index))throw new TypeError(`OpenAI embedding response entry at position ${r.position} is missing a valid integer index`);return[...t].sort((r,n)=>{let o=r.index-n.index;return o!==0?o:r.position-n.position})}return t}function _t(e){let t=Co(e),r=xo(e),n=[t,r].filter(s=>s!==null),o=b(e.search?.provider),i=o?o.toLowerCase():null;return{active:(i?n.find(s=>s.name===i):void 0)??n[0]??null,available:n}}function Tr(e){let t=re(e.base_url);return e.name==="openai"?{provider:"openai",endpoint:Ao(t),model:e.model}:{provider:"ollama",endpoint:`${t}/api/embed`,model:e.model}}function Oo(e,t){let r=Ir(t);return e.name==="openai"?{target:Tr(e),method:"POST",headers:{"content-type":"application/json",...e.api_key?{authorization:`Bearer ${e.api_key}`}:{}},body:{model:e.model,input:r.length===1?r[0]:r}}:{target:Tr(e),method:"POST",headers:{"content-type":"application/json"},body:{model:e.model,input:r}}}function Lo(e,t){if(e.name==="openai"){let o=t.data;if(!Array.isArray(o)||o.length===0)throw new Error("OpenAI embedding response must include a non-empty data array");return Ro(o).map((i,s)=>{let a=i.embedding;if(!J(a))throw new Error(`OpenAI embedding response entry at index ${s} is missing a numeric embedding vector`);return[...a]})}let r=t.embedding;if(J(r))return[[...r]];let n=t.embeddings;if(Array.isArray(n)&&n.length>0)return n.map((o,i)=>{if(!J(o))throw new Error(`Ollama embedding response entry at index ${i} is missing a numeric embedding vector`);return[...o]});throw new Error("Ollama embedding response must include embedding or embeddings vectors")}async function Ar(e,t,r={}){let n=z(r.timeout_ms,"Embedding request"),o=F(r.fetcher,"Embedding request"),i=Ir(t),s=ko(i),a=Oo(e,s.uniqueInputs),c=await xe({endpoint:a.target.endpoint,method:a.method,headers:a.headers,body:a.body,timeoutMs:n,fetcher:o,requestLabel:"Embedding request",responseLabel:"Embedding response"}),d=Lo(e,c);if(d.length!==s.uniqueInputs.length)throw new Error(`Embedding response cardinality mismatch: expected ${s.uniqueInputs.length} vector(s), received ${d.length}`);return s.originalToUniqueIndex.map(u=>[...d[u]])}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5c86afdf-6d8d-5851-82c1-ae5bcc9f0196")}catch{}})();var ke=["title","description","tags","status","type","priority","assignee","parent","goal","value","why_now","risk","confidence","estimated_minutes","acceptance_criteria","resolution","expected_result","actual_result","body","comments","notes","learnings","reminders","events","dependencies","plan"];function ht(e){let t=e?.search?.corpus_fields;if(!Array.isArray(t))return[...ke];let r=new Set(ke),n=Array.from(new Set(t.filter(o=>typeof o=="string").map(o=>o.trim()).filter(o=>o.length>0&&r.has(o))));return n.length>0?n:[...ke]}var Do=8e3,Mo=3200,U="...[semantic corpus truncated]",No="search_embedding_corpus_max_characters_invalid:using_provider_default";function x(e){return e.map(t=>t==null?"":String(t).trim()).filter(t=>t.length>0).join(" ")}function Po(e){return(e.reminders??[]).map(t=>x([t.at,t.text]))}function $o(e){return(e.events??[]).map(t=>x([t.start_at,t.end_at,t.title,t.description,t.location,t.all_day===!0?"all day":void 0,t.timezone,t.recurrence?.freq,t.recurrence?.interval,t.recurrence?.count,t.recurrence?.until,t.recurrence?.by_weekday?.join(" "),t.recurrence?.by_month_day?.join(" "),t.recurrence?.exdates?.join(" ")]))}function zo(e,t){e.push(t.title,t.body,t.status,t.owner,t.evidence,t.blocked_reason,t.superseded_by);for(let r of t.linked_items??[])e.push(`${r.kind} ${r.id}`,r.note);for(let r of t.files??[])e.push(r.path,r.note);for(let r of t.tests??[])e.push(r.command,r.path,r.note);for(let r of t.docs??[])e.push(r.path,r.note)}function Fo(e,t){for(let r of t.plan_decisions??[])e.push(r.decision,r.rationale,r.evidence);for(let r of t.plan_discoveries??[])e.push(r.text);for(let r of t.plan_validation??[])e.push(r.text,r.command,r.expected)}function Jc(e){let t=[];t.push(e.plan_mode,e.plan_scope,e.plan_harness,e.plan_resume_context);for(let r of e.plan_steps??[])zo(t,r);return Fo(t,e),t.filter(r=>typeof r=="string"&&r.length>0).join(" ")}function Uo(e){let t=(e.plan_steps??[]).map(i=>x([i.order,i.id,i.title,i.body,i.status,i.owner,i.evidence,i.blocked_reason,i.superseded_by,(i.linked_items??[]).map(s=>x([s.kind,s.id,s.note])).join(" "),(i.files??[]).map(s=>x([s.path,s.note])).join(" "),(i.tests??[]).map(s=>x([s.command,s.path,s.note])).join(" "),(i.docs??[]).map(s=>x([s.path,s.note])).join(" ")])),r=(e.plan_decisions??[]).map(i=>x([i.decision,i.rationale,i.evidence,i.step_id])),n=(e.plan_discoveries??[]).map(i=>x([i.text,i.step_id])),o=(e.plan_validation??[]).map(i=>x([i.text,i.command,i.expected]));if([e.plan_mode,e.plan_scope,e.plan_harness,e.plan_resume_context,...t,...r,...n,...o].some(i=>i!==void 0))return{mode:e.plan_mode,scope:e.plan_scope,harness:e.plan_harness,resume_context:e.plan_resume_context,steps:t,decisions:r,discoveries:n,validation:o}}function C(e){return typeof e=="string"&&e.trim().length>0}var Vo={title:e=>e.metadata.title,description:e=>e.metadata.description,tags:e=>e.metadata.tags,status:e=>e.metadata.status,type:e=>e.metadata.type,priority:e=>typeof e.metadata.priority=="number"?e.metadata.priority:void 0,assignee:e=>C(e.metadata.assignee)?e.metadata.assignee:void 0,parent:e=>C(e.metadata.parent)?e.metadata.parent:void 0,goal:e=>C(e.metadata.goal)?e.metadata.goal:void 0,value:e=>C(e.metadata.value)?e.metadata.value:void 0,why_now:e=>C(e.metadata.why_now)?e.metadata.why_now:void 0,risk:e=>C(e.metadata.risk)?e.metadata.risk:void 0,confidence:e=>e.metadata.confidence!==void 0&&e.metadata.confidence!==null?e.metadata.confidence:void 0,estimated_minutes:e=>typeof e.metadata.estimated_minutes=="number"?e.metadata.estimated_minutes:void 0,acceptance_criteria:e=>C(e.metadata.acceptance_criteria)?e.metadata.acceptance_criteria:void 0,resolution:e=>C(e.metadata.resolution)?e.metadata.resolution:void 0,expected_result:e=>C(e.metadata.expected_result)?e.metadata.expected_result:void 0,actual_result:e=>C(e.metadata.actual_result)?e.metadata.actual_result:void 0,body:e=>e.body,comments:e=>(e.metadata.comments??[]).map(t=>t.text),notes:e=>(e.metadata.notes??[]).map(t=>t.text),learnings:e=>(e.metadata.learnings??[]).map(t=>t.text),reminders:e=>Po(e.metadata),events:e=>$o(e.metadata),dependencies:e=>(e.metadata.dependencies??[]).map(t=>({id:t.id,kind:t.kind})),plan:e=>Uo(e.metadata)};function Cr(e,t={}){let r=t.fields??ke,n={};for(let o of r){let i=Vo[o];if(!i)continue;let s=i(e);s!==void 0&&(n[o]=s)}return n}function jo(e){return e?.trim().toLowerCase()==="ollama"?Mo:Do}function Z(e,t){let r=jo(e),n=tr(t);return n!==null?{maxCharacters:n,warning:null}:{maxCharacters:r,warning:t==null?null:No}}function gt(e,t={}){let r=JSON.stringify(Cr(e,{fields:t.fields})),n=Z(t.providerName,t.maxCharacters).maxCharacters;if(r.length<=n)return r;if(n<=U.length)return U.slice(0,n);let o=Math.max(0,n-U.length);return`${r.slice(0,o)}${U}`}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="67bae1a1-19d1-50ea-816f-4b68e6bb69d9")}catch{}})();function qo(e,t,r){let n=e.search.embedding_batch_size,o=e.search.embedding_timeout_ms,i=e.search.scanner_max_batch_retries,s=Number.isFinite(n)&&n>0?Math.max(1,Math.floor(n)):1,a=Number.isFinite(o)&&o>0?Math.max(1,Math.floor(o)):3e4,c=Number.isFinite(i)&&i>=0?Math.floor(i):0;return{batchSize:s,timeoutMs:a,maxRetries:c,maxRequestBytes:r,maxInputCharacters:t}}function Ho(e,t,r,n){let o=[],i=[],s=Buffer.byteLength(JSON.stringify({model:e.model,input:[]})),a=s;for(let c of t){let d=Buffer.byteLength(JSON.stringify(c.trim()));if(s+d>n)throw new RangeError(`Embedding input exceeds request byte ceiling ${n}; lower search.embedding_corpus_max_characters or raise maxRequestBytes`);let u=i.length>0?1:0;(i.length>=r||a+u+d>n)&&(o.push(i),i=[],a=s),a+=d+(i.length>0?1:0),i.push(c)}return o.push(i),o}function Yo(e,t){if(!Number.isFinite(t)||t<=0||e.length<=t)return e;let r=Math.max(0,t-U.length);return`${e.slice(0,r)}${U}`.slice(0,t)}function xr(e){let t=E(e).toLowerCase();return t.includes("timed out")||t.includes("timeout")}function Bo(e,t,r,n,o,i){let s=`Embedding batch ${t} failed after ${o} attempt(s): ${E(i)}`,a=`provider=${e.name} model=${e.model} batch_size=${r} timeout_ms=${n}`;return xr(i)?`${s} (${a}; guidance=check provider availability or lower search.embedding_batch_size, raise search.embedding_timeout_ms, or run keyword search while semantic indexing catches up)`:`${s} (${a})`}function Go(e){return e instanceof ae?e.status===413?"payload_too_large":null:xr(e)?"timeout":null}async function yt(e,t,r,n,o,i,s){let a=null;for(let c=0;c<=o;c+=1)try{s.requests+=1;let d=await Ar(e,t,{timeout_ms:n});return c>0&&i.push(`search_embedding_batch_retry_succeeded:batch=${r}:attempt=${c+1}:size=${t.length}`),s.successful_batches+=1,s.batch_size_histogram[t.length]=(s.batch_size_histogram[t.length]??0)+1,d}catch(d){a=d;let u=Go(d);if(u!==null&&t.length>1){s.split_batches+=1;let f=Math.ceil(t.length/2),_=t.slice(0,f),p=t.slice(f);return i.push(`search_embedding_batch_split_after_${u}:batch=${r}:size=${t.length}:parts=${_.length}|${p.length}`),[...await yt(e,_,`${r}.1`,n,o,i,s),...await yt(e,p,`${r}.2`,n,o,i,s)]}if(c<o){s.retries+=1;let f=Math.min(1e3*2**c,8e3);await new Promise(_=>setTimeout(_,f))}}throw new Error(Bo(e,r,t.length,n,o+1,a))}async function bt(e,t,r,n={}){if(r.length===0)return{vectors:[],warnings:[]};let o=performance.now(),i=n.maxRequestBytes??262144;if(!Number.isSafeInteger(i)||i<=0)throw new RangeError("maxRequestBytes must be a positive safe integer");let s={provider:e.name,model:e.model,max_request_bytes:i,limit_source:n.maxRequestBytes===void 0?"default":"caller",planned_batches:0,requests:0,successful_batches:0,split_batches:0,retries:0,batch_size_histogram:{},elapsed_ms:0,inputs_per_second:0},a=[],c=Z(e.name,t.search.embedding_corpus_max_characters);c.warning&&a.push(c.warning);let d=qo(t,c.maxCharacters,i),u=0,f=r.map(h=>{if(h.trim().length===0)throw new TypeError("Embedding inputs must be non-empty strings");let y=Yo(h,d.maxInputCharacters);return y.length<h.length&&(u+=1),y});u>0&&a.push(`search_embedding_input_truncated:count=${u}:max_characters=${d.maxInputCharacters}`);let _=Ho(e,f,d.batchSize,d.maxRequestBytes);s.planned_batches=_.length;let p=[],g=0;for(let h=0;h<_.length;h+=1){let y=_[h];n.onProgress?.({batch_index:h+1,batch_total:_.length,batch_size:y.length,completed_inputs:g,total_inputs:f.length,phase:"start"}),p.push(...await yt(e,y,String(h+1),d.timeoutMs,d.maxRetries,a,s)),g+=y.length,n.onProgress?.({batch_index:h+1,batch_total:_.length,batch_size:y.length,completed_inputs:g,total_inputs:f.length,phase:"complete"})}return s.elapsed_ms=Math.max(1,performance.now()-o),s.inputs_per_second=r.length*1e3/s.elapsed_ms,{vectors:p,warnings:a,receipt:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="88eb8555-e098-5279-801e-3b76d0dd0eae")}catch{}})();var V=`[^\\s/\\\\<>"'\\x60()\\[\\]{},;?=:#*]+`,S="[/\\\\]+",Wo="[\\p{L}\\p{N}._@-]+",j=Wo+"(?:"+S+V+")*",Re="(?:(?:home|users)"+S+j+"|root"+S+j+")",Ko="[/\\\\]"+Re,Jo="[/\\\\]{2,}"+Re,Xo="/?[a-z]:"+S+"users"+S+j,Qo=V+"(?: +"+V+")*",Et="(?:"+Qo+S+")?users"+S+j,Zo="[/\\\\]{2,}"+V+S+Et,ei="(?:[a-z]:|volume\\{[a-f0-9-]+\\}|"+V+")",Rr="[/\\\\]{2}[?.]"+S+"(?:unc"+S+V+S+Et+"|"+ei+S+"users"+S+j+")",ti="file:(?:"+Rr+"|(?:[/\\\\](?![/\\\\])|[/\\\\]{3,}|[/\\\\]{2}localhost"+S+")(?:"+Re+"|[a-z]:"+S+"users"+S+j+")|[/\\\\]{2}(?:[a-z]:"+S+"users"+S+j+"|"+V+S+"(?:"+Re+"|"+Et+")))",ri=new RegExp("(?:^|[^\\p{L}\\p{N}_./\\\\~])(?:"+Ko+"|"+Xo+"|"+ti+")|(?:^|[^\\p{L}\\p{N}_:./\\\\~])(?:"+Jo+"|"+Zo+"|"+Rr+")","giu"),kr=4,ni=/%[a-f0-9]{2}|\\(?:u[a-f0-9]{4}|x[a-f0-9]{2}|\/)/iu,oi=new TextDecoder("utf-8");function ii(e){return e.replace(/(?:%[a-f0-9]{2})+/giu,t=>oi.decode(Uint8Array.from(t.matchAll(/%([a-f0-9]{2})/giu),r=>Number.parseInt(r[1],16)))).replace(/%(?![a-f0-9]{2})[a-z0-9]{0,2}/giu,"\uFFFD")}function si(e){return e.replace(/\\+(?:u([a-f0-9]{4})|x([a-f0-9]{2})|(\/))?/giu,(t,r,n,o)=>{let i=r??n;return i===void 0?o??t:String.fromCharCode(Number.parseInt(i,16))})}function ai(e){return e.normalize("NFKC").replace(/[\p{Bidi_Control}\u200b-\u200f\u2060-\u206f\ufeff]/gu,"").replace(/[\u2215\u2044]/gu,"/").replace(/[\u043e\u041e]/gu,"o").replace(/[\u0455\u0405]/gu,"s")}function ci(e,t){for(let[r,n]of[["percent_decode",ii],["json_unescape",si],["unicode_fold",ai]]){let o=n(e);o!==e&&!t.includes(r)&&t.push(r),e=o}return e}function*di(e,t,r){let n=e,o=[];for(let i=0;i<kr;i+=1){let s=n;if(n=ci(n,o),!r){t.lastIndex=0;for(let a of n.matchAll(t))r=!0,yield{index:0,normalizations:[...o]}}if(n===s)break;i===kr-1&&ni.test(n)&&(yield{index:0,normalizations:[...o],normalization_incomplete:!0})}}function*li(e,t){let r=0;for(let n of e.split(`
9
+ `)){t.lastIndex=0;let o=!1;for(let i of n.matchAll(t))o=!0,yield{index:r+i.index};for(let i of di(n,t,o))yield{...i,index:r};r+=n.length+1}}var Or=[{name:"private-key",mutationRule:"private_key",regex:/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/g},{name:"github-token",mutationRule:"github_token",regex:/\b(?:gh[opsru]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,})\b/g},{name:"npm-token",mutationRule:"npm_token",regex:/\bnpm_[A-Za-z0-9]{20,}\b/g},{name:"aws-access-key",mutationRule:"aws_access_key",regex:/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g},{name:"google-api-key",mutationRule:"google_api_key",regex:/\bAIza[0-9A-Za-z_-]{35}\b/g},{name:"slack-token",mutationRule:"slack_token",regex:/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g},{name:"anthropic-api-key",mutationRule:"anthropic_api_key",regex:/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g},{name:"openai-api-key",mutationRule:"openai_api_key",regex:/\bsk-(?!ant-)[A-Za-z0-9_-]{20,}\b/g},{name:"gitlab-token",mutationRule:"gitlab_token",regex:/\bglpat-[A-Za-z0-9_.-]{20,}\b/g},{name:"jwt-like-token",mutationRule:"jwt_like_token",regex:/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g},{name:"npm-auth-token-assignment",mutationRule:"npm_auth_token_assignment",regex:/_authToken\s*=\s*\S+/g},{name:"sentry-user-token",mutationRule:"sentry_user_token",regex:/\bsntryu_[A-Za-z0-9]{20,}\b/g},{name:"sentry-org-token",mutationRule:"sentry_org_token",regex:/\bsntrys_[A-Za-z0-9_-]{20,}\b/g},{name:"private-ip",mutationRule:"private_ip",regex:/\b(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g},{name:"private-ssh-target",mutationRule:"private_ssh_target",regex:/\b(?:ssh|scp|rsync)\s+[A-Za-z0-9._-]+@(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g},{name:"sshpass-inline-password",mutationRule:"sshpass_inline_password",regex:/\bsshpass\s+-p\s+["'][^"']{6,}["']/g},{name:"password-assignment",mutationRule:"password_assignment",regex:/\b(?:password|passphrase)\s*[:=]\s*(?:(?!<|\$\{|\$\(|config\.auth\.password\s*(?:\|\|\s*(?:''|"")|\?\s*unescape\(encodeURIComponent\(config\.auth\.password\)\)\s*:\s*(?:''|""))(?=[ \t]*(?:\/\*(?:[^*]|\*(?!\/))*\*\/[ \t]*)*(?:;|$|\/\/[^\r\n\u2028\u2029]*(?:\r\n)?$)))[A-Za-z0-9!@#$%^&*._+\-=]{8,}|"(?!<|\$\{|\$\()[^"]{8,}"|'(?!<|\$\{|\$\()[^']{8,}')/gi},{name:"absolute-home-path",mutationRule:"absolute_home_path",regex:ri,excludeFiles:/^(?:tests\/|examples\/)/},{name:"user-at-private-host",mutationRule:"user_at_private_host",regex:/\b[A-Za-z0-9._-]+@(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g,excludeFiles:/^(?:tests\/|examples\/)/},{name:"high-entropy-assignment",mutationRule:"high_entropy_assignment",regex:/\b(?:token|secret|password|passwd|api[_-]?key)\s*[:=]\s*["']?([A-Za-z0-9+/=_-]{24,})/gi,mutationOnlyReason:"Generic assignments in source code are not credentials; preserve the existing mutation heuristic without treating source identifiers as secrets.",minimumEntropy:3.5}];function*Lr(e,t){if(e.mutationRule==="absolute_home_path"){yield*li(t,e.regex);return}e.regex.lastIndex=0;for(let r of t.matchAll(e.regex))ui(e,r)&&(yield{index:r.index})}function ui(e,t){if(e.minimumEntropy===void 0)return!0;let r=t[1],n=new Map;for(let i of r)n.set(i,(n.get(i)??0)+1);let o=0;for(let i of n.values()){let s=i/r.length;o-=s*Math.log2(s)}return o>=e.minimumEntropy}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d6059407-bf03-5ae8-8b01-e3e7c5b28030")}catch{}})();var mi=[{action:"append",history_scope:"item"},{action:"claim",history_scope:"item"},{action:"close",history_scope:"item"},{action:"close-many",history_scope:"item"},{action:"close-task",history_scope:"item"},{action:"comments",history_scope:"conditional"},{action:"config",history_scope:"conditional"},{action:"copy",history_scope:"item"},{action:"create",history_scope:"item"},{action:"delete",history_scope:"item"},{action:"deps",history_scope:"conditional"},{action:"discover",history_scope:"item"},{action:"docs",history_scope:"conditional"},{action:"files",history_scope:"conditional"},{action:"focus",history_scope:"conditional"},{action:"gc",history_scope:"conditional"},{action:"history-compact",history_scope:"history"},{action:"history-author-acknowledge",history_scope:"workspace"},{action:"history-redact",history_scope:"history"},{action:"history-repair",history_scope:"history"},{action:"init",history_scope:"workspace"},{action:"install",history_scope:"conditional"},{action:"learnings",history_scope:"conditional"},{action:"notes",history_scope:"conditional"},{action:"package",history_scope:"conditional"},{action:"pause-task",history_scope:"item"},{action:"plan",history_scope:"conditional"},{action:"profile",history_scope:"conditional"},{action:"release",history_scope:"item"},{action:"restore",history_scope:"item"},{action:"schema",history_scope:"conditional"},{action:"start-task",history_scope:"item"},{action:"templates",history_scope:"conditional"},{action:"test",history_scope:"conditional"},{action:"test-all",history_scope:"conditional"},{action:"update",history_scope:"item"},{action:"update-many",history_scope:"item"},{action:"upgrade",history_scope:"conditional"}],St=new Map(mi.map(e=>[e.action,e]));function wt(e,t="$",r=new WeakSet){return typeof e=="string"?[{path:t,value:e}]:typeof e!="object"||e===null?[]:r.has(e)?[]:(r.add(e),Array.isArray(e)?e.flatMap((n,o)=>wt(n,`${t}[${o}]`,r)):Object.entries(e).flatMap(([n,o])=>wt(o,`${t}.${n}`,r)))}function fi(e,t){let r=Lr(e,t),n=r.next().value;if(!n||e.mutationRule!=="absolute_home_path"||n.normalization_incomplete)return n;for(let o of r)if(o.normalization_incomplete)return{...n,normalizations:[...new Set([n.normalizations,o.normalizations].flatMap(i=>i??[]))],normalization_incomplete:!0};return n}function Dr(e){let t=[];for(let r of wt(e))for(let n of Or){let o=fi(n,r.value);if(o){let i={rule:n.mutationRule,path:r.path};o.normalizations&&(i.normalizations=o.normalizations),o.normalization_incomplete&&(i.normalization_incomplete=!0),t.push(i)}}return t.filter((r,n,o)=>o.findIndex(i=>i.rule===r.rule&&i.path===r.path)===n)}function pi(e){let t=e.author.trim()||"unknown";if(e.settings.require_attributed_author&&t.toLowerCase()==="unknown")throw new m("Mutation author is required by workspace policy.",l.USAGE,{code:"mutation_author_required",required:"Pass --author <id>, set PM_AUTHOR, or configure author_default.",nextSteps:["Retry with --author <stable-agent-id>.","Set PM_AUTHOR for this agent session."]});if(e.settings.secret_guard==="off")return{author:t,findings:[],warnings:[],override_applied:!1};let r;try{r=Dr(e.payload)}catch{return{author:t,findings:[],warnings:["secret_guard_scan_failed_open"],override_applied:!1}}if(r.length===0)return{author:t,findings:r,warnings:[],override_applied:!1};let n=[...new Set(r.map(o=>o.rule))].sort().join(",");if(e.settings.secret_guard==="block"&&e.force!==!0)throw new m(`Mutation blocked by secret guard (${n}). No detected value was logged.`,l.CONFLICT,{code:"mutation_secret_guard_blocked",required:"Remove the credential-shaped content or retry with --force after explicit review.",nextSteps:["Replace the value with a secret-manager reference.","Use pm history-redact if equivalent content already entered history."],recovery:{recovery_mode:"compact",attempted_command:"pm <mutation> [REDACTED]",normalized_args:["[REDACTED]"],suggested_retry:"Remove credential-shaped content, then retry the mutation."}});return{author:t,findings:r,warnings:[`secret_guard_detected:${r.length}:rules=${n}`,...e.settings.secret_guard==="block"&&e.force===!0?["secret_guard_force_override"]:[]],override_applied:e.settings.secret_guard==="block"&&e.force===!0}}function _i(e){return St.has(e.trim().toLowerCase())}function hi(){return[...St.keys()].sort((e,t)=>e.localeCompare(t))}function ad(e){return St.get(e.trim().toLowerCase())}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5767332d-8094-55cd-96e9-47c5d20cd7df")}catch{}})();var gi=/\b([a-z][a-z0-9]*)-(\d+)(?:-[a-z0-9]+)*\b/giu,yi=/^(?:utf|iso|sha|tls|http|covid|match)$/iu;function Tt(e){return e.trim().toLowerCase().replace(/\s+/g," ")}function Nr(e){return[...new Set(Tt(e).match(/[\p{L}\p{N}]+/gu)??[])]}function Mr(e){let t=Tt(e);return{normalized:t,tokens:Nr(t),issueCodes:[...new Set([...e.matchAll(gi)].filter(r=>{let n=r[1],o=r.index,i=e.slice(o+r[0].length);return!yi.test(n)&&(n===n.toUpperCase()||n.length<=2||o===0&&/^\s*(?::|—|–|\])/u.test(i))}).map(r=>r[0].toLowerCase()))]}}function bi(e,t){return Ei(Mr(e),Mr(t))}function Ei(e,t){if(e.normalized===t.normalized)return{score:1,reason:"exact_title"};let r=new Set(e.issueCodes);return t.issueCodes.some(n=>r.has(n))?{score:.99,reason:"issue_code"}:{score:_e(e.tokens,t.tokens),reason:"title_token_jaccard"}}import wi from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a7cd1d62-16fe-5e5b-b382-64335fc5e403")}catch{}})();function Oe(e){return(e??"in_progress").trim().toLowerCase().replaceAll("-","_")}function Si(e,t){return[e.updated_at,t].map(r=>({value:r,time:Date.parse(r??"")})).filter(r=>typeof r.value=="string"&&Number.isFinite(r.time)).sort((r,n)=>n.time-r.time)[0]?.value??e.updated_at}function Pr(e,t){let r=Math.max(1,Math.trunc(t.threshold_hours)),n=(t.now??new Date).getTime(),o=Oe(t.in_progress_status),i=[];for(let s of e){if(Oe(String(s.status))!==o||(s.assignee?.trim().length??0)>0)continue;let a=Si(s,t.last_history_activity?.(s)),c=Date.parse(a);if(!Number.isFinite(c))continue;let d=Math.max(0,Math.floor((n-c)/36e5));d>=r&&i.push({id:s.id,last_activity_at:a,age_hours:d})}return i.sort((s,a)=>a.age_hours-s.age_hours||s.id.localeCompare(a.id)),{threshold_hours:r,count:i.length,items:i,remediation:"Claim active work with `pm claim <id>` or return abandoned work to open with `pm update <id> --status open`."}}async function Ti(e,t,r){let n=new Map;return await Promise.all(t.filter(o=>Oe(String(o.status))===Oe(r.in_progress_status)&&(o.assignee?.trim().length??0)===0).map(async o=>{let i;try{i=await st(wi.join(e,"history",`${o.id}.jsonl`),o.id)}catch{return}let s=i.map(a=>a.ts).filter(a=>Number.isFinite(Date.parse(a))).sort((a,c)=>Date.parse(c)-Date.parse(a))[0];s&&n.set(o.id,s)})),Pr(t,{...r,last_history_activity:o=>n.get(o.id)})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="42b217a3-31c0-561a-b7cb-b1a584b2edd5")}catch{}})();var vi=new Set(["rename-type","rename-field","remap-status",...nr]);function Ii(e,t){if(t&&!vi.has(e))throw new m(`schema ${e} does not support --dry-run. Preview is supported for rename-type, rename-field, remap-status and workflow-policy actions. Remove --dry-run only when you intend to apply changes.`,l.USAGE,{code:"invalid_argument_value",examples:["pm schema rename-type Spike --to Experiment --dry-run"]})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ccb1b39b-3dde-511b-8133-d4747bb6e55e")}catch{}})();function Td(e){try{return e()}catch(t){throw!(t instanceof m)||t.exitCode!==l.USAGE?t:new m(`${t.message} No changes were made.`,l.USAGE,{...t.context,code:t.code==="linked_test_command_not_executable"?t.code:"invalid_argument_value",reason:"test_option_invalid",changed:!1,required:t.context.required??t.message})}}function Ai(e,t){if(e[t]==="'"){let r=e.indexOf("'",t+1);return r<0?void 0:r+1}for(let r=t+1;r<e.length;r+=1){if(e[r]==='"')return r+1;if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"||e.startsWith("$(",r))return}}function Ci(e,t){let r=t;for(;r<e.length;){let n=e[r];if(/\s/u.test(n)||";&|".includes(n))return r;if(n==="\\"){r+=2;continue}if(n==="'"||n==='"'){let o=Ai(e,r);if(o===void 0)return;r=o;continue}if("<>()`".includes(n))return;r+=1}return r===e.length?r:void 0}function vt(e,t){let r=t;for(;r<e.length;){if(/\s/u.test(e[r])){r+=1;continue}if(e[r]!=="#")return r;let n=e.indexOf(`
10
+ `,r);if(n<0)return e.length;r=n+1}return r}function xi(e,t){let r=vt(e,t),n=e[r];return n===void 0||!";&|".includes(n)?r:(r+=1,n!==";"&&e[r]===n&&(r+=1),vt(e,r))}function ki(e){let t=e.trim(),r=vt(t,0);if(t.length===0)return!1;for(;r<t.length;){if(!/[A-Za-z_]/u.test(t[r]))return!1;let n=r+1;for(;n<t.length&&/[A-Za-z0-9_]/u.test(t[n]);)n+=1;if(t[n]!=="=")return!1;let o=Ci(t,n+1);if(o===void 0)return!1;r=xi(t,o)}return!0}function $r(e){if(!(e===void 0||!ki(e)))throw new m("Linked-test command contains only variable assignments or comments and has no executable command.",l.USAGE,{code:"linked_test_command_not_executable",required:'Supply an actual test command with --add "command=<actual command>" or --add-json. Environment assignments may precede that command.',examples:['pm test <id> --add "command=node --version"'],nextSteps:["Remove any already-stored assignment-only entry with --remove-index, then register the actual test command."]})}function vd(e){if($r(e.command),!(e.pm_context_mode!=="none"||e.workspace_context_mode==="isolated"||e.workspace_context_mode==="snapshot"))throw new m("pm_context_mode=none requires workspace_context_mode=isolated or snapshot so implicit tracker discovery cannot reach the source workspace.",l.USAGE,{code:"linked_test_context_invalid",required:"Set workspace_context_mode to isolated or snapshot when pm_context_mode is none.",examples:[sr(["test","<id>","--add-json",JSON.stringify({command:e.command,pm_context_mode:"none",workspace_context_mode:"isolated"})])]})}function Id(e,t){return e.command===t.command&&e.path===t.path&&e.scope===t.scope&&e.pm_context_mode===t.pm_context_mode&&e.workspace_context_mode===t.workspace_context_mode}var Le=["command","cmd","path","scope","timeout","timeout_seconds","pm_context_mode","workspace_context_mode","env_set","env_clear","shared_host_safe","assert_stdout_contains","assert_stdout_regex","assert_stderr_contains","assert_stderr_regex","assert_stdout_min_lines","assert_json_field_equals","assert_json_field_gte","note"],Ri=new Set(Le);function Ad(e){return hr(e,Le)}function Oi(e,t){let r={},n=[];for(let[o,i]of Object.entries(e)){let s=o.toLowerCase();if(!Ri.has(s)){n.push(o);continue}if(Object.hasOwn(r,s))throw new m(`${t} provides key "${o}" more than once after case normalization`,l.USAGE);r[s]=i}if(n.length>0)throw new m(`${t} does not recognize key${n.length>1?"s":""} ${n.map(o=>`"${o}"`).join(", ")}. Allowed keys: ${Le.join(", ")}.`,l.USAGE);if(r.cmd!==void 0){if(r.command!==void 0&&r.command.trim()!==r.cmd.trim())throw new m(`${t} command and cmd must match when both are provided`,l.USAGE);let{cmd:o,...i}=r;return{...i,command:i.command??o}}return r}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b58016fa-9817-5421-a4a3-78d1b1d22937")}catch{}})();import{readFile as Li}from"node:fs/promises";import zr from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7cc00705-c03e-5a18-9bec-af2585939ed8")}catch{}})();function Yd(e){if(e!==void 0){if(typeof e!="string")throw new m("--rollback requires a non-empty checkpoint ID string",l.USAGE);return Fr(e)}}function Fr(e){let t=e.trim();if(!t)throw new m("--rollback requires a non-empty checkpoint ID",l.USAGE);if(!/^[a-zA-Z0-9._-]+$/.test(t))throw new m("--rollback checkpoint ID must match [a-zA-Z0-9._-]+",l.USAGE);return t}function Di(e,t){let r=t.replace(/[-:.TZ]/g,"").slice(0,14),n=Math.random().toString(36).slice(2,8);return`${e}-${r}-${n}`}function Mi(e,t){return zr.join(e,"checkpoints",t)}function Ur(e,t,r){return zr.join(Mi(e,t),`${r}.json`)}async function Ni(e,t,r,n){let o=Ur(e,t,r),i=`${JSON.stringify(n,null,2)}
11
+ `;if(!await or(o,i)&&await T(o)!==i)throw new m(`Checkpoint ${r} already exists with different contents; use a new checkpoint ID.`,l.CONFLICT);return o}function Pi(e,t){if(!Array.isArray(e.items))throw new m(`Checkpoint ${t} is missing items`,l.GENERIC_FAILURE);return e.items.map(r=>{if(!r||typeof r!="object")throw new m(`Checkpoint ${t} contains an invalid item entry`,l.GENERIC_FAILURE);let n=r;if(typeof n.id!="string"||n.id.trim().length===0)throw new m(`Checkpoint ${t} contains an item entry without ID`,l.GENERIC_FAILURE);if(typeof n.target_updated_at!="string"||n.target_updated_at.trim().length===0)throw new m(`Checkpoint ${t} contains an item entry without target_updated_at`,l.GENERIC_FAILURE);return{id:n.id.trim(),target_updated_at:n.target_updated_at.trim()}})}async function $i(e,t,r,n){let o=Fr(r),i=Ur(e,t,o);if(!await W(i))throw new m(`Checkpoint ${o} not found`,l.NOT_FOUND);let s=await Li(i,"utf8"),a;try{a=JSON.parse(s)}catch(u){throw new m(`Checkpoint ${o} contains invalid JSON: ${E(u)}`,l.GENERIC_FAILURE)}if(!a||typeof a!="object")throw new m(`Checkpoint ${o} is invalid`,l.GENERIC_FAILURE);let c=a;if(c.schema_version!==n)throw new m(`Checkpoint ${o} has unsupported schema version. Inspect pm history and use an explicit pm restore only after reviewing later edits.`,l.GENERIC_FAILURE);let d=Pi(c,o);return{record:c,items:d,path:i,id:typeof c.id=="string"?c.id:o,created_at:typeof c.created_at=="string"?c.created_at:M(),author:typeof c.author=="string"?c.author:"unknown"}}async function zi(e,t){let r=[],n=[];for(let o of e)try{let i=await t(o.id,o.target_updated_at);r.push({id:o.id,status:i.skipped?"skipped":"restored",changed_fields:i.changed_fields,warnings:i.warnings}),i.skipped||n.push(o.id)}catch(i){r.push({id:o.id,status:"failed",error:E(i)})}return{rows:r,restored_ids:n,failed_count:r.filter(o=>o.status==="failed").length}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cb883ffc-c431-5bf9-a973-931a8a0a940c")}catch{}})();function N(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return t.length>0?t:null}function Gd(e,t){let r=N(t);return!e||!r?null:[...e.assurance_providers??[]].reverse().find(n=>N(n.definition.id)===r)??null}function Fi(e,t){let r=N(t);return!e||!r?null:[...e.search_providers].reverse().find(n=>(N(n.runtime_definition?.name)??N(n.definition?.name))===r)??null}function Ui(e,t){let r=N(t);return!e||!r?null:[...e.vector_store_adapters].reverse().find(n=>(N(n.runtime_definition?.name)??N(n.definition?.name))===r)??null}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4441095d-0acd-5780-8758-7df94396cb8e")}catch{}})();function It(e){return[...new Set(e.split(/[,\r\n]+/).map(t=>t.trim()).filter(t=>t.length>0))]}function Vi(e){let t=[];for(let n of e)if(typeof n=="string")t.push(n);else if(typeof n=="number"&&Number.isFinite(n))t.push(String(n));else return"";let r=It(t.join(`
12
+ `));return r.length>0?r.join(","):""}function ji(e){if(e===void 0)return;if(typeof e=="number")return Number.isFinite(e)?String(e):"";if(Array.isArray(e))return Vi(e);if(typeof e!="string")return"";let t=It(e);return t.length>0?t.join(","):""}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1dcf0d72-10da-51b6-b9f6-ab47bebcbf64")}catch{}})();function Vr(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function At(e){if(e==="/body"||e.startsWith("/body/"))return"body";if(e==="/metadata"||e.startsWith("/metadata/")||e==="/front_matter"||e.startsWith("/front_matter/")){let r=e.replace(/^\/(?:metadata|front_matter)\/?/,"").split("/")[0];return r?Vr(r):"metadata"}let t=e.replace(/^\//,"").split("/")[0];return t?Vr(t):"root"}function De(e,t){return t==="body"?e.body:t==="metadata"?e.metadata:t==="root"?e:e.metadata[t]}function qi(e,t){let r=t?.windowStartIndex??0,n=t?.field;if(e.length===0||r>=e.length)return[];let o=cr(),i=[];for(let s=0;s<e.length;s+=1){let a=e[s],c=o,d=dr(o,a.patch),u;d.ok?(u=d.document,o=u):u=c;let f=new Set;for(let p of a.patch)f.add(At(p.path)),p.from!==void 0&&f.add(At(p.from));let _=[...f].sort((p,g)=>p.localeCompare(g));if(s>=r)if(n!==void 0){if(!f.has(n))continue;let p={field:n,before:De(c,n),after:De(u,n)};i.push({index:s+1,ts:a.ts,op:a.op,author:a.author,patch_ops:a.patch.length,changed_fields:[n],changes:[p]})}else{let p=_.map(g=>({field:g,before:De(c,g),after:De(u,g)}));i.push({index:s+1,ts:a.ts,op:a.op,author:a.author,patch_ops:a.patch.length,changed_fields:_,changes:p})}}return i}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="80805c6b-9b9a-5dad-b94b-d7dbd365fe5e")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2fd342e6-06cc-56d4-aa0e-2af269234b59")}catch{}})();var Hi=new Set(["none","null","undefined"]);function cl(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="warn"||t==="strict_error")return t;if(t==="strict")return"strict_error";throw new m("Config set parent-reference-policy requires --policy with one of: warn, strict_error (alias: strict)",l.USAGE)}function Yi(e){if(typeof e!="string")throw new m("--parent must be a string. Use --unset parent to clear this field.",l.USAGE);let t=e.trim();if(t.length===0)throw new m("--parent must not be empty. Use --parent none to unset.",l.USAGE);if(jr(t))throw new m(`--parent must not use placeholder token "${t}". Use --unset parent to clear this field.`,l.USAGE);return t}function jr(e){return Hi.has(e.trim().toLowerCase())}function Bi(e,t){if(t==="strict_error")throw new m(`Parent item "${e}" was not found. Create it first or use --parent none.`,l.USAGE);return{warnings:[`validation_warning:parent_reference_missing:${e}`]}}function Gi(e,t,r){let n=be(e,r),o=be(t,r);if(n!==o)return;let i=t!==o||e!==n?` (normalized from parent "${t}" and item "${e}")`:"";throw new m(`Parent item "${o}" cannot be the same as item "${n}"${i}. Use --unset parent to clear this field.`,l.USAGE)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a59d5b7f-9764-53c5-a014-1119868be8ea")}catch{}})();var Ct={critical:0,high:1,medium:2,low:3,minimal:4},qr=Object.keys(Ct),Wi=`numbers 0..4 (0=critical, 1=high, 2=medium, 3=low, 4=minimal) or names (${qr.join(", ")}), case-insensitive`;function Me(e){return new m(`Invalid priority "${e}". Accepted values: ${Wi}.`,l.USAGE,{code:"invalid_argument_value",field:"priority",value:e,allowed:["0","1","2","3","4",...qr]})}function Ki(e){if(typeof e=="number"){if(Number.isInteger(e)&&e>=0&&e<=4)return e;throw Me(String(e))}if(typeof e!="string")throw Me(String(e));let t=e.trim();if(t.length===0)throw Me(e);let r=t.toLowerCase();if(Object.prototype.hasOwnProperty.call(Ct,r))return Ct[r];if(/^[0-4]$/.test(t))return Number(t);throw Me(e)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e363ee89-b438-5c8e-bb06-f4d05cc814cc")}catch{}})();function Ji(e){return ie(se(Ae(e,{...e})))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b6206b0e-0cd8-5827-acbd-6ac064dbcad7")}catch{}})();var Xi=/^[A-Za-z0-9][A-Za-z0-9._/-]*$/,Qi=64;function yl(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="warn"||t==="strict_error")return t;if(t==="strict")return"strict_error";throw new m("Config set sprint-release-format-policy requires --policy with one of: warn, strict_error (alias: strict)",l.USAGE)}function Zi(e,t,r){let n=t.trim();if(n.length===0)throw new m(`--${e} must not be empty. Use --${e} none to unset.`,l.USAGE);if(n.length<=Qi&&Xi.test(n))return{value:n,warnings:[]};let o="Expected 1-64 characters matching [A-Za-z0-9][A-Za-z0-9._/-]* (no spaces).";if(r==="strict_error")throw new m(`Invalid --${e} value "${n}". ${o}`,l.USAGE);return{value:n,warnings:[`validation_warning:${e}_format:${n}`]}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="14e6c7b4-3161-5f82-b797-f06a879d1370")}catch{}})();var Hr={open:"open_status",closed:"close_status",canceled:"canceled_status",cancelled:"canceled_status"},Yr="all";function vl(e){if(typeof e!="string")return!1;let t=e.split(",").map(r=>r.trim().toLowerCase()).filter(r=>r.length>0);return t.length===1&&t[0]===Yr}function es(e,t){let r=e.trim().toLowerCase();if(r.length===0)return;let n=Hr[r];return n?t[n]:ot(e,t)}function ts(e){let t=new Set(Object.keys(Hr));for(let r of e.definitions){t.add(r.id);for(let n of r.aliases)t.add(n)}return[...t]}function rs(e,t){let r=e.trim().toLowerCase(),n,o=Number.POSITIVE_INFINITY;for(let i of ts(t)){let s=Xe(r,i.toLowerCase(),2);s!==null&&s<o&&(n=i,o=s)}return n}function ns(e,t,r){if(typeof e!="string")return;let n=r?.strict===!0,o=r?.flagLabel??"--status",i=e.split(",").map(a=>a.trim()).filter(a=>a.length>0);if(i.length===0)return;if(i.filter(a=>a.trim().toLowerCase()===Yr).length>0){if(i.length===1)return;throw new m(`Invalid ${o} value "all". Use it by itself, or omit ${o} to search every status.`,l.USAGE)}let s=[];for(let a of i){let c=es(a,t);if(c===void 0){if(n){let d=rs(a,t);throw new m(`Invalid ${o} value "${a}". Use open|closed|canceled or a configured status id${d?`. Did you mean "${d}"?`:"."}`,l.USAGE)}s.push(a);continue}s.push(c)}return[...new Set(s)]}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="50f77f3f-b2b0-5ae2-b669-6ed50bbdd530")}catch{}})();var os={bug:"Issue",bugfix:"Issue",defect:"Issue",incident:"Issue",enhancement:"Feature",story:"Feature",userstory:"Feature","user-story":"Feature","user story":"Feature",change:"Chore",ticket:"Task",todo:"Task"};function is(e){if(e!==void 0)return os[e.trim().toLowerCase()]}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c628dcf9-d98f-566e-9f93-cc81e737691c")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4b79bd02-51ae-5c46-be4c-2f41dd8c9486")}catch{}})();function Br(e,t){return oe(e,t)}function ss(e,t,r){let n={};for(let o of t.command_to_fields.get(r)??[]){let i=nt(e,o);i!==void 0&&(n[o.metadata_key]=ar(o,i))}return n}function as(e,t){for(let[r,n]of Object.entries(t)){let o=e[r];if(Array.isArray(n)){if(Array.isArray(o)){let i=o.map(s=>String(s));if(!n.map(s=>String(s)).every(s=>i.includes(s)))return!1;continue}if(!Br(o,n[n.length-1]))return!1;continue}if(!Br(o,n))return!1}return!0}import{spawnSync as Wr}from"node:child_process";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7889f11f-36f9-5384-8429-58d951c342da")}catch{}})();var cs="PM_DISABLE_OLLAMA_AUTO_DEFAULTS",ds="PM_OLLAMA_MODEL",ls="http://localhost:11434",us="qwen3-embedding:0.6b",ms=".agents/pm/search/lancedb/",fs=1500,ps=2500,_s=/qwen.*(?:embed|embedding)|(?:embed|embedding).*qwen/i,hs=/embed|embedding/i,k=b;function gs(){let e=k(process.env[cs]);if(!e)return!1;let t=e.toLowerCase();return t==="1"||t==="true"||t==="yes"}function Gr(e){return e.some(t=>k(t)!==null)}function ys(e){let t=k(e);return!!(t&&t.toLowerCase()!=="ollama")}function bs(e){let t=k(e);return!!(t&&t.toLowerCase()!=="lancedb")}function Es(e){return ys(e.search?.provider)||bs(e.vector_store?.adapter)||Gr([e.providers?.openai?.base_url,e.providers?.openai?.model,e.providers?.openai?.api_key])?!0:Gr([e.vector_store?.qdrant?.url,e.vector_store?.qdrant?.api_key])}function ws(){let e=Wr("ollama",["--version"],{encoding:"utf8",timeout:fs});return e.error?!1:e.status===0}function Ss(e){let t=e.split(/\r?\n/).map(n=>n.trim()).filter(n=>n.length>0);if(t.length===0)return null;let r=t.map(n=>n.split(/\s+/)[0]?.trim()).filter(n=>!!(n&&n.length>0)).filter(n=>n.toUpperCase()!=="NAME");return r.length===0?null:r.find(n=>_s.test(n))||(r.find(n=>hs.test(n))??null)}function Ts(e){let t=k(e.providers?.ollama?.model);if(t)return t;let r=k(process.env[ds]);if(r)return r;let n=Wr("ollama",["list"],{encoding:"utf8",timeout:ps});if(!n.error&&n.status===0){let o=Ss(typeof n.stdout=="string"?n.stdout:"");if(o)return o}return null}function vs(e){return{baseUrl:k(e.providers?.ollama?.base_url)===null,model:k(e.providers?.ollama?.model)===null,lancedbPath:k(e.vector_store?.lancedb?.path)===null,embeddingModel:k(e.search?.embedding_model)===null}}function Is(e){return e.baseUrl||e.model||e.lancedbPath||e.embeddingModel}function As(e,t,r){if(!t.baseUrl&&!t.model)return;let n=e.providers??={},o=n.ollama??={};t.baseUrl&&(o.base_url=ls),t.model&&(o.model=r)}function Cs(e,t){if(!t.lancedbPath)return;let r=e.vector_store??={},n=r.lancedb??={};n.path=ms}function xs(e,t,r){if(!t.embeddingModel)return;let n=e.search??={};n.embedding_model=r}function Ne(e){let t={settings:e,auto_ollama_defaults_applied:!1};if(gs()||Es(e))return t;let r=vs(e);if(!Is(r)||r.model&&!ws())return t;let n=structuredClone(e),o=Ts(n);return o?(As(n,r,o),Cs(n,r),xs(n,r,o),{settings:n,auto_ollama_defaults_applied:!0}):{...t,auto_ollama_defaults_skipped_reason:"no_installed_embedding_model",auto_ollama_defaults_remediation:`Run ollama pull ${us} or configure providers.ollama.model explicitly (and search.embedding_model if you need an override).`}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9ecff496-8afa-5cfc-9178-2be8bd403978")}catch{}})();var ks="reindex";import nn from"node:path";import{mkdir as Rs,readFile as Os,stat as Rt,unlink as Ls}from"node:fs/promises";import{basename as Jr,dirname as xt,isAbsolute as Ds,join as Ms,resolve as Ot}from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b5f2e49a-fb72-554b-b0a8-dca0adee71f4")}catch{}})();var Lt="pm_items",Ns=/[^a-zA-Z0-9_-]/g,Ps=128,$s=".pm-cli-local-vectors",kt=1,q=new Map;function de(e){return(b(e.collection_name)??Lt).replaceAll(Ns,"_").slice(0,Ps)}function Pe(e){if(!J(e)||e.length===0)throw new Error("Vector values must be a non-empty numeric array");return[...e]}function Qr(e){if(!Number.isFinite(e)||e<=0)throw new Error("Vector query limit must be a positive number");return Math.floor(e)}function zs(e){let t=e.result;if(!Array.isArray(t))throw new TypeError("Qdrant query response must include a result array");let r=t.map((n,o)=>{let i=n.id,s=typeof i=="number"?String(i):i,a=b(s);if(!a)throw new Error(`Qdrant query response entry at index ${o} is missing a non-empty id`);let c=n.score;if(typeof c!="number"||!Number.isFinite(c))throw new TypeError(`Qdrant query response entry at index ${o} is missing a finite numeric score`);let d=n.payload;if(d!==void 0&&(typeof d!="object"||d===null||Array.isArray(d)))throw new Error(`Qdrant query response entry at index ${o} must provide payload as an object when set`);return{id:a,score:c,...d?{payload:d}:{}}});return r.sort((n,o)=>n.score!==o.score?o.score-n.score:n.id.localeCompare(o.id)),r}function Dt(e){let t=b(e.result?.status);if(t)return{status:t};let r=b(e.status);if(r)return{status:r};throw new Error("Qdrant upsert response must include status metadata")}async function ce(e,t,r,n,o){return await xe({endpoint:e,method:t.method,headers:t.headers,body:t.body,timeoutMs:r,fetcher:n,requestLabel:`Vector ${o} request`,responseLabel:`Vector ${o} response`})}function Fs(e){let t=b(e.vector_store?.qdrant?.url);if(!t)return null;let r=b(e.vector_store?.collection_name),n=b(e.vector_store?.qdrant?.api_key);return{name:"qdrant",url:t,...r&&r!==Lt?{collection_name:r}:{},...n?{api_key:n}:{}}}function Us(e){let t=Ot(e),r=xt(t);return Jr(t)==="pm"&&Jr(r)===".agents"?xt(r):t}function Vs(e,t){return!t||Ds(e)?e:Ot(Us(t),e)}function js(e,t){let r=b(e.vector_store?.lancedb?.path);if(!r)return null;let n=b(e.vector_store?.collection_name);return{name:"lancedb",path:Vs(r,t),...n&&n!==Lt?{collection_name:n}:{}}}function qs(e){if(!Array.isArray(e)||e.length===0)throw new Error("Vector upsert records must include at least one entry");return e.map((t,r)=>{let n=b(t.id);if(!n)throw new Error(`Vector upsert record at index ${r} is missing a non-empty id`);let o=Pe(t.vector),i=t.payload;if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new Error(`Vector upsert record at index ${r} must provide payload as an object when set`);return{id:n,vector:o,...i?{payload:i}:{}}})}function Hs(e){if(!Array.isArray(e)||e.length===0)throw new Error("Vector delete ids must include at least one entry");let t=e.map((n,o)=>{let i=b(n);if(!i)throw new Error(`Vector delete id at index ${o} is missing a non-empty value`);return i}).sort((n,o)=>n.localeCompare(o)),r=[];for(let n of t)r.at(-1)!==n&&r.push(n);return r}function Ys(e){return e.replace(/\/points\?wait=true$/,"/points/delete?wait=true")}function Bs(e){return e.replace(/\/points\?wait=true$/,"")}function $e(e){return{"content-type":"application/json",...e.api_key?{"api-key":e.api_key}:{}}}function ze(e,t){return ee(e,t)}function ee(e,t){return Ms(Ot(e),$s,`${t}.json`)}function Gs(e,t,r){let n=b(e.id);if(!n)throw new Error(`LanceDB local snapshot '${r}' record at index ${t} is missing a non-empty id`);let o=Pe(e.vector),i=e.payload;if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new Error(`LanceDB local snapshot '${r}' record '${n}' must provide payload as an object when set`);return{id:n,vector:o,...i?{payload:i}:{}}}function Ws(e,t,r){let n;try{n=JSON.parse(r)}catch(a){throw new Error(`LanceDB local snapshot at '${e}' is not valid JSON: ${E(a)}`)}if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`LanceDB local snapshot at '${e}' must be a JSON object`);if(n.version!==kt)throw new Error(`LanceDB local snapshot at '${e}' must include version=${kt}`);let o=b(n.table);if(!o)throw new Error(`LanceDB local snapshot at '${e}' must include a non-empty table value`);if(o!==t)throw new Error(`LanceDB local snapshot at '${e}' table mismatch: expected '${t}', received '${o}'`);let i=n.records;if(!Array.isArray(i))throw new TypeError(`LanceDB local snapshot at '${e}' must include a records array`);let s=new Map;for(let a=0;a<i.length;a+=1){let c=Gs(i[a],a,e);s.set(c.id,c)}return s}async function Ks(e){try{let t=await Rt(e);return{mtimeMs:t.mtimeMs,size:t.size}}catch(t){if(!K(t))throw t;return null}}function Js(e,t){if(!t)return null;if(t.mtimeMs===null&&t.size===null&&t.records.size===0)return t.records;let r=new Map;return q.set(e,{records:r,mtimeMs:null,size:null}),r}function Xs(e,t){return e!==void 0&&t!==null&&e.mtimeMs===t.mtimeMs&&e.size===t.size}async function Mt(e,t){let r=ze(e,t),n=ee(e,t),o=await Ks(n),i=q.get(r);if(!o){let a=Js(r,i);if(a)return a}if(Xs(i,o))return i.records;let s=new Map;try{let a=await Os(n,"utf8");s=Ws(n,t,a)}catch(a){if(!K(a))throw a}return q.set(r,{records:s,mtimeMs:o?.mtimeMs??null,size:o?.size??null}),s}function Qs(e){let t=[...e.values()];return t.sort((r,n)=>r.id.localeCompare(n.id)),t.map(r=>({id:r.id,vector:[...r.vector],...r.payload?{payload:r.payload}:{}}))}async function Zr(e){try{await Ls(e)}catch(t){if(!K(t))throw new Error(`LanceDB local snapshot delete failed at '${e}': ${E(t)}`)}}async function en(e,t,r){let n=ee(e,t);if(r.size===0){await Zr(n);return}let o=xt(n);try{await Rs(o,{recursive:!0})}catch(s){throw new Error(`LanceDB local snapshot directory create failed at '${o}': ${E(s)}`)}let i=`${JSON.stringify({version:kt,table:t,records:Qs(r)})}
13
+ `;try{await v(n,i)}catch(s){throw new Error(`LanceDB local snapshot write failed at '${n}': ${E(s)}`)}}async function Zs(e,t){let r=ze(e,t),n=ee(e,t);await Zr(n),q.delete(r)}function Xr(e){let t=0;for(let r=0;r<e.length;r+=1)t+=e[r]*e[r];return Math.sqrt(t)}function ea(e,t){let r=0;for(let i=0;i<e.length;i+=1)r+=e[i]*t[i];let n=Xr(e),o=Xr(t);return n===0||o===0?0:r/(n*o)}function Nt(e,t){let r=Fs(e),n=js(e,t),o=[r,n].filter(a=>a!==null),i=b(e.vector_store?.adapter),s=i?i.toLowerCase():null;return{active:(s?o.find(a=>a.name===s):void 0)??o[0]??null,available:o}}function Fe(e){let t=de(e);if(e.name==="qdrant"){let o=re(e.url),i=encodeURIComponent(t);return{store:"qdrant",query_target:`${o}/collections/${i}/points/search`,upsert_target:`${o}/collections/${i}/points?wait=true`}}let r=encodeURIComponent(e.path),n=encodeURIComponent(t);return{store:"lancedb",query_target:`lancedb://${r}#${n}`,upsert_target:`lancedb://${r}#${n}`}}function ta(e,t,r){let n=Fe(e),o=Pe(t),i=Qr(r);return e.name==="qdrant"?{target:n,method:"POST",headers:$e(e),body:{vector:o,limit:i,with_payload:!0}}:{target:n,method:"LOCAL",headers:{},body:{table:de(e),vector:o,limit:i}}}function ra(e,t){let r=Fe(e),n=qs(t);return e.name==="qdrant"?{target:r,method:"POST",headers:$e(e),body:{points:n}}:{target:r,method:"LOCAL",headers:{},body:{table:de(e),records:n}}}function na(e,t){let r=Fe(e),n=Hs(t);return e.name==="qdrant"?{target:r,method:"POST",headers:$e(e),body:{points:n}}:{target:r,method:"LOCAL",headers:{},body:{table:de(e),ids:n}}}async function Gl(e,t,r,n={}){let o=ta(e,t,r);if(o.method==="LOCAL"){let c=e,d=o.body,u=await Mt(c.path,d.table);if(u.size===0)return[];let f=Pe(d.vector),_=Qr(d.limit),p=[],g=0;for(let h of u.values()){if(h.vector.length!==f.length){g++;continue}p.push({id:h.id,score:ea(f,h.vector),...h.payload?{payload:h.payload}:{}})}return g>0&&n.warnings&&n.warnings.push(`vector_dimension_mismatch:${g} records skipped (expected ${f.length} dimensions)`),p.sort((h,y)=>h.score!==y.score?y.score-h.score:h.id.localeCompare(y.id)),p.slice(0,_)}let i=z(n.timeout_ms,"Vector request"),s=F(n.fetcher,"Vector request"),a=await ce(o.target.query_target,{method:"POST",headers:o.headers,body:o.body},i,s,"query");return zs(a)}async function Pt(e,t,r={}){let n=ra(e,t);if(n.method==="LOCAL"){let a=e,c=n.body,d=ze(a.path,c.table),u=await Mt(a.path,c.table);for(let p of c.records)u.set(p.id,p);await en(a.path,c.table,u);let f=ee(a.path,c.table),_=await Rt(f);return q.set(d,{records:u,mtimeMs:_.mtimeMs,size:_.size}),{status:"ok"}}let o=z(r.timeout_ms,"Vector request"),i=F(r.fetcher,"Vector request"),s=await ce(n.target.upsert_target,{method:"POST",headers:n.headers,body:n.body},o,i,"upsert");return Dt(s)}async function Ue(e,t,r={}){let n=na(e,t);if(n.method==="LOCAL"){let a=e,c=n.body,d=ze(a.path,c.table),u=await Mt(a.path,c.table);if(u.size===0)return{status:"ok"};for(let f of c.ids)u.delete(f);if(await en(a.path,c.table,u),u.size===0)q.delete(d);else{let f=ee(a.path,c.table),_=await Rt(f);q.set(d,{records:u,mtimeMs:_.mtimeMs,size:_.size})}return{status:"ok"}}let o=z(r.timeout_ms,"Vector request"),i=F(r.fetcher,"Vector request"),s=await ce(Ys(n.target.upsert_target),{method:"POST",headers:n.headers,body:n.body},o,i,"delete");return Dt(s)}async function tn(e,t=[],r={},n){if(e.name==="lancedb")return await Zs(e.path,de(e)),{status:"ok"};if(n!==void 0){if(!Number.isInteger(n)||n<=0)throw new Error("Vector reset dimension must be a positive integer when provided");let i=Fe(e),s=Bs(i.upsert_target),a=z(r.timeout_ms,"Vector request"),c=F(r.fetcher,"Vector request"),d=$e(e);try{await ce(s,{method:"DELETE",headers:d,body:{}},a,c,"delete")}catch(f){if(!E(f).includes("failed with status 404"))throw f}let u=await ce(s,{method:"PUT",headers:d,body:{vectors:{size:n,distance:"Cosine"}}},a,c,"upsert");return Dt(u)}let o=t.map(i=>i.trim()).filter(i=>i.length>0);return o.length===0?{status:"ok"}:await Ue(e,o,r)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f8acaac5-64f7-5e22-987e-4eb12a1aa1cf")}catch{}})();function Ve(e,t){let r=b(e),n=b(t);return!r||!n?null:{provider:r,model:n}}function rn(e){if(e==null)return null;if(typeof e!="object"||Array.isArray(e))throw new Error("Vectorization embedding metadata must be an object when set");let t=Ve(e.provider,e.model),r=e.vector_dimension;if(!t||typeof r!="number"||!Number.isInteger(r)||r<=0)throw new Error("Vectorization embedding metadata must include provider, model, and positive vector_dimension");return{...t,vector_dimension:r}}function $t(e,t){if(!Number.isInteger(t)||t<=0)throw new Error("Vectorization embedding metadata requires a positive vector dimension");return{provider:e.provider,model:e.model,vector_dimension:t}}function zt(e,t){return!e||e.provider!==t.provider||e.model!==t.model}function Ft(e,t){return!!(e&&e.vector_dimension!==t)}function Ut(e,t){if(e.length===0)throw new Error(`${t} returned no vectors`);let r=e[0].length;if(!Number.isInteger(r)||r<=0)throw new Error(`${t} returned an empty vector`);for(let n=1;n<e.length;n+=1)if(e[n]?.length!==r)throw new Error(`${t} returned mixed vector dimensions`);return r}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7113dff5-c8e0-5ba6-b0ae-2ff849ed94df")}catch{}})();var on="search/vectorization-status.json";function ue(e){return[...new Set([...e].map(t=>t.trim()).filter(t=>t.length>0))].sort((t,r)=>t.localeCompare(r))}function sn(e){return typeof e=="string"&&e.trim().length>0&&Number.isFinite(Date.parse(e))}function an(e){let t=new Map;for(let[r,n]of Object.entries(e)){let o=r.trim();o.length===0||!sn(n)||t.set(o,n)}return Object.fromEntries([...t.entries()].sort((r,n)=>r[0].localeCompare(n[0])))}async function cn(e){let t=nn.join(e,on),r=await T(t);if(r===null||r.trim().length===0)return{entries:{},embedding:null,warnings:[]};let n;try{n=JSON.parse(r)}catch{return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]}}if(typeof n!="object"||n===null||n.version!==1||!Array.isArray(n.items))return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]};let o=new Map;for(let s of n.items){if(typeof s!="object"||s===null)return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]};let a=s.id,c=s.updated_at;if(typeof a!="string"||a.trim().length===0||!sn(c))return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]};o.set(a.trim(),c)}let i=null;try{i=rn(n.embedding)}catch{return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]}}return{entries:Object.fromEntries([...o.entries()].sort((s,a)=>s[0].localeCompare(a[0]))),embedding:i,warnings:[]}}async function dn(e,t,r){let n=an(t),o=nn.join(e,on),i=`${JSON.stringify({version:1,generated_at:M(),...r?{embedding:r}:{},items:Object.entries(n).map(([s,a])=>({id:s,updated_at:a}))},null,2)}
14
+ `;await v(o,i)}function oa(e){return{id:e.id,type:e.type,status:e.status,priority:e.priority,updated_at:e.updated_at}}function ia(e){let t=Ve(e.name,e.model);if(!t)throw new Error("Embedding provider must include a provider name and model");return t}function le(e,t){return{refreshed:[],skipped:e,warnings:[t]}}async function sa(e,t,r){if(!r.settings&&!await W(X(e)))return le(t,"search_semantic_refresh_skipped:settings_not_initialized");let n;try{if(r.settings)n=r.settings;else{let a=await Se(e),c=a.warnings.find(d=>d.startsWith("settings_read_"));if(c)return le(t,`search_semantic_refresh_skipped:settings_read_failed:${c}`);n=a.settings}}catch(a){return le(t,`search_semantic_refresh_skipped:settings_read_failed:${E(a)}`)}let o=r.apply_runtime_defaults?Ne(n).settings:n,i=_t(o).active;if(!i)return le(t,"search_semantic_refresh_skipped:provider_unconfigured");let s=Nt(o,e).active;return s?{settings:o,provider:i,vectorStore:s}:le(t,"search_semantic_refresh_skipped:vector_store_unconfigured")}async function aa(e,t,r,n,o,i){let s=[],a=new Set,c=new Set,d=[];for(let u of n){let f=await dt(e,u,t,r,o);if(!f){c.add(u);continue}try{let _=await lt(f,{schema:i});d.push({id:_.document.metadata.id,document:_.document})}catch(_){a.add(f.id),s.push(`search_semantic_refresh_item_read_failed:${f.id}:${E(_)}`)}}return d.sort((u,f)=>u.id.localeCompare(f.id)),{documents:d,missingIds:ue(c),skippedIds:ue(a),warnings:s}}async function ca(e,t,r){let n=Z(t.name,e.search.embedding_corpus_max_characters).maxCharacters,o=ht(e),i=r.map(a=>gt(a.document,{providerName:t.name,maxCharacters:n,fields:o})),s=await bt(t,e,i);return{vectors:s.vectors,vector_dimension:Ut(s.vectors,"Semantic refresh embedding"),warnings:s.warnings}}async function da(e,t,r){return await Pt(e,t.map((n,o)=>({id:n.id,vector:r[o],payload:oa(n.document.metadata)}))),{refreshed:t.map(n=>n.id),skipped:[],warnings:[]}}async function la(e,t){if(t.length===0)return{refreshed:[],skipped:[],warnings:[]};try{return await Ue(e,t),{refreshed:[],skipped:[],warnings:[]}}catch(r){return{refreshed:[],skipped:t,warnings:[`search_semantic_refresh_delete_failed:${E(r)}`]}}}async function pu(e,t,r={}){let n=ue(t);if(n.length===0)return{refreshed:[],skipped:[],warnings:[]};let o=await sa(e,n,r);if(!("settings"in o))return o;let i=Ze(o.settings,tt()),s=await aa(e,o.settings.id_prefix,o.settings.item_format,n,i.type_to_folder,o.settings.schema),a=s.documents.length>0||s.missingIds.length>0?await cn(e):{entries:{},embedding:null,warnings:[]},c=ia(o.provider),d=a.entries,u={refreshed:[],skipped:[],warnings:[]},f=a.embedding;if(s.documents.length>0)if(a.embedding&&zt(a.embedding,c))u={refreshed:[],skipped:s.documents.map(y=>y.id),warnings:["search_semantic_refresh_requires_reindex:embedding_identity_changed"]};else try{let y=await ca(o.settings,o.provider,s.documents);if(Ft(a.embedding,y.vector_dimension))u={refreshed:[],skipped:s.documents.map(w=>w.id),warnings:[...y.warnings,"search_semantic_refresh_requires_reindex:vector_dimension_changed"]};else{f=$t(c,y.vector_dimension);let w=await da(o.vectorStore,s.documents,y.vectors);u={refreshed:w.refreshed,skipped:w.skipped,warnings:[...y.warnings,...w.warnings]}}}catch(y){u={refreshed:[],skipped:s.documents.map(w=>w.id),warnings:[`search_semantic_refresh_failed:${E(y)}`]}}let _=await la(o.vectorStore,s.missingIds),p=new Set(u.refreshed),g=Object.fromEntries(s.documents.filter(y=>p.has(y.id)).map(y=>[y.id,y.document.metadata.updated_at])),h=[];if(Object.keys(g).length>0||s.missingIds.length>0){let y={...d,...an(g)};for(let w of s.missingIds)delete y[w];try{await dn(e,y,f)}catch(w){h.push(`search_vectorization_status_ledger_write_failed:${E(w)}`)}h.push(...a.warnings)}return{refreshed:ue([...u.refreshed,..._.refreshed]),skipped:ue([...s.skippedIds,...u.skipped,..._.skipped]),warnings:[...s.warnings,...u.warnings,..._.warnings,...h]}}import{createRequire as ha}from"node:module";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ac3b0f55-7faf-5fa6-b01d-304e87acb9a2")}catch{}})();var ua=new Set(["1","true","yes","on"]),Vt=["user","automation","test","dogfood"],ma=new Set(Vt);function ln(e=process.env){return typeof e.VITEST=="string"||typeof e.VITEST_WORKER_ID=="string"||typeof e.NODE_TEST_CONTEXT=="string"||(e.NODE_ENV??"").trim().toLowerCase()==="test"}function je(e,t){return ua.has((t[e]??"").trim().toLowerCase())}function me(e=process.env){let t=je("DO_NOT_TRACK",e),r=(e.PM_TELEMETRY_SOURCE_CONTEXT??"").trim().toLowerCase(),n=ln(e)&&!ma.has(r)&&!je("PM_TELEMETRY_SEND_TEST_EVENTS",e);return{telemetry_disabled:t||n||je("PM_TELEMETRY_DISABLED",e)||je("PM_NO_TELEMETRY",e),do_not_track:t,test_suppressed:n}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="64589e00-25ef-5d74-a94a-7d40455e1929")}catch{}})();var mn=/(?:token|secret|password|passwd|api[_-]?key|apikey|authorization|cookie|credentials|bearer|dsn)/i,gu=new RegExp(`(?:\\b|(?<=_))(${mn.source})\\s*[:=]\\s*([^\\s,;]+)`,"giu");var un="(?:\\s|\\\\+u(?:0009|000a|000d|0020))*",yu=new RegExp("^"+un+"(?::|=|\\\\+u(?:003a|003d))"+un,"iu");(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="93725298-6091-543b-969d-bac38d70be89")}catch{}})();var xu=ha(import.meta.url);(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9e8ad404-2f8d-5d9b-9046-60178a70e5b2")}catch{}})();var qe=class extends m{constructor(t,r,n){super(t,l.GENERIC_FAILURE,r),this.name="ExtensionCommandError",Object.defineProperty(this,"cause",{value:n,configurable:!0,writable:!0})}};function Lu(e,t){let r=t.warnings[0]??"extension_command_handler_failed",n=t.errorMessage?.trim();return new qe(`Command "${e}" failed in extension handler (${r}).${n?` ${n}`:""}`,{code:t.errorCode??"command_failed",nextSteps:t.remediation?[t.remediation]:void 0},t.cause)}function Du(e){return e instanceof m||e instanceof Error?e.message:"Unknown failure"}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bd65294f-dfa5-53d2-9691-c630884f2a5f")}catch{}})();var Pu=new Map([[l.USAGE,"invalid_command_usage"],[l.NOT_FOUND,"item_not_found"],[l.CONFLICT,"lock_conflict"],[l.DEPENDENCY_FAILED,"dependency_failed"]]);(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="10325dfb-128f-5d83-9163-061d8d8b29b6")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ab644545-f072-53c0-9ebf-72a62c237a2f")}catch{}})();var Gu=Object.freeze({"&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&amp;":"&"});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e7deff0d-d9c9-5250-b172-ab752ddd64a4")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bc9e1b59-21cb-5dda-91c0-36e123734cd3")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4b566486-120f-5aed-8d92-9e62ed996210")}catch{}})();function ya(e,t){if(e==null)return[];let r=t?.separators??/,/,n=e.split(r).map(i=>i.trim()).filter(i=>i.length>0),o=t?.unique!==!1?Array.from(new Set(n)):n;return t?.sort===!0?[...o].sort():o}import jt from"node:fs/promises";import He from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="12ee7de1-dff4-53f1-8d0d-d8b1c1ebea42")}catch{}})();function ba(e){return"json_markdown"}function _n(e,t){return He.relative(e,t).replaceAll("\\","/")}function Ea(e){return String(e).replaceAll(/[^a-zA-Z0-9._-]+/g,"_").slice(0,120)}async function wa(e,t,r){e!==t&&ge(await jt.readFile(t,"utf8"),{format:"json_markdown",requireSupportedFormat:!0,schema:r})}async function Sa(e,t,r="item_format:migrate",n=Qe,o){if(t!=="toon")throw new Error("Only toon item-format migration targets are supported. Markdown item files are legacy read-only input.");let i=new Set,s=new Set,a=[],c=0,d=ba(t),u=Object.entries(n);for(let[f,_]of u){let p=He.join(e,_),g=[];try{g=await jt.readdir(p)}catch{continue}let h=new Map;for(let w of g){let D=He.join(p,w),O=rr(D);if(!O)continue;let B=He.extname(w),te=w.slice(0,w.length-B.length).trim();if(te.length===0)continue;let G=h.get(te)??{};G[O]=D,h.set(te,G)}let y=[...h.keys()].sort((w,D)=>w.localeCompare(D));for(let w of y){let D=h.get(w);c+=1;let O=D[d];if(!O)continue;let B=D[t]??O,te=B===D[t]?t:d;try{let G=await jt.readFile(B,"utf8"),Qn=ge(G,{format:te,requireSupportedFormat:!0,schema:o,onWarning:Zn=>a.push(`item_format_migration_parse_warning:${w}:${Zn}`)});await wa(B,O,o);let Je=et(e,f,w,t,n),er=it(Qn,{format:t,schema:o});await T(Je)!==er&&(await v(Je,er),a.push(...await Q({path:Je,scope:"project",op:r})),i.add(w)),await pe(O),s.add(_n(e,O)),a.push(...await Q({path:O,scope:"project",op:`${r}:remove`})),i.add(w)}catch(G){a.push(`item_format_migration_skipped:${_n(e,B)}:${Ea(G)}`)}}}return{target_format:t,scanned:c,migrated:[...i].sort((f,_)=>f.localeCompare(_)),removed:[...s].sort((f,_)=>f.localeCompare(_)),warnings:a}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="12c59406-7e00-5fe1-bd93-c1f9d8537f01")}catch{}})();var Ta=new Set(["completed","superseded"]);function va(e){return e!==void 0&&Ta.has(e)}function Ia(e){if(e.type.trim().toLowerCase()!=="plan")return!1;let t=e.plan_steps??[];return t.length>0&&t.every(r=>r.status==="completed")}import{createHash as Aa}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7cbbb50d-e9bc-5940-9ae6-6270e9c2fcbf")}catch{}})();var Ca=/^[a-z][a-z0-9_-]{0,63}$/u,xa=new Set(["constructor","prototype"]),hn="settings:section:write",ka=240;function Ye(e){return`sha256:${Aa("sha256").update(qt(e)).digest("hex")}`}function qt(e){return Array.isArray(e)?`[${e.map(t=>qt(t)).join(",")}]`:typeof e=="object"&&e!==null?`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${qt(Object.getOwnPropertyDescriptor(e,t)?.value)}`).join(",")}}`:String(JSON.stringify(e))}function yn(e){if(!Ca.test(e)||xa.has(e))throw new m(`Invalid settings section name "${e.slice(0,80)}". Use 1-64 lowercase letters, digits, underscores or hyphens, starting with a letter.`,l.USAGE,{code:"settings_section_name_invalid",field:"section",required:"Name the section after the package, for example lint or jev."});if(lr.includes(e))throw new m(`Settings section "${e}" is owned by core settings; extension sections must use another name.`,l.USAGE,{code:"settings_section_reserved",field:"section",value:e,required:"Read core settings with readSettings and change them with writeSettings or pm config."})}function bn(e){let t;try{t=JSON.parse(e)}catch{t=void 0}if(typeof t!="object"||t===null||Array.isArray(t))throw new m("settings.json is not a JSON object, so no settings section can be read or written.",l.USAGE,{code:"settings_section_document_malformed",reason:t===void 0?"settings_json_malformed":"settings_json_not_object",nextSteps:["Repair .agents/pm/settings.json so it is a JSON object, then retry.","Run pm health to confirm the settings warning has cleared."]});return t}function Ht(e,t,r){let n;try{n=r===void 0?t:r(t)}catch(o){throw new m(`Settings section "${e}" is invalid: ${E(o).slice(0,ka)}`,l.USAGE,{code:"settings_section_invalid",field:e,required:`Fix the "${e}" section of .agents/pm/settings.json so the owning package accepts it, then retry.`})}return n}function En(e){return typeof Reflect.get(e,"toJSON")=="function"}function Yt(e){return e.length===0?"the value":e.join(".")}function wn(e,t){return Object.values(Object.getOwnPropertyDescriptors(e)).every(r=>"value"in r&&(!t||r.enumerable===!0))}function Ra(e){if(Object.getPrototypeOf(e)!==Array.prototype||!wn(e,!1))return!1;let t=Object.keys(e);return t.length===e.length&&t.every((r,n)=>r===String(n))&&Object.getOwnPropertyNames(e).length===e.length+1&&Object.getOwnPropertySymbols(e).length===0&&!En(e)}function Oa(e){let t=Object.getPrototypeOf(e);return(t===Object.prototype||t===null)&&wn(e,!0)&&Object.getOwnPropertySymbols(e).length===0&&!En(e)}function La(e,t){if(e===null||typeof e=="string"||typeof e=="boolean")return null;let r=Yt(t);return typeof e=="number"?Number.isFinite(e)?null:{detail:`${r} is a non-finite number`,representable:!0}:{detail:`${r} is ${typeof e}`,representable:typeof e!="bigint"&&t.length>0}}function Sn(e,t=[],r=new Set){if(typeof e!="object"||e===null)return La(e,t);let n=Yt(t);if(r.has(e))return{detail:`${n} is a circular reference`,representable:!1};if(!(Array.isArray(e)?Ra(e):Oa(e)))return{detail:`${n} is not a plain JSON ${Array.isArray(e)?"array":"object"}`,representable:!0};r.add(e);for(let[o,i]of Object.entries(e)){let s=Sn(i,[...t,o],r);if(s!==null)return s}return r.delete(e),null}function Tn(e,t=[]){if(typeof e!="object"||e===null)return null;for(let[r,n]of Object.entries(e)){let o=[...t,r];if(r==="__proto__"||r==="prototype"&&t.at(-1)==="constructor")return Yt(o);let i=Tn(n,o);if(i!==null)return i}return null}function gn(e,t,r){return Ht(e,t,()=>{throw new Error(r)})}function Da(e,t){let r=Sn(t);if(r!==null){let o=r.representable?`the value would change when stored as JSON: ${r.detail}`:`the value is not representable as JSON: ${r.detail}`;return gn(e,t,o)}let n=Tn(t);return n!==null?gn(e,t,`${n} is a reserved key that settings history cannot record`):JSON.parse(JSON.stringify(t))}function vn(e,t){return Object.hasOwn(e,t)?e[t]:void 0}async function Ma(e,t,r={}){yn(t);let n=X(e);await rt({path:n,scope:"project"});let o=await T(n),i=o===null?void 0:vn(bn(o),t);if(i===void 0)return{section:t,source:"default",value:r.defaultValue,revision:null};let s=Ye(i);return{section:t,source:"stored",value:Ht(t,structuredClone(i),r.validate),revision:s}}async function Na(e,t,r,n={}){yn(t);let o=r===void 0?void 0:Da(t,Ht(t,r,n.validate)),i=X(e),s=await P(e);try{let a=await at({pmRoot:e,filePath:i,op:hn,author:ye(n.author,s.author_default),lockTtlSeconds:s.locks.ttl_seconds,lockWaitMs:s.locks.wait_ms,recordCreation:!1,mutate:c=>{if(c===null)throw new m("settings.json does not exist, so no settings section can be written.",l.NOT_FOUND,{code:"settings_section_document_missing",required:"Initialize the tracker with pm init, then retry."});let d=bn(c),u=vn(d,t),f=u===void 0?null:Ye(u);if(n.expectedRevision!==void 0&&n.expectedRevision!==f)throw new m(`Settings section "${t}" changed since it was read; read it again and reapply the change.`,l.CONFLICT,{code:"settings_section_revision_conflict",field:t,expected_revision:n.expectedRevision,current_revision:f,required:"Read the section again with readSettingsSection, then retry with its current revision."});let _={section:t,changed:!1,previous_revision:f,revision:o===void 0?null:Ye(o)};return oe(u,o)?{raw:c,result:_}:(o===void 0?delete d[t]:d[t]=o,{raw:`${JSON.stringify(d,null,2)}
15
+ `,result:{..._,changed:!0}})}});return a.changed&&await Q({path:i,scope:"project",op:hn}),a.result}finally{Ee(e)}}import Sm from"node:readline/promises";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="88db9929-8e1d-56ad-9a5f-6cc0febadfb3")}catch{}})();import Kt from"node:crypto";import{mkdirSync as Fm,rmSync as za,statSync as Um}from"node:fs";import{mkdir as Bt,readdir as Fa,rm as Jt,stat as On}from"node:fs/promises";import{request as Ua}from"node:http";import{request as Va}from"node:https";import A from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4f455b67-536a-59be-8f25-1dc9c9c0b917")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cbcb519e-1348-5974-bd16-ea5905c468a4")}catch{}})();var ja=A.join("runtime","telemetry","events.jsonl"),qa=A.join("runtime","telemetry","state.json"),Ha=A.join("runtime","telemetry","otel-spans.jsonl"),Ya=8,In=500,Ba=1;var Ga=100,Wa=36e5,Ka=3e4,An=2e4,Ja=1e3,Xa=25e3;var Qa=864e5,Ln=65536;var Dn=15;var Mn=[25,50,100,200],Za=3600*1e3,ec=6e4;var H="PM_TELEMETRY_FLUSH_CHILD",tc="PM_TELEMETRY_HTTP_TIMEOUT_MS",rc=globalThis.fetch;var sf=Promise.resolve(),Cn=Promise.resolve();var nc=new Set(["1","true","yes","on"]);var af=Kt.randomUUID();var Nn="(?:token|secret|password|passwd|api[_-]?key|apikey|authorization|cookie|session|credentials|bearer|literals?|regex(?:es)?|replacements?)",oc=new RegExp(`\\b(${Nn})\\s*([:=])\\s*([^\\s,;]+)`,"giu"),ic=new RegExp(`(--${Nn})(=|\\s+)([^\\s,;]+)`,"giu"),sc=/(^|[\s"'`(=])\/(?:[^\s"'`),;]+)/g,ac=/bearer\s+[a-z0-9._=-]+/giu,cc=/\b(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g;function Be(e){return A.join(e,ja)}function Ge(e){return A.join(e,Ha)}function dc(e){return A.dirname(Be(e))}function Pn(e){return A.join(e,qa)}function $n(e){return A.join(e,"runtime","telemetry","flush.lock")}function lc(e){return A.join(e,"runtime","telemetry","flush.spawn.lock")}async function uc(e){let t=await T(Pn(e));if(!t||t.trim().length===0)return{};try{let r=JSON.parse(t);return typeof r!="object"||r===null||Array.isArray(r)?{}:r}catch{return{}}}async function R(e,t){try{await fe(async()=>{let r={...await uc(e),...t},n=Object.fromEntries(Object.entries(r).filter(([,o])=>o!==void 0).sort((o,i)=>o[0].localeCompare(i[0])));await v(Pn(e),`${JSON.stringify(n,null,2)}
16
+ `,{createParentDirectories:!Y(process.env[H])})},e)}catch{}}function zn(e){return e.replaceAll(oc,(t,r,n)=>`${r}${n}[redacted]`).replaceAll(ic,(t,r,n)=>`${r}${n}[redacted]`)}function Fn(e){return e.replaceAll(sc,(t,r)=>`${r}[redacted_path]`)}function Un(e){let t=e>=65&&e<=90,r=e>=97&&e<=122,n=e>=48&&e<=57;return t||r||n}function Vn(e){if(!e)return!1;let t=e.charCodeAt(0);return Un(t)?!0:e==="."||e==="_"||e==="%"||e==="+"||e==="-"}function jn(e){if(!e)return!1;let t=e.charCodeAt(0);return Un(t)?!0:e==="."||e==="-"}function mc(e){let t=e.indexOf("@");if(t<=0||t!==e.lastIndexOf("@")||t===e.length-1)return!1;let r=e.slice(0,t),n=e.slice(t+1),o=n.lastIndexOf(".");if(o<=0||o===n.length-1||n.length-(o+1)<2)return!1;for(let i of r)if(!Vn(i))return!1;for(let i of n)if(!jn(i))return!1;return!0}function fc(e){let t="",r=0;for(;r<e.length;){let n=e.indexOf("@",r);if(n<0){t+=e.slice(r);break}let o=n-1;for(;o>=r&&Vn(e[o]);)o-=1;o+=1;let i=n+1;for(;i<e.length&&jn(e[i]);)i+=1;let s=e.slice(o,i);if(mc(s)){t+=e.slice(r,o),t+="[redacted_email]",r=i;continue}t+=e.slice(r,n+1),r=n+1}return t}function qn(e){return fc(e).replaceAll(ac,"bearer [redacted_token]").replaceAll(cc,"[redacted_ip]")}function pc(e){let t=qn(e),r=zn(t),n=Fn(r),o=n.trim();return o.startsWith("/")&&o.length>1?"[redacted_path]":n.length>512?`${n.slice(0,509)}...`:n}function _c(e){let t=qn(e),r=zn(t),n=Fn(r),o=n.trim();return o.startsWith("/")&&o.length>1?"[redacted_path]":n.length>2048?`${n.slice(0,2045)}...`:n}function Wt(e,t="redacted"){return t==="max"?_c(e):pc(e)}function hc(e){let t=e?.trim().toLowerCase();return t==="minimal"||t==="redacted"||t==="max"?t:"redacted"}function Y(e){return nc.has((e??"").trim().toLowerCase())}function xn(){let e=process.env[tc]?.trim();if(!e)return An;let t=Number(e);return Number.isFinite(t)?Math.min(Xa,Math.max(Ja,Math.trunc(t))):An}async function Hn(e,t,r){let n=new URL(e);if(globalThis.fetch!==rc){let i=new AbortController,s,a=new Promise((c,d)=>{s=setTimeout(()=>{i.abort(),d(new Error("telemetry_http_timeout"))},xn())});try{return(await Promise.race([globalThis.fetch(e,{method:"POST",headers:t,body:r,signal:i.signal}),a])).status}finally{clearTimeout(s)}}let o=n.protocol==="https:"?Va:n.protocol==="http:"?Ua:void 0;if(!o)throw new Error(`telemetry_http_protocol_unsupported_${n.protocol}`);return new Promise((i,s)=>{let a=xn(),c={method:"POST",headers:{...t,"content-length":Buffer.byteLength(r)},signal:AbortSignal.timeout(a),autoSelectFamilyAttemptTimeout:Math.min(5e3,a)},d=o(n,c,u=>{u.once("error",s),u.once("end",()=>i(u.statusCode)),u.resume()});d.once("error",s),d.end(r)})}async function gc(e){let t=await P(e);if(!t.telemetry.enabled||me().telemetry_disabled)return null;if(t.telemetry.installation_id.trim().length===0){if(ur(e)||we(t))return null;t.telemetry.installation_id=Kt.randomUUID(),await Te(e,t,"telemetry:install_id")}return{installationId:t.telemetry.installation_id,endpoint:t.telemetry.endpoint,retentionDays:Math.max(1,Math.trunc(t.telemetry.retention_days)),captureLevel:hc(t.telemetry.capture_level)}}function Yn(e){let t=[];for(let r of e.split(`
17
+ `)){let n=r.trim();if(n.length!==0)try{let o=JSON.parse(n);o&&typeof o=="object"&&o.event&&typeof o.event=="object"&&typeof o.attempts=="number"&&(o.client_schema_version===void 0||typeof o.client_schema_version=="number"&&Number.isFinite(o.client_schema_version))&&t.push(o)}catch{}}return t}function Bn(e){let t=Math.min(Ka*2**Math.max(e-1,0),Wa);return new Date(Date.now()+t).toISOString()}function Xt(e){if(typeof e!="string"||e.trim().length===0)return!0;let t=Date.parse(e);return Number.isNaN(t)?!0:t<=Date.now()}function Gn(e){return Xt(e.next_attempt_after)}function Wn(e){let t=Number.isFinite(e)?Math.max(1,Math.trunc(e)):1;return Date.now()-t*Qa}function yc(e,t){let r=e.event?.occurred_at;if(typeof r!="string"||r.trim().length===0)return!1;let n=Date.parse(r);return Number.isNaN(n)?!1:n<t}function We(e,t){let r=Wn(t),n=[],o=0;for(let i of e){if(JSON.stringify(i).length>Ln||yc(i,r)||i.attempts>=Dn){o+=1;continue}n.push(i)}return{entries:n,prunedCount:o}}async function Kn(e,t){let r=t.map(o=>JSON.stringify(o)).join(`
18
+ `),n=r.length>0?`${r}
19
+ `:"";for(let o=0;;o+=1)try{await v(Be(e),n,{createParentDirectories:!Y(process.env[H])});return}catch(i){let s=Mn[o];if(s===void 0||!Jn(i))throw i;await Xn(s)}}function Jn(e){if(typeof e!="object"||e===null||!("code"in e))return!1;let t=e.code;return t==="EACCES"||t==="EBUSY"||t==="EPERM"}function Xn(e){return new Promise(t=>{setTimeout(t,e)})}function bc(e){let t=JSON.stringify([e.endpoint,e.enqueued_at,e.payload]);return Kt.createHash("sha256").update(t).digest("hex").slice(0,32)}function Qt(e){let t=[];for(let r of e.split(`
20
+ `)){let n=r.trim();if(n.length!==0)try{let o=JSON.parse(n);o&&typeof o=="object"&&typeof o.endpoint=="string"&&o.endpoint.trim().length>0&&"payload"in o&&typeof o.attempts=="number"&&Number.isFinite(o.attempts)&&((typeof o.id!="string"||o.id.length===0)&&(o.id=bc(o)),t.push(o))}catch{}}return t}function Ec(e,t){if(typeof e.enqueued_at!="string"||e.enqueued_at.trim().length===0)return!1;let r=Date.parse(e.enqueued_at);return Number.isNaN(r)?!1:r<t}function Zt(e,t){let r=Wn(t),n=[],o=0;for(let i of e){if(JSON.stringify(i).length>Ln||Ec(i,r)||i.attempts>=Dn){o+=1;continue}n.push(i)}if(n.length>In){let i=n.length-In;return o+=i,{entries:n.slice(i),prunedCount:o}}return{entries:n,prunedCount:o}}async function wc(e,t){let r=t.map(o=>JSON.stringify(o)).join(`
21
+ `),n=r.length>0?`${r}
22
+ `:"";for(let o=0;;o+=1)try{await v(Ge(e),n,{createParentDirectories:!Y(process.env[H])});return}catch(i){let s=Mn[o];if(s===void 0||!Jn(i))throw i;await Xn(s)}}async function kn(e,t,r,n){return fe(async()=>{let o=await T(Ge(e)),i=o===null?[]:Qt(o),s=[];for(let c of i){if(r.has(c.id))continue;let d=n.get(c.id);s.push(d?{...c,attempts:d.attempts,next_attempt_after:d.next_attempt_after}:c)}let{entries:a}=Zt(s,t);return await wc(e,a),a.length},e)}async function Sc(e,t){let r=await T(Ge(e));if(r===null||r.trim().length===0){await R(e,{pending_otel_spans:0});return}let n=Qt(r),{entries:o,prunedCount:i}=Zt(n,t),s=o.filter(g=>Xt(g.next_attempt_after)).slice(0,Ya);if(s.length===0){let g=i>0?await kn(e,t,new Set,new Map):o.length;await R(e,{pending_otel_spans:g});return}let a=M(),c=new Set,d=new Map,u=0,f;await Promise.all(s.map(async g=>{try{let h=await Hn(g.endpoint,{"content-type":"application/json"},JSON.stringify(g.payload));if(h<200||h>=300)throw new Error(`local_otel_export_http_${h}`);c.add(g.id),u+=1}catch(h){f=h instanceof Error?Wt(h.message,"redacted"):"local_otel_export_failed";let y=g.attempts+1;d.set(g.id,{attempts:y,next_attempt_after:Bn(y)})}}));let _=await kn(e,t,c,d),p={pending_otel_spans:_,last_otel_attempt_at:a};u>0&&(p.last_otel_success_at=a),f!==void 0?(p.last_otel_failure_at=a,p.last_otel_failure_error=f):_===0&&(p.last_otel_failure_at=void 0,p.last_otel_failure_error=void 0),await R(e,p)}async function Tc(e,t,r){try{await Ac(e,t,r)}catch{}try{await Sc(e,r)}catch{}}async function vc(e,t=Za){try{let r=dc(e),n=await Fa(r,{withFileTypes:!0}),o=Date.now()-Math.max(0,t);await Promise.all(n.filter(i=>i.isFile()&&/^\.events\.jsonl\.\d+\.\d+\.[a-f0-9]+\.tmp$/.test(i.name)).map(async i=>{let s=A.join(r,i.name);(await On(s)).mtimeMs<o&&await Jt(s,{force:!0})}))}catch{}}async function fe(e,t=ne(process.cwd()),r=5e3){let n=Cn.catch(()=>{}).then(()=>ir(async()=>{let o=await he(t,"telemetry-queue",60,"telemetry",!1,!1,r,{createParentDirectories:!Y(process.env[H])});try{return Ee(t),await e()}finally{await o()}}));return Cn=n.catch(()=>{}),n}async function Ke(e){let t=await T(Be(e));return t===null||t.trim().length===0?[]:Yn(t)}async function Gt(e,t,r){return fe(async()=>{let n=await Ke(e),{entries:o}=We(n,r),i=o.filter(s=>!t.has(s.event.event_id));return await Kn(e,i),i},e)}async function Ic(e,t,r,n){return fe(async()=>{let o=await Ke(e),{entries:i}=We(o,n),s=i.map(a=>{if(!t.has(a.event.event_id))return a;let c=a.attempts+1;return{...a,attempts:c,last_attempt_at:r,next_attempt_after:Bn(c)}});return await Kn(e,s),s},e)}async function Ac(e,t,r){await vc(e);let n=t.trim();if(n.length===0)return;let o=await T(Be(e));if(o===null||o.trim().length===0){await R(e,{endpoint:n,queue_entries:0});return}let i=Yn(o);if(i.length===0){await R(e,{endpoint:n,queue_entries:0});return}let{entries:s,prunedCount:a}=We(i,r);if(s.length===0){let p=await Gt(e,new Set,r);await R(e,{endpoint:n,queue_entries:p.length});return}let c=s.filter(p=>Gn(p)).slice(0,Ga);if(c.length===0){let p=a>0?await Gt(e,new Set,r):s;await R(e,{endpoint:n,queue_entries:p.length});return}let d=new Set(c.map(p=>p.event.event_id)),u=M(),f={"content-type":"application/json"},_=process.env.PM_TELEMETRY_INGEST_KEY?.trim();_&&(f["x-pm-telemetry-key"]=_);try{let p=await Hn(n,f,JSON.stringify({schema_version:Ba,events:c.map(g=>g.event)}));if(p<200||p>=300)throw new Error(`telemetry_flush_http_${p}`)}catch(p){let g=await Ic(e,d,u,r),h=p instanceof Error?Wt(p.message,"redacted"):"telemetry_flush_failed";await R(e,{endpoint:n,queue_entries:g.length,last_attempted_flush_at:u,last_failed_flush_at:u,last_failed_flush_error:h});return}try{let p=await Gt(e,d,r);await R(e,{endpoint:n,queue_entries:p.length,last_attempted_flush_at:u,last_successful_flush_at:u,last_failed_flush_at:void 0,last_failed_flush_error:void 0})}catch(p){let g=p instanceof Error?Wt(p.message,"redacted"):"telemetry_flush_failed",h=await Ke(e).catch(()=>s);await R(e,{endpoint:n,queue_entries:h.length,last_attempted_flush_at:u,last_failed_flush_at:u,last_failed_flush_error:g})}}async function Cc(e){let t=$n(e);Y(process.env[H])||await Bt(A.dirname(t),{recursive:!0});try{return await Bt(t),!0}catch(r){if(typeof r!="object"||r===null||!("code"in r)||r.code!=="EEXIST")throw r}try{let r=await On(t);return Date.now()-r.mtimeMs<ec?!1:(await Jt(t,{recursive:!0,force:!0}),await Bt(t),!0)}catch{return!1}}function xc(e){try{za(e,{recursive:!0,force:!0})}catch{}}function kc(e){xc(lc(e))}async function Rc(e,t,r){let n=await Cc(e);if(kc(e),!n)return!1;try{await Tc(e,t,r)}finally{try{await Jt($n(e),{recursive:!0,force:!0})}catch{}}return!0}async function Rn(e,t){let r=new Set;try{let{entries:n}=We(await Ke(e),t);for(let o of n.filter(Gn))r.add(`event:${o.event.event_id}`)}catch{}try{let n=await T(Ge(e));if(n!==null)for(let o of Zt(Qt(n),t).entries)Xt(o.next_attempt_after)&&r.add(`span:${o.id}`)}catch{}return r}async function cf(e=ne(process.cwd())){if(!me().telemetry_disabled)try{await ct(e,async()=>{let t=Y(process.env[H]),r=!0;for(;r;){if(!(await P(e)).telemetry.enabled)return;let n=await fe(()=>gc(e),e);if(!n)return;let o=t?await Rn(e,n.retentionDays):new Set;if(!await Rc(e,n.endpoint,n.retentionDays)||!t)return;let i=await Rn(e,n.retentionDays);r=i.size>0&&(i.size!==o.size||[...i].some(s=>!o.has(s)))}},()=>Y(process.env[H]))}catch{}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1e571c5b-0ebf-578a-8a53-398eab70d71e")}catch{}})();export{Lu as a,Du as b,Yd as c,Di as d,Ni as e,$i as f,zi as g,mt as h,eo as i,hr as j,gr as k,no as l,oo as m,io as n,so as o,Sr as p,_o as q,Nc as r,ho as s,Pc as t,se as u,yo as v,Ae as w,$c as x,bo as y,Ie as z,zc as A,Ce as B,wo as C,So as D,Ji as E,Ii as F,Td as G,$r as H,vd as I,Id as J,Le as K,Ad as L,Oi as M,Gd as N,Fi as O,Ui as P,It as Q,ji as R,At as S,qi as T,cl as U,Yi as V,jr as W,Bi as X,Gi as Y,Ki as Z,yl as _,Zi as $,vl as aa,ns as ba,is as ca,To as da,ss as ea,as as fa,Ne as ga,ks as ha,Gc as ia,_t as ja,Ar as ka,ht as la,Po as ma,$o as na,Jc as oa,Cr as pa,Z as qa,gt as ra,bt as sa,Nt as ta,Gl as ua,Pt as va,Ue as wa,tn as xa,Ve as ya,$t as za,zt as Aa,Ft as Ba,Ut as Ca,cn as Da,dn as Ea,pu as Fa,Vt as Ga,me as Ha,mi as Ia,Dr as Ja,pi as Ka,_i as La,hi as Ma,ad as Na,Tt as Oa,Nr as Pa,Mr as Qa,bi as Ra,Ei as Sa,Pr as Ta,Ti as Ua,ya as Va,Sa as Wa,va as Xa,Ia as Ya,Ma as Za,Na as _a,Ba as $a,Dn as ab,fe as bb,cf as cb};
23
+ //# sourceMappingURL=chunk-YVLAP3BL.js.map