@unbrained/pm-cli 2026.9.27 → 2026.9.28

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 (127) hide show
  1. package/.claude-plugin/marketplace.json +4 -6
  2. package/CHANGELOG.md +26 -0
  3. package/dist/cli/help-json-payload.js +1 -1
  4. package/dist/cli/register-operations.js +1 -1
  5. package/dist/cli-bundle/bundle-manifest.json +154 -154
  6. package/dist/cli-bundle/chunks/{chunk-OKVDVERQ.js → chunk-35DME35A.js} +2 -2
  7. package/dist/cli-bundle/chunks/{chunk-AUS6USO4.js → chunk-A2G5OG6W.js} +2 -2
  8. package/dist/cli-bundle/chunks/chunk-CPOWTIIS.js +2 -0
  9. package/dist/cli-bundle/chunks/{chunk-7TAGYNFP.js → chunk-GLH2LNRH.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-3BTJ66CB.js → chunk-NBDB3SRC.js} +48 -48
  11. package/dist/cli-bundle/chunks/{chunk-JX6WCCHL.js → chunk-NEUIVBFO.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-6OJVQ7SW.js → chunk-OYCCWPBM.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-LKGQUZ5M.js → chunk-PLNNUAFZ.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-4SLLCDFL.js → chunk-PR4UAMI5.js} +8 -8
  15. package/dist/cli-bundle/chunks/{chunk-TSF2LPIH.js → chunk-UT7GRGHY.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-V5UGBYHN.js → chunk-VMJLM7P2.js} +62 -62
  17. package/dist/cli-bundle/chunks/{chunk-IEP3VAT5.js → chunk-YERBAGQD.js} +2 -2
  18. package/dist/cli-bundle/chunks/chunk-ZFHJP7YD.js +29 -0
  19. package/dist/cli-bundle/chunks/{register-list-query-6PAJ4PBU.js → register-list-query-N6RP6PSP.js} +2 -2
  20. package/dist/cli-bundle/chunks/{register-mutation-RZCXZXYS.js → register-mutation-CY7JGQE6.js} +2 -2
  21. package/dist/cli-bundle/chunks/{register-operations-GK6VU2H2.js → register-operations-53HAD3QP.js} +2 -2
  22. package/dist/cli-bundle/chunks/{register-setup-ASEMNMBF.js → register-setup-NVX6374E.js} +2 -2
  23. package/dist/cli-bundle/focused-chunks/{chunk-OJRX6G22.js → chunk-5KJXX2TZ.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/{chunk-MILJCOFJ.js → chunk-6IVQPNYN.js} +2 -2
  25. package/dist/cli-bundle/focused-chunks/{chunk-NETVXIH5.js → chunk-A5O3VYWV.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/chunk-AZA4AEOR.js +75 -0
  27. package/dist/cli-bundle/focused-chunks/chunk-BGWF6CMP.js +2 -0
  28. package/dist/cli-bundle/focused-chunks/{chunk-PDVL7QYU.js → chunk-BRLXKRI2.js} +15 -15
  29. package/dist/cli-bundle/focused-chunks/{chunk-SMADBUPL.js → chunk-DTLRXY77.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-6UNKK3UH.js → chunk-IJXZQE3D.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-NWRVNHAD.js → chunk-IWLMQLBO.js} +6 -6
  32. package/dist/cli-bundle/focused-chunks/chunk-K7GSZ7YZ.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-OJKJFDIG.js → chunk-ONDNR3VU.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-NZAG7OKB.js → chunk-OVVCXTIE.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-GZD4ZYIB.js → chunk-V7OPZRL6.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-LBDWUHQD.js → chunk-Y5Z3XNGY.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-QO4MTAEA.js → chunk-YZB7IPR6.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-DQ3MB7BO.js → chunk-ZMQTIS3L.js} +2 -2
  39. package/dist/cli-bundle/main.js +21 -21
  40. package/dist/cli-bundle/sdk-authoring.js +1 -1
  41. package/dist/cli-bundle/sdk-contracts.js +1 -1
  42. package/dist/cli-bundle/sdk-core.js +18 -18
  43. package/dist/cli-bundle/sdk-governance.js +1 -1
  44. package/dist/cli-bundle/sdk-graph.js +1 -1
  45. package/dist/cli-bundle/sdk-merge.js +51 -51
  46. package/dist/cli-bundle/sdk-query.js +1 -1
  47. package/dist/cli-bundle/sdk-runtime.js +1 -1
  48. package/dist/cli-bundle/sdk-testing.js +1 -1
  49. package/dist/cli-bundle/sdk.js +1 -1
  50. package/dist/core/diagnostics/remediation.js +1 -1
  51. package/dist/core/item/item-format.js +1 -1
  52. package/dist/core/store/settings.js +3 -3
  53. package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
  54. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
  55. package/dist/sdk/completion/fish.js +3 -3
  56. package/dist/sdk/completion/zsh.js +3 -3
  57. package/dist/sdk/extension/copy-scope.d.ts +2 -2
  58. package/dist/sdk/extension/copy-scope.js +1 -1
  59. package/dist/sdk/extension/install-plan.js +1 -1
  60. package/dist/sdk/extension/install-runtime.js +2 -2
  61. package/dist/sdk/extension/static-inventory.js +1 -1
  62. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  63. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  64. package/dist/sdk/governance/health-merge-evidence.d.ts +18 -0
  65. package/dist/sdk/governance/health-merge-evidence.js +2 -0
  66. package/dist/sdk/governance/health.js +1 -1
  67. package/dist/sdk/merge/install.js +2 -2
  68. package/dist/sdk/output-projection.d.ts +1 -1
  69. package/dist/sdk/output-projection.js +1 -1
  70. package/dist/sdk/public-surface.json +1 -1
  71. package/dist/sdk/read-output-budget.d.ts +1 -1
  72. package/dist/sdk/read-output-budget.js +1 -1
  73. package/dist/sdk/read-output-contracts.js +1 -1
  74. package/dist/sdk/test/execution.d.ts +11 -0
  75. package/dist/sdk/test/execution.js +2 -2
  76. package/dist/sdk/test/parsers.d.ts +1 -1
  77. package/dist/sdk/test/parsers.js +1 -1
  78. package/dist/types.d.ts +3 -3
  79. package/dist/types.js +1 -1
  80. package/docs/AGENT_READ_AND_TEST_RECEIPTS.md +21 -0
  81. package/docs/CLAUDE_CODE_PLUGIN.md +12 -7
  82. package/docs/CONFIGURATION.md +2 -0
  83. package/docs/PACKAGE_EVIDENCE.md +18 -7
  84. package/docs/README.md +1 -0
  85. package/docs/TESTING.md +14 -3
  86. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +7 -3
  87. package/marketplace.json +4 -6
  88. package/package.json +5 -5
  89. package/packages/pm-beads/package.json +1 -1
  90. package/packages/pm-calendar/package.json +1 -1
  91. package/packages/pm-command-kit/package.json +1 -1
  92. package/packages/pm-digital-twin/package.json +1 -1
  93. package/packages/pm-governance-audit/package.json +1 -1
  94. package/packages/pm-guide-shell/package.json +1 -1
  95. package/packages/pm-kanban/package.json +1 -1
  96. package/packages/pm-lifecycle-hooks/package.json +1 -1
  97. package/packages/pm-linked-test-adapters/package.json +1 -1
  98. package/packages/pm-search-advanced/package.json +1 -1
  99. package/packages/pm-templates/package.json +1 -1
  100. package/packages/pm-todos/package.json +1 -1
  101. package/packages/pm-vcs/package.json +1 -1
  102. package/plugins/pm-claude/.claude-plugin/plugin.json +4 -2
  103. package/plugins/pm-claude/.mcp.json +1 -2
  104. package/plugins/pm-claude/README.md +7 -7
  105. package/plugins/pm-claude/package.json +2 -2
  106. package/plugins/pm-claude/{commands/pm-calendar.md → skills/pm-calendar/SKILL.md} +1 -0
  107. package/plugins/pm-claude/{commands/pm-close-task.md → skills/pm-close-task/SKILL.md} +1 -0
  108. package/plugins/pm-claude/{commands/pm-init.md → skills/pm-init/SKILL.md} +2 -1
  109. package/plugins/pm-claude/{commands/pm-list.md → skills/pm-list/SKILL.md} +2 -1
  110. package/plugins/pm-claude/{commands/pm-new.md → skills/pm-new/SKILL.md} +1 -0
  111. package/plugins/pm-claude/{commands/pm-search.md → skills/pm-search/SKILL.md} +1 -0
  112. package/plugins/pm-claude/{commands/pm-start-task.md → skills/pm-start-task/SKILL.md} +1 -0
  113. package/plugins/pm-claude/{commands/pm-status.md → skills/pm-status/SKILL.md} +1 -0
  114. package/plugins/pm-claude/{commands/pm-triage.md → skills/pm-triage/SKILL.md} +1 -0
  115. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  116. package/plugins/pm-codex/package.json +2 -2
  117. package/plugins/pm-codex/plugin.json +1 -1
  118. package/dist/cli-bundle/chunks/chunk-4UPZLUT2.js +0 -29
  119. package/dist/cli-bundle/chunks/chunk-LC6WEA5U.js +0 -2
  120. package/dist/cli-bundle/focused-chunks/chunk-6J2YCGSN.js +0 -75
  121. package/dist/cli-bundle/focused-chunks/chunk-E7LYK7V5.js +0 -2
  122. package/dist/cli-bundle/focused-chunks/chunk-KMPKKSA6.js +0 -2
  123. package/plugins/pm-claude/commands/pm-audit.md +0 -38
  124. package/plugins/pm-claude/commands/pm-developer.md +0 -38
  125. package/plugins/pm-claude/commands/pm-planner.md +0 -54
  126. package/plugins/pm-claude/commands/pm-release.md +0 -41
  127. package/plugins/pm-claude/commands/pm-workflow.md +0 -49
@@ -1,2 +1,2 @@
1
- import{$ as m,A as Je,Aa as Mo,B as Ke,Ba as Ro,C as Qe,Ca as Ao,D as Ye,Da as Po,E as Ze,Ea as Bo,F as $e,Fa as Oo,G as eo,Ga as Uo,H as oo,Ha as Wo,I as to,Ia as jo,J as ro,Ja as Lo,K as no,Ka as No,L as fo,La as Vo,M as po,Ma as zo,N as ao,Na as Xo,O as mo,Oa as qo,P as so,Pa as Go,Q as io,Qa as Ho,R as xo,Ra as Jo,S as lo,Sa as Ko,T as uo,Ta as k,U as co,Ua as E,V as yo,Va as D,W as go,X as bo,Y as Co,Z as Io,_ as a,a as Be,aa as d,b as Oe,ba as s,c as Ue,ca as i,d as We,da as x,e as je,ea as l,f as Le,fa as u,g as Ne,ga as c,ha as y,ia as g,ja as b,ka as C,la as I,ma as w,na as T,o as Ve,oa as h,p as ze,pa as _,q as Xe,qa as wo,r as qe,ra as To,sa as ho,ta as _o,ua as ko,va as Eo,wa as Do,x as p,xa as vo,y as Ge,ya as Fo,z as He,za as So}from"./focused-chunks/chunk-NZAG7OKB.js";import{Q as te,Qa as Ce,Ra as Ie,Sa as we,Ta as Te,Ua as he,Va as _e,Wa as ke,da as n,db as Ee,eb as De,fb as ve,gb as Fe,hb as Se,ib as Me,jb as Re,kb as Ae,lb as Pe,tb as f}from"./focused-chunks/chunk-GZD4ZYIB.js";import"./focused-chunks/chunk-QO4MTAEA.js";import{a as J,b as K,c as Q,d as Y,e as Z,f as $}from"./focused-chunks/chunk-MILJCOFJ.js";import"./focused-chunks/chunk-OJRX6G22.js";import{$ as ee,Da as oe,Hb as se,Ib as ie,Jb as xe,Kb as le,Lb as ue,Mb as ce,Nb as ye,Ob as ge,Pb as be,kb as r,lb as re,mb as ne,nb as fe,ob as pe,qb as ae,rb as me,sb as de}from"./focused-chunks/chunk-NWRVNHAD.js";import"./focused-chunks/chunk-LBDWUHQD.js";import"./focused-chunks/chunk-HFAW3FJQ.js";import{bd as v,be as U,cd as F,ce as W,dd as S,de as j,ed as M,ee as L,fd as R,fe as N,gd as A,ge as V,hd as P,he as z,id as B,ie as X,jd as O,je as q,ke as G,le as H}from"./focused-chunks/chunk-PDVL7QYU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d45a8203-4501-5797-a6cc-a2e7844adec9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d007edcb-46f0-5546-b804-27d86afe23e7")}catch{}})();export{ie as ACTIONABILITY_ORDERING_KINDS,K as BRIEF_LIST_FIELDS,Ze as CONTEXT_EVALUATION_METRIC_NAMES,a as CONTEXT_OUTPUT_VALUES,ro as CONTEXT_PACKING_PROFILES,Je as CONTEXT_RELEVANCE_SERVICE,Ge as CONTEXT_RELEVANCE_SIGNAL_NAMES,po as CONTEXT_SIGNAL_SET_VERSION,fo as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,ao as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,U as CONTEXT_USAGE_LIMITS,xo as ContextSignalStore,W as ContextUsageValidationError,So as DEFAULT_CHILD_SAMPLE_LIMIT,J as DEFAULT_COMPACT_LIST_FIELDS,pe as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,uo as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,k as EVAL_METRIC_NAMES,Z as GET_DEPTH_VALUES,io as JsonFileContextSignalStoreAdapter,Q as LIST_COMMAND_DEFAULT_PROJECTIONS,ve as LIST_SORT_FIELDS,Fe as LIST_SORT_ORDER_VALUES,Fo as MAX_CHILD_PROJECTION_ITEMS,wo as NEXT_OUTPUT_VALUES,Be as PM_COMPLETE_LIST_FINDING_CODES,Oe as PmCompleteListValidationError,O as QUERY_CURSOR_CONTRACT,Pe as _testOnly,vo as _testOnlyAggregateCommand,Ao as _testOnlyGetCommand,ho as _testOnlyNextCommand,Jo as _testOnlySearchCommand,ae as acquireItemMetadataDerivedIndexLock,f as analyzeDuplicateItems,h as applyContextTagProjection,Se as applyFilterValueEcho,Le as assertCompleteListResult,j as attachContextUsageServingReceipt,C as buildChildrenByParent,Vo as buildCompactSearchFilterSummary,Me as buildContentFilterEcho,so as buildContextSignalSnapshot,Re as buildGovernanceMissingFilterEcho,Mo as buildItemChildrenRollup,He as buildItemContextRelevanceCandidates,zo as buildVerboseSearchFilters,co as buildWorkspaceMemorySnapshot,je as certifyCompleteListResult,qo as classifyImplicitSemanticFallbackReason,xe as collectBlockedByIds,ue as collectBlockedByIdsFromCorpus,N as collectContextUsageDeliveredItemIds,ye as collectDependencyBlockedIds,Xo as collectErrorCauseCodes,u as collectSubtreeIds,c as compareCriticalItems,be as computeActionabilityReport,Ue as createCompleteListOptions,F as createQueryFingerprint,Lo as createSearchCursorFingerprint,A as decodeQueryCursor,M as decodeQueryCursorEnvelope,R as decodeQueryCursorState,Ke as defaultScoreContextCandidates,S as encodeQueryCursor,$e as evaluateContextRanking,D as evaluateMetricFloors,n as executeEmbeddingBatchesWithRetry,V as finalizeContextUsageDelivery,Ho as formatVectorIndexRecoveryWarnings,le as indexBlockedByIds,We as inspectCompleteListResult,$ as listGetProjectionFields,Y as listListProjectionFields,r as measureItemMetadataReadWork,w as mergeSortedWarnings,no as packContextCandidates,y as packRankedContextItems,B as paginateQueryRows,x as parseContextDepth,m as parseContextFocusFields,l as parseContextSections,mo as parseContextSignalSnapshot,E as parseEvalMetricFloors,Ce as parseIntegerLimit,te as parseLimit,Te as parseMultiValueFilter,Ie as parsePriority,ke as parsePriorityFilterSet,he as parseStringFilterSet,we as parseType,_e as parseTypeFilterSet,_o as partitionDecisionEntries,d as projectContextFocusRows,L as propagateContextUsageServingReceipt,re as queryItemMetadataIndex,ne as queryLinkedFileMetadataIndex,fe as querySimilarItemMetadataIndex,H as readContextUsageAffinity,ee as readHistoryEntries,me as readItemMetadataDerivedIndexState,lo as readWorkspaceContextSignals,yo as readWorkspaceMemory,X as recordContextUsageDelivery,z as recordContextUsageServing,q as recordContextUsageTouch,G as recordContextUsageTouches,de as refreshItemMetadataDerivedIndex,ze as renderCalendarMarkdown,Xe as renderCalendarToon,T as renderContextMarkdown,Eo as renderNextMarkdown,Ve as resolveCalendarOutputFormat,De as resolveContentFieldFilters,s as resolveContextOutputFormat,i as resolveContextTokenBudget,Oo as resolveEffectiveSearchMode,Wo as resolveHybridSemanticWeight,ce as resolveItemBlockers,se as resolveItemExecutionRole,Ee as resolveMissingMetadataFilters,To as resolveNextOutputFormat,P as resolveQueryCursorStart,Bo as resolveSearchMaxResults,No as resolveSearchPage,Uo as resolveSearchScoreThreshold,jo as resolveSearchTuning,Go as resolveVectorIndexRecovery,p as runActivity,Do as runAggregate,qe as runCalendar,_ as runContext,to as runContextEvaluationCorpus,eo as runContextEvaluationScenario,Ne as runDuplicates,Ro as runGet,Po as runHistory,Ae as runList,ko as runNext,Ko as runSearch,Qe as scoreContextCandidates,Ye as scoreContextCandidatesWithActiveExtensions,Co as searchWorkspaceMemory,Io as searchWorkspaceMemoryReadResult,ge as selectActionableEntries,v as selectCursorSemanticOptions,bo as selectWorkspaceMemory,go as selectWorkspaceMemoryRollups,oo as summarizeContextEvaluationReports,I as toContextFocusItem,g as toContextPackingSummary,b as toContextRankingSummary,oe as verifyHistoryChain};
1
+ import{$ as m,A as Je,Aa as Mo,B as Ke,Ba as Ro,C as Qe,Ca as Ao,D as Ye,Da as Po,E as Ze,Ea as Bo,F as $e,Fa as Oo,G as eo,Ga as Uo,H as oo,Ha as Wo,I as to,Ia as jo,J as ro,Ja as Lo,K as no,Ka as No,L as fo,La as Vo,M as po,Ma as zo,N as ao,Na as Xo,O as mo,Oa as qo,P as so,Pa as Go,Q as io,Qa as Ho,R as xo,Ra as Jo,S as lo,Sa as Ko,T as uo,Ta as k,U as co,Ua as E,V as yo,Va as D,W as go,X as bo,Y as Co,Z as Io,_ as a,a as Be,aa as d,b as Oe,ba as s,c as Ue,ca as i,d as We,da as x,e as je,ea as l,f as Le,fa as u,g as Ne,ga as c,ha as y,ia as g,ja as b,ka as C,la as I,ma as w,na as T,o as Ve,oa as h,p as ze,pa as _,q as Xe,qa as wo,r as qe,ra as To,sa as ho,ta as _o,ua as ko,va as Eo,wa as Do,x as p,xa as vo,y as Ge,ya as Fo,z as He,za as So}from"./focused-chunks/chunk-OVVCXTIE.js";import{Q as te,Qa as Ce,Ra as Ie,Sa as we,Ta as Te,Ua as he,Va as _e,Wa as ke,da as n,db as Ee,eb as De,fb as ve,gb as Fe,hb as Se,ib as Me,jb as Re,kb as Ae,lb as Pe,tb as f}from"./focused-chunks/chunk-V7OPZRL6.js";import"./focused-chunks/chunk-YZB7IPR6.js";import{a as J,b as K,c as Q,d as Y,e as Z,f as $}from"./focused-chunks/chunk-6IVQPNYN.js";import"./focused-chunks/chunk-5KJXX2TZ.js";import{$ as ee,Da as oe,Hb as se,Ib as ie,Jb as xe,Kb as le,Lb as ue,Mb as ce,Nb as ye,Ob as ge,Pb as be,kb as r,lb as re,mb as ne,nb as fe,ob as pe,qb as ae,rb as me,sb as de}from"./focused-chunks/chunk-IWLMQLBO.js";import"./focused-chunks/chunk-Y5Z3XNGY.js";import"./focused-chunks/chunk-HFAW3FJQ.js";import{bd as v,be as U,cd as F,ce as W,dd as S,de as j,ed as M,ee as L,fd as R,fe as N,gd as A,ge as V,hd as P,he as z,id as B,ie as X,jd as O,je as q,ke as G,le as H}from"./focused-chunks/chunk-BRLXKRI2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d45a8203-4501-5797-a6cc-a2e7844adec9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d007edcb-46f0-5546-b804-27d86afe23e7")}catch{}})();export{ie as ACTIONABILITY_ORDERING_KINDS,K as BRIEF_LIST_FIELDS,Ze as CONTEXT_EVALUATION_METRIC_NAMES,a as CONTEXT_OUTPUT_VALUES,ro as CONTEXT_PACKING_PROFILES,Je as CONTEXT_RELEVANCE_SERVICE,Ge as CONTEXT_RELEVANCE_SIGNAL_NAMES,po as CONTEXT_SIGNAL_SET_VERSION,fo as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,ao as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,U as CONTEXT_USAGE_LIMITS,xo as ContextSignalStore,W as ContextUsageValidationError,So as DEFAULT_CHILD_SAMPLE_LIMIT,J as DEFAULT_COMPACT_LIST_FIELDS,pe as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,uo as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,k as EVAL_METRIC_NAMES,Z as GET_DEPTH_VALUES,io as JsonFileContextSignalStoreAdapter,Q as LIST_COMMAND_DEFAULT_PROJECTIONS,ve as LIST_SORT_FIELDS,Fe as LIST_SORT_ORDER_VALUES,Fo as MAX_CHILD_PROJECTION_ITEMS,wo as NEXT_OUTPUT_VALUES,Be as PM_COMPLETE_LIST_FINDING_CODES,Oe as PmCompleteListValidationError,O as QUERY_CURSOR_CONTRACT,Pe as _testOnly,vo as _testOnlyAggregateCommand,Ao as _testOnlyGetCommand,ho as _testOnlyNextCommand,Jo as _testOnlySearchCommand,ae as acquireItemMetadataDerivedIndexLock,f as analyzeDuplicateItems,h as applyContextTagProjection,Se as applyFilterValueEcho,Le as assertCompleteListResult,j as attachContextUsageServingReceipt,C as buildChildrenByParent,Vo as buildCompactSearchFilterSummary,Me as buildContentFilterEcho,so as buildContextSignalSnapshot,Re as buildGovernanceMissingFilterEcho,Mo as buildItemChildrenRollup,He as buildItemContextRelevanceCandidates,zo as buildVerboseSearchFilters,co as buildWorkspaceMemorySnapshot,je as certifyCompleteListResult,qo as classifyImplicitSemanticFallbackReason,xe as collectBlockedByIds,ue as collectBlockedByIdsFromCorpus,N as collectContextUsageDeliveredItemIds,ye as collectDependencyBlockedIds,Xo as collectErrorCauseCodes,u as collectSubtreeIds,c as compareCriticalItems,be as computeActionabilityReport,Ue as createCompleteListOptions,F as createQueryFingerprint,Lo as createSearchCursorFingerprint,A as decodeQueryCursor,M as decodeQueryCursorEnvelope,R as decodeQueryCursorState,Ke as defaultScoreContextCandidates,S as encodeQueryCursor,$e as evaluateContextRanking,D as evaluateMetricFloors,n as executeEmbeddingBatchesWithRetry,V as finalizeContextUsageDelivery,Ho as formatVectorIndexRecoveryWarnings,le as indexBlockedByIds,We as inspectCompleteListResult,$ as listGetProjectionFields,Y as listListProjectionFields,r as measureItemMetadataReadWork,w as mergeSortedWarnings,no as packContextCandidates,y as packRankedContextItems,B as paginateQueryRows,x as parseContextDepth,m as parseContextFocusFields,l as parseContextSections,mo as parseContextSignalSnapshot,E as parseEvalMetricFloors,Ce as parseIntegerLimit,te as parseLimit,Te as parseMultiValueFilter,Ie as parsePriority,ke as parsePriorityFilterSet,he as parseStringFilterSet,we as parseType,_e as parseTypeFilterSet,_o as partitionDecisionEntries,d as projectContextFocusRows,L as propagateContextUsageServingReceipt,re as queryItemMetadataIndex,ne as queryLinkedFileMetadataIndex,fe as querySimilarItemMetadataIndex,H as readContextUsageAffinity,ee as readHistoryEntries,me as readItemMetadataDerivedIndexState,lo as readWorkspaceContextSignals,yo as readWorkspaceMemory,X as recordContextUsageDelivery,z as recordContextUsageServing,q as recordContextUsageTouch,G as recordContextUsageTouches,de as refreshItemMetadataDerivedIndex,ze as renderCalendarMarkdown,Xe as renderCalendarToon,T as renderContextMarkdown,Eo as renderNextMarkdown,Ve as resolveCalendarOutputFormat,De as resolveContentFieldFilters,s as resolveContextOutputFormat,i as resolveContextTokenBudget,Oo as resolveEffectiveSearchMode,Wo as resolveHybridSemanticWeight,ce as resolveItemBlockers,se as resolveItemExecutionRole,Ee as resolveMissingMetadataFilters,To as resolveNextOutputFormat,P as resolveQueryCursorStart,Bo as resolveSearchMaxResults,No as resolveSearchPage,Uo as resolveSearchScoreThreshold,jo as resolveSearchTuning,Go as resolveVectorIndexRecovery,p as runActivity,Do as runAggregate,qe as runCalendar,_ as runContext,to as runContextEvaluationCorpus,eo as runContextEvaluationScenario,Ne as runDuplicates,Ro as runGet,Po as runHistory,Ae as runList,ko as runNext,Ko as runSearch,Qe as scoreContextCandidates,Ye as scoreContextCandidatesWithActiveExtensions,Co as searchWorkspaceMemory,Io as searchWorkspaceMemoryReadResult,ge as selectActionableEntries,v as selectCursorSemanticOptions,bo as selectWorkspaceMemory,go as selectWorkspaceMemoryRollups,oo as summarizeContextEvaluationReports,I as toContextFocusItem,g as toContextPackingSummary,b as toContextRankingSummary,oe as verifyHistoryChain};
2
2
  //# sourceMappingURL=sdk-query.js.map
@@ -1,2 +1,2 @@
1
- import{$a as oc,$b as od,Aa as Kb,Ab as Pc,Ba as Lb,Bb as Qc,Ca as Mb,Cb as Rc,Da as Nb,Db as Sc,Ea as Ob,Eb as Tc,Fa as Pb,Fb as Uc,Ga as Qb,Gb as Vc,Ha as Rb,Hb as Wc,Ia as Sb,Ib as Xc,Ja as Tb,Jb as Yc,Ka as Ub,Kb as Zc,La as Vb,Lb as _c,Ma as Wb,Mb as $c,Na as Xb,Nb as ad,Oa as Yb,Ob as bd,Pa as Zb,Pb as cd,Qa as _b,Qb as dd,Ra as $b,Rb as ed,S as sb,Sa as ac,Sb as fd,T as tb,Ta as bc,Tb as gd,U as ub,Ua as cc,Ub as hd,V as vb,Va as dc,Vb as id,Wa as jc,Wb as jd,Xa as kc,Xb as kd,Ya as lc,Yb as ld,Za as mc,Zb as md,_a as nc,_b as nd,ab as pc,ac as pd,bb as qc,bc as qd,cb as rc,cc as rd,db as sc,dc as sd,eb as tc,ec as td,fb as uc,fc as ud,g as Y,gb as vc,gc as vd,h as Z,hb as wc,hc as wd,i as _,ib as xc,ic as xd,ja as Ab,jb as yc,jc as yd,ka as Bb,kb as zc,kc as zd,lb as Ac,lc as Ad,mb as Bc,mc as Bd,n as Ra,nb as Cc,nc as Cd,o as Sa,ob as Dc,oc as Dd,p as Ta,pb as Ec,pc as Ed,q as Ua,qb as Fc,qc as Fd,r as Va,rb as Gc,rc as Gd,sa as Cb,sb as Hc,sc as Hd,ta as Db,tb as Ic,tc as Id,ua as Eb,ub as Jc,uc as Jd,va as Fb,vb as Kc,vc as Kd,w as cb,wa as Gb,wb as Lc,wc as Ld,x as db,xa as Hb,xb as Mc,xc as Md,y as eb,ya as Ib,yb as Nc,yc as Nd,z as gb,za as Jb,zb as Oc,zc as Od}from"./chunks/chunk-4SLLCDFL.js";import"./chunks/chunk-TSF2LPIH.js";import{L as yb,m as bb,n as wb,u as xb}from"./chunks/chunk-JX6WCCHL.js";import{$c as qb,Fd as zb,Rd as ec,Sd as fc,Tc as fb,Td as gc,Ud as hc,Vd as ic,_c as pb,ad as rb,oc as Xa,pc as Ya,qc as Za,sb as Wa,sc as _a,tc as $a,uc as ab}from"./chunks/chunk-4UPZLUT2.js";import{T as Ma,U as Na,W as Oa,X as Pa,Y as Qa,i as Ia,j as Ja,l as Ka,m as La}from"./chunks/chunk-V5UGBYHN.js";import{Dc as lb,Mb as hb,Nb as ib,Ob as jb,Pb as kb,Uc as mb,Vc as nb,Zc as ob,na as Ha}from"./chunks/chunk-7TAGYNFP.js";import{$f as $,A as b,B as c,Bc as t,C as d,Gh as ra,Hd as w,Hh as sa,Id as x,Jd as y,Kc as u,Kd as z,Ld as A,Mc as v,Md as B,Nd as C,Ni as ya,Od as D,Oi as za,Pd as E,Qd as F,Qi as Aa,Rd as G,Ri as Ba,Sa as n,Ya as o,_a as p,bb as q,bf as V,bg as aa,bl as Da,cb as r,cf as W,cl as Ea,dl as Fa,eb as s,fl as Ga,gg as ba,hg as ca,hh as na,if as X,ig as da,ih as oa,jg as ea,jh as pa,jj as Ca,kg as fa,kh as qa,la as e,lg as ga,li as ta,me as H,mg as ha,na as f,ne as I,oa as g,oe as J,og as ia,oi as ua,pa as h,pe as K,pi as va,qa as i,qe as L,qg as ja,qi as wa,re as M,rg as ka,se as N,te as O,tg as la,ti as xa,ua as j,ue as P,ug as ma,ve as Q,wa as k,we as R,x as a,xa as l,xe as S,ya as m,ye as T,ze as U}from"./chunks/chunk-3BTJ66CB.js";export{ba as BASELINE_ITEM_FORMAT_VERSION,g as BUILTIN_ITEM_TYPE_VALUES,m as CONFIDENCE_TEXT_VALUES,lb as CONTEXT_OUTPUT_VALUES,ca as CURRENT_ITEM_FORMAT_VERSION,Xa as DEFAULT_TERMINAL_TRANSITION_POLICY,j as DEPENDENCY_KIND_VALUES,e as EXIT_CODE,na as HISTORY_EVENT_CLASSIFICATION_VERSION,l as ISSUE_SEVERITY_VALUES,h as ITEM_TYPE_VALUES,oa as MAINTENANCE_HISTORY_OPERATIONS,x as MAX_WORKFLOW_POLICIES,y as MAX_WORKFLOW_POLICY_TERMS,nb as NEXT_OUTPUT_VALUES,Y as PM_CLI_EXPECTED_ERROR_NAME,P as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,K as PM_DIAGNOSTIC_DEGRADATION_STEPS,L as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,J as PM_DIAGNOSTIC_OUTPUT_CLASSES,Ja as PM_GITIGNORE_END,Ia as PM_GITIGNORE_START,I as PM_OUTPUT_BUDGET_CLASSES,H as PM_OUTPUT_DEGRADATION_STEPS,f as PmCliError,jc as PmClient,Ra as PmCompleteListValidationError,k as RISK_VALUES,Cb as SEARCH_EXTENSION_FLAG_DEFINITIONS,i as STATUS_VALUES,pa as SUBSTANTIVE_HISTORY_OPERATIONS,w as WORKFLOW_POLICY_ACTIONS,Na as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Ma as WORKFLOW_POLICY_SCHEMA,X as acquireLock,qc as aggregate,Od as analyzeSdkActionCoverage,Cc as append,sa as appendHistoryEntry,_a as applyTerminalOrderingPolicy,Va as assertCompleteListResult,Oa as buildWorkflowCompletenessCheck,ma as canonicalDocument,Ua as certifyCompleteListResult,ld as claim,md as claimNext,qa as classifyHistoryEvent,fa as classifyItemFormatVersion,Bb as clearWorkspaceContractsCache,kd as close,$a as closeItem,ud as closeTask,tc as comments,_b as commitImportedItem,Ec as config,kc as context,od as copy,hd as create,Sa as createCompleteListOptions,ra as createHistoryEntry,Pa as createLifecycleCompletenessPolicies,Z as createPmCliExpectedError,N as createPmCommandOutputBudget,G as createWorkflowPolicyEvaluator,O as definePmCommandOutputBudget,pd as deleteItem,Ac as deps,zc as docs,sc as duplicates,da as effectiveItemFormatVersion,Zb as emptyImportedDocument,La as ensurePmGitignore,Yb as ensureTrackerInitialized,R as estimatePmOutputTokens,F as evaluateWorkflowPolicies,vd as extension,xd as extensionActivate,yd as extensionDeactivate,wd as extensionList,wc as files,xc as filesDiscover,yc as filesLookup,rd as focus,bd as gc,wa as generateItemId,oc as get,t as getActiveExtensionRegistrations,Ld as getContracts,s as getHistoryPath,r as getItemPath,Ka as getPmGitignoreBlock,q as getSettingsPath,Db as getWorkspaceContracts,Bc as graph,ad as health,fd as historyCompact,gd as historyCompactBulk,cd as historyRedact,dd as historyRepair,ed as historyRepairAll,M as inferPmOutputBudgetClass,Dc as init,Ta as inspectCompleteListResult,_ as isPmCliExpectedError,ia as isTerminalStatus,W as isTimestampLiteral,Da as jaccardSimilarity,vc as learnings,lc as list,mc as listAllComplete,Aa as listAllItemMetadata,Ba as listAllItemMetadataLight,sb as loadCreateTemplateOptions,ya as locateItem,pc as next,ea as normalizeItemFormatVersion,va as normalizeItemId,ja as normalizeItemMetadata,ua as normalizeRawItemId,Ea as normalizeSimilarityText,ha as normalizeStatusInput,uc as notes,V as nowIso,Id as packageActivate,Hd as packageCatalog,Jd as packageDeactivate,Fd as packageDescribe,Dd as packageDoctor,Bd as packageInstall,zd as packageLifecycle,Ad as packageList,Ed as packageManage,Gd as packageReload,Cd as packageUninstall,Ca as parseTags,z as parseWorkflowPolicy,A as parseWorkflowPolicyDocument,a as pathExists,td as pauseTask,Wc as profile,Zc as profileApply,_c as profileLint,Xc as profileList,Yc as profileShow,T as projectPmDiagnosticOutput,U as projectPmDiagnosticText,Fb as readBooleanOption,Gb as readCsvListOption,b as readFileIfExists,za as readLocatedItem,Ab as readRequiredString,ta as readSettings,Eb as readStringOption,xa as readWorkflowPolicies,B as readWorkflowPolicyField,nd as release,d as removeFileIfExists,ib as renderCalendarMarkdown,jb as renderCalendarToon,bc as renderGuideMarkdown,jd as reopen,Za as requireTerminalReason,hb as resolveCalendarOutputFormat,$b as resolveGuideOutputFormat,o as resolveImplicitPmRoot,n as resolveItemTypeRegistry,Q as resolvePmCommandOutputBudget,S as resolvePmDiagnosticOutputBudget,p as resolvePmRoot,aa as resolveRuntimeFieldRegistry,$ as resolveRuntimeStatusRegistry,Ya as resolveTerminalReason,qd as restore,Nd as runAction,v as runActiveOnReadHooks,u as runActiveOnWriteHooks,wb as runAggregate,kb as runCalendar,ab as runClose,rb as runCloseTask,cc as runCompletion,mb as runContext,cb as runCopy,db as runDelete,Wa as runDuplicates,eb as runFocus,xb as runGet,ac as runGuide,Ha as runList,ob as runNext,qb as runPauseTask,dc as runReindex,gb as runReopen,bb as runRestore,yb as runSearch,pb as runStartTask,zb as runStats,ub as runTemplatesList,tb as runTemplatesSave,vb as runTemplatesShow,ec as runTestRunsList,gc as runTestRunsLogs,ic as runTestRunsResume,fc as runTestRunsStatus,hc as runTestRunsStop,fb as runUpdate,Md as runWithActiveExtensions,Qa as runWorkflowPolicyAction,ga as scanItemFormatVersions,Fc as schema,Mc as schemaAddField,Kc as schemaAddStatus,Ic as schemaAddType,Qc as schemaApplyPreset,Rc as schemaInferTypes,Gc as schemaList,Oc as schemaListFields,Uc as schemaRemapStatus,Nc as schemaRemoveField,Lc as schemaRemoveStatus,Jc as schemaRemoveType,Tc as schemaRenameField,Sc as schemaRenameType,Hc as schemaShow,Pc as schemaShowField,Vc as schemaShowStatus,Ga as scoreItemSimilarity,nc as search,Xb as selectImportAuthor,la as serializeItemDocument,ka as splitFrontMatter,sd as startTask,rc as stats,Ib as toEstimatedMinutesValue,Nb as toImportBoolean,Rb as toImportConfidence,Mb as toImportInteger,Vb as toImportLinkedDocs,Ub as toImportLinkedFiles,Wb as toImportLinkedTests,Tb as toImportLogEntries,Sb as toImportNormalizedEnum,Qb as toImportNumberMap,Jb as toImportPriority,Lb as toImportStatus,Ob as toImportStringList,Pb as toImportStringMap,Kb as toImportTags,Hb as toNonEmptyImportString,Fa as tokenizeSimilarityText,id as update,Kd as upgrade,$c as validate,D as workflowApprovalFingerprint,E as workflowPolicyApplies,C as workflowPolicyFingerprint,c as writeFileAtomic};
1
+ import{$a as oc,$b as od,Aa as Kb,Ab as Pc,Ba as Lb,Bb as Qc,Ca as Mb,Cb as Rc,Da as Nb,Db as Sc,Ea as Ob,Eb as Tc,Fa as Pb,Fb as Uc,Ga as Qb,Gb as Vc,Ha as Rb,Hb as Wc,Ia as Sb,Ib as Xc,Ja as Tb,Jb as Yc,Ka as Ub,Kb as Zc,La as Vb,Lb as _c,Ma as Wb,Mb as $c,Na as Xb,Nb as ad,Oa as Yb,Ob as bd,Pa as Zb,Pb as cd,Qa as _b,Qb as dd,Ra as $b,Rb as ed,S as sb,Sa as ac,Sb as fd,T as tb,Ta as bc,Tb as gd,U as ub,Ua as cc,Ub as hd,V as vb,Va as dc,Vb as id,Wa as jc,Wb as jd,Xa as kc,Xb as kd,Ya as lc,Yb as ld,Za as mc,Zb as md,_a as nc,_b as nd,ab as pc,ac as pd,bb as qc,bc as qd,cb as rc,cc as rd,db as sc,dc as sd,eb as tc,ec as td,fb as uc,fc as ud,g as Y,gb as vc,gc as vd,h as Z,hb as wc,hc as wd,i as _,ib as xc,ic as xd,ja as Ab,jb as yc,jc as yd,ka as Bb,kb as zc,kc as zd,lb as Ac,lc as Ad,mb as Bc,mc as Bd,n as Ra,nb as Cc,nc as Cd,o as Sa,ob as Dc,oc as Dd,p as Ta,pb as Ec,pc as Ed,q as Ua,qb as Fc,qc as Fd,r as Va,rb as Gc,rc as Gd,sa as Cb,sb as Hc,sc as Hd,ta as Db,tb as Ic,tc as Id,ua as Eb,ub as Jc,uc as Jd,va as Fb,vb as Kc,vc as Kd,w as cb,wa as Gb,wb as Lc,wc as Ld,x as db,xa as Hb,xb as Mc,xc as Md,y as eb,ya as Ib,yb as Nc,yc as Nd,z as gb,za as Jb,zb as Oc,zc as Od}from"./chunks/chunk-PR4UAMI5.js";import"./chunks/chunk-UT7GRGHY.js";import{L as yb,m as bb,n as wb,u as xb}from"./chunks/chunk-NEUIVBFO.js";import{$c as qb,Fd as zb,Rd as ec,Sd as fc,Tc as fb,Td as gc,Ud as hc,Vd as ic,_c as pb,ad as rb,oc as Xa,pc as Ya,qc as Za,sb as Wa,sc as _a,tc as $a,uc as ab}from"./chunks/chunk-ZFHJP7YD.js";import{T as Ma,U as Na,W as Oa,X as Pa,Y as Qa,i as Ia,j as Ja,l as Ka,m as La}from"./chunks/chunk-VMJLM7P2.js";import{Dc as lb,Mb as hb,Nb as ib,Ob as jb,Pb as kb,Uc as mb,Vc as nb,Zc as ob,na as Ha}from"./chunks/chunk-GLH2LNRH.js";import{$f as $,A as b,B as c,Bc as t,C as d,Gh as ra,Hd as w,Hh as sa,Id as x,Jd as y,Kc as u,Kd as z,Ld as A,Mc as v,Md as B,Nd as C,Ni as ya,Od as D,Oi as za,Pd as E,Qd as F,Qi as Aa,Rd as G,Ri as Ba,Sa as n,Ya as o,_a as p,bb as q,bf as V,bg as aa,bl as Da,cb as r,cf as W,cl as Ea,dl as Fa,eb as s,fl as Ga,gg as ba,hg as ca,hh as na,if as X,ig as da,ih as oa,jg as ea,jh as pa,jj as Ca,kg as fa,kh as qa,la as e,lg as ga,li as ta,me as H,mg as ha,na as f,ne as I,oa as g,oe as J,og as ia,oi as ua,pa as h,pe as K,pi as va,qa as i,qe as L,qg as ja,qi as wa,re as M,rg as ka,se as N,te as O,tg as la,ti as xa,ua as j,ue as P,ug as ma,ve as Q,wa as k,we as R,x as a,xa as l,xe as S,ya as m,ye as T,ze as U}from"./chunks/chunk-NBDB3SRC.js";export{ba as BASELINE_ITEM_FORMAT_VERSION,g as BUILTIN_ITEM_TYPE_VALUES,m as CONFIDENCE_TEXT_VALUES,lb as CONTEXT_OUTPUT_VALUES,ca as CURRENT_ITEM_FORMAT_VERSION,Xa as DEFAULT_TERMINAL_TRANSITION_POLICY,j as DEPENDENCY_KIND_VALUES,e as EXIT_CODE,na as HISTORY_EVENT_CLASSIFICATION_VERSION,l as ISSUE_SEVERITY_VALUES,h as ITEM_TYPE_VALUES,oa as MAINTENANCE_HISTORY_OPERATIONS,x as MAX_WORKFLOW_POLICIES,y as MAX_WORKFLOW_POLICY_TERMS,nb as NEXT_OUTPUT_VALUES,Y as PM_CLI_EXPECTED_ERROR_NAME,P as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,K as PM_DIAGNOSTIC_DEGRADATION_STEPS,L as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,J as PM_DIAGNOSTIC_OUTPUT_CLASSES,Ja as PM_GITIGNORE_END,Ia as PM_GITIGNORE_START,I as PM_OUTPUT_BUDGET_CLASSES,H as PM_OUTPUT_DEGRADATION_STEPS,f as PmCliError,jc as PmClient,Ra as PmCompleteListValidationError,k as RISK_VALUES,Cb as SEARCH_EXTENSION_FLAG_DEFINITIONS,i as STATUS_VALUES,pa as SUBSTANTIVE_HISTORY_OPERATIONS,w as WORKFLOW_POLICY_ACTIONS,Na as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Ma as WORKFLOW_POLICY_SCHEMA,X as acquireLock,qc as aggregate,Od as analyzeSdkActionCoverage,Cc as append,sa as appendHistoryEntry,_a as applyTerminalOrderingPolicy,Va as assertCompleteListResult,Oa as buildWorkflowCompletenessCheck,ma as canonicalDocument,Ua as certifyCompleteListResult,ld as claim,md as claimNext,qa as classifyHistoryEvent,fa as classifyItemFormatVersion,Bb as clearWorkspaceContractsCache,kd as close,$a as closeItem,ud as closeTask,tc as comments,_b as commitImportedItem,Ec as config,kc as context,od as copy,hd as create,Sa as createCompleteListOptions,ra as createHistoryEntry,Pa as createLifecycleCompletenessPolicies,Z as createPmCliExpectedError,N as createPmCommandOutputBudget,G as createWorkflowPolicyEvaluator,O as definePmCommandOutputBudget,pd as deleteItem,Ac as deps,zc as docs,sc as duplicates,da as effectiveItemFormatVersion,Zb as emptyImportedDocument,La as ensurePmGitignore,Yb as ensureTrackerInitialized,R as estimatePmOutputTokens,F as evaluateWorkflowPolicies,vd as extension,xd as extensionActivate,yd as extensionDeactivate,wd as extensionList,wc as files,xc as filesDiscover,yc as filesLookup,rd as focus,bd as gc,wa as generateItemId,oc as get,t as getActiveExtensionRegistrations,Ld as getContracts,s as getHistoryPath,r as getItemPath,Ka as getPmGitignoreBlock,q as getSettingsPath,Db as getWorkspaceContracts,Bc as graph,ad as health,fd as historyCompact,gd as historyCompactBulk,cd as historyRedact,dd as historyRepair,ed as historyRepairAll,M as inferPmOutputBudgetClass,Dc as init,Ta as inspectCompleteListResult,_ as isPmCliExpectedError,ia as isTerminalStatus,W as isTimestampLiteral,Da as jaccardSimilarity,vc as learnings,lc as list,mc as listAllComplete,Aa as listAllItemMetadata,Ba as listAllItemMetadataLight,sb as loadCreateTemplateOptions,ya as locateItem,pc as next,ea as normalizeItemFormatVersion,va as normalizeItemId,ja as normalizeItemMetadata,ua as normalizeRawItemId,Ea as normalizeSimilarityText,ha as normalizeStatusInput,uc as notes,V as nowIso,Id as packageActivate,Hd as packageCatalog,Jd as packageDeactivate,Fd as packageDescribe,Dd as packageDoctor,Bd as packageInstall,zd as packageLifecycle,Ad as packageList,Ed as packageManage,Gd as packageReload,Cd as packageUninstall,Ca as parseTags,z as parseWorkflowPolicy,A as parseWorkflowPolicyDocument,a as pathExists,td as pauseTask,Wc as profile,Zc as profileApply,_c as profileLint,Xc as profileList,Yc as profileShow,T as projectPmDiagnosticOutput,U as projectPmDiagnosticText,Fb as readBooleanOption,Gb as readCsvListOption,b as readFileIfExists,za as readLocatedItem,Ab as readRequiredString,ta as readSettings,Eb as readStringOption,xa as readWorkflowPolicies,B as readWorkflowPolicyField,nd as release,d as removeFileIfExists,ib as renderCalendarMarkdown,jb as renderCalendarToon,bc as renderGuideMarkdown,jd as reopen,Za as requireTerminalReason,hb as resolveCalendarOutputFormat,$b as resolveGuideOutputFormat,o as resolveImplicitPmRoot,n as resolveItemTypeRegistry,Q as resolvePmCommandOutputBudget,S as resolvePmDiagnosticOutputBudget,p as resolvePmRoot,aa as resolveRuntimeFieldRegistry,$ as resolveRuntimeStatusRegistry,Ya as resolveTerminalReason,qd as restore,Nd as runAction,v as runActiveOnReadHooks,u as runActiveOnWriteHooks,wb as runAggregate,kb as runCalendar,ab as runClose,rb as runCloseTask,cc as runCompletion,mb as runContext,cb as runCopy,db as runDelete,Wa as runDuplicates,eb as runFocus,xb as runGet,ac as runGuide,Ha as runList,ob as runNext,qb as runPauseTask,dc as runReindex,gb as runReopen,bb as runRestore,yb as runSearch,pb as runStartTask,zb as runStats,ub as runTemplatesList,tb as runTemplatesSave,vb as runTemplatesShow,ec as runTestRunsList,gc as runTestRunsLogs,ic as runTestRunsResume,fc as runTestRunsStatus,hc as runTestRunsStop,fb as runUpdate,Md as runWithActiveExtensions,Qa as runWorkflowPolicyAction,ga as scanItemFormatVersions,Fc as schema,Mc as schemaAddField,Kc as schemaAddStatus,Ic as schemaAddType,Qc as schemaApplyPreset,Rc as schemaInferTypes,Gc as schemaList,Oc as schemaListFields,Uc as schemaRemapStatus,Nc as schemaRemoveField,Lc as schemaRemoveStatus,Jc as schemaRemoveType,Tc as schemaRenameField,Sc as schemaRenameType,Hc as schemaShow,Pc as schemaShowField,Vc as schemaShowStatus,Ga as scoreItemSimilarity,nc as search,Xb as selectImportAuthor,la as serializeItemDocument,ka as splitFrontMatter,sd as startTask,rc as stats,Ib as toEstimatedMinutesValue,Nb as toImportBoolean,Rb as toImportConfidence,Mb as toImportInteger,Vb as toImportLinkedDocs,Ub as toImportLinkedFiles,Wb as toImportLinkedTests,Tb as toImportLogEntries,Sb as toImportNormalizedEnum,Qb as toImportNumberMap,Jb as toImportPriority,Lb as toImportStatus,Ob as toImportStringList,Pb as toImportStringMap,Kb as toImportTags,Hb as toNonEmptyImportString,Fa as tokenizeSimilarityText,id as update,Kd as upgrade,$c as validate,D as workflowApprovalFingerprint,E as workflowPolicyApplies,C as workflowPolicyFingerprint,c as writeFileAtomic};
2
2
  //# sourceMappingURL=sdk-runtime.js.map
@@ -1,2 +1,2 @@
1
- import{A as t,B as u,C as v,D as w,E as x,F as y,G as z,H as A,I as B,J as C,K as D,L as E,M as F,N as G,O as H,P as I,Q as J,R as K,S as L,T as M,U as N,V as O,W as P,X as Q,Y as R,f as c,g as d,l as e,m as f,n as g,o as h,p as i,q as j,r as k,s as l,t as m,u as n,v as o,w as p,x as q,y as r,z as s}from"./chunks/chunk-OKVDVERQ.js";import"./chunks/chunk-4SLLCDFL.js";import"./chunks/chunk-TSF2LPIH.js";import"./chunks/chunk-JX6WCCHL.js";import"./chunks/chunk-4UPZLUT2.js";import{Pa as b,n as a}from"./chunks/chunk-V5UGBYHN.js";import"./chunks/chunk-7TAGYNFP.js";import"./chunks/chunk-3BTJ66CB.js";export{e as activateExtensionForTest,M as assertExtensionBlueprint,L as assertExtensionCapabilityUsage,t as assertExtensionDeactivated,P as assertExtensionManifestCompatible,O as assertExtensionManifestMatchesBlueprint,Q as assertExtensionPreflight,u as assertPackageManifest,N as assertProjectProfile,v as assertRegisteredCommandContract,F as assertRegisteredCommandOverride,B as assertRegisteredExporter,w as assertRegisteredFlags,x as assertRegisteredHook,A as assertRegisteredImporter,C as assertRegisteredItemField,D as assertRegisteredItemType,K as assertRegisteredMigration,G as assertRegisteredParserOverride,H as assertRegisteredPreflightOverride,E as assertRegisteredProfile,I as assertRegisteredRendererOverride,y as assertRegisteredSearchProvider,J as assertRegisteredServiceOverride,z as assertRegisteredVectorStoreAdapter,R as createExtensionTestHarness,f as deactivateExtensionForTest,a as describeExtensionActivation,c as describeExtensionBlueprint,d as lintExtensionBlueprint,b as renderExtensionSurfaceMarkdown,g as runRegisteredCommandForTest,l as runRegisteredCommandOverrideForTest,s as runRegisteredExporterForTest,i as runRegisteredHookForTest,r as runRegisteredImporterForTest,q as runRegisteredMigrationForTest,h as runRegisteredMutationGuardForTest,j as runRegisteredParserOverrideForTest,k as runRegisteredPreflightOverrideForTest,m as runRegisteredRendererOverrideForTest,o as runRegisteredSearchProviderForTest,n as runRegisteredServiceOverrideForTest,p as runRegisteredVectorStoreAdapterForTest};
1
+ import{A as t,B as u,C as v,D as w,E as x,F as y,G as z,H as A,I as B,J as C,K as D,L as E,M as F,N as G,O as H,P as I,Q as J,R as K,S as L,T as M,U as N,V as O,W as P,X as Q,Y as R,f as c,g as d,l as e,m as f,n as g,o as h,p as i,q as j,r as k,s as l,t as m,u as n,v as o,w as p,x as q,y as r,z as s}from"./chunks/chunk-35DME35A.js";import"./chunks/chunk-PR4UAMI5.js";import"./chunks/chunk-UT7GRGHY.js";import"./chunks/chunk-NEUIVBFO.js";import"./chunks/chunk-ZFHJP7YD.js";import{Pa as b,n as a}from"./chunks/chunk-VMJLM7P2.js";import"./chunks/chunk-GLH2LNRH.js";import"./chunks/chunk-NBDB3SRC.js";export{e as activateExtensionForTest,M as assertExtensionBlueprint,L as assertExtensionCapabilityUsage,t as assertExtensionDeactivated,P as assertExtensionManifestCompatible,O as assertExtensionManifestMatchesBlueprint,Q as assertExtensionPreflight,u as assertPackageManifest,N as assertProjectProfile,v as assertRegisteredCommandContract,F as assertRegisteredCommandOverride,B as assertRegisteredExporter,w as assertRegisteredFlags,x as assertRegisteredHook,A as assertRegisteredImporter,C as assertRegisteredItemField,D as assertRegisteredItemType,K as assertRegisteredMigration,G as assertRegisteredParserOverride,H as assertRegisteredPreflightOverride,E as assertRegisteredProfile,I as assertRegisteredRendererOverride,y as assertRegisteredSearchProvider,J as assertRegisteredServiceOverride,z as assertRegisteredVectorStoreAdapter,R as createExtensionTestHarness,f as deactivateExtensionForTest,a as describeExtensionActivation,c as describeExtensionBlueprint,d as lintExtensionBlueprint,b as renderExtensionSurfaceMarkdown,g as runRegisteredCommandForTest,l as runRegisteredCommandOverrideForTest,s as runRegisteredExporterForTest,i as runRegisteredHookForTest,r as runRegisteredImporterForTest,q as runRegisteredMigrationForTest,h as runRegisteredMutationGuardForTest,j as runRegisteredParserOverrideForTest,k as runRegisteredPreflightOverrideForTest,m as runRegisteredRendererOverrideForTest,o as runRegisteredSearchProviderForTest,n as runRegisteredServiceOverrideForTest,p as runRegisteredVectorStoreAdapterForTest};
2
2
  //# sourceMappingURL=sdk-testing.js.map
@@ -1,4 +1,4 @@
1
- import{A as PM,B as MM,C as kM,D as xM,E as NM,a as Vn,b as $S,c as FS,d as GS,e as US,f as jS,g as Yi,h as Ji,i as Zi,j as Qi,k as es,l as OM,m as RM,n as Ch,o as Th,p as Sh,r as Eh,s as wh,t as Ah,u as vh,v as Oh,w as Rh,x as Ih,y as Ph,z as IM}from"./chunks/chunk-6OJVQ7SW.js";import{A as Ck,B as Tk,C as Sk,D as Ek,E as wk,F as Ak,G as vk,H as Ok,I as Rk,J as Ik,K as Pk,L as Mk,M as kk,N as xk,O as Nk,P as Lk,Q as Dk,R as $k,S as Fk,T as Gk,U as Uk,V as jk,W as Bk,X as qk,Y as zk,a as WM,b as XM,c as YM,d as JM,e as ZM,f as QM,g as ek,h as tk,i as rk,j as ok,k as nk,l as ik,m as sk,n as ak,o as ck,p as dk,q as lk,r as uk,s as pk,t as mk,u as fk,v as _k,w as hk,x as gk,y as yk,z as bk}from"./chunks/chunk-OKVDVERQ.js";import{a as Mh}from"./chunks/chunk-LC6WEA5U.js";import{a as LM,b as DM,c as $M,d as FM}from"./chunks/chunk-LKGQUZ5M.js";import{a as GM,b as UM,c as jM,d as BM,e as qM,f as zM,g as VM,h as HM,i as KM}from"./chunks/chunk-IEP3VAT5.js";import{$ as rm,$a as Kf,$b as K_,A as Ve,Aa as _f,Ab as C_,B as Bp,Ba as hf,Bb as T_,C as qp,Ca as gf,Cb as S_,D as zp,Da as yf,Db as E_,E as Vp,Ea as bf,Eb as w_,F as Hp,Fa as Cf,Fb as A_,G as Bt,Ga as Tf,Gb as v_,H as qt,Ha as Sf,Hb as O_,I as zt,Ia as Ef,Ib as R_,J as Vt,Ja as wf,Jb as I_,K as Ht,Ka as Af,Kb as P_,L as Kt,La as vf,Lb as M_,M as Wt,Ma as Of,Mb as k_,N as Xt,Na as Rf,Nb as x_,O as Yt,Oa as If,Ob as N_,P as Jt,Pa as Pf,Pb as L_,Q as Zt,Qa as Mf,Qb as D_,R as Kp,Ra as kf,Rb as $_,S as Wp,Sa as xf,Sb as F_,T as Xp,Ta as Nf,Tb as G_,U as Yp,Ua as Lf,Ub as U_,V as Jp,Va as Qt,Vb as j_,W as He,Wa as me,Wb as B_,X as Zp,Xa as qf,Xb as q_,Y as Qp,Ya as zf,Yb as z_,Z as em,Za as Vf,Zb as V_,_ as tm,_a as Hf,_b as H_,a as MS,aa as om,ab as Wf,ac as W_,b as kS,ba as nm,bb as Xf,bc as X_,c as xS,ca as im,cb as Yf,cc as Y_,d as NS,da as cM,db as Jf,dc as J_,e as LS,ea as dM,eb as Zf,ec as Z_,f as DS,fa as lM,fb as Qf,fc as Q_,g as Xn,ga as ym,gb as e_,gc as eh,h as Yn,ha as bm,hb as t_,hc as th,i as Jn,ia as Cm,ib as r_,ic as rh,j as Ew,ja as sf,jb as o_,jc as oh,k as ww,ka as af,kb as n_,kc as nh,l as zi,la as bM,lb as i_,lc as ih,m as TR,ma as CM,mb as s_,mc as sh,n as SR,na as TM,nb as a_,nc as ah,o as ER,oa as SM,ob as c_,oc as ch,p as wR,pa as EM,pb as d_,pc as dh,q as AR,qa as wM,qb as l_,qc as lh,r as vR,ra as AM,rb as u_,rc as uh,s as tl,sa as vM,sb as p_,sc as ph,t as Mu,ta as cf,tb as m_,tc as mh,u as ku,ua as df,ub as f_,uc as fh,v as Du,va as lf,vb as __,vc as _h,w as $u,wa as uf,wb as h_,wc as hh,x as tp,xa as pf,xb as g_,xc as gh,y as cp,ya as mf,yb as y_,yc as yh,z as YI,za as ff,zb as b_,zc as bh}from"./chunks/chunk-4SLLCDFL.js";import{e as IR,f as PR,g as rl,h as ol,i as Gt}from"./chunks/chunk-TSF2LPIH.js";import{A as JP,B as ZP,C as QP,D as eM,E as tM,F as rM,G as oM,H as nM,I as iM,J as sM,K as aM,L as cm,M as dm,N as lm,O as um,P as pm,Q as mm,R as fm,S as _m,T as hm,U as gm,a as xI,b as NI,c as LI,d as DI,e as $I,f as Pu,g as FI,h as GI,i as UI,j as jI,k as BI,m as Lu,n as sm,o as UP,p as jP,q as BP,r as qP,s as zP,t as VP,u as am,v as HP,w as KP,x as WP,y as XP,z as YP}from"./chunks/chunk-JX6WCCHL.js";import{$ as KO,$a as ml,$b as Eu,$c as Up,A as SO,Ab as DR,Ac as qu,Ad as qm,B as EO,Bb as $R,Bc as zu,Bd as zm,C as wO,Cb as FR,Cc as Vu,Cd as Vm,D as AO,Db as GR,Dc as Hu,Dd as Hm,E as vO,Ea as Gd,Eb as UR,Ec as Ku,Ed as Km,F as ze,Fa as Ud,Fb as sI,Fc as Wu,Fd as Wm,G as OO,Ga as jd,Gb as aI,Gc as Xu,Gd as Xm,H as xt,Ha as Bd,Hb as cI,Hc as Yu,Hd as Ym,I as RO,Ia as qd,Ib as dI,Ic as Ju,Id as Jm,J as IO,Jb as lI,Jc as Zu,Jd as Zm,K as PO,Ka as zd,Kb as uI,Kc as Qu,Kd as Qm,L as MO,La as Vd,Lb as pI,Ld as ef,M as kO,Ma as Hd,Mb as yI,Mc as WI,Md as tf,N as xO,Na as Kd,Nb as bI,Nc as XI,Nd as rf,O as NO,Oa as OR,Ob as _u,Oc as ep,Od as of,P as LO,Pa as RR,Pb as hu,Pc as dp,Pd as nf,Q as DO,Qa as Wd,Qb as CI,Qd as Df,R as $O,Ra as Xd,Rb as TI,Rd as $f,S as FO,Sa as Yd,Sb as SI,Sd as Ff,T as GO,Ta as Jd,Tb as EI,Tc as lp,Td as Gf,U as UO,Ua as Zd,Ub as wI,Ud as Uf,V as jO,Va as Qd,Vb as gu,Vc as up,Vd as jf,W as BO,Wa as el,Wb as yu,Wc as Lp,Wd as Bf,X as qO,Xa as dl,Xb as bu,Xc as Dp,Y as zO,Ya as ll,Yb as Cu,Yc as $p,Z as VO,Za as ul,Zb as Tu,Zc as Fp,_ as HO,_a as pl,_b as Su,_c as Gp,a as mO,aa as WO,ab as fl,ac as wu,ad as jp,b as Pt,ba as XO,bb as _l,bc as Au,bd as Tm,c as fO,ca as YO,cb as hl,cc as vu,cd as Sm,d as Be,da as JO,db as gl,dc as Ou,dd as Em,e as ee,ea as ZO,eb as yl,ec as Ru,ed as wm,f as td,fa as QO,fb as bl,fc as AI,fd as Am,gb as Cl,gc as vI,gd as vm,hb as Tl,hc as OI,hd as Om,i as qe,ib as Sl,ic as RI,id as Rm,j as rd,jb as El,jc as II,jd as Im,k as od,kb as wl,kc as PI,kd as hM,la as Fd,lb as Al,lc as MI,ld as gM,m as pe,mb as vl,mc as kI,md as yM,n as nd,nb as kR,nc as Iu,nd as Pm,o as id,ob as Ol,oc as qI,od as Mm,p as sd,pb as Rl,pc as zI,pd as km,q as ad,qb as Il,qc as VI,qd as xm,r as _O,rb as Pl,rc as HI,rd as Nm,s as hO,sb as xR,sc as KI,sd as Lm,t as gO,tb as Ml,tc as xu,td as Dm,u as yO,ub as kl,uc as Nu,ud as $m,v as bO,vb as xl,vc as Fu,vd as Fm,w as Mt,wb as Nl,wc as Gu,wd as Gm,x as CO,xb as Ll,xc as Uu,xd as Um,y as TO,yb as NR,yc as ju,yd as jm,z as kt,zb as LR,zc as Bu,zd as Bm}from"./chunks/chunk-4UPZLUT2.js";import{$ as Sd,$a as kd,A as mR,B as fR,C as pd,D as md,E as fd,F as _d,G as hd,H as _R,I as gd,J as yd,Ja as Lt,K as bd,Ka as Dt,La as $t,Ma as Ft,Na as wd,Pa as Ad,Qa as vd,Ra as Od,T as hR,U as gR,W as yR,Wa as Rd,X as bR,Xa as Id,Y as CR,Z as Cd,Za as Pd,_ as Td,_a as Md,a as Iw,aa as Ed,ab as xd,b as Pw,ba as Nt,bb as Nd,c as Vi,d as Hi,db as Ld,e as Ki,eb as Dd,f as Wi,fb as $d,g as Xi,i as cd,j as dd,l as ld,m as ud,n as eR,o as tR,p as rR,q as oR,r as nR,s as iR,t as sR,u as aR,v as cR,w as dR,x as lR,y as uR,z as pR}from"./chunks/chunk-V5UGBYHN.js";import{$ as tO,$a as fu,$b as sP,$c as uM,Aa as jl,Ac as xP,Ba as Bl,Bb as mI,Bc as NP,Ca as ql,Cb as fI,Cc as LP,Da as zl,Db as _I,Dc as Ut,Ea as Vl,Eb as hI,Ec as gp,Fa as Hl,Fb as gI,Fc as yp,G as Hv,Ga as Kl,Gb as rp,Gc as bp,H as Kv,Ha as Wl,Hb as op,Hc as Cp,I as Wv,Ia as Xl,Ib as np,Ic as Tp,J as Xv,Ja as Yl,Jb as ip,Jc as Sp,K as Yv,Ka as Jl,Kb as sp,Kc as Ep,L as Jv,La as Zl,Lb as ap,Lc as wp,M as Zv,Ma as Ql,Mb as pp,Mc as Ap,N as Qv,Na as eu,Nb as mp,Nc as vp,O as qc,Oa as tu,Ob as fp,Oc as Op,P as zc,Pa as ru,Pb as _p,Pc as Rp,Q as Vc,Qa as ou,Qb as JI,Qc as Ip,R as Hc,Ra as nu,Rb as ZI,Rc as Pp,S as Kc,Sa as iu,Sb as QI,Sc as Mp,T as Wc,Ta as su,Tb as eP,Tc as kp,U as Xc,Ua as au,Ub as tP,Uc as jt,V as Yc,Va as cu,Vb as rP,Vc as xp,W as Jc,Wa as du,Wb as oP,Wc as DP,X as Zc,Xa as lu,Xc as $P,Y as Qc,Ya as uu,Yb as hp,Yc as FP,Z as je,Za as pu,Zb as nP,Zc as Np,_ as eO,_a as mu,_b as iP,_c as GP,aa as rO,ac as aP,ad as pM,b as Cw,ba as oO,bc as cP,bd as mM,c as Tw,ca as nO,cb as jR,cc as dP,cd as fM,d as Sw,da as iO,db as BR,dc as lP,dd as _M,e as Aw,eb as qR,ec as uP,f as vw,fb as zR,fc as pP,g as Ow,ga as sO,gb as VR,gc as mP,h as Rw,ha as aO,hb as HR,hc as fP,i as Pv,ia as cO,ib as KR,ic as _P,j as Mv,ja as dO,jb as WR,jc as hP,k as kv,ka as lO,kb as XR,kc as gP,l as xv,la as uO,lb as YR,lc as yP,m as Nv,ma as pO,mb as JR,mc as bP,n as Lv,na as ed,nb as ZR,nc as CP,o as Dv,oa as nl,ob as QR,oc as TP,p as $v,pa as il,pc as SP,q as Fv,qa as sl,qc as EP,r as Gv,ra as al,rc as wP,s as Uv,sa as MR,sb as eI,sc as AP,t as jv,tc as vP,u as Bv,ua as cl,ub as tI,uc as OP,v as qv,va as Dl,vb as rI,vc as RP,w as zv,wa as $l,wc as IP,x as Vv,xa as Fl,xb as oI,xc as PP,ya as Gl,yb as nI,yc as MP,za as Ul,zb as iI,zc as kP}from"./chunks/chunk-7TAGYNFP.js";import{$a as iC,$c as an,$d as hn,$f as Zn,$g as Ai,$h as zE,$i as xw,$k as cs,$l as gv,$m as ya,$n as Q,A as Do,Ac as PC,Ad as _T,Ae as kT,Af as SS,Ag as aE,Ah as vE,Ai as ow,Aj as Qw,Ak as xA,Al as bs,Am as Hs,An as Va,Ao as Bc,B as xe,Bc as rn,Bd as hT,Be as xT,Bf as ES,Bg as cE,Bh as OE,Bi as nw,Bj as eA,Bk as NA,Bl as Cs,Bm as Ks,Bn as Ha,Bo as It,C as $o,Cc as MC,Cd as gT,Ce as NT,Cf as wS,Cg as dE,Ch as RE,Ci as iw,Cj as tA,Ck as LA,Cl as Ts,Cm as Ws,Cn as Ka,Dc as kC,Dd as yT,De as LT,Df as AS,Dg as lE,Dh as IE,Di as sw,Dj as rA,Dk as DA,Dl as Ss,Dm as Xs,Dn as Wa,E as Nb,Eb as aC,Ec as xC,Ed as bT,Ee as DT,Ef as vS,Eg as ui,Ei as aw,Ej as oA,Ek as $A,El as Es,Em as Ys,En as Xa,F as Lb,Fc as NC,Fd as CT,Fe as $T,Ff as OS,Fg as pi,Fh as PE,Fi as cw,Fj as nA,Fk as FA,Fl as ws,Fm as Js,Fn as Ya,G as Db,Gb as cC,Gc as LC,Ge as FT,Gf as RS,Gg as L,Gh as Ni,Gi as dw,Gj as iA,Gk as GA,Gl as As,Gn as Ja,H as $b,Hb as dC,Hc as DC,Hd as TT,He as GT,Hg as mi,Hh as Li,Hi as lw,Hj as sA,Hk as UA,Hl as vs,Hm as Zs,Hn as Za,I as Fb,Ib as lC,Ic as $C,Id as ST,Ie as UT,If as IS,Ik as jA,Il as Os,Im as Qs,In as Qa,J as Gb,Jb as uC,Jc as FC,Jd as ET,Je as jT,Jf as PS,Ji as uw,Jj as aA,Jk as BA,Jl as Rs,Jm as ea,Jn as ec,Kb as pC,Kc as on,Kd as wT,Kf as Hn,Ki as pw,Kj as cA,Kk as vt,Kl as Is,Km as ta,Kn as tc,L as Ub,Lc as GC,Ld as AT,Le as BT,Lf as Kn,Li as mw,Lj as dA,Lk as qA,Ll as Ps,Lm as ra,Ln as rc,M as jb,Mc as nn,Md as vT,Me as qT,Mf as Wn,Mh as ME,Mi as fw,Mj as lA,Ml as Ms,Mm as oa,Mn as oc,Na as Zb,Nb as mC,Nd as OT,Ne as zT,Nf as BS,Ng as uE,Nh as kE,Ni as ji,Nj as uA,Nl as ks,Nm as na,Nn as nc,Oa as Qb,Ob as fC,Oc as UC,Od as RT,Oe as VT,Of as qS,Og as pE,Oh as xE,Oi as Bi,Ok as zA,Ol as xs,Om as ia,On as ic,P as Bb,Pa as eC,Pc as jC,Pd as IT,Pe as HT,Pf as zS,Pg as mE,Ph as NE,Pj as pA,Pk as VA,Pl as Ns,Pm as sa,Pn as sc,Qc as BC,Qd as PT,Qe as KT,Qf as VS,Qg as fi,Qh as LE,Qi as qi,Qk as HA,Qm as aa,Qn as ac,Rb as I,Rc as qC,Rd as MT,Re as WT,Rf as HS,Rg as _i,Rh as DE,Ri as _w,Rj as mA,Rk as KA,Rl as dv,Rm as ca,Rn as cc,S as qb,Sa as Vo,Sb as _C,Sc as zC,Sd as dn,Se as XT,Sg as hi,Sj as fA,Sk as WA,Sl as lv,Sm as da,Sn as dc,Ta as tC,Tb as yt,Td as ln,Te as YT,Tf as KS,Tg as gi,Th as $E,Ti as hw,Tj as _A,Tk as XA,Tm as la,Tn as lc,U as zb,Ua as rC,Ub as hC,Ud as un,Ue as JT,Ug as yi,Ui as gw,Uj as hA,Uk as YA,Um as ua,Un as uc,V as Vb,Va as oC,Vd as pn,Ve as ZT,Vg as bi,Vh as FE,Vi as yw,Vj as gA,Vk as JA,Vl as uv,Vm as pa,Vn as pc,W as Hb,Wa as nC,Wb as gC,Wd as mn,We as QT,Wg as Ci,Wh as GE,Wk as os,Wl as pv,Wm as ma,Wn as mc,Xd as fn,Xe as eS,Xg as Ti,Xh as UE,Xi as bw,Xk as ns,Xl as mv,Xm as fa,Xn as fc,Ya as Ho,Yc as bt,Yd as _n,Ye as tS,Yg as Si,Yh as jE,Yk as is,Yl as fv,Ym as _a,Yn as _c,Za as Ko,Zc as Ct,Zd as Le,Ze as rS,Zf as WS,Zg as Ei,Zh as BE,Zi as Mw,Zk as ss,Zl as _v,Zm as ha,_a as Ne,_c as sn,_d as De,_e as Tt,_g as wi,_h as qE,_i as kw,_k as as,_l as hv,_m as ga,_n as Ue,ad as cn,ae as gn,af as St,ag as XS,ah as vi,ai as VE,aj as Nw,am as yv,an as ba,ao as hc,b as vo,ba as Kb,bb as Wo,be as yn,bf as qn,bg as Qn,bh as Oi,bi as HE,bj as Lw,bl as ds,bm as bv,bn as Ca,bo as gc,c as Oo,cb as Xo,cd as VC,ce as bn,cf as zn,ch as Ri,ci as KE,cj as Dw,cl as ls,cm as Cv,cn as Ta,co as yc,d as Ro,da as Wb,dd as HC,de as Cn,df as Et,dg as YS,dh as fE,di as WE,dj as $w,dk as yA,dl as us,dm as Fe,dn as Sa,do as bc,e as Io,eb as Yo,ed as KC,ee as Tn,eg as JS,eh as _E,ei as XE,ek as bA,el as ps,em as Tv,en as Ea,eo as Cc,f as Pe,fd as WC,fe as Sn,ff as oS,fg as ZS,fh as Ii,fi as YE,fj as Fw,fk as CA,fl as ms,fm as Sv,fn as wa,fo as Tc,g as Po,ga as Xb,gc as yC,gd as XC,ge as En,gg as ei,gh as hE,gi as JE,gj as Gw,gk as TA,gl as fs,gm as Ev,gn as Aa,go as Sc,h as N,hc as bC,hd as YC,he as wn,hf as nS,hg as ti,hh as Pi,hk as SA,hl as _s,hm as Rt,hn as va,ho as Ec,i as Me,ic as CC,id as JC,ie as An,if as $e,ig as ri,ih as Mi,ik as EA,il as hs,im as Ge,in as Oa,io as wc,j as Mo,jd as ZC,je as vn,jf as iS,jg as oi,jh as ki,ji as ZE,jj as ts,jk as wA,jl as ZA,jm as wv,jn as Ra,jo as Ac,k as ko,ka as Yb,kc as TC,kd as QC,ke as On,kf as sS,kg as ni,kh as xi,ki as QE,kj as Uw,kk as AA,kl as QA,km as Av,kn as Ia,ko as vc,l as xo,la as ue,lc as SC,ld as eT,le as Rn,lf as aS,lg as ii,li as Di,lj as jw,lk as vA,ll as ev,lm as vv,ln as Pa,lo as Oc,m as No,ma as Jb,md as tT,me as In,mf as cS,mg as si,mi as ew,mj as Bw,mk as At,ml as tv,mm as Ov,mn as Ma,mo as Rc,n as Rb,na as b,nc as EC,nd as rT,ne as Pn,nf as dS,ng as QS,nj as qw,nl as rv,nm as Rv,nn as ka,no as Ic,o as ke,oa as Fo,oc as Qo,od as oT,oe as Mn,of as lS,og as eE,oi as $i,oj as zw,ok as OA,ol as ov,om as Iv,on as xa,oo as Pc,p as ht,pa as Go,pd as nT,pe as kn,pf as uS,pi as Fi,pj as Vw,pl as nv,pm as Ls,pn as Na,po as Mc,q as Ib,qa as Uo,qc as en,qd as iT,qe as xn,qf as pS,qg as ai,qi as Gi,qk as RA,ql as iv,qm as Ds,qn as La,qo as kc,r as Pb,rb as Jo,rc as tn,rd as sT,re as Nn,rf as mS,rg as ci,rh as gE,rj as Hw,rm as $s,rn as Da,ro as xc,s as Mb,sb as Zo,sd as aT,se as Ln,sf as fS,sg as tE,sh as yE,sj as Kw,sm as Fs,sn as $a,so as Nc,t as kb,tb as sC,td as cT,te as Dn,tf as _S,tg as di,th as bE,ti as tw,tj as Ww,tm as Gs,tn as Fa,to as Lc,u as q,ua as jo,uc as wC,ud as dT,ue as $n,uf as hS,ug as li,uh as CE,uj as Xw,uk as IA,ul as Ot,um as Us,un as Ga,uo as Dc,v as xb,vc as AC,vd as lT,ve as Fn,vf as gS,vg as rE,vh as TE,vk as PA,vl as sv,vm as js,vn as Ua,vo as $c,wa as Bo,wc as vC,wd as uT,we as Gn,wf as yS,wg as oE,wh as SE,wj as Yw,wk as MA,wl as av,wm as Bs,wn as ja,wo as Fc,x as Lo,xa as qo,xc as OC,xd as pT,xe as Un,xf as bS,xg as nE,xh as EE,xi as Ui,xj as Jw,xk as rs,xl as cv,xm as qs,xn as Ba,xo as Gc,y as gt,ya as zo,yc as RC,yd as mT,ye as jn,yf as CS,yg as iE,yh as wE,yi as wt,yk as kA,yl as gs,ym as zs,yn as qa,yo as Uc,z as le,zc as IC,zd as fT,ze as Bn,zf as TS,zg as sE,zh as AE,zi as rw,zj as Zw,zl as ys,zm as Vs,zn as za,zo as jc}from"./chunks/chunk-3BTJ66CB.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]="08485124-a2f1-5bb5-9316-533a3f7888bc")}catch{}})();var z="2026-07-28",Vk=["2025-11-25","2025-06-18"],Ke=[z],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},w={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},er=["debug","info","notice","warning","error","critical","alert","emergency"],p=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function kh(e){if(e===void 0)return;if(!_(e))throw new p("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new p("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function xh(e){if(e!==void 0){if(typeof e!="string"||!er.includes(e))throw new p("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...er]});return e}}function We(e){let t=_(e)?e._meta:void 0;if(!_(t))throw new p("Missing required MCP request metadata",m.invalidParams,{required:[w.protocolVersion,w.clientCapabilities]});let r=t[w.protocolVersion];if(typeof r!="string"||!Ke.includes(r))throw new p("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...Ke],requested:typeof r=="string"?r:null});let o=t[w.clientCapabilities];if(!_(o))throw new p("Invalid MCP client capabilities metadata",m.invalidParams,{field:w.clientCapabilities,expected:"object"});let n=kh(t[w.clientInfo]),i=xh(t[w.logLevel]);return{protocolVersion:z,clientCapabilities:o,...n?{clientInfo:n}:{},...i?{logLevel:i}:{}}}function Hk(e,t){if(t!==e.protocolVersion)throw new p("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function Kk(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new p("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function Wk(e,t){let r=e.clientCapabilities.extensions;return _(r)&&_(r[t])}function Xe(e,t){let r=_(e._meta)?e._meta:{};return{...e,_meta:{...r,[w.serverInfo]:{...t}}}}function Nh(e,t){return Xe({...e,resultType:"complete"},t)}function Xk(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new p("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return Nh({supportedVersions:[...Ke],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function Yk(e,t){if(_(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new p("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}import{createHash as or,createHmac as nr,timingSafeEqual as Lh}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]="6505e714-d1f3-5794-88c8-51c1644acec9")}catch{}})();var Dh=["elicitation/create","roots/list","sampling/createMessage"],tr=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},ir=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,fe=32,Je=64*1024,_e=16*1024,Ye={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function $h(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function he(e,t,r){let o;try{o=JSON.stringify(e)}catch{throw new p(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new p(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function Ze(e,t){if(!_(e))throw new p("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>fe)throw new p("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:fe,observed:r.length});let o={};for(let[n,i]of r){if(!ir.test(n)||!_(i))throw new p("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let s=i.method;if(typeof s!="string"||!Dh.includes(s))throw new p("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:s??null});let a=$h(s);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new p("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!_(i.params))throw new p("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${n}.params`,expected:"object"});o[n]={method:s,params:structuredClone(i.params)}}return he(o,Je,"inputRequests"),o}function sr(e){if(!_(e))throw new p("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>fe)throw new p("Invalid MCP inputResponses count",m.invalidParams,{maximum:fe,observed:t.length});let r={};for(let[o,n]of t){if(!ir.test(o)||!_(n))throw new p("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return he(r,Je,"inputResponses"),r}function ex(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>_e)throw new p("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:_e});let r=e.inputRequests===void 0?void 0:Ze(e.inputRequests,e.requestContext);if(r===void 0&&!t)throw new p("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[w.serverInfo]:{...e.serverInfo}}}}function ar(e){let t=Buffer.from(e);if(t.byteLength<32)throw new p("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function tx(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new p("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>_e/2)throw new p("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:_e/2});let o=r.toString("base64url"),n=nr("sha256",ar(t)).update(o).digest("base64url");return`${o}.${n}`}function Fh(e){if(!_(e)||e.version!==1)throw new p("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:i}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new p("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new p("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:i}}function rx(e,t,r){let[o,n,i]=e.split(".");if(!o||!n||i!==void 0)throw new p("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let s=Buffer.from(n,"base64url"),a=nr("sha256",ar(t)).update(o).digest();if(s.byteLength!==a.byteLength||!Lh(s,a))throw new p("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let c;try{c=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{c=null}let d=Fh(c),{expiresAt:l,method:u,parameterDigest:f,principal:g}=d;if(l<(r.nowMs??Date.now()))throw new p("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(u!==r.method||f!==r.parameterDigest||g!==r.principal)throw new p("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return d}function ox(e){return he(e,Je,"request parameters"),or("sha256").update(JSON.stringify(e)).digest("hex")}var rr=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new p("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=or("sha256").update(t).digest("hex");if(this.#e.has(r))throw new p("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function Gh(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new p("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function nx(e,t){return{...e,...Gh(t)}}function Uh(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function jh(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Uh)){if(!_(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Bh(e){let t=e.maxBytes??Ye.maxBytes,r=e.maxDepth??Ye.maxDepth,o=e.maxNodes??Ye.maxNodes;if(!Number.isSafeInteger(t)||t<2)throw new p("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new p("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new p("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function qh(e,t){let r=Array.isArray(e.value)?e.value:_(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function zh(e,t){if(!_(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&jh(e,r)===void 0)throw new p("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function ix(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Bh(t);if(typeof e!="boolean"&&!_(e))throw new p("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});he(e,r,"JSON Schema");let i=[{value:e,depth:0}],s=0;for(;i.length>0;){let a=i.pop();if(s+=1,s>n||a.depth>o)throw new p("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});zh(e,a.value),qh(a,i)}return structuredClone(e)}import{randomUUID as Vh}from"node:crypto";import{readFile as Hh}from"node:fs/promises";import cr 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]="7f5b3ba6-07cf-5317-8f62-63e84f561232")}catch{}})();var mx="io.modelcontextprotocol/tasks",Kh=["working","input_required","completed","failed","cancelled"],Wh=/^mcp-task-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu,Xh=3600*1e3,Yh=1e3,ye=1024,Jh=30,Zh=2e3;function Qe(e){return new p(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function ge(e){let t=e.trim();if(!Wh.test(t))throw Qe("Unknown MCP task");return t}function dr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new p("Corrupt MCP task record",m.invalidParams,{field:t});return e}function lr(e){if(!_(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new p("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,ye),..._(e.data)?{data:structuredClone(e.data)}:{}}}function Qh(e){if(!Kh.includes(e))throw new p("Corrupt MCP task record",m.invalidParams);return e}function eg(e){if(typeof e!="string"||e.length===0)throw new p("Corrupt MCP task record",m.invalidParams);return e}function tg(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new p("Corrupt MCP task record",m.invalidParams);return e}function rg(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new p("Corrupt MCP task record",m.invalidParams);return e}function og(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new p("Corrupt MCP task record",m.invalidParams);return e}}function ng(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new p("Corrupt MCP task record",m.invalidParams);return[...e]}function ig(e){if(!_(e)||e.version!==1)throw new p("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?ge(e.taskId):"",r=Qh(e.status),o=eg(e.principal),n=tg(e.workerPid),i=rg(e.ttlMs),s=og(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:dr(e.createdAt,"createdAt"),lastUpdatedAt:dr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:i,consumedInputKeys:ng(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,ye)}:{},...typeof s=="number"?{pollIntervalMs:s}:{}};if(_(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),_(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),_(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=lr(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new p("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function V(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function te(e){return e==="completed"||e==="failed"||e==="cancelled"}function sg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var et=class{#e;#t;#r;#o;#i;constructor(t){this.#e=cr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Vh()}`),this.#i=t.workerPid??process.pid}#s(t){return cr.join(this.#e,"runtime","mcp-tasks","records",`${ge(t)}.json`)}async#c(t){try{return ig(JSON.parse(await Hh(this.#s(t),"utf8")))}catch(r){throw le(r)||r instanceof SyntaxError?Qe("Unknown MCP task"):r}}async#a(t){await xe(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
1
+ import{A as PM,B as MM,C as kM,D as xM,E as NM,a as Vn,b as $S,c as FS,d as GS,e as US,f as jS,g as Yi,h as Ji,i as Zi,j as Qi,k as es,l as OM,m as RM,n as Ch,o as Th,p as Sh,r as Eh,s as wh,t as Ah,u as vh,v as Oh,w as Rh,x as Ih,y as Ph,z as IM}from"./chunks/chunk-OYCCWPBM.js";import{A as Ck,B as Tk,C as Sk,D as Ek,E as wk,F as Ak,G as vk,H as Ok,I as Rk,J as Ik,K as Pk,L as Mk,M as kk,N as xk,O as Nk,P as Lk,Q as Dk,R as $k,S as Fk,T as Gk,U as Uk,V as jk,W as Bk,X as qk,Y as zk,a as WM,b as XM,c as YM,d as JM,e as ZM,f as QM,g as ek,h as tk,i as rk,j as ok,k as nk,l as ik,m as sk,n as ak,o as ck,p as dk,q as lk,r as uk,s as pk,t as mk,u as fk,v as _k,w as hk,x as gk,y as yk,z as bk}from"./chunks/chunk-35DME35A.js";import{a as Mh}from"./chunks/chunk-CPOWTIIS.js";import{a as LM,b as DM,c as $M,d as FM}from"./chunks/chunk-PLNNUAFZ.js";import{a as GM,b as UM,c as jM,d as BM,e as qM,f as zM,g as VM,h as HM,i as KM}from"./chunks/chunk-YERBAGQD.js";import{$ as rm,$a as Kf,$b as K_,A as Ve,Aa as _f,Ab as C_,B as Bp,Ba as hf,Bb as T_,C as qp,Ca as gf,Cb as S_,D as zp,Da as yf,Db as E_,E as Vp,Ea as bf,Eb as w_,F as Hp,Fa as Cf,Fb as A_,G as Bt,Ga as Tf,Gb as v_,H as qt,Ha as Sf,Hb as O_,I as zt,Ia as Ef,Ib as R_,J as Vt,Ja as wf,Jb as I_,K as Ht,Ka as Af,Kb as P_,L as Kt,La as vf,Lb as M_,M as Wt,Ma as Of,Mb as k_,N as Xt,Na as Rf,Nb as x_,O as Yt,Oa as If,Ob as N_,P as Jt,Pa as Pf,Pb as L_,Q as Zt,Qa as Mf,Qb as D_,R as Kp,Ra as kf,Rb as $_,S as Wp,Sa as xf,Sb as F_,T as Xp,Ta as Nf,Tb as G_,U as Yp,Ua as Lf,Ub as U_,V as Jp,Va as Qt,Vb as j_,W as He,Wa as me,Wb as B_,X as Zp,Xa as qf,Xb as q_,Y as Qp,Ya as zf,Yb as z_,Z as em,Za as Vf,Zb as V_,_ as tm,_a as Hf,_b as H_,a as MS,aa as om,ab as Wf,ac as W_,b as kS,ba as nm,bb as Xf,bc as X_,c as xS,ca as im,cb as Yf,cc as Y_,d as NS,da as cM,db as Jf,dc as J_,e as LS,ea as dM,eb as Zf,ec as Z_,f as DS,fa as lM,fb as Qf,fc as Q_,g as Xn,ga as ym,gb as e_,gc as eh,h as Yn,ha as bm,hb as t_,hc as th,i as Jn,ia as Cm,ib as r_,ic as rh,j as Ew,ja as sf,jb as o_,jc as oh,k as ww,ka as af,kb as n_,kc as nh,l as zi,la as bM,lb as i_,lc as ih,m as TR,ma as CM,mb as s_,mc as sh,n as SR,na as TM,nb as a_,nc as ah,o as ER,oa as SM,ob as c_,oc as ch,p as wR,pa as EM,pb as d_,pc as dh,q as AR,qa as wM,qb as l_,qc as lh,r as vR,ra as AM,rb as u_,rc as uh,s as tl,sa as vM,sb as p_,sc as ph,t as Mu,ta as cf,tb as m_,tc as mh,u as ku,ua as df,ub as f_,uc as fh,v as Du,va as lf,vb as __,vc as _h,w as $u,wa as uf,wb as h_,wc as hh,x as tp,xa as pf,xb as g_,xc as gh,y as cp,ya as mf,yb as y_,yc as yh,z as YI,za as ff,zb as b_,zc as bh}from"./chunks/chunk-PR4UAMI5.js";import{e as IR,f as PR,g as rl,h as ol,i as Gt}from"./chunks/chunk-UT7GRGHY.js";import{A as JP,B as ZP,C as QP,D as eM,E as tM,F as rM,G as oM,H as nM,I as iM,J as sM,K as aM,L as cm,M as dm,N as lm,O as um,P as pm,Q as mm,R as fm,S as _m,T as hm,U as gm,a as xI,b as NI,c as LI,d as DI,e as $I,f as Pu,g as FI,h as GI,i as UI,j as jI,k as BI,m as Lu,n as sm,o as UP,p as jP,q as BP,r as qP,s as zP,t as VP,u as am,v as HP,w as KP,x as WP,y as XP,z as YP}from"./chunks/chunk-NEUIVBFO.js";import{$ as KO,$a as ml,$b as Eu,$c as Up,A as SO,Ab as DR,Ac as qu,Ad as qm,B as EO,Bb as $R,Bc as zu,Bd as zm,C as wO,Cb as FR,Cc as Vu,Cd as Vm,D as AO,Db as GR,Dc as Hu,Dd as Hm,E as vO,Ea as Gd,Eb as UR,Ec as Ku,Ed as Km,F as ze,Fa as Ud,Fb as sI,Fc as Wu,Fd as Wm,G as OO,Ga as jd,Gb as aI,Gc as Xu,Gd as Xm,H as xt,Ha as Bd,Hb as cI,Hc as Yu,Hd as Ym,I as RO,Ia as qd,Ib as dI,Ic as Ju,Id as Jm,J as IO,Jb as lI,Jc as Zu,Jd as Zm,K as PO,Ka as zd,Kb as uI,Kc as Qu,Kd as Qm,L as MO,La as Vd,Lb as pI,Ld as ef,M as kO,Ma as Hd,Mb as yI,Mc as WI,Md as tf,N as xO,Na as Kd,Nb as bI,Nc as XI,Nd as rf,O as NO,Oa as OR,Ob as _u,Oc as ep,Od as of,P as LO,Pa as RR,Pb as hu,Pc as dp,Pd as nf,Q as DO,Qa as Wd,Qb as CI,Qd as Df,R as $O,Ra as Xd,Rb as TI,Rd as $f,S as FO,Sa as Yd,Sb as SI,Sd as Ff,T as GO,Ta as Jd,Tb as EI,Tc as lp,Td as Gf,U as UO,Ua as Zd,Ub as wI,Ud as Uf,V as jO,Va as Qd,Vb as gu,Vc as up,Vd as jf,W as BO,Wa as el,Wb as yu,Wc as Lp,Wd as Bf,X as qO,Xa as dl,Xb as bu,Xc as Dp,Y as zO,Ya as ll,Yb as Cu,Yc as $p,Z as VO,Za as ul,Zb as Tu,Zc as Fp,_ as HO,_a as pl,_b as Su,_c as Gp,a as mO,aa as WO,ab as fl,ac as wu,ad as jp,b as Pt,ba as XO,bb as _l,bc as Au,bd as Tm,c as fO,ca as YO,cb as hl,cc as vu,cd as Sm,d as Be,da as JO,db as gl,dc as Ou,dd as Em,e as ee,ea as ZO,eb as yl,ec as Ru,ed as wm,f as td,fa as QO,fb as bl,fc as AI,fd as Am,gb as Cl,gc as vI,gd as vm,hb as Tl,hc as OI,hd as Om,i as qe,ib as Sl,ic as RI,id as Rm,j as rd,jb as El,jc as II,jd as Im,k as od,kb as wl,kc as PI,kd as hM,la as Fd,lb as Al,lc as MI,ld as gM,m as pe,mb as vl,mc as kI,md as yM,n as nd,nb as kR,nc as Iu,nd as Pm,o as id,ob as Ol,oc as qI,od as Mm,p as sd,pb as Rl,pc as zI,pd as km,q as ad,qb as Il,qc as VI,qd as xm,r as _O,rb as Pl,rc as HI,rd as Nm,s as hO,sb as xR,sc as KI,sd as Lm,t as gO,tb as Ml,tc as xu,td as Dm,u as yO,ub as kl,uc as Nu,ud as $m,v as bO,vb as xl,vc as Fu,vd as Fm,w as Mt,wb as Nl,wc as Gu,wd as Gm,x as CO,xb as Ll,xc as Uu,xd as Um,y as TO,yb as NR,yc as ju,yd as jm,z as kt,zb as LR,zc as Bu,zd as Bm}from"./chunks/chunk-ZFHJP7YD.js";import{$ as Sd,$a as kd,A as mR,B as fR,C as pd,D as md,E as fd,F as _d,G as hd,H as _R,I as gd,J as yd,Ja as Lt,K as bd,Ka as Dt,La as $t,Ma as Ft,Na as wd,Pa as Ad,Qa as vd,Ra as Od,T as hR,U as gR,W as yR,Wa as Rd,X as bR,Xa as Id,Y as CR,Z as Cd,Za as Pd,_ as Td,_a as Md,a as Iw,aa as Ed,ab as xd,b as Pw,ba as Nt,bb as Nd,c as Vi,d as Hi,db as Ld,e as Ki,eb as Dd,f as Wi,fb as $d,g as Xi,i as cd,j as dd,l as ld,m as ud,n as eR,o as tR,p as rR,q as oR,r as nR,s as iR,t as sR,u as aR,v as cR,w as dR,x as lR,y as uR,z as pR}from"./chunks/chunk-VMJLM7P2.js";import{$ as tO,$a as fu,$b as sP,$c as uM,Aa as jl,Ac as xP,Ba as Bl,Bb as mI,Bc as NP,Ca as ql,Cb as fI,Cc as LP,Da as zl,Db as _I,Dc as Ut,Ea as Vl,Eb as hI,Ec as gp,Fa as Hl,Fb as gI,Fc as yp,G as Hv,Ga as Kl,Gb as rp,Gc as bp,H as Kv,Ha as Wl,Hb as op,Hc as Cp,I as Wv,Ia as Xl,Ib as np,Ic as Tp,J as Xv,Ja as Yl,Jb as ip,Jc as Sp,K as Yv,Ka as Jl,Kb as sp,Kc as Ep,L as Jv,La as Zl,Lb as ap,Lc as wp,M as Zv,Ma as Ql,Mb as pp,Mc as Ap,N as Qv,Na as eu,Nb as mp,Nc as vp,O as qc,Oa as tu,Ob as fp,Oc as Op,P as zc,Pa as ru,Pb as _p,Pc as Rp,Q as Vc,Qa as ou,Qb as JI,Qc as Ip,R as Hc,Ra as nu,Rb as ZI,Rc as Pp,S as Kc,Sa as iu,Sb as QI,Sc as Mp,T as Wc,Ta as su,Tb as eP,Tc as kp,U as Xc,Ua as au,Ub as tP,Uc as jt,V as Yc,Va as cu,Vb as rP,Vc as xp,W as Jc,Wa as du,Wb as oP,Wc as DP,X as Zc,Xa as lu,Xc as $P,Y as Qc,Ya as uu,Yb as hp,Yc as FP,Z as je,Za as pu,Zb as nP,Zc as Np,_ as eO,_a as mu,_b as iP,_c as GP,aa as rO,ac as aP,ad as pM,b as Cw,ba as oO,bc as cP,bd as mM,c as Tw,ca as nO,cb as jR,cc as dP,cd as fM,d as Sw,da as iO,db as BR,dc as lP,dd as _M,e as Aw,eb as qR,ec as uP,f as vw,fb as zR,fc as pP,g as Ow,ga as sO,gb as VR,gc as mP,h as Rw,ha as aO,hb as HR,hc as fP,i as Pv,ia as cO,ib as KR,ic as _P,j as Mv,ja as dO,jb as WR,jc as hP,k as kv,ka as lO,kb as XR,kc as gP,l as xv,la as uO,lb as YR,lc as yP,m as Nv,ma as pO,mb as JR,mc as bP,n as Lv,na as ed,nb as ZR,nc as CP,o as Dv,oa as nl,ob as QR,oc as TP,p as $v,pa as il,pc as SP,q as Fv,qa as sl,qc as EP,r as Gv,ra as al,rc as wP,s as Uv,sa as MR,sb as eI,sc as AP,t as jv,tc as vP,u as Bv,ua as cl,ub as tI,uc as OP,v as qv,va as Dl,vb as rI,vc as RP,w as zv,wa as $l,wc as IP,x as Vv,xa as Fl,xb as oI,xc as PP,ya as Gl,yb as nI,yc as MP,za as Ul,zb as iI,zc as kP}from"./chunks/chunk-GLH2LNRH.js";import{$a as iC,$c as an,$d as hn,$f as Zn,$g as Ai,$h as zE,$i as xw,$k as cs,$l as gv,$m as ya,$n as Q,A as Do,Ac as PC,Ad as _T,Ae as kT,Af as SS,Ag as aE,Ah as vE,Ai as ow,Aj as Qw,Ak as xA,Al as bs,Am as Hs,An as Va,Ao as Bc,B as xe,Bc as rn,Bd as hT,Be as xT,Bf as ES,Bg as cE,Bh as OE,Bi as nw,Bj as eA,Bk as NA,Bl as Cs,Bm as Ks,Bn as Ha,Bo as It,C as $o,Cc as MC,Cd as gT,Ce as NT,Cf as wS,Cg as dE,Ch as RE,Ci as iw,Cj as tA,Ck as LA,Cl as Ts,Cm as Ws,Cn as Ka,Dc as kC,Dd as yT,De as LT,Df as AS,Dg as lE,Dh as IE,Di as sw,Dj as rA,Dk as DA,Dl as Ss,Dm as Xs,Dn as Wa,E as Nb,Eb as aC,Ec as xC,Ed as bT,Ee as DT,Ef as vS,Eg as ui,Ei as aw,Ej as oA,Ek as $A,El as Es,Em as Ys,En as Xa,F as Lb,Fc as NC,Fd as CT,Fe as $T,Ff as OS,Fg as pi,Fh as PE,Fi as cw,Fj as nA,Fk as FA,Fl as ws,Fm as Js,Fn as Ya,G as Db,Gb as cC,Gc as LC,Ge as FT,Gf as RS,Gg as L,Gh as Ni,Gi as dw,Gj as iA,Gk as GA,Gl as As,Gn as Ja,H as $b,Hb as dC,Hc as DC,Hd as TT,He as GT,Hg as mi,Hh as Li,Hi as lw,Hj as sA,Hk as UA,Hl as vs,Hm as Zs,Hn as Za,I as Fb,Ib as lC,Ic as $C,Id as ST,Ie as UT,If as IS,Ik as jA,Il as Os,Im as Qs,In as Qa,J as Gb,Jb as uC,Jc as FC,Jd as ET,Je as jT,Jf as PS,Ji as uw,Jj as aA,Jk as BA,Jl as Rs,Jm as ea,Jn as ec,Kb as pC,Kc as on,Kd as wT,Kf as Hn,Ki as pw,Kj as cA,Kk as vt,Kl as Is,Km as ta,Kn as tc,L as Ub,Lc as GC,Ld as AT,Le as BT,Lf as Kn,Li as mw,Lj as dA,Lk as qA,Ll as Ps,Lm as ra,Ln as rc,M as jb,Mc as nn,Md as vT,Me as qT,Mf as Wn,Mh as ME,Mi as fw,Mj as lA,Ml as Ms,Mm as oa,Mn as oc,Na as Zb,Nb as mC,Nd as OT,Ne as zT,Nf as BS,Ng as uE,Nh as kE,Ni as ji,Nj as uA,Nl as ks,Nm as na,Nn as nc,Oa as Qb,Ob as fC,Oc as UC,Od as RT,Oe as VT,Of as qS,Og as pE,Oh as xE,Oi as Bi,Ok as zA,Ol as xs,Om as ia,On as ic,P as Bb,Pa as eC,Pc as jC,Pd as IT,Pe as HT,Pf as zS,Pg as mE,Ph as NE,Pj as pA,Pk as VA,Pl as Ns,Pm as sa,Pn as sc,Qc as BC,Qd as PT,Qe as KT,Qf as VS,Qg as fi,Qh as LE,Qi as qi,Qk as HA,Qm as aa,Qn as ac,Rb as I,Rc as qC,Rd as MT,Re as WT,Rf as HS,Rg as _i,Rh as DE,Ri as _w,Rj as mA,Rk as KA,Rl as dv,Rm as ca,Rn as cc,S as qb,Sa as Vo,Sb as _C,Sc as zC,Sd as dn,Se as XT,Sg as hi,Sj as fA,Sk as WA,Sl as lv,Sm as da,Sn as dc,Ta as tC,Tb as yt,Td as ln,Te as YT,Tf as KS,Tg as gi,Th as $E,Ti as hw,Tj as _A,Tk as XA,Tm as la,Tn as lc,U as zb,Ua as rC,Ub as hC,Ud as un,Ue as JT,Ug as yi,Ui as gw,Uj as hA,Uk as YA,Um as ua,Un as uc,V as Vb,Va as oC,Vd as pn,Ve as ZT,Vg as bi,Vh as FE,Vi as yw,Vj as gA,Vk as JA,Vl as uv,Vm as pa,Vn as pc,W as Hb,Wa as nC,Wb as gC,Wd as mn,We as QT,Wg as Ci,Wh as GE,Wk as os,Wl as pv,Wm as ma,Wn as mc,Xd as fn,Xe as eS,Xg as Ti,Xh as UE,Xi as bw,Xk as ns,Xl as mv,Xm as fa,Xn as fc,Ya as Ho,Yc as bt,Yd as _n,Ye as tS,Yg as Si,Yh as jE,Yk as is,Yl as fv,Ym as _a,Yn as _c,Za as Ko,Zc as Ct,Zd as Le,Ze as rS,Zf as WS,Zg as Ei,Zh as BE,Zi as Mw,Zk as ss,Zl as _v,Zm as ha,_a as Ne,_c as sn,_d as De,_e as Tt,_g as wi,_h as qE,_i as kw,_k as as,_l as hv,_m as ga,_n as Ue,ad as cn,ae as gn,af as St,ag as XS,ah as vi,ai as VE,aj as Nw,am as yv,an as ba,ao as hc,b as vo,ba as Kb,bb as Wo,be as yn,bf as qn,bg as Qn,bh as Oi,bi as HE,bj as Lw,bl as ds,bm as bv,bn as Ca,bo as gc,c as Oo,cb as Xo,cd as VC,ce as bn,cf as zn,ch as Ri,ci as KE,cj as Dw,cl as ls,cm as Cv,cn as Ta,co as yc,d as Ro,da as Wb,dd as HC,de as Cn,df as Et,dg as YS,dh as fE,di as WE,dj as $w,dk as yA,dl as us,dm as Fe,dn as Sa,do as bc,e as Io,eb as Yo,ed as KC,ee as Tn,eg as JS,eh as _E,ei as XE,ek as bA,el as ps,em as Tv,en as Ea,eo as Cc,f as Pe,fd as WC,fe as Sn,ff as oS,fg as ZS,fh as Ii,fi as YE,fj as Fw,fk as CA,fl as ms,fm as Sv,fn as wa,fo as Tc,g as Po,ga as Xb,gc as yC,gd as XC,ge as En,gg as ei,gh as hE,gi as JE,gj as Gw,gk as TA,gl as fs,gm as Ev,gn as Aa,go as Sc,h as N,hc as bC,hd as YC,he as wn,hf as nS,hg as ti,hh as Pi,hk as SA,hl as _s,hm as Rt,hn as va,ho as Ec,i as Me,ic as CC,id as JC,ie as An,if as $e,ig as ri,ih as Mi,ik as EA,il as hs,im as Ge,in as Oa,io as wc,j as Mo,jd as ZC,je as vn,jf as iS,jg as oi,jh as ki,ji as ZE,jj as ts,jk as wA,jl as ZA,jm as wv,jn as Ra,jo as Ac,k as ko,ka as Yb,kc as TC,kd as QC,ke as On,kf as sS,kg as ni,kh as xi,ki as QE,kj as Uw,kk as AA,kl as QA,km as Av,kn as Ia,ko as vc,l as xo,la as ue,lc as SC,ld as eT,le as Rn,lf as aS,lg as ii,li as Di,lj as jw,lk as vA,ll as ev,lm as vv,ln as Pa,lo as Oc,m as No,ma as Jb,md as tT,me as In,mf as cS,mg as si,mi as ew,mj as Bw,mk as At,ml as tv,mm as Ov,mn as Ma,mo as Rc,n as Rb,na as b,nc as EC,nd as rT,ne as Pn,nf as dS,ng as QS,nj as qw,nl as rv,nm as Rv,nn as ka,no as Ic,o as ke,oa as Fo,oc as Qo,od as oT,oe as Mn,of as lS,og as eE,oi as $i,oj as zw,ok as OA,ol as ov,om as Iv,on as xa,oo as Pc,p as ht,pa as Go,pd as nT,pe as kn,pf as uS,pi as Fi,pj as Vw,pl as nv,pm as Ls,pn as Na,po as Mc,q as Ib,qa as Uo,qc as en,qd as iT,qe as xn,qf as pS,qg as ai,qi as Gi,qk as RA,ql as iv,qm as Ds,qn as La,qo as kc,r as Pb,rb as Jo,rc as tn,rd as sT,re as Nn,rf as mS,rg as ci,rh as gE,rj as Hw,rm as $s,rn as Da,ro as xc,s as Mb,sb as Zo,sd as aT,se as Ln,sf as fS,sg as tE,sh as yE,sj as Kw,sm as Fs,sn as $a,so as Nc,t as kb,tb as sC,td as cT,te as Dn,tf as _S,tg as di,th as bE,ti as tw,tj as Ww,tm as Gs,tn as Fa,to as Lc,u as q,ua as jo,uc as wC,ud as dT,ue as $n,uf as hS,ug as li,uh as CE,uj as Xw,uk as IA,ul as Ot,um as Us,un as Ga,uo as Dc,v as xb,vc as AC,vd as lT,ve as Fn,vf as gS,vg as rE,vh as TE,vk as PA,vl as sv,vm as js,vn as Ua,vo as $c,wa as Bo,wc as vC,wd as uT,we as Gn,wf as yS,wg as oE,wh as SE,wj as Yw,wk as MA,wl as av,wm as Bs,wn as ja,wo as Fc,x as Lo,xa as qo,xc as OC,xd as pT,xe as Un,xf as bS,xg as nE,xh as EE,xi as Ui,xj as Jw,xk as rs,xl as cv,xm as qs,xn as Ba,xo as Gc,y as gt,ya as zo,yc as RC,yd as mT,ye as jn,yf as CS,yg as iE,yh as wE,yi as wt,yk as kA,yl as gs,ym as zs,yn as qa,yo as Uc,z as le,zc as IC,zd as fT,ze as Bn,zf as TS,zg as sE,zh as AE,zi as rw,zj as Zw,zl as ys,zm as Vs,zn as za,zo as jc}from"./chunks/chunk-NBDB3SRC.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]="08485124-a2f1-5bb5-9316-533a3f7888bc")}catch{}})();var z="2026-07-28",Vk=["2025-11-25","2025-06-18"],Ke=[z],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},w={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},er=["debug","info","notice","warning","error","critical","alert","emergency"],p=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function kh(e){if(e===void 0)return;if(!_(e))throw new p("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new p("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function xh(e){if(e!==void 0){if(typeof e!="string"||!er.includes(e))throw new p("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...er]});return e}}function We(e){let t=_(e)?e._meta:void 0;if(!_(t))throw new p("Missing required MCP request metadata",m.invalidParams,{required:[w.protocolVersion,w.clientCapabilities]});let r=t[w.protocolVersion];if(typeof r!="string"||!Ke.includes(r))throw new p("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...Ke],requested:typeof r=="string"?r:null});let o=t[w.clientCapabilities];if(!_(o))throw new p("Invalid MCP client capabilities metadata",m.invalidParams,{field:w.clientCapabilities,expected:"object"});let n=kh(t[w.clientInfo]),i=xh(t[w.logLevel]);return{protocolVersion:z,clientCapabilities:o,...n?{clientInfo:n}:{},...i?{logLevel:i}:{}}}function Hk(e,t){if(t!==e.protocolVersion)throw new p("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function Kk(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new p("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function Wk(e,t){let r=e.clientCapabilities.extensions;return _(r)&&_(r[t])}function Xe(e,t){let r=_(e._meta)?e._meta:{};return{...e,_meta:{...r,[w.serverInfo]:{...t}}}}function Nh(e,t){return Xe({...e,resultType:"complete"},t)}function Xk(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new p("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return Nh({supportedVersions:[...Ke],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function Yk(e,t){if(_(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new p("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}import{createHash as or,createHmac as nr,timingSafeEqual as Lh}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]="6505e714-d1f3-5794-88c8-51c1644acec9")}catch{}})();var Dh=["elicitation/create","roots/list","sampling/createMessage"],tr=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},ir=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,fe=32,Je=64*1024,_e=16*1024,Ye={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function $h(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function he(e,t,r){let o;try{o=JSON.stringify(e)}catch{throw new p(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new p(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function Ze(e,t){if(!_(e))throw new p("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>fe)throw new p("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:fe,observed:r.length});let o={};for(let[n,i]of r){if(!ir.test(n)||!_(i))throw new p("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let s=i.method;if(typeof s!="string"||!Dh.includes(s))throw new p("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:s??null});let a=$h(s);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new p("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!_(i.params))throw new p("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${n}.params`,expected:"object"});o[n]={method:s,params:structuredClone(i.params)}}return he(o,Je,"inputRequests"),o}function sr(e){if(!_(e))throw new p("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>fe)throw new p("Invalid MCP inputResponses count",m.invalidParams,{maximum:fe,observed:t.length});let r={};for(let[o,n]of t){if(!ir.test(o)||!_(n))throw new p("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return he(r,Je,"inputResponses"),r}function ex(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>_e)throw new p("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:_e});let r=e.inputRequests===void 0?void 0:Ze(e.inputRequests,e.requestContext);if(r===void 0&&!t)throw new p("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[w.serverInfo]:{...e.serverInfo}}}}function ar(e){let t=Buffer.from(e);if(t.byteLength<32)throw new p("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function tx(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new p("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>_e/2)throw new p("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:_e/2});let o=r.toString("base64url"),n=nr("sha256",ar(t)).update(o).digest("base64url");return`${o}.${n}`}function Fh(e){if(!_(e)||e.version!==1)throw new p("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:i}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new p("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new p("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:i}}function rx(e,t,r){let[o,n,i]=e.split(".");if(!o||!n||i!==void 0)throw new p("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let s=Buffer.from(n,"base64url"),a=nr("sha256",ar(t)).update(o).digest();if(s.byteLength!==a.byteLength||!Lh(s,a))throw new p("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let c;try{c=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{c=null}let d=Fh(c),{expiresAt:l,method:u,parameterDigest:f,principal:g}=d;if(l<(r.nowMs??Date.now()))throw new p("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(u!==r.method||f!==r.parameterDigest||g!==r.principal)throw new p("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return d}function ox(e){return he(e,Je,"request parameters"),or("sha256").update(JSON.stringify(e)).digest("hex")}var rr=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new p("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=or("sha256").update(t).digest("hex");if(this.#e.has(r))throw new p("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function Gh(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new p("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function nx(e,t){return{...e,...Gh(t)}}function Uh(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function jh(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Uh)){if(!_(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Bh(e){let t=e.maxBytes??Ye.maxBytes,r=e.maxDepth??Ye.maxDepth,o=e.maxNodes??Ye.maxNodes;if(!Number.isSafeInteger(t)||t<2)throw new p("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new p("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new p("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function qh(e,t){let r=Array.isArray(e.value)?e.value:_(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function zh(e,t){if(!_(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&jh(e,r)===void 0)throw new p("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function ix(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Bh(t);if(typeof e!="boolean"&&!_(e))throw new p("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});he(e,r,"JSON Schema");let i=[{value:e,depth:0}],s=0;for(;i.length>0;){let a=i.pop();if(s+=1,s>n||a.depth>o)throw new p("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});zh(e,a.value),qh(a,i)}return structuredClone(e)}import{randomUUID as Vh}from"node:crypto";import{readFile as Hh}from"node:fs/promises";import cr 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]="7f5b3ba6-07cf-5317-8f62-63e84f561232")}catch{}})();var mx="io.modelcontextprotocol/tasks",Kh=["working","input_required","completed","failed","cancelled"],Wh=/^mcp-task-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu,Xh=3600*1e3,Yh=1e3,ye=1024,Jh=30,Zh=2e3;function Qe(e){return new p(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function ge(e){let t=e.trim();if(!Wh.test(t))throw Qe("Unknown MCP task");return t}function dr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new p("Corrupt MCP task record",m.invalidParams,{field:t});return e}function lr(e){if(!_(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new p("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,ye),..._(e.data)?{data:structuredClone(e.data)}:{}}}function Qh(e){if(!Kh.includes(e))throw new p("Corrupt MCP task record",m.invalidParams);return e}function eg(e){if(typeof e!="string"||e.length===0)throw new p("Corrupt MCP task record",m.invalidParams);return e}function tg(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new p("Corrupt MCP task record",m.invalidParams);return e}function rg(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new p("Corrupt MCP task record",m.invalidParams);return e}function og(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new p("Corrupt MCP task record",m.invalidParams);return e}}function ng(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new p("Corrupt MCP task record",m.invalidParams);return[...e]}function ig(e){if(!_(e)||e.version!==1)throw new p("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?ge(e.taskId):"",r=Qh(e.status),o=eg(e.principal),n=tg(e.workerPid),i=rg(e.ttlMs),s=og(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:dr(e.createdAt,"createdAt"),lastUpdatedAt:dr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:i,consumedInputKeys:ng(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,ye)}:{},...typeof s=="number"?{pollIntervalMs:s}:{}};if(_(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),_(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),_(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=lr(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new p("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function V(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function te(e){return e==="completed"||e==="failed"||e==="cancelled"}function sg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var et=class{#e;#t;#r;#o;#i;constructor(t){this.#e=cr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Vh()}`),this.#i=t.workerPid??process.pid}#s(t){return cr.join(this.#e,"runtime","mcp-tasks","records",`${ge(t)}.json`)}async#c(t){try{return ig(JSON.parse(await Hh(this.#s(t),"utf8")))}catch(r){throw le(r)||r instanceof SyntaxError?Qe("Unknown MCP task"):r}}async#a(t){await xe(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
2
2
  `)}async#n(t,r,o){let n=ge(t),i=await $e(this.#e,n,Jh,this.#t,!1,!1,Zh);try{let s=await this.#c(n);if(s.principal!==r)throw Qe("Unknown MCP task");let a=o(s);return await this.#a(a),a}finally{await i()}}async create(t){let r=ge(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Xh:t.ttlMs,i=t.pollIntervalMs??Yh;if(o.length===0||n!==null&&(!Number.isSafeInteger(n)||n<0)||!Number.isSafeInteger(i)||i<0)throw new p("Invalid MCP task creation options",m.invalidParams);let s=this.#r().toISOString(),a={version:1,taskId:r,status:"working",createdAt:s,lastUpdatedAt:s,ttlMs:n,pollIntervalMs:i,principal:o,workerPid:this.#i,consumedInputKeys:[],...t.statusMessage?.trim()?{statusMessage:t.statusMessage.trim().slice(0,ye)}:{}};return await this.#a(a),{...V(a),resultType:"task"}}async get(t,r){return V(await this.#n(t,r,o=>{if(te(o.status))return o;let n=this.#r().getTime(),i=o.ttlMs!==null&&Date.parse(o.createdAt)+o.ttlMs<=n,s=o.workerPid!==this.#i&&!sg(o.workerPid);return!i&&!s?o:{...o,status:"failed",statusMessage:i?"Task retention expired before completion.":"Task worker ended before recording a terminal result.",lastUpdatedAt:this.#r().toISOString(),error:{code:-32603,message:i?"MCP task expired":"MCP task worker unavailable after restart",data:{recoverable:!1,createNewTask:!0}},inputRequests:void 0}}))}async requireInput(t){let r=Ze(t.inputRequests,t.requestContext);return V(await this.#n(t.taskId,t.principal,o=>{if(te(o.status))return o;let n=Object.keys(r).filter(i=>o.consumedInputKeys.includes(i));if(n.length>0)throw new p("MCP task input request keys must be unique for the task lifetime",m.invalidParams,{reused:n});return{...o,status:"input_required",statusMessage:t.statusMessage?.trim().slice(0,ye),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=sr(o),i=[],s=[];return await this.#n(t,r,a=>{if(a.status!=="input_required"||!a.inputRequests)return a;let c={...a.inputRequests},d=a.inputResponses?{...a.inputResponses}:{};for(let[l,u]of Object.entries(n))Object.prototype.hasOwnProperty.call(c,l)&&(d[l]=u,delete c[l],i.push(l));return s=Object.keys(c).sort(),i.length===0?a:{...a,status:s.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:s.length===0?void 0:c,inputResponses:d,consumedInputKeys:[...new Set([...a.consumedInputKeys,...i])].sort()}}),{acceptedKeys:i.sort(),remainingKeys:s}}async takeInputResponses(t,r){let o={};return await this.#n(t,r,n=>(o=structuredClone(n.inputResponses??{}),Object.keys(o).length===0?n:{...n,inputResponses:void 0})),o}async complete(t,r,o){return V(await this.#n(t,r,n=>te(n.status)?n:{...n,status:"completed",statusMessage:"Task completed.",lastUpdatedAt:this.#r().toISOString(),result:structuredClone(o),inputRequests:void 0,error:void 0}))}async fail(t,r,o){let n=lr(o);return V(await this.#n(t,r,i=>te(i.status)?i:{...i,status:"failed",statusMessage:n.message,lastUpdatedAt:this.#r().toISOString(),error:n,inputRequests:void 0,result:void 0}))}async cancel(t,r){return V(await this.#n(t,r,o=>te(o.status)?o:{...o,status:"cancelled",statusMessage:"Task cancelled by the client.",lastUpdatedAt:this.#r().toISOString(),inputRequests:void 0,result:void 0,error:void 0}))}};function fx(e){return new et(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]="f87864d3-e499-57f7-b1e3-4ea3f30b7725")}catch{}})();var be="io.modelcontextprotocol/subscriptionId",ur=256,pr=2048,ag=5e3;function cg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),ag);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},i=>{clearTimeout(n),o(i instanceof Error?i:new Error(String(i)))})})}function tt(e,t){if(e!==void 0){if(typeof e!="boolean")throw new p("Invalid MCP subscription filter",m.invalidParams,{field:`notifications.${t}`,expected:"boolean"});return e||void 0}}function dg(e){if(!_(e))throw new p("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=tt(e.toolsListChanged,"toolsListChanged"),r=tt(e.promptsListChanged,"promptsListChanged"),o=tt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>ur)throw new p("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:ur});let i=new Set;for(let s of e.resourceSubscriptions){if(typeof s!="string"||s.trim().length===0||Buffer.byteLength(s,"utf8")>pr)throw new p("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:pr});i.add(s)}i.size>0&&(n=[...i].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function lg(e,t){return{...e.toolsListChanged&&t.tools?.listChanged?{toolsListChanged:!0}:{},...e.promptsListChanged&&t.prompts?.listChanged?{promptsListChanged:!0}:{},...e.resourcesListChanged&&t.resources?.listChanged?{resourcesListChanged:!0}:{},...e.resourceSubscriptions&&t.resources?.subscribe?{resourceSubscriptions:[...e.resourceSubscriptions]}:{}}}var mr=class{#e;#t=new Map;#r;constructor(t){this.#e=structuredClone(t.capabilities),this.#r={...t.serverInfo}}get size(){return this.#t.size}async open(t){if(this.#t.has(t.id))throw new p("MCP subscription id is already active",m.invalidParams,{subscriptionId:t.id});let r=lg(dg(t.notifications),this.#e),o={filter:r,sink:t.sink,writeQueue:Promise.resolve()};this.#t.set(t.id,o);try{await this.#o(t.id,o,{jsonrpc:"2.0",method:"notifications/subscriptions/acknowledged",params:{_meta:{[be]:t.id},notifications:structuredClone(r)}},!0)}catch(n){throw this.#t.delete(t.id),n}return structuredClone(r)}async emitListChanged(t){let r=`${t}ListChanged`,o=`notifications/${t}/list_changed`,n=[];for(let[i,s]of this.#t)s.filter[r]===!0&&n.push(this.#o(i,s,{jsonrpc:"2.0",method:o,params:{_meta:{[be]:i}}}));return(await Promise.all(n)).filter(Boolean).length}async emitResourceUpdated(t){let r=[];for(let[o,n]of this.#t)n.filter.resourceSubscriptions?.includes(t)&&r.push(this.#o(o,n,{jsonrpc:"2.0",method:"notifications/resources/updated",params:{_meta:{[be]:o},uri:t}}));return(await Promise.all(r)).filter(Boolean).length}async#o(t,r,o,n=!1){let i=r.writeQueue.then(async()=>{if(this.#t.get(t)!==r)return!1;try{return await cg(r.sink,o),!0}catch(s){if(this.#t.get(t)===r&&this.#t.delete(t),n)throw s;return!1}});return r.writeQueue=i.then(()=>{},()=>{}),i}close(t){if(this.#t.delete(t))return{...Xe({resultType:"complete",_meta:{[be]:t}},this.#r)}}closeAll(){let t=[];for(let r of this.#t.keys()){let o=this.close(r);t.push({id:r,result:o})}return 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]="7d591d0b-f009-519c-8024-c6fa18effb8e")}catch{}})();var fr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,ug=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,_r=/^[\t\x20-\x7E]*$/u,hr=new Set(["prompts/get","resources/read","tools/call"]);function pg(e){let t=new Map;for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let n=typeof o=="string"?o:o.join(", ");t.set(r.toLowerCase(),n)}return t}function A(e,t){throw new p(e,m.headerMismatch,{header:t})}function gr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&_r.test(t)&&!fr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function yr(e,t){let r=fr.exec(e);if(r){let o=r[1],n=Buffer.from(o,"base64");return n.toString("base64")!==o||n.length===0?A("Malformed MCP Base64 header value",t):n.toString("utf8")}return e.length===0||e.trim()!==e||!_r.test(e)?A("Malformed MCP header value",t):e}function Ce(e){return Array.isArray(e)?e.some(Ce):_(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(Ce):!1}function mg(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!ug.test(o)||!["boolean","integer","string"].includes(String(n))||r.has(o.toLowerCase()))throw new p("Invalid MCP x-mcp-header annotation",m.invalidParams,{field:t.join("."),annotation:o});return r.add(o.toLowerCase()),{name:o,path:t,type:n}}function br(e){if(!_(e))throw new p("Invalid MCP tool schema",m.invalidParams,{field:"inputSchema",expected:"object"});let t=[],r=new Set,o=(n,i)=>{let s=n.properties;if(s!==void 0){if(!_(s))throw new p("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,c]of Object.entries(s)){if(!_(c))continue;let d=[...i,a],l=mg(c,d,r);l&&t.push(l);for(let[u,f]of Object.entries(c))if(u!=="properties"&&u!=="x-mcp-header"&&Ce(f))throw new p("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:d.join("."),keyword:u});o(c,d)}}};for(let[n,i]of Object.entries(e))if(n!=="properties"&&Ce(i))throw new p("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function Cr(e,t){let r=e;for(let o of t){if(!_(r))return;r=r[o]}return r}function Tr(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function fg(e,t){let r=_(e.arguments)?e.arguments:{},o={};for(let n of br(t)){let i=Cr(r,n.path);if(i==null)continue;if(!(n.type==="integer"&&typeof i=="number"&&Number.isSafeInteger(i)||n.type==="boolean"&&typeof i=="boolean"||n.type==="string"&&typeof i=="string"))throw new p("Invalid MCP custom header argument",m.invalidParams,{field:n.path.join("."),expected:n.type});o[`Mcp-Param-${n.name}`]=gr(i)}return o}function bx(e){let t=_(e.request.params)?e.request.params:void 0,r=We(t),o=e.request.method;if(typeof o!="string"||o.length===0)return A("Missing MCP request method","Mcp-Method");let n={Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":r.protocolVersion,"Mcp-Method":o},i=Tr(o,t);if(hr.has(o)){if(i===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=gr(i)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,fg(t,e.toolSchema)),n}function _g(e,t){let r=t.method;(typeof r!="string"||r.length===0)&&A("Missing MCP request method","Mcp-Method");let o=_(t.params)?t.params:void 0,n=We(o).protocolVersion;if(e.get("mcp-protocol-version")!==n&&A("MCP protocol header does not match request metadata","MCP-Protocol-Version"),e.get("mcp-method")!==r&&A("MCP method header does not match request body","Mcp-Method"),hr.has(r)){let i=e.get("mcp-name"),s=Tr(r,o);(i===void 0||s===void 0||yr(i,"Mcp-Name")!==s)&&A("MCP name header does not match request body","Mcp-Name")}e.has("last-event-id")&&A("MCP SSE resumability is not supported","Last-Event-ID")}function hg(e,t,r){return e.type==="integer"?typeof t=="number"&&Number.isSafeInteger(t)&&Number(r)===t:e.type==="boolean"?typeof t=="boolean"&&r===String(t):typeof t=="string"&&r===t}function gg(e){let t=_(e.params.arguments)?e.params.arguments:{};for(let r of br(e.toolSchema)){let o=Cr(t,r.path),n=`Mcp-Param-${r.name}`,i=e.headers.get(n.toLowerCase());if(o==null){i!==void 0&&A("Unexpected MCP parameter header",n);continue}i===void 0&&A("Missing MCP parameter header",n),hg(r,o,yr(i,n))||A("MCP parameter header does not match request body",n)}}function Cx(e){let t=pg(e.headers),r=typeof e.request.method=="string"?e.request.method:"";_g(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&gg({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var Tx=z;import{AsyncLocalStorage as yg}from"node:async_hooks";import{createHash as Sr,timingSafeEqual as bg}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]="6a5310f6-3add-5108-b39f-61607918dc9f")}catch{}})();var y=class extends Error{httpStatus;challenge;constructor(t,r,o){super(t),this.name="PmMcpAuthorizationError",this.httpStatus=r,this.challenge=o}},Cg=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,Tg=/^[a-z][a-z0-9_*/-]{0,255}$/u,Sg=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,Eg=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,wr=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,Ar=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,wg=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,Ag=/%(?![0-9A-Fa-f]{2})/u,vg=512,Og=32,Rg=180,Ig=8192,Pg=8192,vr=new yg;function E(e,t,r=!1){if(new RegExp("\\p{Cc}","u").test(e))throw new y(`Invalid ${t}`,401);let o;try{o=new URL(e)}catch{throw new y(`Invalid ${t}`,401)}let n=o.hostname==="127.0.0.1"||o.hostname==="localhost";if(o.hash.length>0||o.protocol!=="https:"&&!(r&&n&&o.protocol==="http:"))throw new y(`Invalid ${t}`,401);return o}function Mg(e,t){let r=t.toLowerCase();for(let[o,n]of Object.entries(e))if(!(o.toLowerCase()!==r||n===void 0))return typeof n=="string"?n:n.join(", ")}function vx(e){let t=E(e.resource,"protected resource URI",!0).href.replace(/\/$/u,"");if(e.authorizationServers.length===0)throw new y("Protected resource metadata requires an authorization server",401);let r=e.authorizationServers.map(n=>E(n,"authorization server issuer").href.replace(/\/$/u,"")),o=[...new Set(e.scopes??[])];if(o.some(n=>!wr.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function Ox(e){let t=E(e,"authorization server issuer"),r=t.pathname.replace(/^\/+|\/+$/gu,""),o=t.origin;return r?[`${o}/.well-known/oauth-authorization-server/${r}`,`${o}/.well-known/openid-configuration/${r}`,`${o}/${r}/.well-known/openid-configuration`]:[`${o}/.well-known/oauth-authorization-server`,`${o}/.well-known/openid-configuration`]}function Rx(e,t){if(!_(e)||typeof e.issuer!="string")throw new y("Invalid authorization server metadata",401);let r=E(t,"expected issuer").href.replace(/\/$/u,"");if(E(e.issuer,"metadata issuer").href.replace(/\/$/u,"")!==r)throw new y("Authorization server issuer mismatch",401);if(!Array.isArray(e.code_challenge_methods_supported)||!e.code_challenge_methods_supported.includes("S256"))throw new y("Authorization server does not support required S256 PKCE",401);let n=d=>{let l=e[d];if(typeof l!="string")throw new y(`Authorization server metadata requires ${d}`,401);return E(l,d).href},i=d=>{let l=e[d];return typeof l=="string"?E(l,d).href:void 0},s=n("authorization_endpoint"),a=n("token_endpoint"),c=i("registration_endpoint");return{issuer:r,authorization_endpoint:s,token_endpoint:a,code_challenge_methods_supported:[...new Set(e.code_challenge_methods_supported.filter(d=>typeof d=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...c?{registration_endpoint:c}:{}}}function Ix(e){return e.hasPreRegisteredClient?"pre_registered":e.metadata.client_id_metadata_document_supported?"client_id_metadata_document":e.metadata.registration_endpoint?"dynamic":"user_supplied"}function Px(e){if(e.responseIssuer===void 0){if(e.issuerParameterSupported)throw new y("Authorization response omitted the advertised issuer",401);return}if(e.responseIssuer!==e.expectedIssuer)throw new y("Authorization response issuer mismatch",401)}function Mx(e,t){let r=E(t,"client metadata document URL");if(r.pathname==="/"||!_(e)||e.client_id!==r.href||typeof e.client_name!="string"||e.client_name.trim().length===0||!Array.isArray(e.redirect_uris)||e.redirect_uris.length===0)throw new y("Invalid Client ID Metadata Document",401);for(let o of e.redirect_uris){if(typeof o!="string")throw new y("Invalid client redirect URI",401);E(o,"client redirect URI",!0)}return structuredClone(e)}function kx(e){if(e.redirectUris.length===0||e.clientName.trim().length===0)throw new y("Invalid dynamic client registration metadata",401);let t=e.redirectUris.map(r=>E(r,"redirect URI",!0).href);return{application_type:e.applicationType,client_name:e.clientName.trim().slice(0,128),redirect_uris:t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"}}var Er=class{#e=new Map;set(t,r){let o=E(t,"credential issuer").href;this.#e.set(o,structuredClone(r))}get(t){let r=E(t,"credential issuer").href,o=this.#e.get(r);return o?structuredClone(o):void 0}delete(t){let r=E(t,"credential issuer").href;return this.#e.delete(r)}};function kg(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?Cg.exec(t):null;if(!o)throw new y("Invalid MCP traceparent",403);let n=o[1],i=o[2];if(/^0+$/u.test(n)||/^0+$/u.test(i))throw new y("Invalid MCP traceparent",403)}if(r!==void 0&&(typeof r!="string"||!Ng(r)))throw new y("Invalid MCP tracestate",403);return{...typeof t=="string"?{traceparent:t}:{},...typeof r=="string"?{tracestate:r}:{}}}function D(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function xg(e){return Tg.test(e)||Sg.test(e)}function Ng(e){if(Buffer.byteLength(e,"utf8")>vg)return!1;let t=e.split(",");if(t.length>Og)return!1;let r=new Set;for(let o of t){let n=D(o);if(n.length===0)continue;let i=n.indexOf("="),s=i>0?n.slice(0,i):"",a=i>0?n.slice(i+1):"";if(!xg(s)||!Eg.test(a)||r.has(s))return!1;r.add(s)}return!0}function Or(e){return wg.test(e)&&!Ag.test(e)}function Lg(e){let t=D(e),r=t.indexOf("="),o=D(r>=0?t.slice(0,r):t),n=r>=0?D(t.slice(r+1)):void 0;return Ar.test(o)&&(n===void 0||Or(n))}function Dg(e){let t=D(e),r=t.split(";"),o=r[0],n=r.slice(1),i=o.indexOf("="),s=D(i>0?o.slice(0,i):""),a=i>0?D(o.slice(i+1)):"";if(!(!Ar.test(s)||!Or(a)||!n.every(Lg)))return{key:s,serialized:t}}function $g(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>Ig)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>Rg)throw new y("Invalid MCP baggage",403);let n=[];for(let i of o){let s=Dg(i);if(!s)throw new y("Invalid MCP baggage",403);r.has(s.key)&&n.push(s.serialized)}return n.length>0?n.join(","):void 0}function xx(e,t={}){let r=_(e)&&_(e._meta)?e._meta:{},o=$g(r.baggage,t.baggageAllowlist??[]);return{...kg(r),...o?{baggage:o}:{}}}function Nx(e,t){return vr.run(structuredClone(e),t)}function Lx(){let e=vr.getStore();return e?{...e}:void 0}async function Dx(e){let t=E(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(u=>!wr.test(u)))throw new y("Invalid authorization scope",401);let o=`Bearer resource_metadata="${t}"`;if(new URL(e.requestUrl,e.policy.resource).searchParams.has("access_token"))throw new y("Access tokens must not appear in URI query parameters",401,o);let s=Mg(e.headers,"authorization")?.match(/^Bearer ([^\s]+)$/iu);if(!s)throw new y("Missing or malformed bearer token",401,o);let a=s[1];if(Buffer.byteLength(a,"utf8")>Pg)throw new y("Missing or malformed bearer token",401,o);let c;try{c=await e.policy.verifyAccessToken(a)}catch{throw new y("Invalid bearer token",401,o)}let d=Array.isArray(c.audience)?c.audience:[c.audience];if(c.issuer!==e.policy.issuer||!d.includes(e.policy.resource))throw new y("Bearer token issuer or audience mismatch",401,o);let l=r.filter(u=>!c.scopes.includes(u));if(l.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${l.join(" ")}"`);return{...c,audience:[...d],scopes:[...c.scopes]}}function $x(e){let t=Sr("sha256").update(e.token).digest();return r=>{let o=Sr("sha256").update(r).digest();if(!bg(t,o))throw new y("Invalid bearer token",401);return structuredClone(e.claims)}}(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]="4f17095e-2dba-530c-935c-1803ed359510")}catch{}})();var rt="io.modelcontextprotocol/ui",Te="2026-01-26",Pr="text/html;profile=mcp-app",Rr=Object.freeze({specVersion:Te,mimeTypes:[Pr]});function Ux(e){let t=e.clientCapabilities.extensions;if(!_(t))return!1;let r=t[rt];if(r===void 0)return!1;if(!_(r))throw new p("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[rt]:Rr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(Pr)||n!==void 0&&n!==Te)throw new p("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[rt]:Rr}}});return!0}var Fg={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},Mr=Object.freeze([{id:"context",name:"Context explorer",description:"Inspect bounded project context, provenance, omissions, and token accounting.",toolName:"pm_context",uri:"ui://pm/context.html"},{id:"graph",name:"Relationship graph",description:"Explore typed relationships, explaining paths, and graph-governance evidence.",toolName:"pm_graph",uri:"ui://pm/graph.html"},{id:"plan",name:"Plan and milestone view",description:"Review durable plan steps, dependencies, decisions, discoveries, and validation state.",toolName:"pm_plan",uri:"ui://pm/plan.html"},{id:"assurance",name:"Assurance dashboard",description:"Inspect validation verdicts, evidence, omissions, and actionable recovery paths.",toolName:"pm_validate",uri:"ui://pm/assurance.html"},{id:"operations",name:"Long-operation view",description:"Inspect durable test and operation results without creating a second task store.",toolName:"pm_test",uri:"ui://pm/operations.html"}].map(e=>({...e,toolMeta:{resourceUri:e.uri,visibility:["model","app"]},resourceMeta:Fg})));function jx(e){return Mr.find(t=>t.uri===e)}function Bx(e){let t=new Map(Mr.map(r=>[r.toolName,r]));return e.map(r=>{let o=t.get(r.name);return o?{...r,_meta:{...r._meta,ui:o.toolMeta}}:{...r}})}function Ir(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function qx(e){let t=Ir(e.name),r=Ir(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Te}),n=JSON.stringify(Te);return`<!doctype html>
3
3
  <html lang="en">
4
4
  <head>
@@ -1,2 +1,2 @@
1
- !(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a236314b-1a3b-5499-bed3-364a2cb034a5")}catch(e2){}})();const REMEDIATION_REGISTRY=Object.freeze([{code:"missing_directory",command:"pm init",summary:"Recreate missing tracker directories (pm init is idempotent and restores the scaffold)."},{code:"settings_read_fs_error",command:"pm config list --json",summary:"settings.json could not be read as a regular file and pm fell back to defaults; repair the reported path or permissions, then re-run."},{code:"settings_read_invalid_json",command:"pm config list --json",summary:"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run."},{code:"settings_read_invalid_schema",command:"pm config list --json",summary:"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run."},{code:"settings_read_merge_failed",command:"pm config list --json",summary:"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files."},{code:"settings:id_prefix_empty",command:"pm config list --json",summary:'id_prefix is empty; set a non-empty "id_prefix" in settings.json so generated item ids are well-formed.'},{code:"settings:locks_ttl_non_positive",command:"pm config list --json",summary:'locks.ttl_seconds must be positive; set a positive "locks.ttl_seconds" in settings.json.'},{code:"telemetry_state_invalid_json",command:"pm health --check-telemetry",summary:"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only."},{code:"telemetry_queue_invalid_rows",command:"pm health --check-telemetry",summary:"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only."},{code:"telemetry_queue_pending",command:"pm health --check-telemetry",summary:"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only."},{code:"telemetry_queue_high_retries",command:"pm telemetry flush",summary:"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped."},{code:"telemetry_endpoint_probe_failed",command:"pm health --check-telemetry",summary:"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only."},{code:"telemetry_endpoint_probe_http_status",command:"pm health --check-telemetry",summary:"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only."},{code:"telemetry_schema_version_behind",command:"pm health --check-telemetry",summary:"Client schema is behind server; upgrade pm-cli to emit the latest event shape."},{code:"telemetry_otel_export_failing",command:"pm health --check-telemetry",summary:"OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only."},{code:"merge_driver_configuration_missing",command:"pm merge install",summary:"Install the clone-local Git drivers required by the tracker merge fence."},{code:"merge_driver_configuration_drift",command:"pm merge install",summary:"Reinstall clone-local Git drivers after runtime or package paths change."},{code:"validate_merge_driver_configuration",command:"pm merge install",summary:"Restore missing or drifted clone-local Git merge driver commands."},{code:"integrity_item_unreadable",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file could not be read; restore or repair the file at the reported path."},{code:"integrity_item_parse_failed",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file failed to parse; fix the malformed item metadata at the reported path."},{code:"integrity_item_conflict_marker",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line."},{code:"integrity_history_unreadable",command:"pm history-repair <id>",summary:"A history stream could not be read; re-anchor the affected item's history chain."},{code:"integrity_history_invalid_json",command:"pm history-repair <id>",summary:"A history stream contains invalid JSON; re-anchor the affected item's history chain."},{code:"integrity_history_conflict_marker",command:"pm history-repair <id>",summary:"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain."},{code:"validate_storage_unreadable_items",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"An on-disk item file cannot be parsed (for example a botched merge resolution with stale TOON count headers); repair or restore the file at the reported path \u2014 list commands silently skip it while pm get hard-errors."},{code:"validate_storage_duplicate_item_ids",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"One item id is claimed by multiple item documents \u2014 usually two branches minting the same id for different items before merging (GH-600). Keep one document, recreate the other item under a fresh id (pm copy, then delete the colliding file), and consider raising ids.token_length for concurrent multi-agent work."},{code:"validate_storage_history_conflict_markers",command:"pm merge driver history <base> <ours> <theirs>",summary:"A history stream contains unresolved Git conflict markers; re-merge it with the pm history merge driver (or resolve the markers by hand), then run pm history-repair for the item."},{code:"validate_storage_unparseable_history",command:"pm history-repair <id>",summary:"A history stream's newest line is not valid JSONL; repair or restore the stream before further mutations."},{code:"validate_storage_resurrected_items",command:"pm delete <id>",summary:"A live item's newest history operation is a delete: a delete/modify merge silently resurrected it. Decide the winner \u2014 re-delete the item, or keep it and append a mutation documenting the revival."},{code:"validate_storage_unparseable_config",command:"pm merge driver json <base> <ours> <theirs>",summary:"settings.json or a schema file cannot be parsed, so pm silently falls back to defaults; re-merge it with the pm JSON merge driver or fix the file by hand, then rerun pm validate."},{code:"validate_merge_fence_drift",command:"pm merge install",summary:"The committed .gitattributes merge fence no longer matches the active schema's type folders or tracker JSONL stores; rerun pm merge install (and commit .gitattributes) so every tracker artifact keeps its field-aware merge driver."},{code:"validate_storage_tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command, commit the index-only removals and managed .gitignore fence, then rerun validation."},{code:"integrity_item_outdated_format_version",command:"pm validate --verbose-diagnostics",summary:"An item predates the current storage format version; a pm storage migration rewrites it. Use --verbose-diagnostics to list the affected items."},{code:"integrity_item_ahead_format_version",command:"npm install -g @unbrained/pm-cli@latest",summary:"An item was written by a newer pm format version than this runtime supports; upgrade pm to read and validate it safely."},{code:"tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command from the integrity check, commit the index-only removals, and keep the managed .gitignore fence."},{code:"merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts, re-apply any intended discarded values, then run pm merge reconcile; lossy receipts require explicit --force acceptance."},{code:"merge_receipts_pending",command:"pm merge reconcile",summary:"A lossless merge receipt is still pending; run pm merge reconcile to settle it (optionally preview first with --dry-run) so a green health gate certifies receipt settlement, not only intact data."},{code:"merge_receipt_evidence_invalid",command:"pm merge report --include-reconciled --json",summary:"One or more receipt candidates failed bounded-file, schema, identity, or copy-consistency validation; inspect the report's privacy-safe source, receipt id, and reason before repairing only the named evidence."},{code:"merge_receipt_history_reference_missing",command:"pm merge reconcile --dry-run",summary:"Review the bounded coordinates and recover available evidence first; for exact pre-durable clone-local-only references, rerun with --force so pm appends an audited disposition and proves the health finding is cleared without rewriting history."},{code:"validate_merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts before reconciliation; history-repair alone does not settle them, and lossy receipts require explicit --force acceptance."},{code:"history_drift_missing_stream",command:"pm history-repair <id>",summary:"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_unreadable_stream",command:"pm history-repair <id>",summary:"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_hash_mismatch",command:"pm history-repair <id>",summary:"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_chain_mismatch",command:"pm history-repair <id>",summary:"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_version_skew",command:"npm install -g @unbrained/pm-cli@latest",summary:"A history stream declares an item hash version this runtime does not support; upgrade pm to verify the chain instead of re-anchoring it."},{code:"history_drift_merge_receipt",command:"pm merge reconcile",summary:"Canonical path, changed-field, and merged-value hash evidence attributes this drift to a pending receipt; run reconciliation (optionally preview first with --dry-run) instead of repairing history directly."},{code:"history_stream_over_compact_threshold",command:"pm history-compact <id>",summary:"The history stream exceeds the configured compaction threshold; compact it (pm history-compact --all-streams sweeps every over-threshold stream in one pass)."},{code:"history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"provenance_value_domain_invalid",command:"pm history-repair --all --normalize-provenance",summary:"Remove invalid bounded provenance observations from affected streams and append privacy-safe aggregate repair receipts."},{code:"validate_history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"locks_stale_count",command:"pm gc --scope locks",summary:"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them \u2014 gc retains active and unparseable locks."},{code:"locks_unreadable",command:"pm gc --scope locks --dry-run",summary:"Some lock files could not be read; preview the sweep and inspect the unreadable files manually \u2014 gc never deletes what it cannot read."},{code:"extension_update_health_partial_coverage",command:"pm extension --adopt-all --project",summary:"Update-health coverage is partial because unmanaged extensions were skipped; adopt the existing installs into managed metadata so the update scan covers them (use --global for global-scope extensions, or pm package --adopt-all when working with packages)."},{code:"vectorization_stale_items_remaining",command:"pm health --refresh-vectors",summary:"Some items have stale embeddings; refresh vectors so semantic search results stay current."},{code:"vectorization_embedding_identity_changed",command:"pm reindex --mode semantic",summary:"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors."},{code:"validate_metadata_missing_closed_at",command:"pm validate --check-metadata --auto-fix --fix-scope timestamps --dry-run",summary:"Preview closure dates proven by verified lifecycle history; inspect residuals and omit --dry-run to apply only proven dates."},{code:"validate_metadata_missing_acceptance_criteria",command:'pm update <id> --acceptance-criteria "<criteria>"',summary:"Backfill the missing acceptance criteria on the reported item(s)."},{code:"validate_metadata_missing_estimate",command:'pm update <id> --estimate "<estimate>"',summary:"Backfill the missing estimate on the reported item(s)."},{code:"validate_metadata_missing_close_reason",command:'pm update <id> --close-reason "<reason>"',summary:"Backfill the missing close reason on the reported closed item(s)."},{code:"validate_metadata_missing_reviewer",command:'pm update <id> --reviewer "<name>"',summary:"Backfill the missing reviewer on the reported item(s)."},{code:"validate_metadata_missing_risk",command:'pm update <id> --risk "<level>"',summary:"Backfill the missing risk on the reported item(s)."},{code:"validate_metadata_missing_confidence",command:'pm update <id> --confidence "<level>"',summary:"Backfill the missing confidence on the reported item(s)."},{code:"validate_metadata_missing_sprint",command:'pm update <id> --sprint "<sprint>"',summary:"Backfill the missing sprint on the reported item(s)."},{code:"validate_metadata_missing_release",command:'pm update <id> --release "<release>"',summary:"Backfill the missing release on the reported item(s)."},{code:"validate_metadata_custom_profile_missing_required_fields",command:'pm config set metadata-required-fields --criterion "<field>"',summary:"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items."},{code:"validate_metadata_duplicate_issue_codes",command:'pm update <id> --title "<distinct title>"',summary:"Two or more items share one logical issue code (GH-235); give each a distinct title so the derived code is unique, or close the redundant item with pm close <id> --duplicate-of <canonical-id> (closed-as-duplicate items are excluded from the check)."},{code:"validate_resolution_missing_fields",command:'pm update <id> --resolution "<how resolved>"',summary:"Backfill resolution / expected_result / actual_result on the reported closed item(s)."},{code:"validate_lifecycle_active_closure_like_metadata",command:"pm update <id> --unset <closure-like-field>",summary:"Clear the closure-like field the validator flags on this active item \u2014 the detail row names it (resolution / actual-result / blocked-reason) \u2014 or close the item if it is actually done."},{code:"validate_lifecycle_active_terminal_parent",command:"pm update <id> --parent <active-parent-id>",summary:"Reopen the terminal parent or move the active child under a non-terminal parent."},{code:"validate_lifecycle_stale_blockers",command:"pm update <id> --unset blocked-by --unset blocked-reason",summary:"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status."},{code:"validate_lifecycle_dependency_cycles_error",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_lifecycle_dependency_cycles",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_hierarchy_parent_cycle_error",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_hierarchy_parent_cycle",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_files_missing_linked_paths",command:"pm <files|docs> <id> --remove <path>",summary:"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc)."},{code:"validate_files_orphaned_paths",command:"pm <files|docs> <id> --add <path>",summary:"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace."},{code:"validate_files_tracked_all_strict_forces_pm_internals",command:"pm validate --check-files --include-pm-internals",summary:"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode."},{code:"validate_history_drift_missing_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items missing a history stream."},{code:"validate_history_drift_unreadable_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with an unreadable history stream."},{code:"validate_history_drift_hash_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items whose content hash drifted."},{code:"validate_history_drift_chain_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with a broken history chain."},{code:"validate_history_drift_version_skews",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more history streams declare an item hash version this runtime does not support; upgrade pm to verify the chains instead of re-anchoring them."},{code:"validate_command_references_stale_pm_ids",command:'pm update <id> --replace-tests --test "command=<corrected-command>" [--test ...]',summary:"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call."},{code:"validate_format_version_outdated_items",command:"pm validate --verbose-diagnostics",summary:"One or more items predate the current storage format version; a pm storage migration rewrites them. Use --verbose-diagnostics to list the affected items."},{code:"validate_format_version_ahead_items",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more items were written by a newer pm format version than this runtime supports; upgrade pm to read and validate them safely."}]);function resolveRemediation(warning){if(typeof warning!=="string"){return void 0}const normalized=warning.trim();for(const entry of REMEDIATION_REGISTRY){if(normalized===entry.code||normalized.startsWith(`${entry.code}:`)){return entry}}return void 0}function buildRemediationMap(warnings){const map={};for(const warning of warnings){const entry=resolveRemediation(warning);if(entry!==void 0&&!Object.prototype.hasOwnProperty.call(map,entry.code)){map[entry.code]=entry.command}}return map}function buildRemediationCommands(warnings){return Object.values(buildRemediationMap(warnings))}export{REMEDIATION_REGISTRY,buildRemediationCommands,buildRemediationMap,resolveRemediation};
1
+ !(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fac6b840-f5f1-51f6-b643-99b48ac864ba")}catch(e2){}})();const REMEDIATION_REGISTRY=Object.freeze([{code:"missing_directory",command:"pm init",summary:"Recreate missing tracker directories (pm init is idempotent and restores the scaffold)."},{code:"settings_read_fs_error",command:"pm config list --json",summary:"settings.json could not be read as a regular file and pm fell back to defaults; repair the reported path or permissions, then re-run."},{code:"settings_read_invalid_json",command:"pm config list --json",summary:"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run."},{code:"settings_read_invalid_schema",command:"pm config list --json",summary:"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run."},{code:"settings_read_merge_failed",command:"pm config list --json",summary:"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files."},{code:"settings:id_prefix_empty",command:"pm config list --json",summary:'id_prefix is empty; set a non-empty "id_prefix" in settings.json so generated item ids are well-formed.'},{code:"settings:locks_ttl_non_positive",command:"pm config list --json",summary:'locks.ttl_seconds must be positive; set a positive "locks.ttl_seconds" in settings.json.'},{code:"telemetry_state_invalid_json",command:"pm health --check-telemetry",summary:"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only."},{code:"telemetry_queue_invalid_rows",command:"pm health --check-telemetry",summary:"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only."},{code:"telemetry_queue_pending",command:"pm health --check-telemetry",summary:"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only."},{code:"telemetry_queue_high_retries",command:"pm telemetry flush",summary:"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped."},{code:"telemetry_endpoint_probe_failed",command:"pm health --check-telemetry",summary:"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only."},{code:"telemetry_endpoint_probe_http_status",command:"pm health --check-telemetry",summary:"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only."},{code:"telemetry_schema_version_behind",command:"pm health --check-telemetry",summary:"Client schema is behind server; upgrade pm-cli to emit the latest event shape."},{code:"telemetry_otel_export_failing",command:"pm health --check-telemetry",summary:"OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only."},{code:"merge_driver_configuration_missing",command:"pm merge install",summary:"Install the clone-local Git drivers required by the tracker merge fence."},{code:"merge_driver_configuration_drift",command:"pm merge install",summary:"Reinstall clone-local Git drivers after runtime or package paths change."},{code:"merge_fence_missing",command:"pm merge install",summary:"Install the active tracker's committed Git merge attributes."},{code:"merge_fence_drift",command:"pm merge install",summary:"Restore the active tracker's merge mappings while retaining sibling tracker fences."},{code:"validate_merge_driver_configuration",command:"pm merge install",summary:"Restore missing or drifted clone-local Git merge driver commands."},{code:"integrity_item_unreadable",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file could not be read; restore or repair the file at the reported path."},{code:"integrity_item_parse_failed",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file failed to parse; fix the malformed item metadata at the reported path."},{code:"integrity_item_conflict_marker",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line."},{code:"integrity_history_unreadable",command:"pm history-repair <id>",summary:"A history stream could not be read; re-anchor the affected item's history chain."},{code:"integrity_history_invalid_json",command:"pm history-repair <id>",summary:"A history stream contains invalid JSON; re-anchor the affected item's history chain."},{code:"integrity_history_conflict_marker",command:"pm history-repair <id>",summary:"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain."},{code:"validate_storage_unreadable_items",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"An on-disk item file cannot be parsed (for example a botched merge resolution with stale TOON count headers); repair or restore the file at the reported path \u2014 list commands silently skip it while pm get hard-errors."},{code:"validate_storage_duplicate_item_ids",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"One item id is claimed by multiple item documents \u2014 usually two branches minting the same id for different items before merging (GH-600). Keep one document, recreate the other item under a fresh id (pm copy, then delete the colliding file), and consider raising ids.token_length for concurrent multi-agent work."},{code:"validate_storage_history_conflict_markers",command:"pm merge driver history <base> <ours> <theirs>",summary:"A history stream contains unresolved Git conflict markers; re-merge it with the pm history merge driver (or resolve the markers by hand), then run pm history-repair for the item."},{code:"validate_storage_unparseable_history",command:"pm history-repair <id>",summary:"A history stream's newest line is not valid JSONL; repair or restore the stream before further mutations."},{code:"validate_storage_resurrected_items",command:"pm delete <id>",summary:"A live item's newest history operation is a delete: a delete/modify merge silently resurrected it. Decide the winner \u2014 re-delete the item, or keep it and append a mutation documenting the revival."},{code:"validate_storage_unparseable_config",command:"pm merge driver json <base> <ours> <theirs>",summary:"settings.json or a schema file cannot be parsed, so pm silently falls back to defaults; re-merge it with the pm JSON merge driver or fix the file by hand, then rerun pm validate."},{code:"validate_merge_fence_drift",command:"pm merge install",summary:"The committed .gitattributes merge fence no longer matches the active schema's type folders or tracker JSONL stores; rerun pm merge install (and commit .gitattributes) so every tracker artifact keeps its field-aware merge driver."},{code:"validate_storage_tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command, commit the index-only removals and managed .gitignore fence, then rerun validation."},{code:"integrity_item_outdated_format_version",command:"pm validate --verbose-diagnostics",summary:"An item predates the current storage format version; a pm storage migration rewrites it. Use --verbose-diagnostics to list the affected items."},{code:"integrity_item_ahead_format_version",command:"npm install -g @unbrained/pm-cli@latest",summary:"An item was written by a newer pm format version than this runtime supports; upgrade pm to read and validate it safely."},{code:"tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command from the integrity check, commit the index-only removals, and keep the managed .gitignore fence."},{code:"merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts, re-apply any intended discarded values, then run pm merge reconcile; lossy receipts require explicit --force acceptance."},{code:"merge_receipts_pending",command:"pm merge reconcile",summary:"A lossless merge receipt is still pending; run pm merge reconcile to settle it (optionally preview first with --dry-run) so a green health gate certifies receipt settlement, not only intact data."},{code:"merge_receipt_evidence_invalid",command:"pm merge report --include-reconciled --json",summary:"One or more receipt candidates failed bounded-file, schema, identity, or copy-consistency validation; inspect the report's privacy-safe source, receipt id, and reason before repairing only the named evidence."},{code:"merge_receipt_history_reference_missing",command:"pm merge reconcile --dry-run",summary:"Review the bounded coordinates and recover available evidence first; for exact pre-durable clone-local-only references, rerun with --force so pm appends an audited disposition and proves the health finding is cleared without rewriting history."},{code:"validate_merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts before reconciliation; history-repair alone does not settle them, and lossy receipts require explicit --force acceptance."},{code:"history_drift_missing_stream",command:"pm history-repair <id>",summary:"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_unreadable_stream",command:"pm history-repair <id>",summary:"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_hash_mismatch",command:"pm history-repair <id>",summary:"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_chain_mismatch",command:"pm history-repair <id>",summary:"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_version_skew",command:"npm install -g @unbrained/pm-cli@latest",summary:"A history stream declares an item hash version this runtime does not support; upgrade pm to verify the chain instead of re-anchoring it."},{code:"history_drift_merge_receipt",command:"pm merge reconcile",summary:"Canonical path, changed-field, and merged-value hash evidence attributes this drift to a pending receipt; run reconciliation (optionally preview first with --dry-run) instead of repairing history directly."},{code:"history_stream_over_compact_threshold",command:"pm history-compact <id>",summary:"The history stream exceeds the configured compaction threshold; compact it (pm history-compact --all-streams sweeps every over-threshold stream in one pass)."},{code:"history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"provenance_value_domain_invalid",command:"pm history-repair --all --normalize-provenance",summary:"Remove invalid bounded provenance observations from affected streams and append privacy-safe aggregate repair receipts."},{code:"validate_history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"locks_stale_count",command:"pm gc --scope locks",summary:"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them \u2014 gc retains active and unparseable locks."},{code:"locks_unreadable",command:"pm gc --scope locks --dry-run",summary:"Some lock files could not be read; preview the sweep and inspect the unreadable files manually \u2014 gc never deletes what it cannot read."},{code:"extension_update_health_partial_coverage",command:"pm extension --adopt-all --project",summary:"Update-health coverage is partial because unmanaged extensions were skipped; adopt the existing installs into managed metadata so the update scan covers them (use --global for global-scope extensions, or pm package --adopt-all when working with packages)."},{code:"vectorization_stale_items_remaining",command:"pm health --refresh-vectors",summary:"Some items have stale embeddings; refresh vectors so semantic search results stay current."},{code:"vectorization_embedding_identity_changed",command:"pm reindex --mode semantic",summary:"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors."},{code:"validate_metadata_missing_closed_at",command:"pm validate --check-metadata --auto-fix --fix-scope timestamps --dry-run",summary:"Preview closure dates proven by verified lifecycle history; inspect residuals and omit --dry-run to apply only proven dates."},{code:"validate_metadata_missing_acceptance_criteria",command:'pm update <id> --acceptance-criteria "<criteria>"',summary:"Backfill the missing acceptance criteria on the reported item(s)."},{code:"validate_metadata_missing_estimate",command:'pm update <id> --estimate "<estimate>"',summary:"Backfill the missing estimate on the reported item(s)."},{code:"validate_metadata_missing_close_reason",command:'pm update <id> --close-reason "<reason>"',summary:"Backfill the missing close reason on the reported closed item(s)."},{code:"validate_metadata_missing_reviewer",command:'pm update <id> --reviewer "<name>"',summary:"Backfill the missing reviewer on the reported item(s)."},{code:"validate_metadata_missing_risk",command:'pm update <id> --risk "<level>"',summary:"Backfill the missing risk on the reported item(s)."},{code:"validate_metadata_missing_confidence",command:'pm update <id> --confidence "<level>"',summary:"Backfill the missing confidence on the reported item(s)."},{code:"validate_metadata_missing_sprint",command:'pm update <id> --sprint "<sprint>"',summary:"Backfill the missing sprint on the reported item(s)."},{code:"validate_metadata_missing_release",command:'pm update <id> --release "<release>"',summary:"Backfill the missing release on the reported item(s)."},{code:"validate_metadata_custom_profile_missing_required_fields",command:'pm config set metadata-required-fields --criterion "<field>"',summary:"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items."},{code:"validate_metadata_duplicate_issue_codes",command:'pm update <id> --title "<distinct title>"',summary:"Two or more items share one logical issue code (GH-235); give each a distinct title so the derived code is unique, or close the redundant item with pm close <id> --duplicate-of <canonical-id> (closed-as-duplicate items are excluded from the check)."},{code:"validate_resolution_missing_fields",command:'pm update <id> --resolution "<how resolved>"',summary:"Backfill resolution / expected_result / actual_result on the reported closed item(s)."},{code:"validate_lifecycle_active_closure_like_metadata",command:"pm update <id> --unset <closure-like-field>",summary:"Clear the closure-like field the validator flags on this active item \u2014 the detail row names it (resolution / actual-result / blocked-reason) \u2014 or close the item if it is actually done."},{code:"validate_lifecycle_active_terminal_parent",command:"pm update <id> --parent <active-parent-id>",summary:"Reopen the terminal parent or move the active child under a non-terminal parent."},{code:"validate_lifecycle_stale_blockers",command:"pm update <id> --unset blocked-by --unset blocked-reason",summary:"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status."},{code:"validate_lifecycle_dependency_cycles_error",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_lifecycle_dependency_cycles",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_hierarchy_parent_cycle_error",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_hierarchy_parent_cycle",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_files_missing_linked_paths",command:"pm <files|docs> <id> --remove <path>",summary:"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc)."},{code:"validate_files_orphaned_paths",command:"pm <files|docs> <id> --add <path>",summary:"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace."},{code:"validate_files_tracked_all_strict_forces_pm_internals",command:"pm validate --check-files --include-pm-internals",summary:"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode."},{code:"validate_history_drift_missing_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items missing a history stream."},{code:"validate_history_drift_unreadable_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with an unreadable history stream."},{code:"validate_history_drift_hash_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items whose content hash drifted."},{code:"validate_history_drift_chain_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with a broken history chain."},{code:"validate_history_drift_version_skews",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more history streams declare an item hash version this runtime does not support; upgrade pm to verify the chains instead of re-anchoring them."},{code:"validate_command_references_stale_pm_ids",command:'pm update <id> --replace-tests --test "command=<corrected-command>" [--test ...]',summary:"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call."},{code:"validate_format_version_outdated_items",command:"pm validate --verbose-diagnostics",summary:"One or more items predate the current storage format version; a pm storage migration rewrites them. Use --verbose-diagnostics to list the affected items."},{code:"validate_format_version_ahead_items",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more items were written by a newer pm format version than this runtime supports; upgrade pm to read and validate them safely."}]);function resolveRemediation(warning){if(typeof warning!=="string"){return void 0}const normalized=warning.trim();for(const entry of REMEDIATION_REGISTRY){if(normalized===entry.code||normalized.startsWith(`${entry.code}:`)){return entry}}return void 0}function buildRemediationMap(warnings){const map={};for(const warning of warnings){const entry=resolveRemediation(warning);if(entry!==void 0&&!Object.prototype.hasOwnProperty.call(map,entry.code)){map[entry.code]=entry.command}}return map}function buildRemediationCommands(warnings){return Object.values(buildRemediationMap(warnings))}export{REMEDIATION_REGISTRY,buildRemediationCommands,buildRemediationMap,resolveRemediation};
2
2
  //# sourceMappingURL=remediation.js.map