@unbrained/pm-cli 2026.10.24 → 2026.10.25

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 (156) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/dist/cli/error-guidance.js +2 -2
  4. package/dist/cli/extension-command-help.js +2 -2
  5. package/dist/cli/register-history-activity.js +1 -1
  6. package/dist/cli-bundle/bundle-manifest.json +1 -1
  7. package/dist/cli-bundle/chunks/{chunk-R7KWBFM2.js → chunk-3CYXE6BV.js} +2 -2
  8. package/dist/cli-bundle/chunks/chunk-444VPGQT.js +20 -0
  9. package/dist/cli-bundle/chunks/{chunk-YEI4N4A6.js → chunk-4GD6QOP6.js} +21 -21
  10. package/dist/cli-bundle/chunks/{chunk-HZNFNETE.js → chunk-5ZPT67NJ.js} +6 -6
  11. package/dist/cli-bundle/chunks/{chunk-KGZGXC7T.js → chunk-7C3GCLOO.js} +29 -29
  12. package/dist/cli-bundle/chunks/{chunk-3VI4XDP2.js → chunk-7T3H24HN.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-MA7SNKYK.js → chunk-EYCVAAIP.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-CDR5ES7Q.js → chunk-FNZT4BTE.js} +38 -34
  15. package/dist/cli-bundle/chunks/{chunk-CNEUJHA4.js → chunk-HMJSFWHK.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-ZDVTXLA6.js → chunk-LNKPH2DD.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-Z62RXNHW.js → chunk-MVJGGCGQ.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-3S5FLCG7.js → chunk-O3ZTGRIH.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-FASDGYQC.js → chunk-RD6UW3MW.js} +3 -3
  20. package/dist/cli-bundle/chunks/{chunk-UY5UHI4I.js → chunk-RLXK2S7P.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-URZB3USE.js → chunk-RQKDANP7.js} +42 -42
  22. package/dist/cli-bundle/chunks/chunk-TLMXSYJA.js +2 -0
  23. package/dist/cli-bundle/chunks/{chunk-4PNAUT2E.js → chunk-UI3FD3DW.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-VSSHB6XI.js → chunk-VAEB6IUQ.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-TZYQ4JDZ.js → chunk-XYLBOXSH.js} +6 -6
  26. package/dist/cli-bundle/chunks/{chunk-CSE47ZAN.js → chunk-YCCGZHOR.js} +2 -2
  27. package/dist/cli-bundle/chunks/{indexed-receipt-blobs-XANVELIV.js → indexed-receipt-blobs-47I6KKDO.js} +2 -2
  28. package/dist/cli-bundle/chunks/{mutation-admission-NVTBZ7DH.js → mutation-admission-747C6IUR.js} +2 -2
  29. package/dist/cli-bundle/chunks/{register-list-query-2FE6K7FQ.js → register-list-query-COST6KRV.js} +3 -3
  30. package/dist/cli-bundle/chunks/{register-mutation-KZXQUZUH.js → register-mutation-JZVVJUHY.js} +2 -2
  31. package/dist/cli-bundle/chunks/register-operations-S4LKLUBJ.js +2 -0
  32. package/dist/cli-bundle/chunks/{register-setup-P3VLCTDY.js → register-setup-3ITZXPOL.js} +2 -2
  33. package/dist/cli-bundle/chunks/{settlement-hook-YUVCO65H.js → settlement-hook-5IVCF6ZY.js} +2 -2
  34. package/dist/cli-bundle/chunks/stage-3UUIYROS.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/{chunk-JYXA4JIP.js → chunk-22727JYL.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-RVUGTIIU.js → chunk-3FM75SBJ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-RSEGFZTY.js → chunk-3M5FZCMC.js} +54 -54
  38. package/dist/cli-bundle/focused-chunks/{chunk-BUZ2Z4P3.js → chunk-46KDJH3K.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/chunk-5LBZR6YW.js +2 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-SHUPX6G2.js → chunk-74KC7FUQ.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-77NU7NPN.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-NX7TVNUM.js → chunk-7DEZT4JN.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/{chunk-ES2NGVHZ.js → chunk-B5JOVH5F.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/chunk-HMYDUEQK.js +8 -0
  45. package/dist/cli-bundle/focused-chunks/chunk-IVLIUPVV.js +12 -0
  46. package/dist/cli-bundle/focused-chunks/{chunk-X5YRJMAY.js → chunk-KIIGME23.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/{chunk-IUAYTD2S.js → chunk-LWJ2X75I.js} +24 -24
  48. package/dist/cli-bundle/focused-chunks/{chunk-SBJ2IKTH.js → chunk-MT5TYMEU.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-7RQOFHMH.js → chunk-NC5HUGHU.js} +3 -3
  50. package/dist/cli-bundle/focused-chunks/chunk-NI5SG2M2.js +2 -0
  51. package/dist/cli-bundle/focused-chunks/{chunk-ZMWLV2CE.js → chunk-QH5KMIYZ.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-POLMFGPQ.js → chunk-U6HXIF6G.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/{chunk-6HJCSHBG.js → chunk-URWYYJ7K.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-5MKNVJCM.js → chunk-W7MCCFYV.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/{chunk-AGCEWJ27.js → chunk-WMPDY5ZU.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-R536272H.js → chunk-Y4JHHY24.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/{chunk-TAHSXKAT.js → chunk-ZYCOMRFT.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-FVOA3XMI.js → indexed-receipt-blobs-YCLN2ZZG.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{mutation-admission-PB6YFY7S.js → mutation-admission-BQBQXILV.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{settlement-hook-2VXEB6PP.js → settlement-hook-XVS6P2XI.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/stage-VSIL4MTZ.js +2 -0
  62. package/dist/cli-bundle/main.js +19 -19
  63. package/dist/cli-bundle/sdk-authoring.js +1 -1
  64. package/dist/cli-bundle/sdk-contracts.js +2 -2
  65. package/dist/cli-bundle/sdk-core.js +15 -15
  66. package/dist/cli-bundle/sdk-governance.js +1 -1
  67. package/dist/cli-bundle/sdk-graph.js +1 -1
  68. package/dist/cli-bundle/sdk-merge.js +55 -56
  69. package/dist/cli-bundle/sdk-query.js +1 -1
  70. package/dist/cli-bundle/sdk-runtime.js +1 -1
  71. package/dist/cli-bundle/sdk-testing.js +1 -1
  72. package/dist/cli-bundle/sdk.js +3 -3
  73. package/dist/core/diagnostics/remediation.js +1 -1
  74. package/dist/core/shared/errors.d.ts +13 -0
  75. package/dist/core/shared/errors.js +1 -1
  76. package/dist/core/store/settings.js +2 -2
  77. package/dist/sdk/agent/command-recovery.js +1 -1
  78. package/dist/sdk/cli-contracts/commander-types.js +1 -1
  79. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  80. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  81. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
  82. package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
  83. package/dist/sdk/cli-contracts/registration-helpers.d.ts +2 -0
  84. package/dist/sdk/cli-contracts/registration-helpers.js +2 -2
  85. package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
  86. package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
  87. package/dist/sdk/completion/fish.js +3 -1
  88. package/dist/sdk/completion/zsh.js +3 -1
  89. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  90. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  91. package/dist/sdk/governance/health-merge-evidence.d.ts +5 -0
  92. package/dist/sdk/governance/health-merge-evidence.js +1 -1
  93. package/dist/sdk/governance/health.js +1 -1
  94. package/dist/sdk/index.d.ts +1 -1
  95. package/dist/sdk/index.js +1 -1
  96. package/dist/sdk/merge/history-scalar-rebase.d.ts +9 -0
  97. package/dist/sdk/merge/history-scalar-rebase.js +2 -0
  98. package/dist/sdk/merge/ignored-artifacts.d.ts +13 -0
  99. package/dist/sdk/merge/ignored-artifacts.js +2 -0
  100. package/dist/sdk/merge/stage.js +1 -1
  101. package/dist/sdk/merge/three-way.js +1 -1
  102. package/dist/sdk/public-surface.json +1 -1
  103. package/dist/sdk/query/activity.d.ts +14 -2
  104. package/dist/sdk/query/activity.js +1 -1
  105. package/dist/sdk/query/calendar.d.ts +16 -0
  106. package/dist/sdk/query/calendar.js +3 -3
  107. package/dist/sdk/query/context.js +2 -2
  108. package/dist/sdk/query/get.js +1 -1
  109. package/dist/sdk/query/list.js +1 -1
  110. package/dist/sdk/query/search-contracts.js +1 -1
  111. package/dist/sdk/query/window-pagination.d.ts +20 -0
  112. package/dist/sdk/query/window-pagination.js +2 -0
  113. package/dist/sdk/read-output-contracts.js +1 -1
  114. package/dist/sdk/runtime.d.ts +1 -1
  115. package/dist/sdk/runtime.js +1 -1
  116. package/dist/sdk/schema-migration.js +2 -2
  117. package/dist/sdk/templates.d.ts +7 -1
  118. package/dist/sdk/templates.js +2 -2
  119. package/docs/COMMANDS.md +19 -1
  120. package/docs/EXTENSIONS.md +1 -1
  121. package/docs/MERGE_SAFETY.md +28 -0
  122. package/docs/SDK.md +85 -6
  123. package/docs/generated/FLAG_LEXICON_BUDGETS.md +2 -2
  124. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +5 -3
  125. package/marketplace.json +1 -1
  126. package/package.json +1 -1
  127. package/packages/pm-beads/package.json +1 -1
  128. package/packages/pm-calendar/extensions/calendar/index.ts +6 -0
  129. package/packages/pm-calendar/package.json +1 -1
  130. package/packages/pm-command-kit/package.json +1 -1
  131. package/packages/pm-digital-twin/package.json +1 -1
  132. package/packages/pm-governance-audit/package.json +1 -1
  133. package/packages/pm-guide-shell/package.json +1 -1
  134. package/packages/pm-kanban/package.json +1 -1
  135. package/packages/pm-lifecycle-hooks/package.json +1 -1
  136. package/packages/pm-linked-test-adapters/package.json +1 -1
  137. package/packages/pm-search-advanced/package.json +1 -1
  138. package/packages/pm-templates/extensions/templates/runtime.ts +3 -1
  139. package/packages/pm-templates/package.json +1 -1
  140. package/packages/pm-todos/package.json +1 -1
  141. package/packages/pm-vcs/package.json +1 -1
  142. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  143. package/plugins/pm-claude/package.json +1 -1
  144. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  145. package/plugins/pm-codex/package.json +1 -1
  146. package/plugins/pm-codex/plugin.json +1 -1
  147. package/runtime-dependencies.json +1 -1
  148. package/dist/cli-bundle/chunks/chunk-VPMQEVU6.js +0 -20
  149. package/dist/cli-bundle/chunks/register-operations-BOCBWNKJ.js +0 -2
  150. package/dist/cli-bundle/chunks/stage-WRDTMCCF.js +0 -2
  151. package/dist/cli-bundle/focused-chunks/chunk-3QYTS4OY.js +0 -12
  152. package/dist/cli-bundle/focused-chunks/chunk-CEEOWDB7.js +0 -8
  153. package/dist/cli-bundle/focused-chunks/chunk-GXAXDPD4.js +0 -2
  154. package/dist/cli-bundle/focused-chunks/chunk-NFFPNMTH.js +0 -2
  155. package/dist/cli-bundle/focused-chunks/chunk-XTYEASIY.js +0 -2
  156. package/dist/cli-bundle/focused-chunks/stage-MQE4PFWT.js +0 -2
@@ -1,3 +1,3 @@
1
- (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]="826dab45-600c-58df-a150-eacecfb6ef95")}catch{}})();var b=["commands","renderers","hooks","schema","importers","search","parser","preflight","services"],F=2,v=Object.freeze({migration:"schema",validation:"schema"}),M=Object.freeze({version:2,capabilities:[...b],legacy_aliases:{...v}}),P=["off","warn","enforce"],U=["off","warn","enforce"],Y=["none","restricted","strict"],q=["block","warn"],W=["commands.override","commands.handler","hooks.beforecommand","hooks.beforemutation","hooks.aftercommand","hooks.onwrite","hooks.onread","hooks.onindex","schema.flags","schema.itemfields","schema.itemtypes","schema.relationshipkinds","schema.migrations","schema.profiles","parser.override","preflight.override","services.override","renderers.override","importers.importer","importers.exporter","search.provider","search.vectorstore","services.assuranceprovider"],X=["output_format","error_format","help_format","lock_acquire","lock_release","history_append","item_store_write","item_store_delete","context_relevance","command_result"];function m(){return{mode:"off",trust_mode:"off",require_provenance:!1,trusted_extensions:[],default_sandbox_profile:"none",allowed_extensions:[],blocked_extensions:[],allowed_capabilities:[],blocked_capabilities:[],allowed_surfaces:[],blocked_surfaces:[],allowed_commands:[],blocked_commands:[],allowed_actions:[],blocked_actions:[],allowed_services:[],blocked_services:[],extension_overrides:[]}}(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]="3d6df465-e82e-57d8-a687-6c2e720c99c1")}catch{}})();var E=["goal","objective","value","impact","outcome","why_now","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","unblock_note","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result"],T=["id","title","description","type","pm_format_version","source_type","type_options","status","priority","tags","created_at","updated_at","deadline","reminders","events","closed_at","completed_at","assignee","claim_principal","source_owner","author","estimated_minutes","acceptance_criteria","design","external_ref","definition_of_ready","order",...E,"affected_version","fixed_version","component","regression","customer_impact","dependencies","comments","notes","learnings","files","tests","test_runs","docs","close_reason","duplicate_of","plan_mode","plan_scope","plan_harness","plan_resume_context","plan_validation","plan_decisions","plan_discoveries","plan_steps"],k=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]="9a92abe3-1900-5a69-a35d-6aa592c83da0")}catch{}})();var I=Object.freeze([{id:"draft",roles:["draft"]},{id:"open",roles:["active","default_open"]},{id:"in_progress",aliases:["in-progress"],roles:["active"]},{id:"blocked",roles:["blocked"]},{id:"closed",roles:["terminal","terminal_done","default_close"]},{id:"canceled",aliases:["cancelled"],roles:["terminal","terminal_canceled","default_cancel"]}]),O=Object.freeze({draft_status:"draft",open_status:"open",in_progress_status:"in_progress",blocked_status:"blocked",close_status:"closed",canceled_status:"canceled"}),z=".agents/pm",$="settings.json",V="Closed at creation via pm create",N=["","epics","features","tasks","chores","issues","schema","history","search","extensions","locks"],A=["decisions","events","reminders","milestones","meetings","plans"],J=[...N,...A],Q={Epic:"epics",Feature:"features",Task:"tasks",Chore:"chores",Issue:"issues",Decision:"decisions",Event:"events",Reminder:"reminders",Milestone:"milestones",Meeting:"meetings",Plan:"plans"},D={minimal:{ownership_enforcement:"none",create_mode_default:"progressive",close_validation_default:"off",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!1,duplicate_detection_mode:"off",duplicate_detection_threshold:.8,duplicate_detection_limit:3},default:{ownership_enforcement:"warn",create_mode_default:"progressive",close_validation_default:"warn",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3},strict:{ownership_enforcement:"strict",create_mode_default:"strict",close_validation_default:"strict",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"strict",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3}},S=["no active blocker","ready for planned execution sequencing","work completed","work is closed"],f={blocked_reason:["no active blocker because work is closed","work is closed"],resolution:["closed with implementation evidence","closed with verification evidence","work completed and recorded","work is closed"],actual_result:["closed and recorded","work completed","work completed and recorded"]};function h(e){return e?[...e]:void 0}var Z={version:1,id_prefix:"pm-",ids:{token_length:4},author_default:"",agent_identity:{probes_enabled:!0,identity_vocabulary:{version:1,aliases:{}},harness_signals:[]},mutation_guard:{require_attributed_author:!1,secret_guard:"advise",stale_in_progress_hours:72},item_format:"toon",locks:{ttl_seconds:1800,wait_ms:3e3},checkpoints:{retention_days:14},output:{default_format:"toon"},ux:{deprecation_hints:!0},history:{missing_stream:"auto_create",compact_policy:{enabled:!1,max_entries:500,trigger:"health_warn"}},validation:{sprint_release_format:"warn",parent_reference:"warn",metadata_profile:"core",metadata_required_fields:[],lifecycle_stale_blocker_reason_patterns:[...S],lifecycle_closure_like_blocked_reason_patterns:[...f.blocked_reason],lifecycle_closure_like_resolution_patterns:[...f.resolution],lifecycle_closure_like_actual_result_patterns:[...f.actual_result],estimate_defaults_by_type:{}},governance:{preset:"minimal",...D.minimal},workflow:{definition_of_done:[]},testing:{record_results_to_items:!1,allow_untrusted_linked_tests:!1},telemetry:{enabled:!0,first_run_prompt_completed:!1,capture_level:"redacted",endpoint:"https://pm-cli.unbrained.dev/v1/events",installation_id:"",retention_days:365},agent_guidance:{prompt_completed:!1,declined:!1,declined_at:"",template_version:1,last_checked_files:[]},item_types:{definitions:[]},schema:{version:1,files:{types:"schema/types.json",statuses:"schema/statuses.json",fields:"schema/fields.json",workflows:"schema/workflows.json"},statuses:I.map(e=>({...e,aliases:h(e.aliases),roles:h(e.roles)})),fields:[],workflow:{...O},unknown_field_policy:"allow"},extensions:{enabled:[],disabled:[],policy:m()},search:{score_threshold:0,hybrid_semantic_weight:.7,max_results:50,embedding_model:"",embedding_batch_size:32,embedding_timeout_ms:3e4,scanner_max_batch_retries:3,provider:"",default_mode:"auto",mutation_refresh_policy:"semantic_configured",query_expansion:{enabled:!1,provider:""},rerank:{enabled:!1,model:"",top_k:20}},providers:{openai:{base_url:"",api_key:"",model:""},ollama:{base_url:"",model:""}},context:{default_depth:"brief",activity_limit:10,stale_threshold_days:7,sections:{hierarchy:!0,activity:!0,progress:!0,recently_created:!0,unparented:!0,blockers:!0,files:!0,workload:!0,staleness:!0,tests:!0}},vector_store:{adapter:"",collection_name:"pm_items",qdrant:{url:"",api_key:""},lancedb:{path:""}}},H={metadata:{},body:""},w={SUCCESS:0,GENERIC_FAILURE:1,USAGE:2,NOT_FOUND:3,CONFLICT:4,DEPENDENCY_FAILED:5,NO_EFFECT:6,PARTIAL_EFFECT:7},R=Object.freeze({unknown_command:"usage",unknown_option:"usage",missing_required_option:"usage",missing_required_argument:"usage",invalid_command_usage:"usage",linked_test_value_not_quoted:"usage",invalid_argument_value:"validation",health_findings:"validation",validation_findings:"validation",close_through_update:"validation",no_update_fields:"validation",unsupported_update_option:"validation",tracker_not_initialized:"validation",item_not_found:"validation",ownership_conflict:"conflict",lock_conflict:"conflict",terminal_state_conflict:"conflict",dependency_failed:"runtime",init_gitignore_unwritable:"runtime",merge_git_config_unwritable:"runtime",command_failed:"runtime",unknown_error:"runtime"});function ee(e){let t=(e??"").trim().toLowerCase();if(t.length===0)return"unknown";let o=R[t];return typeof o=="string"?o:t.includes("conflict")||t.includes("locked")?"conflict":t.startsWith("unknown_")||t.startsWith("missing_required_")?"usage":t.startsWith("invalid_")||t.endsWith("_not_found")||t.includes("validation")?"validation":t.endsWith("_error")||t.endsWith("_failed")?"runtime":"unknown"}(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]="5740fcf4-dad8-5bcc-b68d-99fa81c43655")}catch{}})();var u=class extends Error{exitCode;code;context;constructor(t,o,i={}){super(t),this.name="PmCliError",this.exitCode=o,this.context=i,this.code=i.code}};import*as r from"node:fs/promises";import{constants as p}from"node:fs";import c from"node:path";import C 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]="3792f1fd-ed9d-5252-887d-e4517a55fb9c")}catch{}})();var L=[10,25,50,100];async function y(e){await r.mkdir(e,{recursive:!0})}async function le(e){try{return await r.access(e),!0}catch{return!1}}function g(e){return x(e)||l(e,"ENOTDIR")}function x(e){return l(e,"ENOENT")}async function ce(e){try{return await r.readFile(e,"utf8")}catch(t){if(g(t))return null;throw t}}async function de(e,t){let o=await r.open(e,p.O_RDONLY|p.O_NOFOLLOW|p.O_NONBLOCK);try{if(!(await o.stat()).isFile())throw t;return await o.readFile("utf8")}finally{await o.close()}}function _e(e){let t=e?.replaceAll(c.sep,"/"),o=t!==void 0&&!c.posix.isAbsolute(t)&&!c.win32.isAbsolute(t)&&!t.split("/").includes(".."),i=o?t.split("/")[0]:void 0,s={"settings.json":"settings",runtime:"runtime",schema:"schema",history:"history",transactions:"transactions"},n=i===void 0?"tracker_storage":Object.hasOwn(s,i)?s[i]:"tracker_storage",d=o&&t.length>0&&t.length<=160&&t.split("/").every(a=>a!=="."&&/^[a-zA-Z0-9_.-]+$/u.test(a)),_=d?t:`${n} (entry name redacted)`;return new u(`Transaction preview requires regular files and directories. Inspect ${_} relative to the selected tracker root.`,w.USAGE,{code:"transaction_preview_non_regular_file",preview_storage:{storage_area:n,...d?{relative_entry:t}:{},entry_redacted:!d},required:"regular files and directories within the configured tracker storage",why:"Preview does not follow linked entries or read special files.",nextSteps:[`Inspect ${_} within the selected tracker for links, directories used as files, or special files; do not follow link targets.`,"Restore the intended regular files and directories, then retry the original dry-run command."]})}async function ue(e,t,o={}){let i=c.dirname(e);o.createParentDirectories!==!1&&await y(i);let s=c.join(i,`.${c.basename(e)}.${process.pid}.${Date.now()}.${C.randomBytes(4).toString("hex")}.tmp`);await r.writeFile(s,t,"utf8");try{await r.rename(s,e)}catch(n){if(process.platform==="win32"&&(l(n,"EPERM")||l(n,"EBUSY"))){let d=n;for(let _ of L){await new Promise(a=>setTimeout(a,_));try{await r.rename(s,e);return}catch(a){if(d=a,!l(a,"EPERM")&&!l(a,"EBUSY"))break}}try{await r.unlink(s)}catch{}throw d}if(l(n,"EXDEV")){try{await r.copyFile(s,e)}finally{try{await r.unlink(s)}catch{}}return}try{await r.unlink(s)}catch{}throw n}}async function fe(e,t){let o=c.dirname(e);await y(o);let i=await r.open(e,"a");try{await i.writeFile(`${t}
1
+ (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]="826dab45-600c-58df-a150-eacecfb6ef95")}catch{}})();var b=["commands","renderers","hooks","schema","importers","search","parser","preflight","services"],F=2,v=Object.freeze({migration:"schema",validation:"schema"}),M=Object.freeze({version:2,capabilities:[...b],legacy_aliases:{...v}}),P=["off","warn","enforce"],U=["off","warn","enforce"],Y=["none","restricted","strict"],q=["block","warn"],W=["commands.override","commands.handler","hooks.beforecommand","hooks.beforemutation","hooks.aftercommand","hooks.onwrite","hooks.onread","hooks.onindex","schema.flags","schema.itemfields","schema.itemtypes","schema.relationshipkinds","schema.migrations","schema.profiles","parser.override","preflight.override","services.override","renderers.override","importers.importer","importers.exporter","search.provider","search.vectorstore","services.assuranceprovider"],X=["output_format","error_format","help_format","lock_acquire","lock_release","history_append","item_store_write","item_store_delete","context_relevance","command_result"];function m(){return{mode:"off",trust_mode:"off",require_provenance:!1,trusted_extensions:[],default_sandbox_profile:"none",allowed_extensions:[],blocked_extensions:[],allowed_capabilities:[],blocked_capabilities:[],allowed_surfaces:[],blocked_surfaces:[],allowed_commands:[],blocked_commands:[],allowed_actions:[],blocked_actions:[],allowed_services:[],blocked_services:[],extension_overrides:[]}}(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]="3d6df465-e82e-57d8-a687-6c2e720c99c1")}catch{}})();var E=["goal","objective","value","impact","outcome","why_now","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","unblock_note","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result"],T=["id","title","description","type","pm_format_version","source_type","type_options","status","priority","tags","created_at","updated_at","deadline","reminders","events","closed_at","completed_at","assignee","claim_principal","source_owner","author","estimated_minutes","acceptance_criteria","design","external_ref","definition_of_ready","order",...E,"affected_version","fixed_version","component","regression","customer_impact","dependencies","comments","notes","learnings","files","tests","test_runs","docs","close_reason","duplicate_of","plan_mode","plan_scope","plan_harness","plan_resume_context","plan_validation","plan_decisions","plan_discoveries","plan_steps"],k=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]="9a92abe3-1900-5a69-a35d-6aa592c83da0")}catch{}})();var I=Object.freeze([{id:"draft",roles:["draft"]},{id:"open",roles:["active","default_open"]},{id:"in_progress",aliases:["in-progress"],roles:["active"]},{id:"blocked",roles:["blocked"]},{id:"closed",roles:["terminal","terminal_done","default_close"]},{id:"canceled",aliases:["cancelled"],roles:["terminal","terminal_canceled","default_cancel"]}]),O=Object.freeze({draft_status:"draft",open_status:"open",in_progress_status:"in_progress",blocked_status:"blocked",close_status:"closed",canceled_status:"canceled"}),z=".agents/pm",$="settings.json",V="Closed at creation via pm create",N=["","epics","features","tasks","chores","issues","schema","history","search","extensions","locks"],A=["decisions","events","reminders","milestones","meetings","plans"],J=[...N,...A],Q={Epic:"epics",Feature:"features",Task:"tasks",Chore:"chores",Issue:"issues",Decision:"decisions",Event:"events",Reminder:"reminders",Milestone:"milestones",Meeting:"meetings",Plan:"plans"},D={minimal:{ownership_enforcement:"none",create_mode_default:"progressive",close_validation_default:"off",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!1,duplicate_detection_mode:"off",duplicate_detection_threshold:.8,duplicate_detection_limit:3},default:{ownership_enforcement:"warn",create_mode_default:"progressive",close_validation_default:"warn",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3},strict:{ownership_enforcement:"strict",create_mode_default:"strict",close_validation_default:"strict",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"strict",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3}},S=["no active blocker","ready for planned execution sequencing","work completed","work is closed"],f={blocked_reason:["no active blocker because work is closed","work is closed"],resolution:["closed with implementation evidence","closed with verification evidence","work completed and recorded","work is closed"],actual_result:["closed and recorded","work completed","work completed and recorded"]};function h(e){return e?[...e]:void 0}var Z={version:1,id_prefix:"pm-",ids:{token_length:4},author_default:"",agent_identity:{probes_enabled:!0,identity_vocabulary:{version:1,aliases:{}},harness_signals:[]},mutation_guard:{require_attributed_author:!1,secret_guard:"advise",stale_in_progress_hours:72},item_format:"toon",locks:{ttl_seconds:1800,wait_ms:3e3},checkpoints:{retention_days:14},output:{default_format:"toon"},ux:{deprecation_hints:!0},history:{missing_stream:"auto_create",compact_policy:{enabled:!1,max_entries:500,trigger:"health_warn"}},validation:{sprint_release_format:"warn",parent_reference:"warn",metadata_profile:"core",metadata_required_fields:[],lifecycle_stale_blocker_reason_patterns:[...S],lifecycle_closure_like_blocked_reason_patterns:[...f.blocked_reason],lifecycle_closure_like_resolution_patterns:[...f.resolution],lifecycle_closure_like_actual_result_patterns:[...f.actual_result],estimate_defaults_by_type:{}},governance:{preset:"minimal",...D.minimal},workflow:{definition_of_done:[]},testing:{record_results_to_items:!1,allow_untrusted_linked_tests:!1},telemetry:{enabled:!0,first_run_prompt_completed:!1,capture_level:"redacted",endpoint:"https://pm-cli.unbrained.dev/v1/events",installation_id:"",retention_days:365},agent_guidance:{prompt_completed:!1,declined:!1,declined_at:"",template_version:1,last_checked_files:[]},item_types:{definitions:[]},schema:{version:1,files:{types:"schema/types.json",statuses:"schema/statuses.json",fields:"schema/fields.json",workflows:"schema/workflows.json"},statuses:I.map(e=>({...e,aliases:h(e.aliases),roles:h(e.roles)})),fields:[],workflow:{...O},unknown_field_policy:"allow"},extensions:{enabled:[],disabled:[],policy:m()},search:{score_threshold:0,hybrid_semantic_weight:.7,max_results:50,embedding_model:"",embedding_batch_size:32,embedding_timeout_ms:3e4,scanner_max_batch_retries:3,provider:"",default_mode:"auto",mutation_refresh_policy:"semantic_configured",query_expansion:{enabled:!1,provider:""},rerank:{enabled:!1,model:"",top_k:20}},providers:{openai:{base_url:"",api_key:"",model:""},ollama:{base_url:"",model:""}},context:{default_depth:"brief",activity_limit:10,stale_threshold_days:7,sections:{hierarchy:!0,activity:!0,progress:!0,recently_created:!0,unparented:!0,blockers:!0,files:!0,workload:!0,staleness:!0,tests:!0}},vector_store:{adapter:"",collection_name:"pm_items",qdrant:{url:"",api_key:""},lancedb:{path:""}}},H={metadata:{},body:""},w={SUCCESS:0,GENERIC_FAILURE:1,USAGE:2,NOT_FOUND:3,CONFLICT:4,DEPENDENCY_FAILED:5,NO_EFFECT:6,PARTIAL_EFFECT:7},R=Object.freeze({unknown_command:"usage",unknown_option:"usage",missing_required_option:"usage",missing_required_argument:"usage",invalid_command_usage:"usage",linked_test_value_not_quoted:"usage",invalid_argument_value:"validation",health_findings:"validation",validation_findings:"validation",close_through_update:"validation",no_update_fields:"validation",unsupported_update_option:"validation",tracker_not_initialized:"validation",item_not_found:"validation",ownership_conflict:"conflict",lock_conflict:"conflict",terminal_state_conflict:"conflict",dependency_failed:"runtime",init_gitignore_unwritable:"runtime",merge_git_config_unwritable:"runtime",command_failed:"runtime",unknown_error:"runtime"});function ee(e){let t=(e??"").trim().toLowerCase();if(t.length===0)return"unknown";let o=R[t];return typeof o=="string"?o:t.includes("conflict")||t.includes("locked")?"conflict":t.startsWith("unknown_")||t.startsWith("missing_required_")?"usage":t.startsWith("invalid_")||t.endsWith("_not_found")||t.includes("validation")?"validation":t.endsWith("_error")||t.endsWith("_failed")?"runtime":"unknown"}(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]="72af1939-fe63-50a3-b327-cfd16d9e953c")}catch{}})();var u=class extends Error{exitCode;code;context;constructor(t,o,i={}){super(t),this.name="PmCliError",this.exitCode=o,this.context=i,this.code=i.code}};import*as r from"node:fs/promises";import{constants as p}from"node:fs";import c from"node:path";import C 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]="3792f1fd-ed9d-5252-887d-e4517a55fb9c")}catch{}})();var L=[10,25,50,100];async function y(e){await r.mkdir(e,{recursive:!0})}async function le(e){try{return await r.access(e),!0}catch{return!1}}function g(e){return x(e)||l(e,"ENOTDIR")}function x(e){return l(e,"ENOENT")}async function ce(e){try{return await r.readFile(e,"utf8")}catch(t){if(g(t))return null;throw t}}async function de(e,t){let o=await r.open(e,p.O_RDONLY|p.O_NOFOLLOW|p.O_NONBLOCK);try{if(!(await o.stat()).isFile())throw t;return await o.readFile("utf8")}finally{await o.close()}}function _e(e){let t=e?.replaceAll(c.sep,"/"),o=t!==void 0&&!c.posix.isAbsolute(t)&&!c.win32.isAbsolute(t)&&!t.split("/").includes(".."),i=o?t.split("/")[0]:void 0,s={"settings.json":"settings",runtime:"runtime",schema:"schema",history:"history",transactions:"transactions"},n=i===void 0?"tracker_storage":Object.hasOwn(s,i)?s[i]:"tracker_storage",d=o&&t.length>0&&t.length<=160&&t.split("/").every(a=>a!=="."&&/^[a-zA-Z0-9_.-]+$/u.test(a)),_=d?t:`${n} (entry name redacted)`;return new u(`Transaction preview requires regular files and directories. Inspect ${_} relative to the selected tracker root.`,w.USAGE,{code:"transaction_preview_non_regular_file",preview_storage:{storage_area:n,...d?{relative_entry:t}:{},entry_redacted:!d},required:"regular files and directories within the configured tracker storage",why:"Preview does not follow linked entries or read special files.",nextSteps:[`Inspect ${_} within the selected tracker for links, directories used as files, or special files; do not follow link targets.`,"Restore the intended regular files and directories, then retry the original dry-run command."]})}async function ue(e,t,o={}){let i=c.dirname(e);o.createParentDirectories!==!1&&await y(i);let s=c.join(i,`.${c.basename(e)}.${process.pid}.${Date.now()}.${C.randomBytes(4).toString("hex")}.tmp`);await r.writeFile(s,t,"utf8");try{await r.rename(s,e)}catch(n){if(process.platform==="win32"&&(l(n,"EPERM")||l(n,"EBUSY"))){let d=n;for(let _ of L){await new Promise(a=>setTimeout(a,_));try{await r.rename(s,e);return}catch(a){if(d=a,!l(a,"EPERM")&&!l(a,"EBUSY"))break}}try{await r.unlink(s)}catch{}throw d}if(l(n,"EXDEV")){try{await r.copyFile(s,e)}finally{try{await r.unlink(s)}catch{}}return}try{await r.unlink(s)}catch{}throw n}}async function fe(e,t){let o=c.dirname(e);await y(o);let i=await r.open(e,"a");try{await i.writeFile(`${t}
2
2
  `,"utf8")}finally{await i.close()}}async function pe(e){try{await r.unlink(e)}catch(t){if(!g(t))throw t}}function l(e,t){return typeof e=="object"&&e!==null&&"code"in e&&e.code===t}export{b as a,F as b,v as c,M as d,P as e,U as f,Y as g,q as h,W as i,X as j,m as k,E as l,k as m,I as n,O as o,z as p,$ as q,V as r,N as s,J as t,Q as u,D as v,S as w,f as x,Z as y,H as z,w as A,ee as B,u as C,y as D,le as E,g as F,x as G,ce as H,de as I,_e as J,ue as K,fe as L,pe as M};
3
- //# sourceMappingURL=chunk-R7KWBFM2.js.map
3
+ //# sourceMappingURL=chunk-3CYXE6BV.js.map