@unbrained/pm-cli 2026.11.19 → 2026.11.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/pm-sdk/SKILL.md +1 -1
- package/.agents/skills/pm-test-audit/SKILL.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +1 -1
- package/CONTRIBUTING.md +2 -1
- package/dist/cli/error-guidance.js +2 -2
- package/dist/cli/register-list-query.js +2 -2
- package/dist/cli/runtime/refusal-credential-redaction.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-2DXRTIC6.js +21 -0
- package/dist/cli-bundle/chunks/{chunk-AGPFANRX.js → chunk-5647LU3A.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CR5GC3VO.js → chunk-6QLEXRUG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XPBPGDFW.js → chunk-AHQB7W2H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4FNMPZ7Y.js → chunk-BKSVHOWI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GQCMICAL.js → chunk-CASX6SFI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NMVPQTZI.js → chunk-CIKGG34F.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IQKCRLQP.js → chunk-D6ILFXZY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AOV5HG3Y.js → chunk-IUIOTAF6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-PRVT7ITI.js → chunk-JVGRFU5H.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-KQIZ34SF.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-IUTN67EB.js → chunk-KVBIMFUG.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LQBWLNZJ.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-AMHD7WIV.js → chunk-NCFCBKIP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-M76BEWTT.js → chunk-NT5AKFE5.js} +30 -30
- package/dist/cli-bundle/chunks/chunk-PJXKA4QU.js +125 -0
- package/dist/cli-bundle/chunks/{chunk-2UTJ5QIE.js → chunk-RMIRNYRG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CNMGGAZO.js → chunk-RULHZRFN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O7IFAJ76.js → chunk-S6HB3WL2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CTOE26W4.js → chunk-SA4BNP3Q.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Z5LHCEXG.js → chunk-SRVTCYAU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N2CPCFSN.js → chunk-WELSVDPU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P4A5RFLX.js → chunk-XHJ3H5PL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q32Q3LRH.js → chunk-XWHJIRNV.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YJEBK7HU.js +8 -0
- package/dist/cli-bundle/chunks/chunk-YKJKQ7DM.js +115 -0
- package/dist/cli-bundle/chunks/{chunk-Y4LXVPA5.js → chunk-YMUSRWV4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HQYIKAC6.js → chunk-YR2KEBHP.js} +2 -2
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-ELEMA7IW.js → indexed-receipt-blobs-ITTXIN4K.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-YJKGOYBR.js → item-revision-R5SZPJZ5.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-7DFCG73I.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-actor-DDYJW5B4.js → mutation-actor-3TG636XG.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-admission-JLMQJ2M5.js → mutation-admission-LICSDNNO.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-4AXLLXK7.js → register-list-query-SPGPS3OS.js} +10 -10
- package/dist/cli-bundle/chunks/{register-mutation-FJIXGGF4.js → register-mutation-WWVECKFQ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-W4E2KEMA.js → register-operations-L6HFJNWD.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-RYRIBNSN.js → register-setup-K7UFG5TD.js} +2 -2
- package/dist/cli-bundle/chunks/{settlement-hook-E5LHZ4RD.js → settlement-hook-BXN5LEQD.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-XGWW3T64.js → stage-57KH3KAC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IXYBN6D2.js → chunk-3IRCYJI5.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-DH4DHL6V.js → chunk-3V53UBHN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2XULTI5B.js → chunk-532WZV65.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZFUZ4YYN.js → chunk-7A4QWNZX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-CR7CGEB2.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-CU2BRAOX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7RF2YPZ5.js → chunk-CWWKRI5P.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ICEHI4SN.js → chunk-HGFNL5XI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-IQK5NPMG.js +13 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OF4UM5B6.js → chunk-J63D6QST.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OAIAZHRG.js → chunk-JMQJBZQ5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4S7I342K.js → chunk-LNHUE4VV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MTBC32ZR.js → chunk-MKM5NKD7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EZXLY6S4.js → chunk-NP72ZDXE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-OSLQD5VH.js +102 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OPY43DNJ.js → chunk-QGKLRXP7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-77CDWGBW.js → chunk-QSJW6NSQ.js} +53 -53
- package/dist/cli-bundle/focused-chunks/{chunk-7Z2NYAK4.js → chunk-RPE6IX26.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-SRDQSA6M.js +91 -0
- package/dist/cli-bundle/focused-chunks/{chunk-D72EQN7Z.js → chunk-UOC6257J.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FPPYE6CY.js → chunk-URJ2E6AS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-WXMI4AV5.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-N64BUB63.js → chunk-XCJSHNXK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GAOWBALE.js → chunk-XQQSSKJI.js} +5 -5
- package/dist/cli-bundle/focused-chunks/{chunk-XS2YZCT5.js → chunk-YOAYY3HE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-ZTRFCPH7.js → indexed-receipt-blobs-AF4U3F3D.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-revision-32HFGFYG.js → item-revision-3V3UIP5X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-C4VW3SHX.js → item-transaction-HLBW7B3J.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-actor-2SVBO324.js → mutation-actor-62HKR5IO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-PNK6ORZR.js → mutation-admission-X4PF2SG3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{settlement-hook-OUBUN45C.js → settlement-hook-ARYCZQY4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-LVAGKCEE.js → stage-O7T7CXBB.js} +2 -2
- package/dist/cli-bundle/main.js +25 -25
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +58 -57
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +11 -11
- package/dist/core/extensions/index.d.ts +2 -0
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/fs/file-glob.js +1 -1
- package/dist/core/fs/fs-utils.d.ts +3 -1
- package/dist/core/fs/fs-utils.js +1 -1
- package/dist/core/history/history-stream-policy.js +1 -1
- package/dist/core/history/read.d.ts +11 -1
- package/dist/core/history/read.js +1 -1
- package/dist/core/history/stream-summary.d.ts +129 -0
- package/dist/core/history/stream-summary.js +3 -0
- package/dist/core/shared/errors.d.ts +8 -0
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/shared/text-normalization.d.ts +9 -0
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.js +2 -2
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/governance/gc.js +1 -1
- package/dist/sdk/governance/health-merge-evidence.js +1 -1
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/governance/workspace-position.js +1 -1
- package/dist/sdk/history-provenance.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/merge/index.d.ts +1 -1
- package/dist/sdk/merge/index.js +1 -1
- package/dist/sdk/merge/install.d.ts +20 -6
- package/dist/sdk/merge/install.js +3 -3
- package/dist/sdk/merge/worktree-config.js +2 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/activity.d.ts +67 -5
- package/dist/sdk/query/activity.js +1 -1
- package/dist/sdk/query/context.d.ts +13 -3
- package/dist/sdk/query/context.js +2 -2
- package/dist/sdk/query.d.ts +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/read-output/continuation.d.ts +9 -3
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output-budget.d.ts +44 -3
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/docs/COMMANDS.md +56 -2
- package/docs/MERGE_SAFETY.md +8 -0
- package/docs/MUTATION_INTEGRITY.md +3 -1
- package/docs/PERFORMANCE.md +17 -2
- package/docs/README.md +6 -4
- package/docs/READ_OUTPUT_CONTRACTS.md +16 -1
- package/docs/SDK.md +25 -1
- package/docs/TESTING.md +8 -697
- package/docs/WORKSPACE_POSITION_AND_LIFECYCLE.md +1 -1
- package/marketplace.json +1 -1
- package/package.json +6 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-5OFMWP3Q.js +0 -3
- package/dist/cli-bundle/chunks/chunk-723PMYNX.js +0 -125
- package/dist/cli-bundle/chunks/chunk-7UUPLMCU.js +0 -115
- package/dist/cli-bundle/chunks/chunk-H64BNM4A.js +0 -8
- package/dist/cli-bundle/chunks/chunk-OESI2ETD.js +0 -20
- package/dist/cli-bundle/chunks/chunk-VS565KBX.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-K4YZ7GWR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5JVB42Z7.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-7A4VIRIU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-A2CLYPDA.js +0 -102
- package/dist/cli-bundle/focused-chunks/chunk-FOA7XKWP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HO2YUD4P.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-P4TG4VMJ.js +0 -12
- package/docs/MCP_2026_07_28_CONFORMANCE.md +0 -41
- package/docs/QUALITY_EVIDENCE.md +0 -130
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +0 -117
- package/docs/performance/cli-transport-overhead.md +0 -51
- package/docs/performance/runner-qualification.md +0 -36
- package/docs/performance/sdk-entrypoint-import-costs.md +0 -32
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as K}from"./chunk-3V53UBHN.js";import{n as H,s as P,u as V,y as q}from"./chunk-MKM5NKD7.js";import{$ as L,Ec as B,Md as $,ne as U,ra as W,xa as E}from"./chunk-OSLQD5VH.js";import{a as X,b as R,c as h,d as z}from"./chunk-CR7CGEB2.js";import{A as _,C as S,E as F,F as G,I as N,z as v}from"./chunk-3IRCYJI5.js";import{access as ue,lstat as ee,readFile as C,realpath as y}from"node:fs/promises";import{constants as me}from"node:fs";import{execFile as de}from"node:child_process";import c from"node:path";import{promisify as pe}from"node:util";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6d1f8e03-97b4-5d83-b85c-e47f39c07d48")}catch{}})();var ce="PM_SOURCE_CONTEXT_ACCESS",le="PM_ALLOW_SOURCE_CONTEXT_WRITES";function J(e){let n=e[ce],r=n===void 0||n.trim().toLowerCase()==="write"?"write":"read_only",t=r==="read_only"&&e[le]?.trim()==="1";return{access:r,write_override_applied:t,source_writes_allowed:r==="write"||t}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b3b43765-c582-516a-bebc-cf08af5efbe5")}catch{}})();var k=pe(de),T="# pm-cli:merge-drivers:start",fe="# pm-cli:merge-drivers:end",x="# pm-cli:merge-drivers:v2:start",te="# pm-cli:merge-drivers:v2:end",ge="merge-fence",he="merge-attributes";function A(e){return`'${e.replaceAll("'",`'"'"'`)}'`}async function ye(e,n){let r=await y(e);if(/(?:^|[\\/])bun-node-[^\\/]+[\\/]bun(?:\.exe)?$/iu.test(r))return;let{stdout:t}=await k(e,["--version"],{encoding:"utf8",windowsHide:!0,timeout:1e4});return t.trim()===n?r:void 0}async function we(){let e=L(import.meta.url,["../../.."]),n=process.execPath,r=!1,t=await y(process.execPath),i=process.versions.bun,o=(process.env.PATH??"").split(c.delimiter).filter(a=>c.isAbsolute(a)).map(a=>c.join(a,i===void 0?c.basename(process.execPath):process.platform==="win32"?"bun.exe":"bun")),s=i===void 0?o:[process.env.npm_execpath??"",...o,t].filter(a=>c.isAbsolute(a)&&/^(?:bun|bun\.exe)$/iu.test(c.basename(a)));for(let a of s)try{if(await ue(a,me.X_OK),i!==void 0){let u=await ye(a,i);if(u!==void 0){n=u,r=!0;break}continue}if(a!==t&&await y(a)===t){n=a;break}}catch{}if(i!==void 0&&!r)throw new _("Cannot install Bun merge drivers without a durable executable matching the current Bun version.",v.DEPENDENCY_FAILED,{code:"merge_bun_launcher_unavailable",why:"The current Bun process may be a temporary bunx launcher that Git cannot reuse after this command exits.",nextSteps:["Run with a durable version-matched Bun executable, expose one on an absolute PATH entry, or invoke pm through a Bun runner that publishes an absolute npm_execpath.","Retry pm merge install, then check pm health --strict-exit before merging branches."]});return`${A(n)} ${A(c.join(e,"dist","cli.js"))}`}var re=[{key:"pm-item-toon",name:"pm field-aware TOON item document merge",artifact:"item",itemPath:"%P"},{key:"pm-item-markdown",name:"pm field-aware JSON-markdown item document merge",artifact:"item",itemPath:"%P"},{key:"pm-history",name:"pm append-only history stream merge",artifact:"history",itemPath:void 0},{key:"pm-relationship",name:"pm append-only relationship event store merge",artifact:"relationship",itemPath:void 0},{key:"pm-json",name:"pm key-level JSON config merge",artifact:"json",itemPath:void 0}];function ve(e){let n=e.explicitPath?.trim(),r=e.environment.PM_SOURCE_WORKSPACE_ROOT?.trim(),t=e.environment.PM_SOURCE_PM_PATH?.trim(),i=J(e.environment),o=!!(r&&t),s=n===void 0&&o&&(e.dryRun||i.source_writes_allowed);if(n!==void 0){let a=E(e.cwd,n);return{pm_root:a,workspace_start:a,source_coordinates_available:o,source_context_selected:!1,source_policy:i}}return s?{pm_root:c.resolve(t),workspace_start:c.resolve(r),source_coordinates_available:!0,source_context_selected:!0,source_policy:i}:{pm_root:o?E(e.cwd,".agents/pm"):E(e.cwd),workspace_start:e.cwd,source_coordinates_available:o,source_context_selected:!1,source_policy:i}}async function I(e){try{let{stdout:n}=await k("git",["rev-parse","--show-toplevel"],{cwd:e,env:h(),encoding:"utf8",windowsHide:!0,timeout:1e4});return await y(R(n))}catch{return null}}async function ne(e){let n=await I(e);if(n===null)throw new _("pm merge install requires a git repository (merge drivers are git configuration).",v.USAGE);return n}function O(e,n){return c.relative(e,n).split(c.sep).join("/")}function Y(e){return e.replace(/[\\*?[\]!]/gu,"\\$&")}function g(e){return`"${e.replaceAll("\\","\\\\").replaceAll('"','\\"')}"`}function Q(e,n){if(e[n]!=="'")return null;let r="";for(let t=n+1;t<e.length;t+=1){if(e.startsWith(`'"'"'`,t)){r+="'",t+=4;continue}if(e[t]==="'")return{value:r,nextOffset:t+1};r+=e[t]}return null}async function _e(e,n,r){if(V(n).filter(i=>i.constraint==="exact").some(i=>i.version!==r))return!1;let t=await I(e);if(t!==null&&t!==await y(n)){let i=await Promise.all([t,n].map(async o=>{let s=await k("git",["rev-parse","--path-format=absolute","--git-common-dir"],{cwd:o,env:h(),timeout:1e4});return y(s.stdout.trim())}));if(i[0]===i[1])return!1}return!0}async function be(e,n,r){let t=Q(e,0);if(t===null||e[t.nextOffset]!==" ")return!1;let i=Q(e,t.nextOffset+1);if(i===null||e.slice(i.nextOffset)!==n||!/^(?:node|bun)(?:\.exe)?$/iu.test(c.basename(t.value))||c.basename(i.value)!=="cli.js"||c.basename(c.dirname(i.value))!=="dist"||!await S(t.value)||!await S(i.value))return!1;try{let o=c.dirname(c.dirname(i.value)),s=JSON.parse(await C(c.join(o,"package.json"),"utf8")),a=typeof s.bin=="string"?s.bin:s.bin?.pm;return await _e(o,r,s.version)?s.name==="@unbrained/pm-cli"&&a==="dist/cli.js":!1}catch{return!1}}function M(e,n){let r=e.length>0?`${Y(e)}/`:"",t=[`${g(`${r}**/*.toon`)} merge=pm-item-toon`,`${g(`${r}**/*.md`)} merge=pm-item-markdown`];for(let i of n){let o=Y(i);t.push(`${g(`${r}${o}/*.toon`)} merge=pm-item-toon`),t.push(`${g(`${r}${o}/*.md`)} merge=pm-item-markdown`)}return t.push(`${g(`${r}**/*.jsonl`)} merge=pm-relationship`),t.push(`${g(`${r}history/*.jsonl`)} merge=pm-history`),t.push(`${g(`${r}settings.json`)} merge=pm-json`),t.push(`${g(`${r}**/*.json`)} merge=pm-json`),t.push(`${g(`${r}extensions/**`)} merge=text`),t.push(`${g(`${r}extensions/.managed-extensions.json`)} merge=pm-json`),t}function ie(e){let n=[],r=0;for(;r<e.length;){let t=e.indexOf(T,r),i=e.indexOf(x,r),o=t===-1?i:i===-1?t:Math.min(t,i);if(o===-1)break;let s=o===i,a=s?x:T,u=s?te:fe,d=e.indexOf(u,o+a.length),m=d===-1?e.length:d+u.length;n.push({start:o,end:m,closed:d!==-1,lines:e.slice(o+a.length,d===-1?m:d).split(`
|
|
2
|
+
`).map(l=>l.trim()).filter(Boolean)}),r=m}return n}function oe(e,n,r){let t=new Set(n),i=g(r.length>0?`${r}/`:"").slice(0,-1);return e.some(o=>t.has(o)||o.startsWith(i)&&/^[^/]+\/\*\.(?:toon|md)" merge=pm-item-(?:toon|markdown)$/u.test(o.slice(i.length)))}async function ae(e,n,r,t){let i=c.join(e,".gitattributes"),o=t?null:R((await k("git",["rev-parse","--absolute-git-dir"],{cwd:e,env:h(),encoding:"utf8",windowsHide:!0,timeout:1e4})).stdout),s=o===null?null:await $(o,he,120,"merge-fence",!1,!0,5e3);try{let a=await G(i)??"",u=[x,...r,te].join(`
|
|
3
|
+
`),d=ie(a),m=d.filter(p=>oe(p.lines,r,n));m.length===0&&n===".agents/pm"&&d.length===1&&d[0].lines.every(p=>!p.includes("/"))&&m.push(d[0]);let l;if(m.length>0){let p=m[0];l=a;for(let b of m.slice(1).reverse())l=`${l.slice(0,b.start)}${l.slice(b.end)}`;l=`${l.slice(0,p.start)}${u}${l.slice(p.end)}`}else{let p=a.trimEnd();l=`${p.length>0?`${p}
|
|
4
|
+
|
|
5
|
+
`:""}${u}
|
|
6
|
+
`}return l===a&&!(await ee(i)).isSymbolicLink()?{path:i,changed:!1}:(t||await N(i,l),{path:i,changed:!0})}finally{await s?.()}}function se(e){let n=W(e,null);return[...new Set(Object.values(n.type_to_folder))].sort((r,t)=>r.localeCompare(t))}async function Z(e){try{return await y(e)}catch{return null}}function ke(e,n){let r=c.relative(e,n);return r===""||!c.isAbsolute(r)&&r.split(c.sep)[0]!==".."}async function xe(e){try{return(await ee(e)).isFile()?await C(e,"utf8"):null}catch{return null}}async function Ee(e){try{return await C(e,"utf8")}catch{return null}}async function $e(e,n){let r=n===void 0?await I(e):n;if(r===null)return{trackerRoot:e,topLevel:null};let[t,i]=await Promise.all([Z(e),Z(r)]);return t===null||i===null||!ke(i,t)?null:{trackerRoot:t,topLevel:i}}async function Pe(e){let n=e.topLevel===null?Ee:xe,r=e.trackerRoot;for(let t=0;e.topLevel!==null||t<8;t+=1){let i=await n(c.join(r,".gitattributes"));if(i!==null&&(i.includes(x)||i.includes(T)))return{directory:r,content:i};let o=c.dirname(r);if(o===r||e.topLevel!==null&&c.relative(e.topLevel,r)==="")return null;r=o}return null}async function et(e,n,r={}){let t=await $e(c.resolve(e),r.gitWorkspaceRoot),i=t===null?null:await Pe(t);if(t===null||i===null)return{status:"not_installed",missing_patterns:[],stale_patterns:[],schema_scope:"project"};let o=i.directory,s=i.content,a=c.join(o,".gitattributes"),u=O(o,t.trackerRoot),d=ie(s),m=M(u,n),l=d.filter(w=>oe(w.lines,m,u)),p=l.flatMap(w=>w.closed?w.lines:[]),b=new Set(p),f=new Set(m),D=m.filter(w=>!b.has(w)),j=p.filter(w=>!f.has(w));return{status:l.length!==1||!l[0].closed||D.length>0||j.length>0?"drift":"ok",path:a,missing_patterns:D,stale_patterns:j,schema_scope:"project"}}async function tt(e){let n=[],r=[];for(let t of re){let i=`merge.${t.key}.driver`,o=` merge driver ${t.artifact} "%O" "%A" "%B"${t.itemPath===void 0?"":` --item-path ${t.itemPath}`}`;try{let{stdout:s}=await k("git",["config","--get",i],{cwd:e,env:h(),encoding:"utf8",windowsHide:!0,timeout:1e4}),a=s.trim();await be(a,o,e)||r.push(i)}catch{n.push(i)}}return{status:n.length>0?"missing":r.length>0?"drift":"ok",missing_keys:n,drifted_keys:r}}async function rt(e){let n;try{n=await ne(c.resolve(e))}catch{return{status:"no_git"}}let r=O(n,c.resolve(e)),t=await P(e),i=U(void 0,t.author_default),o=await $(e,ge,t.locks.ttl_seconds,i,!1,H(t).force_required_for_stale_lock,t.locks.wait_ms);try{let s=c.join(n,".gitattributes"),a;try{a=await C(s,"utf8")}catch(l){if(l instanceof Error&&"code"in l&&F(l))return{status:"not_installed",path:s};throw l}if(!a.includes(x)&&!a.includes(T))return{status:"not_installed",path:s};let u=await P(e),d=se(u),m=await ae(n,r,M(r,d),!1);return{status:m.changed?"refreshed":"unchanged",path:m.path}}finally{await o()}}async function nt(e,n){let r=ve({cwd:process.cwd(),explicitPath:n.path,dryRun:e.dryRun===!0,environment:process.env}),t=r.pm_root;await q(t);let i=await ne(r.workspace_start);return Ce({pmRoot:t,workspaceRoot:i,dryRun:e.dryRun===!0,preCommitHook:e.preCommitHook===!0})}async function Te(e,n){let r=(await k("git",["rev-parse","--path-format=absolute","--git-common-dir"],{cwd:e,env:h(),timeout:1e4})).stdout.trim(),t=await $(r,"merge-driver-config",120,"merge-install",!1,!0,5e3);try{let i=await z(e),o;try{o=(await k("git",["config",i,"--null","--get-regexp","."],{cwd:e,env:h(),timeout:1e4})).stdout}catch(a){if(typeof a!="object"||a===null||!("code"in a)||a.code!==1)throw a;o=""}let s=new Map(o.split("\0").filter(Boolean).map(a=>{let u=a.indexOf(`
|
|
7
|
+
`);return[a.slice(0,u),a.slice(u+1)]}));for(let a of n)s.get(a.key)!==a.value&&await X(e,[i,a.key,a.value])}finally{await t()}}async function Ce(e){let n=c.resolve(e.pmRoot),r=c.resolve(e.workspaceRoot),t=e.dryRun===!0,i,o;try{[i,o]=await Promise.all([y(n),y(r)])}catch(f){throw new _(`Cannot resolve tracker root ${n} or workspace root ${r}: ${String(f)}`,v.NOT_FOUND,{code:"merge_root_not_found",nextSteps:["Initialize the tracker and ensure both paths are accessible.",'Retry "pm merge install" from the repository workspace.']})}let s=O(o,i);if(K(s))throw new _(`Tracker root ${n} is outside the git repository ${r}; there is nothing to configure for this repository.`,v.USAGE);let a=await P(i),u=se(a),d=M(s,u),m=[],l=await we(),p=e.preCommitHook===!0?await import("./settlement-hook-ARYCZQY4.js").then(async f=>({plan:await f.prepareMergeSettlementHook(o,`${l} --pm-path ${A(s||".")}`),write:f.writeMergeSettlementHook})):void 0;for(let f of re)m.push({key:`merge.${f.key}.name`,value:f.name}),m.push({key:`merge.${f.key}.driver`,value:`${l} merge driver ${f.artifact} "%O" "%A" "%B"${f.itemPath===void 0?"":` --item-path ${f.itemPath}`}`});if(!t)try{await Te(o,m)}catch{throw new _(`Cannot install repository-local merge drivers in ${o}. Ensure the repository Git config is writable and no other Git process holds its lock, then retry.`,v.DEPENDENCY_FAILED,{code:"merge_git_config_unwritable",why:"pm merge install must persist clone-local driver commands before publishing their shared .gitattributes mappings.",nextSteps:["Make the repository Git config writable or wait for the process holding its lock to finish.",'Retry "pm merge install"; the operation is idempotent.','Use "pm merge install --dry-run --json" when the workspace is intentionally read-only.']})}let b=await ae(o,s,d,t);return p!==void 0&&!t&&await p.write(p.plan),{ok:!0,dry_run:t,workspace_root:o,pm_root:i,gitattributes:{path:b.path,changed:b.changed,patterns:d,schema_scope:"project"},git_config:m,...p===void 0?{}:{settlement_hook:{path:p.plan.path,changed:p.plan.changed}},guidance:["Commit .gitattributes so every branch and collaborator shares the merge mapping.",'git config is per-clone: each collaborator (and each fresh worktree/clone) runs "pm merge install" once.','After merging branches, run "pm merge reconcile --dry-run" to inspect the complete receipt and history repair, then apply "pm merge reconcile"; use --force only after explicitly accepting any discarded values.',"Custom item types registered later refresh this fence automatically (pm schema add-type/remove-type); rerun pm merge install only after out-of-band type-folder edits."],generated_at:B()}}import{execFile as Se}from"node:child_process";import{promisify as Re}from"node:util";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e57ef62f-fd40-5a33-9816-e24d8dba4d1d")}catch{}})();var Ae=Re(Se);async function ut(e,n){if(n.length===0)return[];let r;try{let o=Ae("git",["check-ignore","--verbose","-z","--stdin"],{cwd:e,env:h(),timeout:1e4}),s=o.child.stdin;s!==null&&(s.on("error",()=>{o.child.kill()}),s.end(`${n.join("\0")}\0`)),{stdout:r}=await o}catch(o){if(typeof o=="object"&&o!==null&&"code"in o&&o.code===1)return[];throw new _("Git could not verify ignore rules for merge artifacts; no automatic settlement is safe until that check succeeds.",v.CONFLICT,{code:"merge_settlement_review_required",reason:"ignore_check_unavailable",nextSteps:["Check Git configuration and ignore-file readability, then retry pm merge reconcile --stage --dry-run."]})}let t=r.split("\0"),i=[];for(let o=0;o+3<t.length;o+=4){let[s,a,u,d]=t.slice(o,o+4);u.startsWith("!")||i.push({path:d,source:s,line:Number(a),pattern:u})}return i}export{ce as a,le as b,I as c,se as d,et as e,tt as f,rt as g,nt as h,Ce as i,ut as j};
|
|
8
|
+
//# sourceMappingURL=chunk-WXMI4AV5.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{H as Ot,I as Lt,j as ke}from"./chunk-
|
|
1
|
+
import{H as Ot,I as Lt,j as ke}from"./chunk-SRDQSA6M.js";import{f as xt,h as Kn,k as Oe,l as kt,m as Zn,o as Le,r as Ne,s as z,t as De}from"./chunk-MKM5NKD7.js";import{$c as St,Aa as ee,Ad as Ce,Ae as Bn,Ba as wt,Bd as vt,Ca as Un,Ec as $,Ge as Wn,Ha as de,Hf as Ct,Ka as Fn,Lf as te,Mc as Vn,Md as Re,Pc as qn,Pf as Rt,Qe as It,Vb as Ae,Vc as bt,a as gt,ad as Hn,ba as w,cc as le,da as ae,dc as jn,ea as Q,fa as b,g as se,ga as Pn,ld as Tt,md as Ie,ne as xe,pa as zn,qa as yt,qe as At,ra as Et,te as Yn,yf as Gn,za as ce}from"./chunk-OSLQD5VH.js";import{A as m,C as J,E as X,F as T,I,K as ve,t as ht,z as u}from"./chunk-3IRCYJI5.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]="8dd367eb-617e-5645-8f8a-57862f8385f7")}catch{}})();var Me=new WeakSet,Nt=new WeakMap,Xn=new WeakSet;function Qn(e){return Xn.add(e),e}function Dt(e){return Xn.has(e)}function ue(e){Me.add(e);for(let[t,n]of Object.entries(e)){if(!Array.isArray(n))continue;let r=[...n];Reflect.set(e,t,r),Me.add(r)}return e}function er(e,t){return Me.has(e)||t!==void 0&&Nt.get(e)?.has(t)===!0}function ns(e,t){let n=new Set(t);Nt.set(e,n);for(let r of n){let o=Reflect.get(e,r);if(!Array.isArray(o))continue;let i=[...o];Reflect.set(e,r,i),Me.add(i)}return e}function tr(e,t){if(Dt(e)&&Qn(t),er(e))return ue(t);let n=Nt.get(e);return n?ns(t,n):t}function jf(e){return er(e)?"sdk":"cli"}function Jn(e,t){return e==="cli"?`--${t}`:t.replace(/-([a-z])/gu,(n,r)=>r.toUpperCase())}function fe(e){return`Pass unset: ["${e}"] to clear it`}function $e(e,t,n=""){return e==="cli"?`--${t} must not be empty${n}`:`${Jn("sdk",t)} must not be empty. ${fe(t)}, or omit ${Jn("sdk",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]="f7bc7fa8-c356-5c92-a03d-82275ba47edd")}catch{}})();var D="-",rr=/^[A-Za-z0-9_.-]+$/u,Mt=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 or(e,t){if(e.startsWith("```")||e.includes(`
|
|
2
2
|
`))return!0;let n=t.map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(`^(?:[-*+]\\s+)?(?:${n})\\s*[:=]`,"i").test(e)}function ir(e){let t=e.trim();if(t==="")return[];let n=(as(t)??t.split(",")).map(r=>r.trim()).filter(Boolean).map(r=>r.toLowerCase());return Array.from(new Set(n)).sort((r,o)=>r.localeCompare(o))}function sr(e){if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n of e)if(typeof n=="string")for(let r of ir(n))t.push(r);return Array.from(new Set(t)).sort((n,r)=>n.localeCompare(r))}function ar(e){return Array.isArray(e)?e.filter(t=>typeof t=="string").map(t=>t.trim().toLowerCase()).filter(Boolean):[]}function rs(e){return typeof e!="string"?[]:e.split(";").map(t=>t.trim()).filter(Boolean)}function os(e,t,n){let r=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',u.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&&!r.includes(a)&&r.push(a)}let o=[],i=r;for(let s of n??[]){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 is(e,t){let n=ar(e);if(!t||t.length===0)return Array.from(new Set(n)).sort((o,i)=>o.localeCompare(i));let r=new Set(n);for(let o of sr(t))r.add(o);return Array.from(r).sort((o,i)=>o.localeCompare(i))}function ss(e,t){let n=Array.from(new Set(ar(e))).sort((o,i)=>o.localeCompare(i));if(!t||t.length===0)return n;let r=new Set(sr(t));return r.size===0?n:n.filter(o=>!r.has(o))}function as(e){if(!e.startsWith("["))return null;let t;try{t=JSON.parse(e)}catch{return null}return t.map(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean"?String(n):"").filter(n=>n.length>0)}function $t(e){return e.replace(/\r\n/g,`
|
|
3
3
|
`)}function cr(e){let t=$t(e).trim();if(!t.startsWith("```"))return e;let n=t.split(`
|
|
4
4
|
`);return n.length<2||n.at(-1)?.trim()!=="```"?e:n.slice(1,-1).join(`
|
|
@@ -24,4 +24,4 @@ ${s}`;continue}return null}return r}function fr(e,t){let n=cr(e).trim();if(!n)th
|
|
|
24
24
|
`)){let r=n.trim();if(r.length!==0)try{let o=JSON.parse(r);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=Rf(o)),t.push(o))}catch{}}return t}function xf(e,t){if(typeof e.enqueued_at!="string"||e.enqueued_at.trim().length===0)return!1;let n=Date.parse(e.enqueued_at);return Number.isNaN(n)?!1:n<t}function Mn(e,t){let n=Zi(t),r=[],o=0;for(let i of e){if(JSON.stringify(i).length>Di||xf(i,n)||i.attempts>=Mi){o+=1;continue}r.push(i)}if(r.length>Ci){let i=r.length-Ci;return o+=i,{entries:r.slice(i),prunedCount:o}}return{entries:r,prunedCount:o}}async function kf(e,t){let n=t.map(o=>JSON.stringify(o)).join(`
|
|
25
25
|
`),r=n.length>0?`${n}
|
|
26
26
|
`:"";for(let o=0;;o+=1)try{await I(ft(e),r,{createParentDirectories:!G(process.env[W])});return}catch(i){let s=$i[o];if(s===void 0||!Xi(i))throw i;await Qi(s)}}async function Oi(e,t,n,r){return Te(async()=>{let o=await T(ft(e)),i=o===null?[]:Dn(o),s=[];for(let c of i){if(n.has(c.id))continue;let d=r.get(c.id);s.push(d?{...c,attempts:d.attempts,next_attempt_after:d.next_attempt_after}:c)}let{entries:a}=Mn(s,t);return await kf(e,a),a.length},e)}async function Of(e,t){let n=await T(ft(e));if(n===null||n.trim().length===0){await lt(e,{pending_otel_spans:0},null);return}let r=Dn(n),{entries:o,prunedCount:i}=Mn(r,t),s=o.filter(y=>Nn(y.next_attempt_after)).slice(0,Xu);if(s.length===0){let y=i>0?await Oi(e,t,new Set,new Map):o.length;await lt(e,{pending_otel_spans:y},null);return}let a=$(),c=new Set,d=new Map,l=0,f;await Promise.all(s.map(async y=>{try{let h=await Bi(y.endpoint,{"content-type":"application/json"},JSON.stringify(y.payload));if(h<200||h>=300)throw new Error(`local_otel_export_http_${h}`);c.add(y.id),l+=1}catch(h){f=h instanceof Error?kn(st(h.message),"redacted"):"local_otel_export_failed";let _=y.attempts+1;d.set(y.id,{attempts:_,next_attempt_after:Gi(_)})}}));let p=await Oi(e,t,c,d),g={pending_otel_spans:p,last_otel_attempt_at:a};l>0&&(g.last_otel_success_at=a),f!==void 0?(g.last_otel_failure_at=a,g.last_otel_failure_error=f):p===0&&(g.last_otel_failure_at=void 0,g.last_otel_failure_error=void 0),await lt(e,g,null)}async function Lf(e,t,n){try{await $f(e,t,n)}catch{}try{await Of(e,n)}catch{}}async function Nf(e,t=af,n=A().endpoint){try{let r=yf(e),o=await Bu(r,{withFileTypes:!0}),i=Date.now(),s=new Set([be("events.jsonl",n),be("state.json",n)]),a=c=>{if(!s.has(c))return/^\.events(?:\.[a-f0-9]{16})?\.jsonl\.\d+\.\d+\.[a-f0-9]+\.tmp$/.test(c)?i-Math.max(0,t):/^(?:events\.[a-f0-9]{16}\.jsonl|state\.[a-f0-9]{16}\.json)$/.test(c)?i-cf:void 0};await Promise.all(o.map(async c=>{let d=c.isFile()?a(c.name):void 0;if(d===void 0)return;let l=v.join(r,c.name);(await Ni(l)).mtimeMs<d&&await Ln(l,{force:!0})}))}catch{}}async function Te(e,t=ce(process.cwd()),n=5e3){let r=xi.catch(()=>{}).then(()=>Gn(async()=>{let o=await Re(t,"telemetry-queue",60,"telemetry",!1,!1,n,{createParentDirectories:!G(process.env[W])});try{return Oe(t),await e()}finally{await o()}}));return xi=r.catch(()=>{}),r}async function pt(e,t=A().endpoint){let n=await T(ut(e,t));return n===null||n.trim().length===0?[]:Wi(n)}async function xn(e,t,n,r=A().endpoint){return Te(async()=>{let o=await pt(e,r),{entries:i}=mt(o,n),s=i.filter(a=>!t.has(a.event.event_id));return await Ji(e,s,r),s},e)}async function Df(e,t,n,r,o=A().endpoint){return Te(async()=>{let i=await pt(e,o),{entries:s}=mt(i,r),a=s.map(c=>{if(!t.has(c.event.event_id))return c;let d=c.attempts+1;return{...c,attempts:d,last_attempt_at:n,next_attempt_after:Gi(d)}});return await Ji(e,a,o),a},e)}function Mf(e,t){return t===null?e:it(e)}async function $f(e,t,n){let r=A().endpoint;await Nf(e,void 0,r);let o=(r??t).trim(),i=Mf(o,r),s=_=>lt(e,_,r);if(o.length===0)return;let a=await T(ut(e,r));if(a===null||a.trim().length===0){await s({endpoint:i,queue_entries:0});return}let c=Wi(a);if(c.length===0){await s({endpoint:i,queue_entries:0});return}let{entries:d,prunedCount:l}=mt(c,n);if(d.length===0){let _=await xn(e,new Set,n,r);await s({endpoint:i,queue_entries:_.length});return}let f=d.filter(_=>Ki(_)).slice(0,ef);if(f.length===0){let _=l>0?await xn(e,new Set,n,r):d;await s({endpoint:i,queue_entries:_.length});return}let p=new Set(f.map(_=>_.event.event_id)),g=$(),y={"content-type":"application/json"},h=process.env.PM_TELEMETRY_INGEST_KEY?.trim();h&&(y["x-pm-telemetry-key"]=h);try{let _=await Bi(o,y,JSON.stringify({schema_version:Qu,events:f.map(E=>E.event)}));if(_<200||_>=300)throw new Error(`telemetry_flush_http_${_}`)}catch(_){let E=await Df(e,p,g,n,r),C=_ instanceof Error?kn(st(_.message),"redacted"):"telemetry_flush_failed";await s({endpoint:i,queue_entries:E.length,last_attempted_flush_at:g,last_failed_flush_at:g,last_failed_flush_error:C});return}try{let _=await xn(e,p,n,r);await s({endpoint:i,queue_entries:_.length,last_attempted_flush_at:g,last_successful_flush_at:g,last_failed_flush_at:void 0,last_failed_flush_error:void 0})}catch(_){let E=_ instanceof Error?kn(st(_.message),"redacted"):"telemetry_flush_failed",C=await pt(e,r).catch(()=>d);await s({endpoint:i,queue_entries:C.length,last_attempted_flush_at:g,last_failed_flush_at:g,last_failed_flush_error:E})}}async function Pf(e){let t=Ui(e);G(process.env[W])||await Rn(v.dirname(t),{recursive:!0});try{return await Rn(t),!0}catch(n){if(typeof n!="object"||n===null||!("code"in n)||n.code!=="EEXIST")throw n}try{let n=await Ni(t);return Date.now()-n.mtimeMs<df?!1:(await Ln(t,{recursive:!0,force:!0}),await Rn(t),!0)}catch{return!1}}function zf(e){try{Yu(e,{recursive:!0,force:!0})}catch{}}function Uf(e){zf(Ef(e))}async function Ff(e,t,n){let r=await Pf(e);if(Uf(e),!r)return!1;try{await Lf(e,t,n)}finally{try{await Ln(Ui(e),{recursive:!0,force:!0})}catch{}}return!0}async function Li(e,t){let n=new Set;try{let{entries:r}=mt(await pt(e),t);for(let o of r.filter(Ki))n.add(`event:${o.event.event_id}`)}catch{}try{let r=await T(ft(e));if(r!==null)for(let o of Mn(Dn(r),t).entries)Nn(o.next_attempt_after)&&n.add(`span:${o.id}`)}catch{}return n}async function ty(e=ce(process.cwd())){if(!Se().telemetry_disabled)try{await kt(e,async()=>{let t=G(process.env[W]),n=!0;for(;n;){if(!(await z(e)).telemetry.enabled)return;let r=await Te(()=>If(e),e);if(!r)return;let o=t?await Li(e,r.retentionDays):new Set;if(!await Ff(e,r.endpoint,r.retentionDays)||!t)return;let i=await Li(e,r.retentionDays);n=i.size>0&&(i.size!==o.size||[...i].some(s=>!o.has(s)))}},()=>G(process.env[W]))}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]="52348de5-f05f-56d0-8e0e-bd7f25b8e6a6")}catch{}})();export{cn as a,rl as b,s_ as c,a_ as d,c_ as e,d_ as f,l_ as g,u_ as h,f_ as i,al as j,ll as k,ul as l,fl as m,pd as n,Dt as o,er as p,jf as q,Jn as r,$e as s,or as t,ir as u,rs as v,os as w,is as x,ss as y,Bf as z,fr as A,ms as B,Wf as C,ps as D,Gf as E,me as F,gs as G,ze as H,Kf as I,hs as J,Pe as K,Zf as L,Ue as M,Es as N,ws as O,Km as P,Oo as Q,Zm as R,Jm as S,Ge as T,Xm as U,wd as V,hp as W,Sd as X,vd as Y,Id as Z,Cd as _,Ep as $,Nd as aa,bp as ba,Dd as ca,Md as da,on as ea,Pd as fa,sn as ga,zd as ha,Pp as ia,Fd as ja,zo as ka,jd as la,Vd as ma,Hd as na,Yd as oa,Gp as pa,Gd as qa,e_ as ra,Xd as sa,el as ta,bs as ua,cl as va,dl as wa,Xe as xa,Dl as ya,im as za,zt as Aa,gr as Ba,Ft as Ca,Ds as Da,Ms as Ea,cm as Fa,hr as Ga,ne as Ha,jt as Ia,qt as Ja,gn as Ka,$_ as La,hn as Ma,rt as Na,ri as Oa,ot as Pa,yn as Qa,En as Ra,wn as Sa,bn as Ta,di as Ua,li as Va,rg as Wa,Tn as Xa,be as Ya,yu as Za,it as _a,sg as $a,Se as ab,vg as bb,Ag as cb,Oc as db,_o as eb,Bc as fb,io as gb,Wc as hb,Em as ib,Zc as jb,Jc as kb,wm as lb,Qt as mb,ho as nb,go as ob,ed as pb,td as qb,yo as rb,Nm as sb,Dm as tb,To as ub,vo as vb,Ao as wb,Mm as xb,Ro as yb,cd as zb,xo as Ab,$m as Bb,Pm as Cb,zm as Db,ko as Eb,Um as Fb,ld as Gb,ud as Hb,fd as Ib,Au as Jb,xu as Kb,Ou as Lb,Lu as Mb,ju as Nb,Vu as Ob,Qu as Pb,Mi as Qb,Te as Rb,ty as Sb};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-XCJSHNXK.js.map
|