@unbrained/pm-cli 2026.8.14 → 2026.8.15

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 (145) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +25 -2
  3. package/dist/cli/commander-usage.js +17 -4
  4. package/dist/cli/error-guidance.d.ts +2 -0
  5. package/dist/cli/error-guidance.js +52 -25
  6. package/dist/cli/main.js +3 -2
  7. package/dist/cli/register-mutation.js +4 -2
  8. package/dist/cli/register-operations.js +5 -5
  9. package/dist/cli-bundle/bundle-manifest.json +150 -150
  10. package/dist/cli-bundle/chunks/{chunk-TXMEUUUY.js → chunk-24GAV7XL.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-TMJ7URWS.js → chunk-AIM6VT2N.js} +9 -9
  12. package/dist/cli-bundle/chunks/chunk-DSWDLTDR.js +197 -0
  13. package/dist/cli-bundle/chunks/{chunk-FIW4P64F.js → chunk-J42EGKDK.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-KIEGUBYQ.js +2 -0
  15. package/dist/cli-bundle/chunks/{chunk-SBRKH6OR.js → chunk-KLKYLSDX.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-G5JUB66K.js → chunk-LJHOAVGI.js} +59 -59
  17. package/dist/cli-bundle/chunks/{chunk-BFALV3YP.js → chunk-MEM2ZS3O.js} +2 -2
  18. package/dist/cli-bundle/chunks/chunk-QHPCJWEJ.js +35 -0
  19. package/dist/cli-bundle/chunks/{chunk-XAVMOK6B.js → chunk-WLPDLNEZ.js} +2 -2
  20. package/dist/cli-bundle/chunks/{register-list-query-T3EHHNNV.js → register-list-query-CT3LFDDN.js} +2 -2
  21. package/dist/cli-bundle/chunks/{register-mutation-E27WCLSZ.js → register-mutation-NWEVA5YS.js} +3 -3
  22. package/dist/cli-bundle/chunks/register-operations-AHIAG5KM.js +2 -0
  23. package/dist/cli-bundle/chunks/{register-setup-3YXZ444E.js → register-setup-ZJZFVAKE.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/chunk-4X57RE4U.js +2 -0
  25. package/dist/cli-bundle/focused-chunks/{chunk-XDNAW5OI.js → chunk-6XKF3PGV.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/chunk-7NJ4QYQ2.js +2 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-WCVE2NIG.js → chunk-EXZA4257.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-ITAUHSO6.js +50 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-4DQ2YERC.js → chunk-KLVUMNXJ.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-K7RWWOAG.js → chunk-KT5XMYSX.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-PPFGQDSI.js → chunk-KTKH4IMG.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-M67F5AIN.js +8 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-KSEDUWVZ.js → chunk-NSPYTG6G.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/chunk-OKA6ELTL.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-PUISBOPP.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/chunk-QLNMCESQ.js +155 -0
  37. package/dist/cli-bundle/focused-chunks/{chunk-LZ4MV3RH.js → chunk-SLKC6QLJ.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/chunk-U65UC4G3.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/{chunk-KFSZ3BP6.js → chunk-WTSER4WJ.js} +6 -6
  40. package/dist/cli-bundle/focused-chunks/{chunk-YOOI3UZX.js → chunk-ZMFXQ7VF.js} +2 -2
  41. package/dist/cli-bundle/main.js +13 -13
  42. package/dist/cli-bundle/sdk-authoring.js +1 -1
  43. package/dist/cli-bundle/sdk-contracts.js +1 -1
  44. package/dist/cli-bundle/sdk-core.js +32 -35
  45. package/dist/cli-bundle/sdk-governance.js +1 -1
  46. package/dist/cli-bundle/sdk-graph.js +1 -1
  47. package/dist/cli-bundle/sdk-merge.js +32 -31
  48. package/dist/cli-bundle/sdk-query.js +1 -1
  49. package/dist/cli-bundle/sdk-runtime.js +1 -1
  50. package/dist/cli-bundle/sdk-testing.js +1 -1
  51. package/dist/cli-bundle/sdk.js +2 -2
  52. package/dist/core/diagnostics/remediation.js +7 -2
  53. package/dist/core/extensions/reserved-host-flags.js +3 -2
  54. package/dist/core/history/replay.d.ts +14 -1
  55. package/dist/core/history/replay.js +45 -8
  56. package/dist/core/output/output.d.ts +2 -0
  57. package/dist/core/output/output.js +3 -2
  58. package/dist/core/shared/command-types.d.ts +2 -0
  59. package/dist/core/shared/command-types.js +2 -2
  60. package/dist/core/shared/errors.d.ts +12 -0
  61. package/dist/core/shared/errors.js +2 -2
  62. package/dist/mcp/tool-definitions.js +9 -5
  63. package/dist/sdk/agent/refusal-reachability.d.ts +61 -0
  64. package/dist/sdk/agent/refusal-reachability.js +91 -3
  65. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  66. package/dist/sdk/cli-bootstrap.js +7 -2
  67. package/dist/sdk/cli-contracts/completeness.js +3 -2
  68. package/dist/sdk/cli-contracts/flag-contracts.js +3 -2
  69. package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
  70. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +5 -0
  71. package/dist/sdk/cli-contracts/runtime-contracts.js +23 -7
  72. package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -5
  73. package/dist/sdk/cli-contracts/tool-schema.js +10 -3
  74. package/dist/sdk/cli-program.js +3 -2
  75. package/dist/sdk/core.d.ts +2 -2
  76. package/dist/sdk/core.js +3 -3
  77. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +26 -2
  78. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -26
  79. package/dist/sdk/governance/assurance-action.d.ts +7 -1
  80. package/dist/sdk/governance/assurance-action.js +7 -6
  81. package/dist/sdk/governance/assurance-mutation-error.d.ts +42 -1
  82. package/dist/sdk/governance/assurance-mutation-error.js +27 -3
  83. package/dist/sdk/governance/assurance-runtime.js +12 -11
  84. package/dist/sdk/governance/assurance.d.ts +9 -0
  85. package/dist/sdk/governance/assurance.js +80 -14
  86. package/dist/sdk/governance/extension-host-version.d.ts +25 -0
  87. package/dist/sdk/governance/extension-host-version.js +105 -0
  88. package/dist/sdk/governance/health.d.ts +32 -1
  89. package/dist/sdk/governance/health.js +119 -27
  90. package/dist/sdk/governance/provenance-health.d.ts +27 -0
  91. package/dist/sdk/governance/provenance-health.js +95 -3
  92. package/dist/sdk/governance/validate.js +7 -8
  93. package/dist/sdk/governance.d.ts +6 -0
  94. package/dist/sdk/governance.js +8 -2
  95. package/dist/sdk/history-repair.d.ts +13 -1
  96. package/dist/sdk/history-repair.js +62 -18
  97. package/dist/sdk/linked-artifacts.js +16 -5
  98. package/dist/sdk/pagination.d.ts +15 -0
  99. package/dist/sdk/pagination.js +9 -5
  100. package/dist/sdk/query/context.d.ts +5 -1
  101. package/dist/sdk/query/context.js +14 -5
  102. package/dist/sdk/read-output/continuation.d.ts +11 -0
  103. package/dist/sdk/read-output/continuation.js +132 -0
  104. package/dist/sdk/read-output-budget.d.ts +1 -1
  105. package/dist/sdk/read-output-budget.js +14 -10
  106. package/dist/sdk/read-output-contracts.d.ts +66 -2
  107. package/dist/sdk/read-output-contracts.js +183 -19
  108. package/dist/sdk/read-output-rows.d.ts +2 -0
  109. package/dist/sdk/read-output-rows.js +15 -2
  110. package/dist/sdk/runtime-input.js +4 -2
  111. package/docs/ASSURANCE.md +59 -2
  112. package/docs/COMMANDS.md +8 -2
  113. package/docs/READ_OUTPUT_CONTRACTS.md +49 -8
  114. package/docs/RELEASING.md +42 -5
  115. package/docs/SDK_CONTEXT_INTEGRITY.md +64 -2
  116. package/marketplace.json +2 -2
  117. package/package.json +3 -3
  118. package/packages/pm-beads/package.json +1 -1
  119. package/packages/pm-calendar/package.json +1 -1
  120. package/packages/pm-command-kit/package.json +1 -1
  121. package/packages/pm-digital-twin/package.json +1 -1
  122. package/packages/pm-governance-audit/package.json +1 -1
  123. package/packages/pm-guide-shell/package.json +1 -1
  124. package/packages/pm-kanban/package.json +1 -1
  125. package/packages/pm-lifecycle-hooks/package.json +1 -1
  126. package/packages/pm-linked-test-adapters/package.json +1 -1
  127. package/packages/pm-search-advanced/package.json +1 -1
  128. package/packages/pm-templates/package.json +1 -1
  129. package/packages/pm-todos/package.json +1 -1
  130. package/packages/pm-vcs/package.json +1 -1
  131. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  132. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  133. package/sdk/public-surface.json +1133 -187
  134. package/dist/cli-bundle/chunks/chunk-BBOFSVAK.js +0 -197
  135. package/dist/cli-bundle/chunks/chunk-YAMTJL6Y.js +0 -34
  136. package/dist/cli-bundle/chunks/chunk-YSVSMJ2B.js +0 -2
  137. package/dist/cli-bundle/chunks/register-operations-4R6I7CPY.js +0 -2
  138. package/dist/cli-bundle/focused-chunks/chunk-F43TT2QQ.js +0 -8
  139. package/dist/cli-bundle/focused-chunks/chunk-KYUQGTSB.js +0 -2
  140. package/dist/cli-bundle/focused-chunks/chunk-PGXJQLCT.js +0 -155
  141. package/dist/cli-bundle/focused-chunks/chunk-Q4YY3XNF.js +0 -2
  142. package/dist/cli-bundle/focused-chunks/chunk-QK753U3U.js +0 -46
  143. package/dist/cli-bundle/focused-chunks/chunk-QUMB2J27.js +0 -2
  144. package/dist/cli-bundle/focused-chunks/chunk-SM7MTG27.js +0 -2
  145. package/dist/cli-bundle/focused-chunks/chunk-ZM6TZVHC.js +0 -2
@@ -1,4 +1,4 @@
1
- import{$ as ro,$b as ke,$c as bt,B as Ht,Bc as q,C as g,Ci as Co,De as ko,Dh as Qt,E as h,Fb as uo,Gb as mo,H as oo,Ha as ao,Ia as so,Ja as J,Nd as bo,Oi as Ro,Pg as xo,Q as A,Qg as et,Ra as j,Rg as tt,Sc as $,Sd as H,Sg as So,Ta as co,Tc as K,Tg as Eo,Ua as be,Uc as wo,Ug as oe,Vc as W,Vg as Ue,Wb as Xt,Wc as ee,Wg as $o,Xb as fo,Xg as de,Yb as ho,Yc as vo,Zb as wt,Zc as Qe,ba as io,bc as xe,bg as Y,c as x,ca as Q,cl as kt,d as Qn,da as ce,e as ne,ec as go,eh as re,f as z,fg as Zt,g as he,gc as vt,hc as yo,hh as O,i as eo,ic as _o,ig as Me,ih as Ee,ja as Kt,ka as Vt,l as _t,la as Yt,mg as Se,nh as Ao,sc as B,th as To,u as Wt,wb as lo,wh as Io,x as to,xb as po,xh as Oo,y as no,zh as Ce}from"./chunk-BBOFSVAK.js";import{mkdir as es,readFile as ts}from"node:fs/promises";import Lo 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]="6ed4a26f-2ae2-556a-87db-56844108757f")}catch{}})();var en=class extends Error{constructor(t="Workspace transaction interrupted"){super(t),this.name="WorkspaceTransactionInterruptedError"}},ns="sdk-workspace-transaction",os=/^[a-zA-Z0-9._-]+$/,rs=30,is=3e3;function Po(e,t){if(typeof e!="string")throw new TypeError(`${t} must be a string`);let n=e.trim();if(!n||!os.test(n))throw new TypeError(`${t} must match [a-zA-Z0-9._-]+`);return n}function No(e,t){if(typeof e!="string")throw new TypeError(`${t} must be a string`);let n=e.trim();if(!n)throw new TypeError(`${t} must be non-empty`);return n}function Do(e,t,n){let o=e??t;if(!Number.isInteger(o)||o<=0)throw new TypeError(`${n} must be a positive integer`);return o}function Mo(e,t){return Lo.join(e,"transactions","sdk",`${t}.json`)}async function $e(e,t){t.updatedAt=A();let n=Mo(e,t.transactionId);await es(Lo.dirname(n),{recursive:!0}),await he(n,`${JSON.stringify(t,null,2)}
1
+ import{$ as ro,$b as ke,$c as bt,$g as $o,B as Ht,Bc as q,Bh as Io,C as g,Ch as Oo,E as h,Eh as Ce,Fb as uo,Fe as ko,Gb as mo,H as oo,Ha as ao,Hi as Co,Ia as so,Ih as Qt,Ja as J,Nd as bo,Q as A,Ra as j,Sc as $,Sd as H,Ta as co,Tc as K,Ti as Ro,Ua as be,Uc as wo,Ug as xo,Vc as W,Vg as et,Wb as Xt,Wc as ee,Wg as tt,Xb as fo,Xg as So,Yb as ho,Yc as vo,Yg as Eo,Zb as wt,Zc as Qe,Zg as oe,_g as Ue,ah as de,ba as io,bc as xe,c as x,ca as Q,d as Qn,da as ce,e as ne,ec as go,f as z,g as he,gc as vt,gg as Y,hc as yo,hl as kt,i as eo,ic as _o,ja as Kt,jh as re,ka as Vt,kg as Zt,l as _t,la as Yt,mh as O,ng as Me,nh as Ee,rg as Se,sc as B,sh as Ao,u as Wt,wb as lo,x as to,xb as po,y as no,yh as To}from"./chunk-DSWDLTDR.js";import{mkdir as es,readFile as ts}from"node:fs/promises";import Lo 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]="6ed4a26f-2ae2-556a-87db-56844108757f")}catch{}})();var en=class extends Error{constructor(t="Workspace transaction interrupted"){super(t),this.name="WorkspaceTransactionInterruptedError"}},ns="sdk-workspace-transaction",os=/^[a-zA-Z0-9._-]+$/,rs=30,is=3e3;function Po(e,t){if(typeof e!="string")throw new TypeError(`${t} must be a string`);let n=e.trim();if(!n||!os.test(n))throw new TypeError(`${t} must match [a-zA-Z0-9._-]+`);return n}function No(e,t){if(typeof e!="string")throw new TypeError(`${t} must be a string`);let n=e.trim();if(!n)throw new TypeError(`${t} must be non-empty`);return n}function Do(e,t,n){let o=e??t;if(!Number.isInteger(o)||o<=0)throw new TypeError(`${n} must be a positive integer`);return o}function Mo(e,t){return Lo.join(e,"transactions","sdk",`${t}.json`)}async function $e(e,t){t.updatedAt=A();let n=Mo(e,t.transactionId);await es(Lo.dirname(n),{recursive:!0}),await he(n,`${JSON.stringify(t,null,2)}
2
2
  `)}function as(e){return Number.isInteger(e.attempt)&&typeof e.author=="string"&&typeof e.createdAt=="string"&&typeof e.updatedAt=="string"}function Re(e){return Object.assign(Object.create(null),e)}function ss(e,t){try{let n=JSON.stringify(e,(o,r)=>{if(typeof r=="number"&&!Number.isFinite(r))throw new TypeError(`${t} contains a non-finite number`);if(r===void 0||typeof r=="function"||typeof r=="symbol")throw new TypeError(`${t} contains a non-JSON value`);return r});return JSON.parse(n)}catch(n){throw new TypeError(`${t} must be JSON serializable`,{cause:n})}}function tn(e,t){return e===void 0?void 0:ss(e,t)}function nn(e,t,n,o){let r=tn(n,o);r===void 0?delete e[t]:e[t]=r}function jo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Fo(e,t){return Array.isArray(e)&&new Set(e).size===e.length&&e.every(n=>typeof n=="string"&&t.includes(n))}function cs(e,t){if(!Fo(e.startedStepIds,t)||!Fo(e.completedStepIds,t)||!jo(e.results)||!jo(e.compensationData))return!1;let n=e.startedStepIds,o=new Set(n),r=e.completedStepIds,i=new Set(r);return Object.keys(e.compensationData).some(a=>!o.has(a))||Object.keys(e.results).some(a=>!i.has(a))?!1:e.status==="committed"?t.every(a=>i.has(a)):e.status!=="compensated"||i.size===0&&o.size===0}function ds(e,t,n){let o;try{o=JSON.parse(e)}catch{throw new TypeError(`Workspace transaction ${t} journal is invalid JSON`)}if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError(`Workspace transaction ${t} journal is invalid`);let r=o,i=r.schemaVersion===1&&r.transactionId===t,a=Array.isArray(r.stepIds)&&r.stepIds.length===n.length&&r.stepIds.every((l,p)=>l===n[p]),s=cs(r,n),c=as(r),d=["applying","compensating","compensated","committed"].includes(String(r.status));if(!i||!a||!s||!c||!d)throw new TypeError(`Workspace transaction ${t} journal does not match the supplied plan`);return{...r,results:Re(r.results),compensationData:Re(r.compensationData)}}async function ls(e,t,n,o,r){let i=r,a=i!==void 0;if(i?.status==="compensating"&&await Uo(e,i),i===void 0||i.status==="compensated"){let s=A();i={schemaVersion:1,transactionId:t,author:n,status:"applying",attempt:(i?.attempt??0)+1,createdAt:i?.createdAt??s,updatedAt:s,stepIds:o,startedStepIds:[],completedStepIds:[],results:Re(),compensationData:Re()},await $e(e.pmRoot,i),await ge(e,i,"prepared")}return{journal:i,recovered:a}}async function ps(e,t,n){try{await ms(t,e.steps),await $e(e.pmRoot,t);let o=new Set(t.completedStepIds),r=new Set(t.startedStepIds);for(let i of e.steps){if(o.has(i.id))continue;let a=await i.inspect(),s=tn(a.result,`Step ${i.id} result`);if(a.state!=="applied"){let c=await i.prepareCompensation?.();nn(t.compensationData,i.id,c,`Step ${i.id} compensation data`),r.add(i.id),t.startedStepIds=e.steps.map(l=>l.id).filter(l=>r.has(l)),await $e(e.pmRoot,t);let d=await i.apply();s=tn(d,`Step ${i.id} result`)}await ge(e,t,"step_applied",i.id),o.add(i.id),t.completedStepIds=e.steps.map(c=>c.id).filter(c=>o.has(c)),nn(t.results,i.id,s,`Step ${i.id} result`),await $e(e.pmRoot,t),await ge(e,t,"step_recorded",i.id)}return await ge(e,t,"committing"),t.status="committed",await $e(e.pmRoot,t),await ge(e,t,"committed"),{transactionId:t.transactionId,status:"committed",recovered:n,results:Re(t.results)}}catch(o){if(o instanceof en||t.status==="committed")throw o;try{await Uo(e,t)}catch(r){throw new AggregateError([o,r],`Workspace transaction failed and compensation failed: ${String(r)}`,{cause:r})}throw o}}async function us(e,t,n){try{return ds(await ts(Mo(e,t),"utf8"),t,n)}catch(o){if(o!==null&&typeof o=="object"&&"code"in o&&ne(o))return;throw o}}async function ge(e,t,n,o){await e.onTransition?.({transactionId:t.transactionId,attempt:t.attempt,transition:n,...o===void 0?{}:{stepId:o}})}async function ms(e,t){let n=new Set,o=Re();for(let r of t){let i=await r.inspect();i.state==="applied"&&(n.add(r.id),nn(o,r.id,i.result,`Step ${r.id} result`))}e.results=o,e.completedStepIds=t.map(r=>r.id).filter(r=>n.has(r))}async function Uo(e,t){t.status="compensating",await $e(e.pmRoot,t),await ge(e,t,"compensating");let n=new Set(t.completedStepIds),o=new Set(t.startedStepIds);for(let r of[...e.steps].reverse()){if(!o.has(r.id)&&!n.has(r.id))continue;let i;try{i=o.has(r.id)&&(await r.inspect()).state==="applied"}catch{i=o.has(r.id)}i&&(await ge(e,t,"step_compensating",r.id),await r.compensate(t.compensationData[r.id])),n.delete(r.id),o.delete(r.id),t.completedStepIds=e.steps.map(a=>a.id).filter(a=>n.has(a)),t.startedStepIds=e.steps.map(a=>a.id).filter(a=>o.has(a)),delete t.results[r.id],delete t.compensationData[r.id],await $e(e.pmRoot,t),await ge(e,t,"step_compensated",r.id)}t.status="compensated",await $e(e.pmRoot,t),await ge(e,t,"compensated")}async function Go(e){let t=No(e.pmRoot,"Transaction pmRoot"),n=Po(e.transactionId,"Transaction id"),o=No(e.author,"Transaction author"),r=Do(e.lockTtlSeconds,rs,"Transaction lock TTL"),i=Do(e.lockWaitMs,is,"Transaction lock wait"),a=[...e.steps];if(a.length===0)throw new TypeError("Workspace transaction requires at least one step");let s=a.map(l=>{let p=Po(l.id,"Transaction step id");if(p!==l.id)throw new TypeError("Transaction step id must not contain surrounding whitespace");return p});if(new Set(s).size!==s.length)throw new TypeError("Workspace transaction step ids must be unique");let c={...e,pmRoot:t,transactionId:n,author:o,steps:a,lockTtlSeconds:r,lockWaitMs:i},d=await Y(t,ns,r,o,!1,!1,i);try{let l=await us(t,n,s),p=l!==void 0;if(l?.status==="committed")return{transactionId:n,status:"committed",recovered:!0,results:Re(l.results)};let u=await ls(c,n,o,s,l);return await ps(c,u.journal,p||u.recovered)}finally{await d()}}import{readFile as fs,writeFile as hs}from"node:fs/promises";import nt 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]="89261a49-97e5-5ffc-a81c-2409f0b529cf")}catch{}})();var Jo="# pm-cli:runtime-cache:start",on="# pm-cli:runtime-cache:end",qo=".agents/pm",gs=["runtime/","search/","locks/","transactions/","checkpoints/"],ys=["search/eval-queries.json"];async function zo(e){try{return await e()}catch(t){throw t instanceof Error&&"code"in t&&typeof t.code=="string"&&["EACCES","EPERM","EROFS"].includes(t.code)?new h("The workspace .gitignore is not writable.",g.GENERIC_FAILURE,{code:"init_gitignore_unwritable",reason:t.code.toLowerCase(),required:"Grant the current user read and write access to the workspace .gitignore before initialization.",why:"pm init must publish its managed runtime-cache ignore fence without replacing unrelated entries.",nextSteps:["Grant read and write access to the workspace .gitignore and rerun pm init.","If the workspace is intentionally read-only, initialize pm in a writable workspace or clone."]}):t}}function Bo(e){return e.replaceAll("\\","/").replace(/^\.\/+/,"").replace(/\/+$/,"")}function rn(e){let t=e.replaceAll("\\","/");return nt.isAbsolute(e)||t===".."||t.startsWith("../")}function _s(e=qo){let t=Bo(e);return[Jo,...gs.map(n=>n==="search/"?`${t}/${n}*`:`${t}/${n}`),...ys.map(n=>`!${t}/${n}`),on].join(`
3
3
  `)}async function Wo(e,t={}){let n=nt.join(e,".gitignore"),o=qo;if(t.pmRoot!==void 0){let l=Bo(nt.relative(nt.resolve(e),nt.resolve(t.pmRoot)));if(rn(l))return{path:n,changed:!1};l.length>0&&(o=l)}let r="";try{r=await zo(()=>fs(n,"utf8"))}catch(l){if(!(l instanceof Error&&"code"in l&&ne(l)))throw l}let i=r.indexOf(Jo),a=r.indexOf(on),c=(i>=0&&a>=i?`${r.slice(0,i)}${r.slice(a+on.length)}`:r).trimEnd(),d=`${c.length>0?`${c}
4
4
 
@@ -74,4 +74,4 @@ Agent guidance check
74
74
  `),V.write(`Telemetry helps improve reliability and can be disabled anytime via pm config.
75
75
  `);let c=t?"Y/n":"y/N",d=await n.question(`Enable telemetry for this project? [${c}] `),l=Ua(d,t);return V.write(`
76
76
  `),{prefix:r,preset:s,telemetry_enabled:l}}finally{n.close()}}function xu(e){return{presetFromOption:Vn(e.preset),useDefaults:e.defaults===!0,authorFromOption:ja(e.author),installBundledPackages:e.withPackages===!0,agentGuidanceMode:Ma(e.agentGuidance),typePreset:Da(e.typePreset)}}function Su(e){let t=[];return e.prefixArg!==void 0&&e.settings.id_prefix!==e.normalizedPrefix&&t.push("id_prefix"),e.presetFromOption!==void 0&&e.settings.governance.preset!==e.presetFromOption&&t.push("governance_preset"),e.authorFromOption!==void 0&&e.settings.author_default!==e.authorFromOption&&t.push("author_default"),t}function Eu(e,t,n,o){if(t.length===0||n)return;let r=o.discovery==="ancestor";throw new h(`${r?`No tracker exists in ${o.requested_cwd}; pm init found an ancestor tracker at ${o.tracker_root}. `:""}Refusing to update existing tracker settings at ${e} without --force.`,g.USAGE,{code:"init_existing_settings_requires_force",type:"urn:pm-cli:error:init_existing_settings_requires_force",required:`--force for ${t.join(", ")}`,why:r?"Ancestor discovery is useful for normal commands, but init must make the selected existing workspace explicit before changing its identity or policy settings.":"pm init is safe to rerun, but changing id prefix, governance preset, or default author on an existing tracker can corrupt long-lived project context when an agent meant to initialize a sandbox path.",resolved_path:o.tracker_root,requested_path:o.requested_cwd,suggested_path:o.suggested_current_tracker_root,examples:["pm init --yes","pm init ./sandbox-pm --yes",...r?['pm init <name> --yes --pm-path "$PWD/.agents/pm"']:[],"pm init acme --yes --force"],nextSteps:[...r?['To create a new tracker in the current directory, rerun with --pm-path "$PWD/.agents/pm".']:[],"If you meant to initialize a sandbox tracker, pass a path-like positional such as ./sandbox-pm or /tmp/pm-test.","If you intentionally want to rewrite this existing tracker's init-managed settings, rerun with --force."]})}function $u(e){let t=!1;return e.prefixArg!==void 0&&e.settings.id_prefix!==e.normalizedPrefix&&(e.settings.id_prefix=e.normalizedPrefix,e.warnings.push(`updated:id_prefix:${e.normalizedPrefix}`),t=!0),e.presetFromOption!==void 0&&e.settings.governance.preset!==e.presetFromOption&&(Yn(e.settings,e.presetFromOption),e.warnings.push(`updated:governance_preset:${e.presetFromOption}`),t=!0),e.authorFromOption!==void 0&&e.settings.author_default!==e.authorFromOption&&(e.settings.author_default=e.authorFromOption,e.warnings.push(`updated:author_default:${e.authorFromOption}`),t=!0),t}async function Au(e){let t=await O(e.pmRoot);e.warnings.push(`already_exists:${e.settingsPath}`);let n=Su({settings:t,normalizedPrefix:e.normalizedPrefix,prefixArg:e.prefixArg,presetFromOption:e.normalizedOptions.presetFromOption,authorFromOption:e.normalizedOptions.authorFromOption});return Eu(e.settingsPath,n,e.options.force===!0,e.target),$u({settings:t,normalizedPrefix:e.normalizedPrefix,prefixArg:e.prefixArg,presetFromOption:e.normalizedOptions.presetFromOption,authorFromOption:e.normalizedOptions.authorFromOption,warnings:e.warnings})&&await Ee(e.pmRoot,t),{settings:t,normalizedPrefix:e.normalizedPrefix,chosenPreset:e.normalizedOptions.presetFromOption,wizardUsed:!1}}async function Tu(e){let t=e.normalizedPrefix,n=e.normalizedOptions.presetFromOption,o,r=!1;if(e.normalizedOptions.presetFromOption===void 0&&!e.normalizedOptions.useDefaults&&process.stdin.isTTY===!0&&process.stdout.isTTY===!0){let c=await Wa(t,Ht.telemetry.enabled);t=c.prefix,n=c.preset,o=c.telemetry_enabled,r=!0}let i=n??"minimal",a=vu();a.id_prefix=t,Yn(a,i);let s=bo()?.trim()||void 0;return a.author_default=e.normalizedOptions.authorFromOption??s??"",o!==void 0&&(a.telemetry.enabled=o,a.telemetry.first_run_prompt_completed=!0),await Ee(e.pmRoot,a),{settings:a,normalizedPrefix:t,chosenPreset:n,wizardUsed:r}}async function Ca(e){return e.settingsExists?await Au(e):await Tu({pmRoot:e.pmRoot,normalizedPrefix:e.normalizedPrefix,normalizedOptions:e.normalizedOptions})}async function Iu(e){let t=await Oa({pm_root:e.pmRoot,cwd:e.cwd,mode:e.agentGuidanceMode,interactive:process.stdin.isTTY===!0&&process.stdout.isTTY===!0,settings:e.settings});return e.warnings.push(...t.warnings),t.settings_changed&&await Ee(e.pmRoot,e.settings),{...t.summary,next_steps:t.next_steps}}async function Ou(e,t){let n=[],o=[],r=await vo(e,t.schema);for(let i of r.created_paths)n.push(i),o.push(...await q({path:i,scope:"project",op:"init:runtime_schema_file"}));return{createdDirs:n,warnings:o}}async function Cu(e){if(e.typePreset===void 0)return;let t=await za(e.pmRoot,e.settings,e.typePreset);return e.warnings.push(`registered_type_preset:${e.typePreset}`),e.warnings.push(...await q({path:t.file,scope:"project",op:"init:type_preset"})),t}async function Ru(e){let n=J(e.settings,B()).folders.filter(r=>!Wt.includes(r)),o=await Ba(e.pmRoot,n);e.createdDirs.push(...o.createdDirs),e.warnings.push(...o.warnings)}function Pu(e){let t=F.resolve(e.tracker_root),n=F.dirname(t);return F.basename(t)==="pm"&&F.basename(n)===".agents"?F.dirname(n):e.workspace_root}async function Nu(e,t,n,o){if(!e)return;let r=await Jn("all",{install:!0,project:!0},{...t,path:n});o.push(...r.warnings);let i=Ga(r),a=i.packages.filter(s=>!s.ok).map(s=>s.alias);if(!i.installed_all||a.length>0)throw new h(`pm init --with-packages did not install all bundled packages successfully${a.length>0?`: ${a.join(", ")}`:"."}`,g.GENERIC_FAILURE);return i}function Ha(e){let t=o=>xt([...e.target.mode==="workspace-discovery"?[]:["--pm-path",e.target.tracker_root],...o]),n=[`Create your first item: ${t(["create","--type","Task","--title","<title>"])}`,`List active items: ${t(["list"])}`,`Get agent-friendly project context: ${t(["context"])}`];e.installBundledPackages?n.push(`Explore newly-available commands: ${t(["cal"])}, ${t(["templates"])}, ${t(["guide"])}`):(n.push(`Add optional packages for richer workflows: ${t(["install","calendar","--project"])}, ${t(["install","templates","--project"])}, ${t(["install","guide-shell","--project"])}`),n.push(`Or install everything bundled: ${t(["init","--with-packages"])} (idempotent on re-run)`)),e.registeredTypePreset&&n.push(`Inspect registered preset types: ${t(["schema","list"])}, ${t(["schema","show",e.registeredTypePreset.registered[0]??e.registeredTypePreset.updated[0]])}`),n.push("Supported agent harnesses are attributed automatically; use --author or PM_AUTHOR only when an explicit identity override is required.");for(let o of e.agentGuidanceNextSteps){let r=e.target.mode==="workspace-discovery"?o:o.replace(/\bpm (?=[a-z])/g,()=>`${t([])} `);n.includes(r)||n.push(r)}return n}async function Ka(e,t,n,o=mn){if(t===null){n.push("merge_fence_skipped:not_git_repository:run pm merge install after moving the tracker into a Git repository");return}try{let r=await o({pmRoot:e,workspaceRoot:t});r.gitattributes.changed&&n.push(`updated:merge_fence:${r.gitattributes.path}`)}catch(r){if(!(r instanceof h))throw r;n.push(`merge_fence_skipped:install_failed:${r.context.code??"pm_error"}:${r.message}:run pm merge install after resolving the Git repository error`)}}async function y_(e,t,n={}){let o=process.cwd(),r=Fa(o,t,e,n.workspace),i=r.pmRoot;e=La(r.prefixArg,n.idPrefix);let a=xu(n);await qa(i,r.target.mode==="tracker-path",n.force===!0);let s=[],c=[],d=F.join(i,"settings.json"),l=await x(d),p;l&&(p=await Ca({pmRoot:i,settingsPath:d,settingsExists:l,normalizedPrefix:Se(e),prefixArg:e,options:n,normalizedOptions:a,warnings:c,target:r.target}));let u=await Ba(i,Wt);s.push(...u.createdDirs),c.push(...u.warnings),p??=await Ca({pmRoot:i,settingsPath:d,settingsExists:l,normalizedPrefix:Se(e),prefixArg:e,options:n,normalizedOptions:a,warnings:c,target:r.target});let{settings:m}=p,y=Pu(r.target),w=await ln(y??F.dirname(i)),f=y??w,_=await Iu({pmRoot:i,cwd:f??o,agentGuidanceMode:a.agentGuidanceMode,settings:m,warnings:c}),v=await Ou(i,m);s.push(...v.createdDirs),c.push(...v.warnings);let k=await Cu({pmRoot:i,settings:m,typePreset:a.typePreset,warnings:c});if(k&&(m=await O(i)),await Ru({pmRoot:i,settings:m,createdDirs:s,warnings:c}),f&&a.agentGuidanceMode!=="status"){let C=await Wo(f,{pmRoot:i});C.changed&&c.push(`updated:gitignore:${C.path}`)}!l&&n.mergeFence!==!1&&a.agentGuidanceMode!=="status"&&await Ka(i,w,c);let T=await Nu(a.installBundledPackages,t,i,c),R=Ha({installBundledPackages:a.installBundledPackages,registeredTypePreset:k,agentGuidanceNextSteps:_.next_steps,target:r.target});return{ok:!0,path:i,target:r.target,settings:m,created_dirs:s,warnings:c,governance_preset:m.governance.preset,wizard_used:p.wizardUsed,...k?{registered_type_preset:k}:{},...T?{installed_packages:T}:{},next_steps:R,agent_guidance:_}}export{en as a,Go as b,Jo as c,on as d,gs as e,_s as f,Wo as g,Ge as h,vs as i,an as j,xt as k,Yu as l,ks as m,xs as n,Ko as o,St as p,Zo as q,ze as r,cn as s,Ts as t,ln as u,un as v,or as w,gm as x,ym as y,rr as z,_m as A,mn as B,mr as C,Be as D,We as E,fr as F,lr as G,Je as H,qe as I,pr as J,mc as K,vr as L,Sr as M,pc as N,uc as O,$f as P,Af as Q,Tf as R,it as S,If as T,Of as U,Cf as V,Rf as W,Pf as X,Nf as Y,Df as Z,jf as _,Ff as $,Lf as aa,Mf as ba,Uf as ca,Gf as da,zf as ea,Jf as fa,qf as ga,Bf as ha,Wf as ia,Hf as ja,Kf as ka,Vf as la,Yf as ma,Xf as na,Zf as oa,Qf as pa,b as qa,we as ra,Ot as sa,Oc as ta,st as ua,Ct as va,Wr as wa,ni as xa,Nn as ya,gi as za,fg as Aa,xl as Ba,Ci as Ca,Ri as Da,Dn as Ea,hl as Fa,gl as Ga,yl as Ha,wi as Ia,vi as Ja,Jn as Ka,ya as La,By as Ma,Oa as Na,h_ as Oa,g_ as Pa,y_ as Qa};
77
- //# sourceMappingURL=chunk-XAVMOK6B.js.map
77
+ //# sourceMappingURL=chunk-WLPDLNEZ.js.map
@@ -1,4 +1,4 @@
1
- import{a as x}from"./chunk-OAC5NIV4.js";import{A as K,C as X,b as z,d as V,j as _,l as W}from"./chunk-BFALV3YP.js";import{B as F,Xb as N,Ya as U,ab as M,hc as B,jc as P,lc as J,oc as H,pc as Q,qc as Y,rc as Z,xa as D}from"./chunk-TMJ7URWS.js";import"./chunk-WYRZZ5ZE.js";import{Af as h,C as c,Cf as y,Df as f,E as p,El as O,Fl as j,Gl as E,Hl as C,Il as R,Jl as q,Kl as T,Ll as L,Mg as I,Ml as G,Ng as A,Nl as $,rl as m,uf as b,ul as s,vc as v,wl as l}from"./chunk-BBOFSVAK.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]="6ed80dad-480c-584f-9977-f0058fcfe5a3")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bb98131e-c0d5-5055-8ad4-b0df3824cfbb")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72332f20-83db-5566-b130-ad4c21267fa9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="85050f31-1e96-5ae9-88a3-77ce4b042cca")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ac3636d0-67b6-58f6-9f0a-a478f20b0ac5")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d6123f68-21a1-5a33-ac06-4893ca6ba20d")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b1affe9d-1c93-5641-be3b-c46a68b93e09")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f76a3502-b942-530f-95f5-b37f4c365e3c")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="35fa89cf-806d-5d6a-ad6b-dad1dc3f1457")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="14619397-8d05-59fb-9744-f78532b98d26")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0bcbdc33-3145-54cc-b4b6-10df50aef57a")}catch{}})();function ne(e,t){return!t||t.size===0?!0:e==="context"?t.has("context")||t.has("ctx"):t.has(e)}function ee(e){if(e===void 0)return;if(typeof e!="string")throw new p("List --format must be one of csv|table|json|ndjson|toon",c.USAGE);let t=e.trim().toLowerCase();if(t==="csv"||t==="table"||t==="json"||t==="ndjson"||t==="toon")return t;throw new p("List --format must be one of csv|table|json|ndjson|toon",c.USAGE)}function w(e,t,o,n=!1){if(t===void 0)return o;if(typeof t!="string")throw new p(`${e} --format must be one of ${n?"json|ndjson|toon":"json|toon"}`,c.USAGE);let a=t.trim().toLowerCase();if(a!=="json"&&(a!=="ndjson"||!n)&&a!=="toon")throw new p(`${e} --format must be one of ${n?"json|ndjson|toon":"json|toon"}`,c.USAGE);if(o.json===!0&&a==="toon")throw new p(`${e} cannot combine --json with --format toon`,c.USAGE);return{...o,json:a==="json"||a==="ndjson"}}function oe(e,t){U[t]==="brief"&&e.includeBody!==!0&&e.compact!==!0&&e.brief!==!0&&e.full!==!0&&e.fields===void 0&&(e.brief=!0)}function te(e){e.option("--has-notes","Show only items that have notes").option("--has-learnings","Show only items that have learnings").option("--has-files","Show only items that have linked files").option("--has-docs","Show only items that have linked docs").option("--has-tests","Show only items that have linked tests").option("--has-comments","Show only items that have comments").option("--has-deps","Show only items that have dependencies").option("--has-body","Show only items that have a non-empty body").option("--has-linked-command","Show only items whose linked tests carry a runnable command").option("--no-notes","Show only items that have no notes").option("--no-learnings","Show only items that have no learnings").option("--no-files","Show only items that have no linked files").option("--filter-files-missing","Alias for --no-files").option("--no-docs","Show only items that have no linked docs").option("--filter-docs-missing","Alias for --no-docs").option("--no-tests","Show only items that have no linked tests").option("--no-comments","Show only items that have no comments").option("--no-deps","Show only items that have no dependencies").option("--empty-body","Show only items with an empty body").option("--no-linked-command","Show only items whose linked tests carry no runnable command").option("--filter-reviewer-missing","Show only items missing reviewer").option("--filter-risk-missing","Show only items missing risk").option("--filter-confidence-missing","Show only items missing confidence").option("--filter-sprint-missing","Show only items missing sprint").option("--filter-release-missing","Show only items missing release")}function ie(e,t){let o=e.stream===!0,n=ee(e.format),a=n==="csv"||n==="table",i=n==="json"||n==="ndjson"||n==="toon"?w("List",e.format,t,!0):t;if(o&&!i.json)throw new p("--stream requires --json output mode.",c.USAGE);if((a||n==="ndjson")&&o)throw new p("--format csv|table|ndjson cannot be combined with --stream.",c.USAGE);return{streamMode:o,listFormat:n,effectiveGlobal:i}}function ae(e,t,o){if(o.listFormat==="csv"||o.listFormat==="table"){v(t);let n=t.items,a=o.listFormat==="csv"?I(n):A(n);!o.effectiveGlobal.quiet&&a.length>0&&h(`${a}
1
+ import{a as x}from"./chunk-OAC5NIV4.js";import{A as K,C as X,b as z,d as V,j as _,l as W}from"./chunk-MEM2ZS3O.js";import{B as F,Xb as N,Ya as U,ab as M,hc as B,jc as P,lc as J,oc as H,pc as Q,qc as Y,rc as Z,xa as D}from"./chunk-AIM6VT2N.js";import"./chunk-WYRZZ5ZE.js";import{Bl as l,C as c,E as p,Ef as h,Gf as y,Hf as f,Jl as O,Kl as j,Ll as E,Ml as C,Nl as R,Ol as q,Pl as T,Ql as L,Rg as I,Rl as G,Sg as A,Sl as $,vc as v,wl as m,yf as b,zl as s}from"./chunk-DSWDLTDR.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]="6ed80dad-480c-584f-9977-f0058fcfe5a3")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bb98131e-c0d5-5055-8ad4-b0df3824cfbb")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72332f20-83db-5566-b130-ad4c21267fa9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="85050f31-1e96-5ae9-88a3-77ce4b042cca")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ac3636d0-67b6-58f6-9f0a-a478f20b0ac5")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d6123f68-21a1-5a33-ac06-4893ca6ba20d")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b1affe9d-1c93-5641-be3b-c46a68b93e09")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f76a3502-b942-530f-95f5-b37f4c365e3c")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="35fa89cf-806d-5d6a-ad6b-dad1dc3f1457")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="14619397-8d05-59fb-9744-f78532b98d26")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0bcbdc33-3145-54cc-b4b6-10df50aef57a")}catch{}})();function ne(e,t){return!t||t.size===0?!0:e==="context"?t.has("context")||t.has("ctx"):t.has(e)}function ee(e){if(e===void 0)return;if(typeof e!="string")throw new p("List --format must be one of csv|table|json|ndjson|toon",c.USAGE);let t=e.trim().toLowerCase();if(t==="csv"||t==="table"||t==="json"||t==="ndjson"||t==="toon")return t;throw new p("List --format must be one of csv|table|json|ndjson|toon",c.USAGE)}function w(e,t,o,n=!1){if(t===void 0)return o;if(typeof t!="string")throw new p(`${e} --format must be one of ${n?"json|ndjson|toon":"json|toon"}`,c.USAGE);let a=t.trim().toLowerCase();if(a!=="json"&&(a!=="ndjson"||!n)&&a!=="toon")throw new p(`${e} --format must be one of ${n?"json|ndjson|toon":"json|toon"}`,c.USAGE);if(o.json===!0&&a==="toon")throw new p(`${e} cannot combine --json with --format toon`,c.USAGE);return{...o,json:a==="json"||a==="ndjson"}}function oe(e,t){U[t]==="brief"&&e.includeBody!==!0&&e.compact!==!0&&e.brief!==!0&&e.full!==!0&&e.fields===void 0&&(e.brief=!0)}function te(e){e.option("--has-notes","Show only items that have notes").option("--has-learnings","Show only items that have learnings").option("--has-files","Show only items that have linked files").option("--has-docs","Show only items that have linked docs").option("--has-tests","Show only items that have linked tests").option("--has-comments","Show only items that have comments").option("--has-deps","Show only items that have dependencies").option("--has-body","Show only items that have a non-empty body").option("--has-linked-command","Show only items whose linked tests carry a runnable command").option("--no-notes","Show only items that have no notes").option("--no-learnings","Show only items that have no learnings").option("--no-files","Show only items that have no linked files").option("--filter-files-missing","Alias for --no-files").option("--no-docs","Show only items that have no linked docs").option("--filter-docs-missing","Alias for --no-docs").option("--no-tests","Show only items that have no linked tests").option("--no-comments","Show only items that have no comments").option("--no-deps","Show only items that have no dependencies").option("--empty-body","Show only items with an empty body").option("--no-linked-command","Show only items whose linked tests carry no runnable command").option("--filter-reviewer-missing","Show only items missing reviewer").option("--filter-risk-missing","Show only items missing risk").option("--filter-confidence-missing","Show only items missing confidence").option("--filter-sprint-missing","Show only items missing sprint").option("--filter-release-missing","Show only items missing release")}function ie(e,t){let o=e.stream===!0,n=ee(e.format),a=n==="csv"||n==="table",i=n==="json"||n==="ndjson"||n==="toon"?w("List",e.format,t,!0):t;if(o&&!i.json)throw new p("--stream requires --json output mode.",c.USAGE);if((a||n==="ndjson")&&o)throw new p("--format csv|table|ndjson cannot be combined with --stream.",c.USAGE);return{streamMode:o,listFormat:n,effectiveGlobal:i}}function ae(e,t,o){if(o.listFormat==="csv"||o.listFormat==="table"){v(t);let n=t.items,a=o.listFormat==="csv"?I(n):A(n);!o.effectiveGlobal.quiet&&a.length>0&&h(`${a}
2
2
  `)}else if(o.listFormat==="ndjson"){v(t);let n=x(t.items);!o.effectiveGlobal.quiet&&n.length>0&&h(`${n}
3
3
  `)}else o.streamMode?E(e,t,o.effectiveGlobal):y(t,o.effectiveGlobal)}async function re(e){let t=m(e.actionCommand),o=Date.now();if(e.options.all===!0)throw new p("List --all was ambiguous and is no longer an alias for --no-truncate. Use `pm list --status all --no-truncate` for every status, or `pm list-all --no-truncate` for the dedicated all-status command.",c.USAGE,{code:"ambiguous_list_all",examples:["pm list --status all --no-truncate","pm list-all --no-truncate"]});let n=b("list",e.options),a=O(n);oe(a,e.name),e.excludeTerminal&&(a.excludeTerminal=!0),e.name==="list"&&a.status===void 0&&(a.status="all"),a.dependencyBlocked=e.dependencyBlocked;let i=ie(n,t),r=await M(e.dependencyBlocked?void 0:e.status,a,t);ae(e.name,r,i),t.profile&&f(`profile:command=${e.name} took_ms=${Date.now()-o}`)}function se(e,t){let{name:o,description:n,status:a,excludeTerminal:i,allowStatusFilter:r,dependencyBlocked:d}=t,u=e.command(o).description(n);r&&u.option("--status <value>","Filter by status (repeatable or comma-separated; matches any; all selects every status)",s),u.option("--for <intent>","Apply a declared context intent projection").option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--type <value>","Filter by item type (repeatable or comma-separated; matches any)",s).option("--tag <value>","Filter by tag (repeatable or comma-separated; matches any)",s).option("--priority <value>","Filter by priority (repeatable or comma-separated; matches any)",s).option("--deadline-before <value>","Filter by deadline upper bound (ISO/date string or relative)").option("--deadline-after <value>","Filter by deadline lower bound (ISO/date string or relative)").option("--today","Filter to items updated since local midnight today").option("--recent","Filter to items updated in the last 7 days").option("--updated-after <value>",'Filter by updated_at lower bound: ISO timestamp or signed relative (e.g. "-2h"/"-7d" for the past). "Changed since my last window" \u2192 --updated-after <ISO>').option("--updated-before <value>","Filter by updated_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-after <value>","Filter by created_at lower bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-before <value>","Filter by created_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--ids <value>","Filter by explicit item IDs (comma-separated or repeatable)").option("--assignee <value>","Filter by assignee",s).option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--parent <value>","Filter by parent item ID").option("--sprint <value>","Filter by sprint",s).option("--release <value>","Filter by release",s).option("--filter-ac-missing","Show only items missing acceptance_criteria").option("--filter-estimates-missing","Show only items missing estimated_minutes").option("--filter-resolution-missing","Show only terminal items missing resolution").option("--filter-metadata-missing","Show only items missing any tracked metadata (AC, estimate, or resolution)").option("--limit <n>","Limit returned item count").option("--offset <n>","Skip the first n matching rows before limit is applied").option("--after <cursor>","Continue after an opaque next_cursor from a previous list response").option("--no-truncate","Return every matched row after the explicit status and field filters").option("--include-body","Include item body in each returned list row").option("--strict-read","Fail closed if any item document or item directory cannot be read").option("--compact","Render compact list projection fields (mutually exclusive with --brief/--full/--fields)").option("--brief","Ultra-compact output: id, status, type, title only (agent-optimized, mutually exclusive with --compact/--full/--fields)").option("--full","Render full list projection fields (mutually exclusive with --compact/--brief/--fields)").option("--fields <value>","Render custom comma-separated list fields (mutually exclusive with --compact/--brief/--full; valid: --fields id,title)").option("--sort <value>","Sort field: priority|deadline|updated_at|created_at|title|parent (aliases: updated, created)").option("--order <value>","Sort order: asc|desc (requires --sort)").option("--tree","Render rows in parent/child tree order").option("--tree-depth <n>","Maximum recursion depth with --tree (0 keeps root rows only)").option("--format <value>","Output render mode: csv|table (human export) or json|ndjson|toon (machine output override)").option("--stream","Emit line-delimited JSON rows (requires --json)"),te(u),u.action(async(k,S)=>{await re({name:o,status:a,excludeTerminal:i,dependencyBlocked:d,options:k,actionCommand:S})}),l(u,"--tags <value>","Alias for --tag"),l(u,"--assignee_filter <value>","Alias for --assignee-filter"),l(u,"--tree_depth <n>","Alias for --tree-depth"),l(u,"--token_budget <n>","Alias for --token-budget"),l(u,"--all","Removed ambiguous alias; emits migration guidance"),l(u,"--filter-estimate-missing","Alias for --filter-estimates-missing")}async function le(e,t){let o=m(t),n=Date.now(),a=await z(j(e),o);y(a,o),o.profile&&f(`profile:command=aggregate took_ms=${Date.now()-n}`)}async function de(e,t){let o=m(t),n=Date.now(),a=G(b("context",e)),i=await P(a,o),r=N(a,o);if(r==="markdown")o.quiet||h(`${B(i)}
4
4
  `);else if(r==="ndjson"){v(i);let d=x([...i.high_level,...i.low_level,...i.blocked_fallback]);!o.quiet&&d.length>0&&h(`${d}
@@ -7,4 +7,4 @@ import{a as x}from"./chunk-OAC5NIV4.js";import{A as K,C as X,b as z,d as V,j as
7
7
  `)}else y(d,k);n.profile&&f(`profile:command=search took_ms=${Date.now()-a}`)}async function pe(e,t){let o=m(t),n=Date.now(),a=await X({mode:typeof e.mode=="string"?e.mode:void 0,k:typeof e.k=="string"?e.k:void 0,failUnder:typeof e.failUnder=="string"?e.failUnder:void 0,queries:typeof e.queries=="string"?e.queries:void 0,format:typeof e.format=="string"?e.format:void 0},o);if(y(a,w("Eval",e.format,o)),o.profile&&f(`profile:command=eval took_ms=${Date.now()-n}`),!a.passed)throw new p(`Eval gate failed: aggregate nDCG@${a.k} ${a.aggregate.ndcg} is below --fail-under ${a.fail_under}`,c.GENERIC_FAILURE)}async function fe(e,t,o){let n=m(o),a=Date.now(),i=b("get",t),r=await _(e,n,{depth:typeof i.depth=="string"?i.depth:void 0,fields:typeof i.fields=="string"?i.fields:void 0,full:!!i.full,tree:i.tree===!0,treeDepth:typeof i.treeDepth=="string"?i.treeDepth:typeof i.tree_depth=="string"?i.tree_depth:void 0,at:typeof i.at=="string"?i.at:void 0});y(r,w("Get",i.format,n)),n.profile&&f(`profile:command=get took_ms=${Date.now()-a}`)}async function me(e,t,o){let n=m(o),a=Date.now();if([t.compact,t.raw,t.full,t.provenance].filter(u=>u===!0).length>1)throw new p("History projection options are mutually exclusive. Use --compact, --provenance, or --full.",c.USAGE);let i=typeof t.field=="string"?t.field:void 0,r=!!t.strictExit||!!t.failOnWarn;if(r&&!t.verify)throw new p("--strict-exit requires --verify (it gates on the verification result).",c.USAGE);let d=await V(e,{limit:typeof t.limit=="string"?t.limit:void 0,compact:!(t.full===!0||t.provenance===!0),provenance:t.provenance===!0,provenanceSummary:t.provenanceSummary===!0,harness:g(t,"harness"),agentInstance:g(t,"agentInstance"),provenanceFilter:g(t,"provenanceFilter"),diff:!!t.diff||i!==void 0,field:i,verify:!!t.verify},n);y(d,w("History",t.format,n)),r&&d.verification&&!d.verification.ok&&(process.exitCode=c.GENERIC_FAILURE),n.profile&&f(`profile:command=history took_ms=${Date.now()-a}`)}function g(e,t){let o=e[t];return Array.isArray(o)?o:void 0}function ye(e,t){let o=g(e,"harness"),n=g(e,"agentInstance"),a=g(e,"provenanceFilter");return{pmRoot:t,since:typeof e.since=="string"?e.since:void 0,type:g(e,"type"),author:g(e,"author"),item:g(e,"item"),limit:typeof e.limit=="string"?Number(e.limit):void 0,full:e.full===!0,...e.provenance===!0?{provenance:!0}:{},...e.provenanceSummary===!0?{provenanceSummary:!0}:{},...o===void 0?{}:{harness:o},...n===void 0?{}:{agentInstance:n},...a===void 0?{}:{provenanceFilter:a}}}async function he(e,t){let o=m(t),n=Date.now(),a=ye(e,o.path);if(e.follow===!0){if(e.provenanceSummary===!0)throw new p("Events --provenance-summary is bounded to one page and cannot be combined with --follow.",c.USAGE);let d=typeof e.intervalMs=="string"?Number(e.intervalMs):void 0;for await(let u of Z({...a,intervalMs:d}))o.quiet||h(`${JSON.stringify(u)}
8
8
  `);return}let i=await Y(a);v(i);let r=x([...i.events,...i.provenance_summary===void 0?[]:[{type:"provenance_summary",provenance_summary:i.provenance_summary}]]);!o.quiet&&r.length>0&&h(`${r}
9
9
  `),o.profile&&f(`profile:command=events took_ms=${Date.now()-n}`)}async function ge(e,t){let o=m(t),n=Date.now();if([e.raw,e.compact,e.full,e.provenance].filter(d=>d===!0).length>1)throw new p("Activity projection options are mutually exclusive. Use --raw, --compact, --provenance, or --full.",c.USAGE);let a=L(e.stream);if(a&&!o.json)throw new p("--stream requires --json output mode.",c.USAGE);let i=T(e),r=await F(a&&e.full!==!0&&e.provenance!==!0?{...i,raw:!0,compact:!0}:i,o);a?C(r,i,o):y(r,o),o.profile&&f(`profile:command=activity took_ms=${Date.now()-n}`)}async function ve(e,t,o,n,a){let i=m(a),r=Date.now(),d=await D(e,t,o,{...Array.isArray(n.kind)?{kind:n.kind}:{},maxDepth:typeof n.maxDepth=="string"?n.maxDepth:void 0,limit:typeof n.limit=="string"?n.limit:void 0,after:typeof n.after=="string"?n.after:void 0,direction:typeof n.direction=="string"?n.direction:void 0,maxPaths:typeof n.maxPaths=="string"?n.maxPaths:void 0,sample:typeof n.sample=="string"?n.sample:void 0,...Array.isArray(n.exemptIsolate)?{exemptIsolate:n.exemptIsolate}:{},...Array.isArray(n.exemptIsolateType)?{exemptIsolateType:n.exemptIsolateType}:{},saveBaseline:n.saveBaseline===!0,rebuild:n.rebuild===!0,clear:n.clear===!0,summary:n.summary===!0,full:n.full===!0},i);y(d,i),i.profile&&f(`profile:command=graph took_ms=${Date.now()-r}`)}function ot(e,t){let o=t?.commandFilter,n=i=>ne(i,o),a=[{name:"list",description:"List items across every lifecycle status with optional filters.",excludeTerminal:!0,allowStatusFilter:!0},{name:"list-all",description:"List all items with optional filters.",excludeTerminal:!1,allowStatusFilter:!0},{name:"list-draft",description:"List draft items with optional filters.",status:"draft"},{name:"list-open",description:"List open items with optional filters.",status:"open",excludeTerminal:!1,allowStatusFilter:!1},{name:"list-in-progress",description:"List in-progress items with optional filters.",status:"in_progress",excludeTerminal:!1,allowStatusFilter:!1},{name:"list-blocked",description:"List blocked items (blocked status or open blocked_by dependencies, matching pm next) with optional filters.",dependencyBlocked:!0,excludeTerminal:!1,allowStatusFilter:!1},{name:"list-closed",description:"List closed items with optional filters.",status:"closed"},{name:"list-canceled",description:"List canceled items with optional filters.",status:"canceled"}];for(let i of a)n(i.name)&&se(e,i);if(n("aggregate")){let i=e.command("aggregate").description("Aggregate grouped item counts for governance queries.").option("--group-by <value>","Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)").option("--count","Return grouped counts (default behavior)").option("--completion","Add open/in_progress/closed/other counts and completion_pct per group").option("--sum <field>","Sum a numeric field per group").option("--avg <field>","Average a numeric field per group").option("--include-unparented","Include unparented rows when grouping by parent").option("--status <value>","Filter by item status").option("--type <value>","Filter by item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--deadline-before <value>","Filter by deadline upper bound (ISO/date string or relative)").option("--deadline-after <value>","Filter by deadline lower bound (ISO/date string or relative)").option("--assignee <value>","Filter by assignee").option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--parent <value>","Filter by parent item ID").option("--sprint <value>","Filter by sprint").option("--release <value>","Filter by release");l(i,"--include_unparented","Alias for --include-unparented"),l(i,"--assignee_filter <value>","Alias for --assignee-filter"),i.action(le)}if(n("context")){let i=e.command("context").alias("ctx").description("Show a token-efficient project context snapshot for next-work decisions.").option("--for <intent>","Apply a declared context intent projection").option("--date <value>","Anchor date/time for agenda window calculations (ISO/date string or relative)").option("--from <value>","Agenda lower bound (ISO/date string or relative)").option("--to <value>","Agenda upper bound (ISO/date string or relative)").option("--past","Include past agenda entries in bounded windows").option("--type <value>","Filter by item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--assignee <value>","Filter by assignee").option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--sprint <value>","Filter by sprint").option("--release <value>","Filter by release").option("--parent <id>","Scope the snapshot to one item's subtree (the item plus all descendants)").option("--limit <n>","Limit focus and agenda rows per section").option("--after <cursor>","Continue ranked focus after a next_cursor from a previous context response").option("--format <value>","Context output format override: markdown|toon|json|ndjson").option("--depth <value>","Context depth: brief|standard|deep|full (full = every section, no per-section cap)").option("--section <value...>","Include specific sections (repeatable; overrides --depth)").option("--fields <value>","Project focus rows to a comma-separated field subset (e.g. id,title,priority)").option("--activity-limit <n>","Limit recent activity entries (default: settings or 10)").option("--stale-threshold <value>","Staleness cutoff in days (e.g. 7 or 7d; default: settings or 7)").option("--explain-ranking","Include the scorer model, per-signal contributions, and ranked candidate ids").option("--token-budget <n>","Maximum estimated tokens spent on ranked focus rows").option("--no-extension-health","Omit the installed extension health summary").option("--no-tags","Omit tag arrays from context focus rows");l(i,"--assignee_filter <value>","Alias for --assignee-filter"),l(i,"--max-items <n>","Alias for --limit"),l(i,"--explain_ranking","Alias for --explain-ranking"),l(i,"--token_budget <n>","Alias for --token-budget"),i.action(de)}if(n("next")){let i=e.command("next").description("Recommend the next actionable (unblocked, ready) work item with rationale + blocked companion.").option("--for <intent>","Apply a declared context intent projection").option("--type <value>","Filter candidate items by type").option("--tag <value>","Filter candidate items by tag").option("--priority <value>","Filter candidate items by priority").option("--assignee <value>","Filter candidate items by assignee").option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--sprint <value>","Filter candidate items by sprint").option("--release <value>","Filter candidate items by release").option("--parent <id>","Scope to one item's subtree (the item plus all descendants)").option("--limit <n>","Limit ready rows (default: 5; non-positive falls back to default)").option("--blocked-limit <n>","Limit blocked rows (default: same as --limit)").option("--ready-only","Omit the blocked companion list").option("--include-decisions","Include human-gated Decision items in the claimable ready queue").option("--format <value>","Next output format override: markdown|toon|json").option("--explain-ranking","Include the scorer model, per-signal contributions, and ranked ready ids").option("--token-budget <n>","Maximum estimated tokens spent on the ranked ready queue");l(i,"--assignee_filter <value>","Alias for --assignee-filter"),l(i,"--blocked_limit <n>","Alias for --blocked-limit"),l(i,"--ready_only","Alias for --ready-only"),l(i,"--explain_ranking","Alias for --explain-ranking"),l(i,"--token_budget <n>","Alias for --token-budget"),i.action(ue)}if(n("search")){let i=e.command("search").argument("<keywords...>","Keyword query tokens").description("Search items with keyword, semantic, or hybrid retrieval. Inline field:value tokens (tag:/status:/type:/priority:) in the query are parsed as filters, e.g. 'auth tag:area:search status:open'.").option("--for <intent>","Apply a declared context intent projection").option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--mode <value>","Search mode: keyword|semantic|hybrid (default: keyword)").option("--semantic","Shorthand for --mode semantic").option("--hybrid","Shorthand for --mode hybrid").option("--match-mode <value>","Token match mode: and|or|exact (default: or with all-terms ranking bonus; and = hard-require every token; exact = exact phrase)").option("--min-score <value>","Per-query minimum score threshold (finite number >= 0); overrides settings search.score_threshold for this query only").option("--count","Return only the count of matching items (post-filter/threshold, pre-limit); skips hit rows").option("--semantic-weight <value>","Override hybrid semantic weight for this query (0..1); invalid values fall back to settings").option("--include-linked","Include linked files, docs, and tests in the searchable corpus").option("--title-exact","Require exact normalized title match for the full query string").option("--phrase-exact","Require exact normalized phrase match in searchable text").option("--highlight","Emit per-field matched-text snippets (wrapped in \xAB\u2026\xBB) on each hit; off by default").option("--status <value>","Filter by status before query (all, open/closed/canceled aliases, or configured status id; CSV)").option("--type <value>","Filter by item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--deadline-before <value>","Filter by deadline upper bound (ISO/date string or relative)").option("--deadline-after <value>","Filter by deadline lower bound (ISO/date string or relative)").option("--updated-after <value>",'Filter by updated_at lower bound: ISO timestamp or signed relative (e.g. "-2h"/"-7d" for the past)').option("--updated-before <value>","Filter by updated_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-after <value>","Filter by created_at lower bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-before <value>","Filter by created_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--assignee <value>","Filter by assignee").option("--sprint <value>","Filter by sprint").option("--release <value>","Filter by release").option("--parent <value>","Filter by parent item ID").option("--compact","Render compact search hits (default; mutually exclusive with --full/--fields)").option("--full","Render full search hits with nested item payloads (mutually exclusive with --compact/--fields)").option("--fields <value>","Render custom comma-separated search hit fields (mutually exclusive with --compact/--full; valid: --fields id,title,score; invalid: --full --fields id,title)").option("--format <value>","Search output format override: json|ndjson|toon").option("--limit <n>","Limit returned item count").option("--after <cursor>","Continue after an opaque next_cursor from a previous search response");te(i),i.action(ce),l(i,"--tags <value>","Alias for --tag"),l(i,"--token_budget <n>","Alias for --token-budget")}if(n("eval")&&e.command("eval").description("Evaluate search relevance against a curated golden-query set: reports nDCG@k, MRR@k, precision@k, and recall@k per query plus the macro average. Use --fail-under as a CI gate.").option("--mode <value>","Default retrieval mode for queries without their own: keyword|semantic|hybrid (default: keyword)").option("--k <n>","Metric cutoff @k (positive integer; default: 10)").option("--fail-under <value>","Exit non-zero when aggregate nDCG@k falls below this threshold (0..1); CI gate").option("--queries <path>",`Query JSON (${W}); default: search/eval-queries.json; errors show an example`).option("--format <value>","Eval output format override: json|toon").action(pe),n("get")){let i=e.command("get").argument("<id>","Item id").option("--for <intent>","Apply a declared context intent projection").option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--depth <value>","Detail depth: brief|standard|deep|full (full aliases deep; default: standard)").option("--full","Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)").option("--fields <value>","Render custom comma-separated item metadata fields (for example: --fields id,title,status,parent,type)").option("--tree","Include descendants rooted at the requested item").option("--tree-depth <n>","Maximum subtree depth for --tree descendants").option("--at <version-or-timestamp>","Reconstruct a verified historical item state without mutating it").option("--format <value>","Get output format override: json|toon").description("Show item details by ID.").action(fe);l(i,"--tree_depth <n>","Alias for --tree-depth"),l(i,"--token_budget <n>","Alias for --token-budget")}n("history")&&e.command("history").argument("<id>","Item id").option("--limit <n>","Return only the latest n history entries").option("--compact","Condensed output: show entry index, timestamp, op, author, patch count, and changed fields").option("--full","Show full history entries with JSON Patch payloads").option("--provenance","Show patch-free author, harness, instance, and extensible provenance").option("--provenance-summary","Include bounded provenance completeness counts").option("--harness <value>","Filter by recorded or vocabulary-resolved harness (repeatable)",s).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",s).option("--diff","Include per-entry field-level before/after value diffs computed by replaying the history chain").option("--field <name>","With --diff, show only entries that changed this field (implies --diff)").option("--verify","Verify hash chain and replay integrity for the full history stream").option("--strict-exit","With --verify, exit nonzero when verification fails (merge-safety gate parity with pm validate)").option("--fail-on-warn","Alias for --strict-exit").option("--format <value>","History output format override: json|toon").description("Show item history entries.").action(me),n("events")&&e.command("events").option("--since <cursor-or-timestamp>","Resume strictly after a durable cursor, or include events from an ISO timestamp").option("--type <value>","Filter by mutation operation (repeatable or comma-separated)",s).option("--author <value>","Filter by mutation author (repeatable or comma-separated)",s).option("--item <value>","Filter by item or workspace stream id (repeatable or comma-separated)",s).option("--limit <n>","Return at most 1,000 events (default: 100)").option("--full","Include each complete authoritative history entry").option("--provenance","Include patch-free author, harness, instance, and extensible provenance").option("--provenance-summary","Include bounded provenance completeness counts").option("--harness <value>","Filter by recorded or vocabulary-resolved harness (repeatable)",s).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",s).option("--follow","Continue emitting committed events as newline-delimited JSON").option("--interval-ms <n>","Empty-read delay while following (minimum: 10ms; default: 250ms)").description("Emit cursor-resumable committed mutation facts as newline-delimited JSON.").action(he),n("activity")&&e.command("activity").option("--id <value>","Filter by item ID").option("--op <value>","Filter by history operation").option("--author <value>","Filter by history author").option("--from <value>","Lower timestamp bound (ISO/date string or relative)").option("--to <value>","Upper timestamp bound (ISO/date string or relative)").option("--limit <n>","Return only the latest n activity entries").option("--unbounded","Explicitly return every matching activity entry (disables the default bound)").option("--compact","Condensed output: show only id, op, ts, author, msg per entry").option("--raw","Show the legacy compact per-event stream instead of the item digest").option("--full","Show full activity entries with JSON Patch payloads").option("--provenance","Show patch-free author, harness, instance, and extensible provenance").option("--provenance-summary","Include bounded provenance completeness counts").option("--harness <value>","Filter by recorded or vocabulary-resolved harness (repeatable)",s).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",s).option("--stream [mode]","Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl").description("Show recent activity across items.").action(ge),n("graph")&&e.command("graph").argument("<subcommand>","Graph query (ancestors, descendants, predecessors, successors, paths, impact, analyze, audit, communities, redundancy, dominators, slack, centrality, articulation, plan, index)").argument("[id]","Root item id (traversals, paths, impact, and dominators)").argument("[target]","Target item id (paths only)").option("--kind <value>","Restrict traversal to registered relationship kinds (repeatable or comma-separated)",s).option("--max-depth <value>","Maximum traversal depth (non-negative integer)").option("--limit <value>","Maximum returned rows per bounded collection").option("--after <value>","Resume a traversal after this previously returned node id").option("--direction <value>","Edge orientation for paths/impact (outgoing, incoming, or both)").option("--max-paths <value>","Maximum enumerated paths (paths only)").option("--sample <value>","Maximum evidence sample entries per audit finding (audit only)").option("--exempt-isolate <value>","Item ids treated as explicitly valid isolates by the audit (repeatable or comma-separated)",s).option("--exempt-isolate-type <value>","Item types whose active isolates are policy-valid for the audit (repeatable or comma-separated)",s).option("--save-baseline","Persist the audit census as the change-since-baseline comparison point (audit only)").option("--rebuild","Rebuild and warm the durable graph index (index only)").option("--clear","Delete the durable graph index (index only)").option("--summary","Return counts-first envelopes without row collections").option("--full","Return the complete graph row projection").description("Bounded workspace relationship-graph queries, analytics, and governance audit.").action(ve)}var it={resolveReadCommandOutputFormat:w,parseListFormat:ee};export{it as _testOnlyRegisterListQuery,ot as registerListQueryCommands};
10
- //# sourceMappingURL=register-list-query-T3EHHNNV.js.map
10
+ //# sourceMappingURL=register-list-query-CT3LFDDN.js.map