@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.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +25 -2
- package/dist/cli/commander-usage.js +17 -4
- package/dist/cli/error-guidance.d.ts +2 -0
- package/dist/cli/error-guidance.js +52 -25
- package/dist/cli/main.js +3 -2
- package/dist/cli/register-mutation.js +4 -2
- package/dist/cli/register-operations.js +5 -5
- package/dist/cli-bundle/bundle-manifest.json +150 -150
- package/dist/cli-bundle/chunks/{chunk-TXMEUUUY.js → chunk-24GAV7XL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TMJ7URWS.js → chunk-AIM6VT2N.js} +9 -9
- package/dist/cli-bundle/chunks/chunk-DSWDLTDR.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-FIW4P64F.js → chunk-J42EGKDK.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-KIEGUBYQ.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-SBRKH6OR.js → chunk-KLKYLSDX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G5JUB66K.js → chunk-LJHOAVGI.js} +59 -59
- package/dist/cli-bundle/chunks/{chunk-BFALV3YP.js → chunk-MEM2ZS3O.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-QHPCJWEJ.js +35 -0
- package/dist/cli-bundle/chunks/{chunk-XAVMOK6B.js → chunk-WLPDLNEZ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-T3EHHNNV.js → register-list-query-CT3LFDDN.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-E27WCLSZ.js → register-mutation-NWEVA5YS.js} +3 -3
- package/dist/cli-bundle/chunks/register-operations-AHIAG5KM.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-3YXZ444E.js → register-setup-ZJZFVAKE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4X57RE4U.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-XDNAW5OI.js → chunk-6XKF3PGV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-7NJ4QYQ2.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-WCVE2NIG.js → chunk-EXZA4257.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ITAUHSO6.js +50 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4DQ2YERC.js → chunk-KLVUMNXJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-K7RWWOAG.js → chunk-KT5XMYSX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PPFGQDSI.js → chunk-KTKH4IMG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-M67F5AIN.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KSEDUWVZ.js → chunk-NSPYTG6G.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-OKA6ELTL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-PUISBOPP.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QLNMCESQ.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-LZ4MV3RH.js → chunk-SLKC6QLJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-U65UC4G3.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KFSZ3BP6.js → chunk-WTSER4WJ.js} +6 -6
- package/dist/cli-bundle/focused-chunks/{chunk-YOOI3UZX.js → chunk-ZMFXQ7VF.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +32 -35
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +32 -31
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +2 -2
- package/dist/core/diagnostics/remediation.js +7 -2
- package/dist/core/extensions/reserved-host-flags.js +3 -2
- package/dist/core/history/replay.d.ts +14 -1
- package/dist/core/history/replay.js +45 -8
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +3 -2
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/errors.d.ts +12 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/mcp/tool-definitions.js +9 -5
- package/dist/sdk/agent/refusal-reachability.d.ts +61 -0
- package/dist/sdk/agent/refusal-reachability.js +91 -3
- package/dist/sdk/cli-bootstrap.d.ts +2 -0
- package/dist/sdk/cli-bootstrap.js +7 -2
- package/dist/sdk/cli-contracts/completeness.js +3 -2
- package/dist/sdk/cli-contracts/flag-contracts.js +3 -2
- package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +5 -0
- package/dist/sdk/cli-contracts/runtime-contracts.js +23 -7
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -5
- package/dist/sdk/cli-contracts/tool-schema.js +10 -3
- package/dist/sdk/cli-program.js +3 -2
- package/dist/sdk/core.d.ts +2 -2
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +26 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -26
- package/dist/sdk/governance/assurance-action.d.ts +7 -1
- package/dist/sdk/governance/assurance-action.js +7 -6
- package/dist/sdk/governance/assurance-mutation-error.d.ts +42 -1
- package/dist/sdk/governance/assurance-mutation-error.js +27 -3
- package/dist/sdk/governance/assurance-runtime.js +12 -11
- package/dist/sdk/governance/assurance.d.ts +9 -0
- package/dist/sdk/governance/assurance.js +80 -14
- package/dist/sdk/governance/extension-host-version.d.ts +25 -0
- package/dist/sdk/governance/extension-host-version.js +105 -0
- package/dist/sdk/governance/health.d.ts +32 -1
- package/dist/sdk/governance/health.js +119 -27
- package/dist/sdk/governance/provenance-health.d.ts +27 -0
- package/dist/sdk/governance/provenance-health.js +95 -3
- package/dist/sdk/governance/validate.js +7 -8
- package/dist/sdk/governance.d.ts +6 -0
- package/dist/sdk/governance.js +8 -2
- package/dist/sdk/history-repair.d.ts +13 -1
- package/dist/sdk/history-repair.js +62 -18
- package/dist/sdk/linked-artifacts.js +16 -5
- package/dist/sdk/pagination.d.ts +15 -0
- package/dist/sdk/pagination.js +9 -5
- package/dist/sdk/query/context.d.ts +5 -1
- package/dist/sdk/query/context.js +14 -5
- package/dist/sdk/read-output/continuation.d.ts +11 -0
- package/dist/sdk/read-output/continuation.js +132 -0
- package/dist/sdk/read-output-budget.d.ts +1 -1
- package/dist/sdk/read-output-budget.js +14 -10
- package/dist/sdk/read-output-contracts.d.ts +66 -2
- package/dist/sdk/read-output-contracts.js +183 -19
- package/dist/sdk/read-output-rows.d.ts +2 -0
- package/dist/sdk/read-output-rows.js +15 -2
- package/dist/sdk/runtime-input.js +4 -2
- package/docs/ASSURANCE.md +59 -2
- package/docs/COMMANDS.md +8 -2
- package/docs/READ_OUTPUT_CONTRACTS.md +49 -8
- package/docs/RELEASING.md +42 -5
- package/docs/SDK_CONTEXT_INTEGRITY.md +64 -2
- package/marketplace.json +2 -2
- package/package.json +3 -3
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +1133 -187
- package/dist/cli-bundle/chunks/chunk-BBOFSVAK.js +0 -197
- package/dist/cli-bundle/chunks/chunk-YAMTJL6Y.js +0 -34
- package/dist/cli-bundle/chunks/chunk-YSVSMJ2B.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-4R6I7CPY.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-F43TT2QQ.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-KYUQGTSB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PGXJQLCT.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-Q4YY3XNF.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QK753U3U.js +0 -46
- package/dist/cli-bundle/focused-chunks/chunk-QUMB2J27.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-SM7MTG27.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZM6TZVHC.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Z as ct,_a as se,eb as at,ka as S,l as A,pb as ut,qb as lt,sb as oe,ta as Le,yb as ft}from"./chunk-QLNMCESQ.js";import{F as Y,L as J,O as Q,Ra as Z,da as E,ia as st,p as X,s as B,t as Se,v as rt}from"./chunk-KT5XMYSX.js";import{b as re,d as Re}from"./chunk-PUISBOPP.js";import{Ha as ee,La as te,Ma as ne,Pa as it,Qa as dt,Y as w,Z as k,aa as ot,la as De}from"./chunk-OKA6ELTL.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]="3a33af50-3d2c-57bb-884a-4d5394599ba2")}catch{}})();function fn(e,t,r,n,s,o){if(e.seen.has(t))return"skip";if(e.cursorFound&&e.affected.length>=o)return"truncate";e.seen.add(t),e.parents.set(t,r.id);let i=r.depth+1;return e.queue.push({id:t,depth:i}),e.cursorFound?(e.affected.push({id:t,distance:i,path:wn(n,t,e.parents)}),"continue"):(e.cursorFound=t===s,"skip")}function pn(e,t,r,n){let s=te("graph impact",{root:e,direction:r,kinds:[...t.kinds??[]].sort(),max_depth:Number.isFinite(n)?n:"unbounded"});return{fingerprint:s,after:t.after===void 0?void 0:it(t.after,s)}}function q(e,t,r){e.get(t).add(r)}function de(e){return new Map(e.map(t=>[t,new Set]))}function gt(e){for(let t of e)t.sort();return e.sort((t,r)=>r.length-t.length||t[0].localeCompare(r[0]))}function ie(e){if(Array.isArray(e))return e.map(r=>ie(r));if(e===null||typeof e!="object")return e;let t=e.toJSON;return typeof t=="function"?ie(t.call(e)):Object.fromEntries(Object.entries(e).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>[r,ie(n)]))}function pt(e){return JSON.stringify(ie(e))}function gn(e,t,r,n){let s=[{id:e,expanded:!1}];for(;s.length>0;){let o=s.pop();if(o.expanded){n.push(o.id);continue}if(r.has(o.id))continue;r.add(o.id),s.push({id:o.id,expanded:!0});let i=[...t.get(o.id)].sort().reverse();for(let d of i)r.has(d)||s.push({id:d,expanded:!1})}}function mn(e,t){let r=new Set,n=[];for(let s of e)r.has(s)||gn(s,t,r,n);return n}function hn(e,t){let r=new Set,n=[];for(let s of[...e].reverse()){if(r.has(s))continue;let o=[],i=[s];for(r.add(s);i.length>0;){let d=i.pop();o.push(d);for(let c of t.get(d))r.has(c)||(r.add(c),i.push(c))}n.push(o)}return gt(n)}function mt(e,t){let r=de(e);for(let[n,s]of t)for(let o of s)q(r,o,n);return hn(mn(e,t),r)}function _n(e,t){let r=de(e.nodes());for(let n of e.edges()){let s=t.require(n.kind);if(!s.ordering)continue;let o=(s.precedence??"source_before_target")==="source_before_target";q(r,o?n.source:n.target,o?n.target:n.source)}return r}function yn(e,t){let r=new Map(e.map(o=>[o,0]));for(let o of t.values())for(let i of o)r.set(i,r.get(i)+1);let n=e.filter(o=>r.get(o)===0).sort(),s=[];for(;n.length>0;){s.push(n);let o=[];for(let i of n)for(let d of t.get(i)){let c=r.get(d)-1;r.set(d,c),c===0&&o.push(d)}n=o.sort()}return s}function bn(e,t){let r=new Map(e.map(i=>[i,0])),n=new Map;for(let i of e)for(let d of t.get(i)){if(!r.has(d))continue;let c=r.get(i)+1,a=n.get(d);(c>r.get(d)||c===r.get(d)&&(a===void 0||i.localeCompare(a)<0))&&(r.set(d,c),n.set(d,i))}let s=[...e].sort((i,d)=>r.get(d)-r.get(i)||i.localeCompare(d))[0],o=s===void 0?[]:[s];for(;o[0]!==void 0&&n.has(o[0]);)o.unshift(n.get(o[0]));return{depth:Object.fromEntries(r),path:o}}function wn(e,t,r){let n=[t],s=t;for(;s!==e;)s=r.get(s),n.push(s);return n.reverse()}function ce(e,t={}){let r=t.registry??E(),n=[...e.nodes()],s=_n(e,r),o=yn(n,s),i=o.flat(),d=i.length===n.length,c=d?[]:mt(n,s).filter(u=>u.length>1||s.get(u[0]).has(u[0])),a=bn(i,s);return{exact:!0,acyclic:d,order:i,layers:o,frontier:o[0]??[],depth:a.depth,criticalPath:a.path,criticalPathLength:Math.max(0,a.path.length-1),cycles:c,provenance:{algorithm:"kahn-longest-path",edgeFamily:"ordering"}}}function ht(e,t,r={}){let n=r.direction??"outgoing",s=r.maxDepth??Number.POSITIVE_INFINITY,o=r.limit??Number.POSITIVE_INFINITY,{fingerprint:i,after:d}=pn(t,r,n,s),c={queue:[{id:t,depth:0}],seen:new Set([t]),parents:new Map,affected:[],cursorFound:d===void 0||d===t},a=0,u=0,f=!1,l=!1;e:for(let p=0;p<c.queue.length;p+=1){r.signal?.throwIfAborted();let g=c.queue[p];a+=1;let m=e.adjacency(g.id,{direction:n,kinds:r.kinds,signal:r.signal});if(u+=m.meta.inspectedEdges,g.depth>=s){m.value.some(_=>!c.seen.has(_))&&(f=!0);continue}for(let _ of m.value)if(fn(c,_,g,t,d,o)==="truncate"){f=!0,l=!0;break e}}if(!c.cursorFound)throw new TypeError(`Unknown impact cursor item: ${d}`);return{root:t,affected:c.affected,exact:!0,truncated:f,...l?{nextCursor:ne(i,c.affected.at(-1)?.id??t)}:{},cost:{visitedNodes:a,inspectedEdges:u}}}function _t(e){let t=[...e.nodes()],r=de(t),n=de(t);for(let c of e.edges())q(r,c.source,c.target),q(r,c.target,c.source),q(n,c.source,c.target);let s=[],o=new Set;for(let c of t){if(o.has(c))continue;let a=[],u=[c];for(o.add(c);u.length>0;){let f=u.pop();a.push(f);for(let l of r.get(f))o.has(l)||(o.add(l),u.push(l))}s.push(a)}let i=t.map(c=>({id:c,degree:r.get(c).size})),d=Math.max(0,...i.map(({degree:c})=>c));return{components:gt(s),stronglyConnected:mt(t,n),orphans:i.filter(({degree:c})=>c===0).map(({id:c})=>c),hubs:i.filter(({degree:c})=>c>0&&c===d),exact:!0,provenance:{algorithm:"component-degree",edgeFamily:"all"}}}function Xs(e,t){let r=new Map(e.edges.map(s=>[pt(s),s])),n=new Map(t.edges.map(s=>[pt(s),s]));return{fromVersion:e.version,toVersion:t.version,added:[...n].filter(([s])=>!r.has(s)).map(([,s])=>s),removed:[...r].filter(([s])=>!n.has(s)).map(([,s])=>s),unchangedCount:[...r.keys()].filter(s=>n.has(s)).length,exact:!0}}(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]="1b2f1ac3-82b3-58a2-9f40-2dd95ab1b2bc")}catch{}})();var yt="global",kn="external";function N(e){let t=e?.trim().toLowerCase();return t===yt||t===kn}function Qs(e){let t=e?.trim();if(t)return N(t)?yt:t}function Zs(e,t,r){let n=e.trim();return N(r)?n:at(n,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]="a6fc5da1-b7d1-5b3c-8033-cecccc7861c3")}catch{}})();function M(e){if(typeof e!="string")return;let t=e.trim();if(!(!t||["none","null","n/a","na"].includes(t.toLowerCase())))return t}function Ae(e){let t=M(e);return t?.toLowerCase()==="no-active-blocker"?void 0:t}function D(){let e=E();for(let t of A()?.relationship_kinds??[])for(let r of t.definitions)e.register(r);return e}function O(e,t){let r=e.toLowerCase(),n=t.toLowerCase();return r!==n?r<n?-1:1:e!==t?e<t?-1:1:0}function vn(e){let t=new Map;for(let r of e.dependencies??[]){if(typeof r!="object"||r===null)continue;let n=r,s=M(n.id);if(!s)continue;let o=typeof n.kind=="string"?n.kind:"related",i=`${o}\0${s.toLowerCase()}`,d=t.get(i);d?d.count+=1:t.set(i,{target_id:s,kind:o,count:1})}return t}function xn(e,t=r=>r==="closed"||r==="canceled"){let r=[];for(let n of e)if(!(typeof n?.id!="string"||n.id.trim().length===0))for(let s of vn(n).values())s.count<2||r.push({holder_id:n.id.trim(),target_id:s.target_id,kind:s.kind,occurrences:s.count,holder_status:n.status,legacy_terminal:t(n.status)});return r.sort((n,s)=>{let o=O(n.holder_id,s.holder_id);if(o!==0)return o;let i=O(n.target_id,s.target_id);return i!==0?i:O(n.kind,s.kind)})}function En(e,t,r,n,s){if(typeof r!="object"||r===null)return;let o=M(r.id);if(!o||o.toLowerCase()!==t.toLowerCase())return;let i=s.resolve(typeof r.kind=="string"?r.kind:"related");if(!(i?.ordering!==!0||(i.precedence??"source_before_target")!=="source_before_target"))return{holder_id:e.id.trim(),target_id:o,dependency_kind:i.kind,holder_status:e.status,legacy_terminal:n(e.status)}}function In(e,t=n=>n==="closed"||n==="canceled",r=D()){let n=new Map;for(let s of e){if(typeof s?.id!="string"||s.id.trim().length===0)continue;let o=M(s.blocked_by);if(o)for(let i of s.dependencies??[]){let d=En(s,o,i,t,r);d&&n.set(`${d.holder_id.toLowerCase()}\0${d.target_id.toLowerCase()}\0${d.dependency_kind}`,d)}}return[...n.values()].sort((s,o)=>{let i=O(s.holder_id,o.holder_id);if(i!==0)return i;let d=O(s.target_id,o.target_id);return d!==0?d:O(s.dependency_kind,o.dependency_kind)})}function Ne(e,t=r=>r==="closed"||r==="canceled"){let r=e.filter(c=>typeof c?.id=="string"&&c.id.trim().length>0),n=new Set(r.map(c=>c.id.trim().toLowerCase())),s=new Map,o=(c,a,u,f)=>{let l=M(a);if(!l||n.has(l.toLowerCase()))return;let p={holder_id:c.id.trim(),target_id:l,kind:u,source:f,holder_status:c.status,legacy_terminal:t(c.status),no_active_blocker_sentinel:l.toLowerCase()==="no-active-blocker"};s.set(`${p.holder_id}::${p.target_id}::${p.kind}::${p.source}`,p)};for(let c of r){o(c,c.parent,"parent","parent"),o(c,c.blocked_by,"blocked_by","blocked_by");for(let a of c.dependencies??[]){if(typeof a!="object"||a===null)continue;let u=a;N(u.source_kind)||o(c,u.id,typeof u.kind=="string"?u.kind:"related","dependency")}}let i=[...s.values()].sort((c,a)=>c.holder_id.localeCompare(a.holder_id)||c.target_id.localeCompare(a.target_id)||c.kind.localeCompare(a.kind)||c.source.localeCompare(a.source)),d=i.filter(c=>c.legacy_terminal);return{active:i.filter(c=>!c.legacy_terminal),legacy_terminal:d,no_active_blocker_sentinels:i.filter(c=>c.no_active_blocker_sentinel)}}function Cn(e){let t=new Map;for(let r of[...e.active,...e.legacy_terminal]){if(r.no_active_blocker_sentinel)continue;let n=r.target_id.trim(),s=n.toLowerCase();t.has(s)||t.set(s,n)}return[...t.values()].sort((r,n)=>r.localeCompare(n))}function Tn(e){let t=new Map;for(let r of e)for(let n of r.dependencies??[]){if(typeof n!="object"||n===null||!N(n.source_kind))continue;let s=M(n.id);s&&!t.has(s.toLowerCase())&&t.set(s.toLowerCase(),s)}return[...t.values()].sort((r,n)=>r.localeCompare(n))}function Sn(e,t=D()){let r={};for(let n of e)for(let s of n.dependencies??[]){if(typeof s!="object"||s===null)continue;let o=s.kind;if(typeof o!="string")continue;let i=o.trim().toLowerCase().replaceAll("-","_"),d=t.resolve(o);d&&i!==d.kind&&(r[i]=(r[i]??0)+1)}return Object.fromEntries(Object.entries(r).sort(([n],[s])=>n.localeCompare(s)))}function P(e,t,r){let n=r??D(),s=e.filter(l=>typeof l?.id=="string"&&l.id.trim().length>0),o=new Map(s.map(l=>[l.id.trim().toLowerCase(),l.id.trim()])),i=Ne(s,t),d=Cn(i);for(let l of d)o.set(l.toLowerCase(),l);let c=Tn(s),a=new Set(o.keys()),u=new Map;for(let l of c){let p=l;for(;a.has(p.toLowerCase());)p=`external:${p}`;u.set(l.toLowerCase(),p),a.add(p.toLowerCase())}let f=s.map(l=>{let p=Ae(l.parent),g=Ae(l.blocked_by),m=(l.dependencies??[]).flatMap(_=>{if(typeof _!="object"||_===null)return[];let b=_,h=Ae(b.id);return h?[{id:N(b.source_kind)?u.get(h.toLowerCase()):o.get(h.toLowerCase()),kind:typeof b.kind=="string"?b.kind:"related"}]:[]});return{id:l.id.trim(),...p?{parent:o.get(p.toLowerCase())}:{},...g?{blocked_by:o.get(g.toLowerCase())}:{},dependencies:m}});return{graph:st.fromItems([...f,...d.map(l=>({id:l})),...c.map(l=>({id:u.get(l.toLowerCase())}))],n),details:[...s.map(l=>({id:l.id.trim(),title:l.title,status:l.status,...typeof l.type=="string"&&l.type.trim().length>0?{type:l.type.trim()}:{}})),...d.map(l=>({id:l,title:`[missing] ${l}`,status:"missing"})),...c.map(l=>({id:u.get(l.toLowerCase()),title:`[external] ${l}`,status:"external"}))],missingIdSet:new Set(d.map(l=>l.toLowerCase())),dangling:i,duplicateRows:xn(s,t),orderingContradictions:In(s,t,n),legacyAliasCounts:Sn(s,n)}}import{createHash as Dn}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]="dea35fb9-9f9f-56ce-afc0-f4dc993012c3")}catch{}})();var Rn=64,Ln=8;function An(e,t){let r=(e.dependencies??[]).map(n=>{if(typeof n!="object"||n===null)return"";let s=n;return`${typeof s.kind=="string"?s.kind:"related"}:${typeof s.id=="string"?s.id:""}`}).sort().join(",");return[e.id,e.title,e.status,t(e.status)?"1":"0",typeof e.type=="string"?e.type.trim():"",e.parent??"",e.blocked_by??"",r].join("\0")}function ae(e,t=n=>n==="closed"||n==="canceled",r=E()){let n=e.filter(o=>typeof o?.id=="string"&&o.id.trim().length>0).map(o=>An(o,t)).sort(),s=r.list().map(o=>ot(o)).sort();return Dn("sha256").update(n.join("")).update("").update(s.join("")).digest("hex")}function bt(e,t,r){let n=t??r;if(!Number.isInteger(n)||n<1)throw new TypeError(`Invalid ${e} bound: ${String(t)}`);return n}var Oe=class{#e=new Map;#t;#n;constructor(t={}){this.#t=bt("maxResultsPerWorkspace",t.maxResultsPerWorkspace,Rn),this.#n=bt("maxWorkspaces",t.maxWorkspaces,Ln)}lookup(t,r,n){let s=this.#e.get(t),o=!0;(s===void 0||s.fingerprint!==r)&&(s={fingerprint:r,assembly:n(),results:new Map},o=!1,!this.#e.has(t)&&this.#e.size>=this.#n&&this.#e.delete(this.#e.keys().next().value)),this.#e.delete(t),this.#e.set(t,s);let i=s,d=this.#t;return{assembly:i.assembly,assemblyReused:o,fingerprint:r,memoize(c,a){let u=i.results.get(c);if(u!==void 0||i.results.has(c))return i.results.delete(c),i.results.set(c,u),{value:structuredClone(u),reused:!0};let f=a();return i.results.size>=d&&i.results.delete(i.results.keys().next().value),i.results.set(c,structuredClone(f)),{value:f,reused:!1}}}}clear(){this.#e.clear()}},wt=new Oe;function ue(){return wt}function ao(){wt.clear()}(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]="31a800f7-1374-5e7c-ad23-ae3d8ebcebe0")}catch{}})();var Nn=["prerequisite","dependent","ancestor","descendant","provenance","related"],On=new TextEncoder;function Me(e,t,r){let n=e??t;if(!Number.isInteger(n)||n<1)throw new TypeError(`Relationship context ${r} must be positive`);return n}function le(e){return Math.max(1,Math.ceil(On.encode(JSON.stringify(e)).byteLength/4))}function Pe(e,t,r){let n=r.resolve(e.kind);if(n?.ordering){let o=(n.precedence??"source_before_target")==="source_before_target"?e.source:e.target;return t===o?"prerequisite":"dependent"}if(n?.hierarchy){let o=(n.hierarchyDirection??"source_parent")==="source_parent"?e.source:e.target;return t===o?"ancestor":"descendant"}return e.kind==="discovered_from"||e.kind==="incident_from"?"provenance":"related"}function Mn(e,t,r,n){let s=e.filter(o=>o.source===t&&o.target===r||o.target===t&&o.source===r).map(o=>Pe(o,r,n));return[...new Set(s)].sort()}function Pn(e){return Nn.find(t=>e.includes(t))}function jn(e,t,r,n){let s=n.direction??"both",o=n.maxDepth??3;if(!Number.isInteger(o)||o<0)throw new TypeError("Relationship context maxDepth must be non-negative");let i=new Set([t]),d=[{id:t,distance:0}],c=[],a=0,u=!1;for(let f=0;f<d.length;f+=1){n.signal?.throwIfAborted();let l=d[f];if(l.distance>=o&&u)continue;let p=e.neighborEdges(l.id,{direction:s,kinds:n.kinds,signal:n.signal});if(a+=p.meta.inspectedEdges,l.distance>=o){p.value.some(g=>!i.has(g.id))&&(u=!0);continue}for(let{id:g,edge:m}of p.value){if(i.has(g))continue;i.add(g);let _={id:g,distance:l.distance+1,via:l.id,role:Pe(m,g,r)};c.push(_),d.push(_)}}return c.sort((f,l)=>f.distance-l.distance||f.id.localeCompare(l.id)),{rows:c,visitedNodes:d.length,inspectedEdges:a,depthTruncated:u}}function $n(e,t,r,n){let s={prerequisite:0,dependent:0,ancestor:0,descendant:0,provenance:0,related:0},o=e.neighborEdges(t,{direction:n.direction??"both",kinds:n.kinds,signal:n.signal}).value;for(let{id:i,edge:d}of o)s[Pe(d,i,r)]+=1;return{directEdges:s,directTotal:o.length,rootEdges:o.map(({edge:i})=>i)}}function Fn(e){let t=[],r=e.initialTokens;for(let n of e.candidates){if(t.length>=e.nodeLimit)break;let s=n.distance===1?Mn(e.rootEdges,e.rootId,n.id,e.registry):[],o={...e.details.get(n.id)??{id:n.id},distance:n.distance,role:s.length>0?Pn(s):n.role,via:n.via,reasons:s.length>0?s:[`${n.role} via ${n.via} (depth ${n.distance})`]},i=le(o);if(r+i>e.tokenBudget)break;t.push(o),r+=i}if(e.candidates.length>0&&t.length===0)throw new TypeError("Relationship context tokenBudget cannot fit one node");return{nodes:t,usedTokens:r}}function Gn(e){let t=e.options.kinds?new Set(e.options.kinds.map(o=>e.registry.require(o).kind)):void 0,r=e.graph.edges().filter(o=>{if(!e.included.has(o.source)||!e.included.has(o.target))return!1;if(t===void 0||t.has(o.kind))return!0;let i=e.registry.resolve(o.kind)?.inverse;return i!==void 0&&t.has(i)}),n=[],s=e.initialTokens;for(let o of r){if(n.length>=e.edgeLimit)break;let i=le(o);if(s+i>e.tokenBudget)break;n.push(o),s+=i}return{edges:n,usedTokens:s,candidateCount:r.length}}function kt(e,t,r,n={}){if(!e.nodes().includes(t))throw new TypeError(`Relationship node not found: ${t}`);let s=Me(n.nodeLimit,20,"nodeLimit"),o=Me(n.edgeLimit,40,"edgeLimit"),i=Me(n.tokenBudget,1200,"tokenBudget"),d=n.registry??E(),c=new Map(r.map(L=>[L.id,L])),a=c.get(t)??{id:t},{evidence:u=[],...f}=a,l=[...u],p=jn(e,t,d,n),{rootEdges:g,...m}=$n(e,t,d,n),_=te("relationship-context",{rootId:t,direction:n.direction??"both",kinds:[...n.kinds??[]].sort(),maxDepth:n.maxDepth??3}),b=dt(p.rows,n.cursor,_,({id:L})=>L),h=p.rows.slice(b),y=le(f)+le(l);if(y>i)throw new TypeError("Relationship context tokenBudget cannot fit root and evidence");let C=Fn({candidates:h,details:c,rootEdges:g,rootId:t,registry:d,nodeLimit:s,tokenBudget:i,initialTokens:y}),{nodes:v}=C,H=new Set([t,...v.map(({id:L})=>L)]),G=Gn({graph:e,included:H,options:n,registry:d,edgeLimit:o,tokenBudget:i,initialTokens:C.usedTokens}),{edges:U,usedTokens:un}=G,V=b+v.length,Ce=V<p.rows.length,tt=v.at(-1),Te=G.candidateCount-U.length,nt=p.depthTruncated||Ce||Te>0,ln={rootId:t,...f.status===void 0?{}:{rootStatus:f.status},...m,discoveredNodes:p.rows.length,returnedNodes:v.length,returnedEdges:U.length,omittedNodes:p.rows.length-V,omittedEdges:Te,evidenceCount:l.length,hasMore:Ce};return{root:f,summary:ln,nodes:v,edges:U,evidence:l,meta:{exact:!0,truncated:nt,completeness:nt?"truncated":"complete",nodeLimit:s,edgeLimit:o,tokenBudget:i,usedTokens:un,visitedNodes:p.visitedNodes,inspectedEdges:p.inspectedEdges,omittedNodes:p.rows.length-V,omittedEdges:Te,...Ce&&tt?{nextCursor:ne(_,tt.id,V-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]="c0fb747e-1f9f-55c4-808b-b77d3a881f87")}catch{}})();var Un=5,Bn=1e4,qn=8;function je(e,t){if(!Number.isFinite(t)||!Number.isInteger(t)||t<0)throw new TypeError(`Invalid path ${e} bound: ${String(t)}`)}function fe(e,t){return t.hierarchyDirection==="target_parent"?e.target:e.source}function z(e,t){return(t.precedence??"source_before_target")==="target_before_source"?e.target:e.source}function pe(e,t){let r=z(e,t);return{predecessor:r,successor:r===e.source?e.target:e.source}}function zn(e,t,r){if(t===void 0)return;let n=e.registry(),s=new Set;for(let o of t){let i=n.require(o);if(!i[r])throw new TypeError(`Relationship kind ${i.kind} is not a ${r} kind`);s.add(i.kind)}return s}function Kn(e,t,r,n,s){let o=e.registry(),i=e.neighborEdges(t,{direction:"both",...r===void 0?{}:{kinds:[...r]}}),d=[],c=new Set;for(let a of i.value){let u=o.require(a.edge.kind);u[n]&&s(a,u,t)&&(c.has(a.id)||(c.add(a.id),d.push(a.id)))}return{neighbors:d,inspectedEdges:i.meta.inspectedEdges}}function Wn(e,t,r,n,s,o){if(t>=r)return e.neighbors.some(i=>!o.seen.has(i))&&(o.truncated=!0),!1;for(let i of e.neighbors)if(!o.seen.has(i)){if(o.seen.add(i),o.queue.push({id:i,depth:t+1}),!o.resumed){i===s&&(o.resumed=!0);continue}if(o.value.length>=n)return o.truncated=!0,!0;o.value.push(i)}return!1}function ge(e,t,r,n,s){if(!e.hasNode(t))throw new TypeError(`Relationship node not found: ${t}`);let o=zn(e,r.kinds,n),i=r.limit??Number.POSITIVE_INFINITY,d=r.maxDepth??Number.POSITIVE_INFINITY,c=r.after,a={seen:new Set([t]),value:[],queue:[{id:t,depth:0}],resumed:c===void 0,truncated:!1},u=0,f=0;for(let l=0;l<a.queue.length;l+=1){r.signal?.throwIfAborted();let p=a.queue[l];u+=1;let g=Kn(e,p.id,o,n,s);if(f+=g.inspectedEdges,Wn(g,p.depth,d,i,c,a))break}if(!a.resumed)throw new TypeError(`Traversal cursor not found in sequence: ${c}`);return{value:a.value,meta:{visitedNodes:u,inspectedEdges:f,truncated:a.truncated,nextCursor:a.value.at(-1)}}}function vt(e,t){if(!e.hasNode(t))throw new TypeError(`Relationship node not found: ${t}`)}function xt(e,t,r,n,s){let o=e.neighborEdges(t.nodes.at(-1),{direction:n,...r.kinds===void 0?{}:{kinds:r.kinds}});return s.inspectedEdges+=o.meta.inspectedEdges,o.value.filter(i=>!t.nodeSet.has(i.id))}function Hn(e,t,r,n,s,o,i){for(let d of xt(e,t,n,s,i)){let c=[...t.nodes,d.id],a=new Set(t.nodeSet).add(d.id),u=[...t.edges,d.edge];if(d.id===r){if(i.value.push({nodes:c,edges:u,length:u.length}),i.value.length>=o)return!0}else i.queue.push({nodes:c,nodeSet:a,edges:u})}return!1}function Et(e,t,r={}){return ge(e,t,r,"hierarchy",(n,s)=>fe(n.edge,s)===n.id)}function It(e,t,r={}){return ge(e,t,r,"hierarchy",(n,s,o)=>fe(n.edge,s)===o)}function Ct(e,t,r={}){return ge(e,t,r,"ordering",(n,s)=>z(n.edge,s)===n.id)}function Tt(e,t,r={}){return ge(e,t,r,"ordering",(n,s,o)=>z(n.edge,s)===o)}function Vn(e,t,r,n,s,o,i,d){let c={value:[],queue:[{nodes:[t],nodeSet:new Set([t]),edges:[]}],inspectedEdges:0},a=0,u=!1,f=s+1;for(let l=0;l<c.queue.length;l+=1){if(n.signal?.throwIfAborted(),c.value.length>=f||a>=o){u=!0;break}let p=c.queue[l];if(a+=1,p.edges.length>=i){xt(e,p,n,d,c).length>0&&(u=!0);continue}if(Hn(e,p,r,n,d,f,c)){u=!0;break}}return{value:c.value.slice(0,s),meta:{visitedNodes:a,inspectedEdges:c.inspectedEdges,truncated:u}}}function St(e,t,r,n={}){vt(e,t),vt(e,r);let s=n.maxPaths??Un,o=n.maxVisitedPaths??Bn,i=n.maxDepth??qn;je("maxPaths",s),je("maxVisitedPaths",o),je("maxDepth",i);let d=n.direction??"outgoing";n.signal?.throwIfAborted();for(let c of n.kinds??[])e.registry().require(c);return t===r?s===0?{value:[],meta:{visitedNodes:1,inspectedEdges:0,truncated:!0}}:{value:[{nodes:[t],edges:[],length:0}],meta:{visitedNodes:1,inspectedEdges:0,truncated:!1}}:Vn(e,t,r,n,s,o,i,d)}(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]="24898402-1568-5b05-9072-f89dd91f25a6")}catch{}})();var Xn=16,Yn=2,Jn=8;function me(e,t){if(!Number.isInteger(t)||t<1)throw new TypeError(`Invalid ${e} bound: ${String(t)}`)}function he(e,t,r){let n=e.registry(),s=t===void 0?void 0:new Set(t.map(o=>n.require(o).kind));for(let o of e.edges()){if(o.source===o.target)continue;let i=n.require(o.kind);s!==void 0&&!(s.has(i.kind)||i.inverse!==void 0&&s.has(i.inverse))||r(o,i)}}function Qn(e,t){let r=new Map;he(e,t,n=>{Dt(r,n.source,n.target),Dt(r,n.target,n.source)});for(let n of r.values())n.sort();return r}function Dt(e,t,r){let n=e.get(t);n===void 0?e.set(t,[r]):n.push(r)}function Zn(e,t){let r=new Map;for(let o of e){let i=t.get(o);r.set(i,(r.get(i)??0)+1)}let n,s=0;for(let[o,i]of r)(i>s||i===s&&o<n)&&(n=o,s=i);return n}function er(e,t){let r=new Map;for(let[s,o]of e){let i=r.get(o);i===void 0?r.set(o,[s]):i.push(s)}let n=[];for(let s of r.values())s.length<t||(s.sort(),n.push({representative:s[0],size:s.length,members:s}));return n.sort((s,o)=>o.size-s.size||s.representative.localeCompare(o.representative))}function Rt(e,t={}){let r=t.maxIterations??Xn,n=t.minSize??Yn;me("maxIterations",r),me("minSize",n);let s=Qn(e,t.kinds),o=e.nodes(),i=new Map(o.map(f=>[f,f])),d=0,c=!1,a=0,u=0;for(;d<r&&!c;){t.signal?.throwIfAborted(),d+=1,c=!0;for(let f of o){a+=1;let l=s.get(f);if(l===void 0)continue;u+=l.length;let p=Zn(l,i);p!==i.get(f)&&(i.set(f,p),c=!1)}}return{value:{communities:er(i,n),iterations:d,converged:c},meta:{visitedNodes:a,inspectedEdges:u,truncated:!c}}}function _e(e){return e.direction==="directed"&&(e.ordering||e.hierarchy)}function ye(e){return e.inverse!==void 0&&e.inverse<e.kind?e.inverse:e.kind}function be(e,t){return(t.hierarchy?fe(e,t):e.source===z(e,t)?e.target:e.source)===e.target?{from:e.source,to:e.target}:{from:e.target,to:e.source}}function tr(e,t){if(t===void 0)return;let r=e.registry(),n=new Set;for(let s of t){let o=r.require(s);if(!_e(o))throw new TypeError(`Relationship kind ${o.kind} is not a directed ordering or hierarchy kind`);n.add(ye(o))}return n}function nr(e,t){let r=e.registry(),n=new Map;for(let s of e.edges()){let o=r.require(s.kind);if(!_e(o))continue;let i=ye(o);if(t!==void 0&&!t.has(i))continue;let d=be(s,o);if(d.from===d.to)continue;let c=n.get(i);c===void 0&&(c={adjacency:new Map,records:[]},n.set(i,c));let a=c.adjacency.get(d.from);a===void 0?c.adjacency.set(d.from,new Set([d.to])):a.add(d.to),c.records.push({...d,edge:s})}return n}function rr(e){let t=new Map;for(let[r,n]of e.adjacency)t.set(r,[...n].sort());return t}function sr(e,t,r,n){let s=[n];for(let o=r;o!==t;o=e.get(o))s.push(o);return s.push(t),s.reverse()}function or(e,t,r,n,s,o){for(let i of e.get(r.id)??[])if(o.inspectedEdges+=1,!(r.depth===0&&i===t.to)&&!n.has(i)){if(n.set(i,r.id),i===t.to)return sr(n,t.from,r.id,i);s.push({id:i,depth:r.depth+1})}}function ir(e,t,r,n){let s=new Map([[t.from,t.from]]),o=[{id:t.from,depth:0}];for(let i=0;i<o.length;i+=1){let d=o[i];if(n.visitedNodes+=1,d.depth>=r)continue;let c=or(e,t,d,s,o,n);if(c!==void 0)return c}}function j(e,t={}){let r=t.maxDepth??Jn;me("maxDepth",r),t.limit!==void 0&&me("limit",t.limit);let n=t.limit??Number.POSITIVE_INFINITY,s=tr(e,t.kinds),o=nr(e,s),i=[],d={visitedNodes:0,inspectedEdges:0},c=!1;e:for(let a of[...o.keys()].sort()){let u=o.get(a),f=rr(u);for(let l of u.records){t.signal?.throwIfAborted();let p=ir(f,l,r,d);if(p!==void 0){if(i.length>=n){c=!0;break e}i.push({edge:l.edge,witness:p})}}}return{value:i,meta:{visitedNodes:d.visitedNodes,inspectedEdges:d.inspectedEdges,truncated:c}}}function dr(e,t,r,n,s){let o=new Set,i=[];for(let d of r){if(d.id===e||o.has(d.id))continue;if(!s.seen.has(d.id)){if(t>=n){s.truncated=!0;continue}s.seen.add(d.id),s.queue.push({id:d.id,depth:t+1})}o.add(d.id),i.push(d.id);let c=s.predecessors.get(d.id);c===void 0&&(c=new Set,s.predecessors.set(d.id,c)),c.add(e)}return i}function cr(e,t,r){let n=r.direction??"outgoing",s=r.maxDepth??Number.POSITIVE_INFINITY,o=[],i=new Map,d={seen:new Set([t]),queue:[{id:t,depth:0}],predecessors:new Map,truncated:!1},c=0;for(let a=0;a<d.queue.length;a+=1){r.signal?.throwIfAborted();let{id:u,depth:f}=d.queue[a];o.push(u);let l=e.neighborEdges(u,{direction:n,...r.kinds===void 0?{}:{kinds:r.kinds}});c+=l.meta.inspectedEdges,i.set(u,dr(u,f,l.value,s,d))}return{order:o,successors:i,predecessors:d.predecessors,inspectedEdges:c,truncated:d.truncated}}function ar(e,t){let r=[],n=new Set([t]),s=[{id:t,index:0}];for(;s.length>0;){let o=s.at(-1),i=e.successors.get(o.id);if(o.index<i.length){let d=i[o.index];o.index+=1,n.has(d)||(n.add(d),s.push({id:d,index:0}))}else r.push(o.id),s.pop()}return r.reverse()}function ur(e,t,r,n){let s=e,o=t;for(;s!==o;){for(;n.get(s)>n.get(o);)s=r.get(s);for(;n.get(o)>n.get(s);)o=r.get(o)}return s}function lr(e,t,r){let n;for(let s of[...e].sort())t.has(s)&&(n=n===void 0?s:ur(n,s,t,r));return n}function fr(e,t,r,n,s){let o=new Map([[t,t]]),i=!0;for(;i;){i=!1;for(let d of r){if(s?.throwIfAborted(),d===t)continue;let c=lr(e.predecessors.get(d),o,n);c!==void 0&&o.get(d)!==c&&(o.set(d,c),i=!0)}}return o}function Lt(e,t,r={}){if(!e.hasNode(t))throw new TypeError(`Relationship node not found: ${t}`);if(r.maxDepth!==void 0&&(!Number.isInteger(r.maxDepth)||r.maxDepth<0))throw new TypeError(`Invalid maxDepth bound: ${String(r.maxDepth)}`);let n=cr(e,t,r),s=ar(n,t),o=new Map(s.map((a,u)=>[a,u])),i=fr(n,t,s,o,r.signal),d=new Map(s.map(a=>[a,1]));for(let a=s.length-1;a>=0;a-=1){let u=s[a];if(u===t)continue;let f=i.get(u);d.set(f,d.get(f)+d.get(u))}let c=s.filter(a=>a!==t).map(a=>({id:a,idom:i.get(a),dominatedCount:d.get(a)-1})).sort((a,u)=>u.dominatedCount-a.dominatedCount||a.id.localeCompare(u.id));return{value:{root:t,reachableCount:n.order.length,rows:c},meta:{visitedNodes:n.order.length,inspectedEdges:n.inspectedEdges,truncated:n.truncated}}}(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]="348c9246-2fb9-529e-b627-f60c901a6cf2")}catch{}})();function At(e){return Math.round(e*1e6)/1e6}function Nt(e,t,r){let n=e.get(t);n===void 0?e.set(t,new Set([r])):n.add(r)}function Ot(e,t){let r=new Map(e.nodes().map(s=>[s,new Set]));he(e,t,s=>{r.get(s.source).add(s.target),r.get(s.target).add(s.source)});let n=new Map;for(let[s,o]of r)n.set(s,[...o].sort());return n}function pr(e,t){let r=new Map,n=new Map;return he(e,t,(s,o)=>{if(!o.ordering)return;let{predecessor:i,successor:d}=pe(s,o);Nt(n,i,d),Nt(r,d,i)}),{incoming:r,outgoing:n}}function gr(e,t,r){let n=new Map([[e,0]]),s=new Map([[e,1]]),o=new Map,i=[],d=[e],c=0,a=0;for(let u=0;u<d.length;u+=1){let f=d[u];r.visitedNodes+=1,i.push(f);let l=n.get(f);f!==e&&(c+=1,a+=l);for(let p of t.get(f))if(r.inspectedEdges+=1,n.has(p)||(n.set(p,l+1),d.push(p)),n.get(p)===l+1){s.set(p,(s.get(p)??0)+s.get(f));let g=o.get(p);g===void 0?o.set(p,[f]):g.push(f)}}return{stack:i,sigma:s,predecessors:o,reachableCount:c,distanceSum:a}}function mr(e,t,r){let n=new Map;for(let s=e.stack.length-1;s>=0;s-=1){let o=e.stack[s],i=(1+(n.get(o)??0))/e.sigma.get(o);for(let d of e.predecessors.get(o)??[])n.set(d,(n.get(d)??0)+e.sigma.get(d)*i);o!==t&&r.set(o,(r.get(o)??0)+(n.get(o)??0))}}function hr(e,t){return t<=1||e.reachableCount===0?0:e.reachableCount/(t-1)*(e.reachableCount/e.distanceSum)}function _r(e,t,r,n,s){return{id:e,degree:t.get(e).length,inDegree:r.incoming.get(e)?.size??0,outDegree:r.outgoing.get(e)?.size??0,betweenness:At((n.get(e)??0)/2),closeness:At(s.get(e))}}function Mt(e,t={}){let r=Ot(e,t.kinds),n=pr(e,t.kinds),s=e.nodes(),o=new Map,i=new Map,d={visitedNodes:0,inspectedEdges:0};for(let u of s){t.signal?.throwIfAborted();let f=gr(u,r,d);i.set(u,hr(f,s.length)),mr(f,u,o)}let c=0;for(let u of r.values())c+=u.length;let a=s.map(u=>_r(u,r,n,o,i)).sort((u,f)=>f.betweenness-u.betweenness||f.degree-u.degree||u.id.localeCompare(f.id));return{value:{nodeCount:s.length,edgeCount:c/2,rows:a},meta:{visitedNodes:d.visitedNodes,inspectedEdges:d.inspectedEdges,truncated:!1}}}function yr(e,t){return e<=t?{source:e,target:t}:{source:t,target:e}}function br(e,t,r){let s=t.get(e.node)[e.neighborIndex];if(e.neighborIndex+=1,r.inspectedEdges+=1,s!==e.parent){if(r.discovery.has(s)){r.low.set(e.node,Math.min(r.low.get(e.node),r.discovery.get(s)));return}return e.children+=1,r.discovery.set(s,r.timer),r.low.set(s,r.timer),r.timer+=1,{node:s,parent:e.node,neighborIndex:0,children:0}}}function wr(e,t,r){if(e.parent===null){e.children>1&&r.articulation.add(e.node);return}let n=e.parent,s=r.low.get(e.node);r.low.set(n,Math.min(r.low.get(n),s)),n!==t&&s>=r.discovery.get(n)&&r.articulation.add(n),s>r.discovery.get(n)&&r.bridges.push(yr(n,e.node))}function kr(e,t,r,n){r.discovery.set(e,r.timer),r.low.set(e,r.timer),r.timer+=1;let s=[{node:e,parent:null,neighborIndex:0,children:0}];for(;s.length>0;){n?.throwIfAborted();let o=s.at(-1);if(o.neighborIndex<t.get(o.node).length){let i=br(o,t,r);i!==void 0&&s.push(i)}else wr(o,e,r),s.pop()}}function we(e,t={}){let r=Ot(e,t.kinds),n={discovery:new Map,low:new Map,timer:0,articulation:new Set,bridges:[],inspectedEdges:0};for(let s of e.nodes())n.discovery.has(s)||kr(s,r,n,t.signal);return{value:{articulationPoints:[...n.articulation].sort(),bridges:n.bridges.sort((s,o)=>s.source.localeCompare(o.source)||s.target.localeCompare(o.target))},meta:{visitedNodes:n.discovery.size,inspectedEdges:n.inspectedEdges,truncated:!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]="f155ac72-64eb-5316-b016-954abd48c0e7")}catch{}})();function vr(e){let t=e.registry(),r=new Map,n=new Set;for(let s of e.edges()){let o=t.require(s.kind);if(!o.ordering)continue;let{predecessor:i,successor:d}=pe(s,o);if(n.add(i),n.add(d),i===d)continue;let c=r.get(i);c===void 0?r.set(i,new Set([d])):c.add(d)}return{forward:r,participants:n}}function xr(e,t,r,n){if(e===void 0)return n;let s=n;for(let o of e)t.has(o)&&(s=Math.min(s,r.get(o)));return s}function Er(e,t,r){let n=r-t;return{id:e,earliestStart:t,earliestFinish:t+1,latestStart:r,latestFinish:r+1,slack:n,critical:n===0}}function Ir(e,t,r,n,s){let o=new Map;for(let i=e.length-1;i>=0;i-=1){let d=e[i],c=xr(t.forward.get(d),n,o,s);o.set(d,c-1)}return e.map(i=>Er(i,r[i],o.get(i))).sort((i,d)=>i.slack-d.slack||i.earliestStart-d.earliestStart||i.id.localeCompare(d.id))}function Pt(e,t={}){t.signal?.throwIfAborted();let r=ce(e,{registry:e.registry()}),n=vr(e),s=new Set(r.order),o=r.order.filter(a=>n.participants.has(a)),i=o.reduce((a,u)=>Math.max(a,r.depth[u]+1),0),d=Ir(o,n,r.depth,s,i),c=d.length>0;return{exact:!0,acyclic:r.acyclic,makespan:i,scheduledCount:d.length,criticalPath:c?r.criticalPath:[],criticalPathLength:c?r.criticalPathLength:0,cycles:r.cycles,rows:d,provenance:{algorithm:"critical-path-method",edgeFamily:"ordering",weighting:"unit"}}}(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]="bc561e73-75b8-5ea7-a18c-da70fb991b69")}catch{}})();var ke=["missing_reference_active","missing_reference_terminal","legacy_no_blocker_sentinel","ordering_cycle","legacy_ordering_cycle","ordering_storage_contradiction","legacy_ordering_storage_contradiction","duplicate_edge","legacy_duplicate_edge","duplicate_dependency_row","legacy_duplicate_dependency_row","stale_lifecycle_block","isolated_active_node","sparse_active_node"];(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]="1955b7a4-385d-5a5d-8856-6db9f94814aa")}catch{}})();var Cr=25,Tr="milestone",Sr="outcome milestone:",Dr=new Set(["discovered_from","incident_from","supersedes","verifies"]);function Be(e){return Dr.has(e)}var jt={error:0,warning:1,info:2};function $t(e){return new Set((e??[]).filter(t=>typeof t=="string").map(t=>t.trim().toLowerCase()))}function Ge(e,t,r,n,s,o,i,d){let c=[...s].sort((a,u)=>a.localeCompare(u));return{code:e,severity:t,policy:r,message:n(c.length),count:c.length,sample:c.slice(0,o),sample_truncated:c.length>o,remediation:i,...d===void 0?{}:{evidence:[...d].sort((a,u)=>a.localeCompare(u)).slice(0,o)}}}function Rr(e){let t=e.graph.registry(),r=new Map;for(let n of e.graph.edges()){let s=t.require(n.kind);if(!s.ordering)continue;let[o,i]=(s.precedence??"source_before_target")==="target_before_source"?[n.target,n.source]:[n.source,n.target],d=r.get(o);d?d.push(i):r.set(o,[i])}for(let n of r.values())n.sort((s,o)=>s.localeCompare(o));return r}function Gt(e,t){t.indexes.set(e,t.nextIndex),t.lowLinks.set(e,t.nextIndex),t.nextIndex+=1,t.stack.push(e),t.onStack.add(e)}function Lr(e,t,r,n){let s=r.get(e.node)??[];if(e.neighborIndex>=s.length)return!1;let o=s[e.neighborIndex];return e.neighborIndex+=1,n.indexes.has(o)?n.onStack.has(o)&&n.lowLinks.set(e.node,Math.min(n.lowLinks.get(e.node),n.indexes.get(o))):(Gt(o,n),t.push({node:o,neighborIndex:0})),!0}function Ar(e,t,r,n){t.pop();let s=t.at(-1);if(s&&n.lowLinks.set(s.node,Math.min(n.lowLinks.get(s.node),n.lowLinks.get(e.node))),n.lowLinks.get(e.node)!==n.indexes.get(e.node))return;let o=[];for(;;){let i=n.stack.pop();if(n.onStack.delete(i),o.push(i),i===e.node)break}(o.length>1||o.length===1&&r.get(o[0])?.includes(o[0]))&&n.components.push(o.sort((i,d)=>i.localeCompare(d)))}function Nr(e){let t={indexes:new Map,lowLinks:new Map,onStack:new Set,stack:[],components:[],nextIndex:0},r=[...e.keys()].sort((n,s)=>n.localeCompare(s));for(let n of r){if(t.indexes.has(n))continue;let s=[{node:n,neighborIndex:0}];for(Gt(n,t);s.length>0;){let o=s.at(-1);Lr(o,s,e,t)||Ar(o,s,e,t)}}return t.components.sort((n,s)=>n[0].localeCompare(s[0]))}function $e(e){return`${e.holder_id} -> ${e.target_id} (${e.kind})`}function x(e,t,r,n,s,o,i,d){t.length!==0&&e.push(Ge(n,s,o,i,t,r,d))}function Or(e,t,r){let n=[],s=[...e.dangling.active,...e.dangling.legacy_terminal].filter(o=>!o.no_active_blocker_sentinel);return x(n,s.filter(o=>!t(o.holder_status)).map($e),r,"missing_reference_active","error","Active items must not reference absent targets; missing prerequisites distort scheduling.",o=>`${o} active dangling reference(s) to absent items`,"Restore or re-create the referenced item, or remove/retype the reference on the holder."),x(n,s.filter(o=>t(o.holder_status)).map($e),r,"missing_reference_terminal","info","Terminal items may retain historical references, but absent targets remain unexplainable context.",o=>`${o} terminal dangling reference(s) to absent items`,"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch."),x(n,e.dangling.no_active_blocker_sentinels.map($e),r,"legacy_no_blocker_sentinel","info","The pre-structured-dependency no-active-blocker sentinel is retired; real edges carry blocker state.",o=>`${o} legacy no-active-blocker sentinel reference(s)`,"Delete the sentinel reference; blocker state is derived from blocked_by edges."),n}function Ue(e,t){let r=t.get(e);return r?!r.terminal:!0}function Ut(e){return`${e.holder_id} -> ${e.target_id} (blocked_by scalar + ${e.dependency_kind} dependency)`}function Mr(e,t){let r=[],n=[];for(let o of e.orderingContradictions??[])(o.legacy_terminal?n:r).push(Ut(o));let s=[];return x(s,r,t,"ordering_storage_contradiction","error","A scalar blocker and same-target structured ordering row must not assert opposite precedence.",o=>`${o} active scalar-versus-structured ordering contradiction(s)`,"Remove the structured dependency row that points the holder before its scalar blocker, or replace both representations with one unambiguous ordering edge."),x(s,n,t,"legacy_ordering_storage_contradiction","info","Terminal scalar-versus-structured ordering contradictions are exact historical storage defects with no live scheduling effect.",o=>`${o} terminal scalar-versus-structured ordering contradiction(s)`,"Remove the contradictory blocks dependency row in a dedicated changelog-safe closed-item batch; preserve the scalar blocker as the historical precedence record."),s}function Pr(e,t,r,n){let s=[],o=Rr(e);for(let c of Nr(o)){let a=c.some(l=>Ue(l,t)),u=new Set(c.map(l=>l.toLowerCase())),f=(e.orderingContradictions??[]).filter(l=>u.has(l.holder_id.toLowerCase())&&u.has(l.target_id.toLowerCase())).map(Ut);s.push(a?Ge("ordering_cycle","error","Order-bearing relationship kinds must stay acyclic; a cycle makes every member unschedulable.",l=>`execution-order cycle across ${l} item(s)`,c,n,"Remove or retype one ordering edge inside the cycle, or split the work so precedence is linear.",f.length===0?void 0:f):Ge("legacy_ordering_cycle","info","Ordering cycles between exclusively terminal items are historical contradictions with no scheduling effect.",l=>`terminal-only execution-order cycle across ${l} item(s)`,c,n,"Leave as history debt, or clean up in a dedicated changelog-safe closed-item batch; never repair closed items ad hoc.",f.length===0?void 0:f))}let i=new Map;for(let[c,a]of o)for(let u of a){let f=i.get(u);f?f.push(c):i.set(u,[c])}let d=[...t.values()].filter(c=>!c.missing&&!c.terminal&&r(c.status)&&!(i.get(c.id)??[]).some(a=>{let u=t.get(a);return u===void 0||!u.terminal})).map(c=>c.id);return x(s,d,n,"stale_lifecycle_block","warning","A blocked lifecycle status must be backed by at least one open ordering predecessor.",c=>`${c} status-blocked item(s) with no open blocker edge`,'Add a local blocker edge, declare an external blocker with --dep "id=<external-ref>,kind=blocked_by,source_kind=external", or move the item back to an active status.'),s}function ve(e){let t=e.edges.map(r=>r.kind).sort((r,n)=>r.localeCompare(n));return`${e.from} -> ${e.to} (${t.join(" + ")})`}function qe(e){let t=e.graph.registry(),r=new Map;for(let s of e.graph.edges()){let o=t.require(s.kind);if(!_e(o))continue;let i=be(s,o);if(i.from===i.to)continue;let d=`${ye(o)}::${i.from}::${i.to}`,c=r.get(d);c?c.edges.push(s):r.set(d,{...i,edges:[s]})}let n=[...r.values()].filter(s=>s.edges.length>=2);for(let s of n)s.edges.sort((o,i)=>o.kind.localeCompare(i.kind));return n.sort((s,o)=>s.from.localeCompare(o.from)||s.to.localeCompare(o.to))}function jr(e,t,r){let n=[],s=[];for(let i of qe(e))(Ue(i.from,t)||Ue(i.to,t)?n:s).push(ve(i));let o=[];return x(o,n,r,"duplicate_edge","info","One semantic relationship should be stored once; parallel same-family spellings (reciprocal inverse pairs included) add no information and skew degree metrics.",i=>`${i} duplicated relationship(s) between active endpoints`,"Remove all but one stored spelling of the relationship; keep the canonical direction the holder declared first."),x(o,s,r,"legacy_duplicate_edge","info","Duplicated spellings between exclusively terminal items are historical noise with no scheduling effect.",i=>`${i} duplicated relationship(s) between terminal endpoints`,"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch."),o}function $r(e,t){let r=[],n=[];for(let o of e.duplicateRows??[])(o.legacy_terminal?n:r).push(`${o.holder_id} -> ${o.target_id} (${o.kind} x${o.occurrences})`);let s=[];return x(s,r,t,"duplicate_dependency_row","warning","One dependency row must be stored once per holder; identical repeated rows are a storage-layer defect invisible to the assembled graph.",o=>`${o} exactly duplicated stored dependency row(s) on active holder(s)`,"Remove the repeated rows so the dependency is stored exactly once; graph semantics are unchanged."),x(s,n,t,"legacy_duplicate_dependency_row","info","Identical repeated dependency rows on terminal holders are historical storage noise with no scheduling effect.",o=>`${o} exactly duplicated stored dependency row(s) on terminal holder(s)`,"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch."),s}function Fr(e,t){let r=new Map;for(let n of e.graph.edges()){t?.throwIfAborted();let s=e.graph.registry().require(n.kind),o;if(s.hierarchy?o=be(n,s):s.kind==="implements"&&(o={from:n.source,to:n.target}),o===void 0)continue;let i=r.get(o.to)??new Set;i.add(o.from),r.set(o.to,i)}return r}function Gr(e,t,r){let n=new Set(e),s=[...e].sort();for(let o=0;o<s.length;o+=1){r?.throwIfAborted();for(let i of[...t.get(s[o])??[]].sort())n.has(i)||(n.add(i),s.push(i))}return n}function Ur(e,t,r,n){let s=0,o=0,i=0,d=0;for(let p of e.values())if(n?.throwIfAborted(),!t.has(p.id)&&!(p.missing||p.status==="external")){if(p.terminal){i+=1,r.has(p.id)&&(d+=1);continue}r.has(p.id)?s+=1:o+=1}let c=s+o,a=i-d,u=s+d,f=o+a,l=u+f;return{active_outcome_reachable_nodes:s,active_outcome_unreachable_nodes:o,active_outcome_reachability_basis_points:c===0?0:Math.floor(s*1e4/c),terminal_nodes:i,terminal_outcome_reachable_nodes:d,terminal_outcome_unreachable_nodes:a,terminal_outcome_reachability_basis_points:i===0?0:Math.floor(d*1e4/i),outcome_reachable_nodes:u,outcome_unreachable_nodes:f,outcome_reachability_basis_points:l===0?0:Math.floor(u*1e4/l)}}function Br(e,t,r){let n=new Set(e.details.filter(o=>o.type?.toLowerCase()===Tr&&o.title.trim().toLowerCase().startsWith(Sr)).map(o=>o.id)),s=Gr(n,Fr(e,r),r);return{outcome_nodes:n.size,...Ur(t,n,s,r)}}function qr(e,t,r,n,s){e.active+=1;let o=t.type??"(untyped)",i=e.byType.get(o);i||(i={active:0,isolated:0,degree_leq_one:0},e.byType.set(o,i)),i.active+=1,!(r>1)&&(e.degreeLeqOne+=1,i.degree_leq_one+=1,r===0&&(e.isolated+=1,i.isolated+=1),!(n.has(t.id.toLowerCase())||s.has(o.toLowerCase()))&&(r===0?e.isolates.push(t.id):e.sparse.push(t.id)))}function zr(e,t,r,n,s,o,i){let d={active:0,missing:0,isolated:0,degreeLeqOne:0,isolates:[],sparse:[],byType:new Map};for(let h of e.graph.nodes()){i?.throwIfAborted();let y=t.get(h);if(y){if(y.missing){d.missing+=1;continue}y.terminal||qr(d,y,e.graph.incidentEdges(h).length,r,n)}}let{isolates:c,sparse:a}=d,u=[];x(u,c,s,"isolated_active_node","warning","Active work should be reachable from the graph unless explicitly declared a valid isolate.",h=>`${h} active item(s) with no relationships`,"Link the item to its parent, prerequisite, or origin \u2014 or register it as an exempt isolate."),x(u,a,s,"sparse_active_node","info","Active items with a single edge often miss an honest semantic partner; sparse is not automatically defective.",h=>`${h} active item(s) with exactly one relationship`,"Investigate for an honest second edge (story->task, defect family, cross-epic complement); do not fabricate one.");let f=e.graph.edges().length,l=j(e.graph,{signal:i}).value,p=new Set(l.map(({edge:h})=>`${h.source.toLowerCase()}\0${h.target.toLowerCase()}\0${h.kind}`));for(let h of e.orderingContradictions??[])p.add(`${h.holder_id.toLowerCase()}\0${h.target_id.toLowerCase()}\0${h.dependency_kind}`);let g=Object.fromEntries(Object.entries(o).sort(([h],[y])=>h.localeCompare(y))),m=Object.entries(g).reduce((h,[y,C])=>h+(Be(y)?C:0),0),_=we(e.graph,{signal:i}).value,b=Br(e,t,i);return{findings:u,profile:{nodes:e.graph.nodes().length,recorded_nodes:e.details.filter(h=>h.status!=="missing"&&h.status!=="external").length,edges:f,informative_edges:f-p.size,redundant_edges:l.length,ordering_contradiction_edges:e.orderingContradictions?.length??0,edge_basis:"deduplicated_directed",edges_by_kind:g,edge_share_by_kind:Object.fromEntries(Object.entries(g).map(([h,y])=>[h,y/f])),semantic_edges:m,semantic_edge_share:f===0?0:m/f,active_nodes:d.active,missing_nodes:d.missing,isolated_active_nodes:d.isolated,degree_leq_one_active_nodes:d.degreeLeqOne,coverage_by_type:Object.fromEntries([...d.byType.entries()].sort(([h],[y])=>h<y?-1:1)),articulation_points:_.articulationPoints.length,bridge_edges:_.bridges.length,...b,finding_subjects_by_code:Object.fromEntries(ke.map(h=>[h,0]))}}}function xe(e,t={}){let r=t.isTerminal??(l=>l==="closed"||l==="canceled"),n=t.isBlocked??(l=>l==="blocked"),s=t.maxSampleSize??Cr;if(!Number.isInteger(s)||s<1)throw new TypeError(`Invalid audit sample bound: ${String(t.maxSampleSize)}`);let o=$t(t.exemptIsolates),i=$t(t.isolateExemptTypes),d=new Map(e.details.map(l=>[l.id,{id:l.id,status:l.status,missing:e.missingIdSet.has(l.id.toLowerCase()),terminal:r(l.status),...l.type===void 0?{}:{type:l.type}}]));t.signal?.throwIfAborted();let c={};for(let l of e.graph.edges())c[l.kind]=(c[l.kind]??0)+1;let a=Or(e,r,s);t.signal?.throwIfAborted(),a.push(...Mr(e,s)),t.signal?.throwIfAborted(),a.push(...Pr(e,d,n,s)),t.signal?.throwIfAborted(),a.push(...jr(e,d,s),...$r(e,s)),t.signal?.throwIfAborted();let u=zr(e,d,o,i,s,c,t.signal);a.push(...u.findings),a.sort((l,p)=>jt[l.severity]-jt[p.severity]||l.code.localeCompare(p.code)||l.sample[0].localeCompare(p.sample[0]));let f=u.profile.finding_subjects_by_code;for(let l of a)f[l.code]+=l.count;return{findings:a,profile:{...u.profile,finding_subjects_by_code:f}}}function Fe(e,t){let r=[...new Set([...Object.keys(e),...Object.keys(t)])].sort(),n={};for(let s of r){let o=(t[s]??0)-(e[s]??0);o!==0&&(n[s]=o)}return n}function Ft(e){return e.profile.coverage_by_type??{}}function Kr(e,t){let r={},n=Ft(e),s=Ft(t),o=[...new Set([...Object.keys(n),...Object.keys(s)])].sort();for(let i of o){let d=Object.assign({active:0,isolated:0,degree_leq_one:0},n[i]),c=Object.assign({active:0,isolated:0,degree_leq_one:0},s[i]),a={active:c.active-d.active,isolated:c.isolated-d.isolated,degree_leq_one:c.degree_leq_one-d.degree_leq_one};Object.values(a).some(u=>u!==0)&&(r[i]=a)}return r}function Bt(e,t){let r=Kr(e,t),{edge_share_by_kind:n={},semantic_edges:s=0,semantic_edge_share:o=0}=e.profile,{edge_share_by_kind:i={},semantic_edges:d=0,semantic_edge_share:c=0}=t.profile,a=e.profile.recorded_nodes??e.profile.nodes,u=t.profile.recorded_nodes??t.profile.nodes,f=e.profile.informative_edges??e.profile.edges,l=t.profile.informative_edges??t.profile.edges,p=e.profile.redundant_edges??0,g=t.profile.redundant_edges??0,m=e.profile.ordering_contradiction_edges??0,_=t.profile.ordering_contradiction_edges??0;return{baseline_saved_at:e.saved_at,same_snapshot:e.fingerprint===t.fingerprint,affected_subjects_by_code:Fe(e.affected_subjects_by_code,t.affected_subjects_by_code),profile:{nodes:t.profile.nodes-e.profile.nodes,recorded_nodes:u-a,edges:t.profile.edges-e.profile.edges,informative_edges:l-f,redundant_edges:g-p,ordering_contradiction_edges:_-m,active_nodes:t.profile.active_nodes-e.profile.active_nodes,missing_nodes:t.profile.missing_nodes-e.profile.missing_nodes,isolated_active_nodes:t.profile.isolated_active_nodes-e.profile.isolated_active_nodes,degree_leq_one_active_nodes:t.profile.degree_leq_one_active_nodes-e.profile.degree_leq_one_active_nodes,edges_by_kind:Fe(e.profile.edges_by_kind,t.profile.edges_by_kind),edge_share_by_kind:Fe(n,i),semantic_edges:d-s,semantic_edge_share:c-o,coverage_by_type:r}}}import qt 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]="9e4aa41d-fca4-5e55-ab2b-d99f06d90ae2")}catch{}})();var zt=1,ze=500,Wr=64,Hr="graph-durable-cache";function Kt(e){return ct(e,Hr,30,`graph-cache:${process.pid}`,!1,!1,3e3)}function W(e){return qt.join(e,"runtime","graph-cache.json")}function Wt(e){return qt.join(e,"runtime","graph-audit-baseline.json")}function Ke(e){if(e!==null)try{let t=JSON.parse(e);return typeof t!="object"||t===null||t.version!==zt||typeof t.fingerprint!="string"||typeof t.saved_at!="string"||typeof t.results!="object"||t.results===null||Array.isArray(t.results)?void 0:t}catch{return}}async function We(e,t){let r=await B(W(e)),n=Ke(r),s=n?.fingerprint===t;return{exists:r!==null,fresh:s,results:s?n.results:{}}}async function He(e,t,r,n,s){let o=await Kt(e);try{let i=Ke(await B(W(e))),d=i?.fingerprint===t?i.results:{};delete d[n],d[n]=s;let c=Object.keys(d);for(let a of c.slice(0,Math.max(0,c.length-Wr)))delete d[a];await Se(W(e),JSON.stringify({version:zt,fingerprint:t,saved_at:new Date().toISOString(),results:d})),r.results=d}finally{await o()}}async function Ve(e){let t=await Kt(e);try{await rt(W(e))}finally{await t()}}async function Ht(e,t){let r=W(e),n=await B(r),s=Ke(n);return s===void 0?{exists:n!==null,fresh:!1,entry_count:0}:{exists:!0,fresh:s.fingerprint===t,entry_count:Object.keys(s.results).length,fingerprint:s.fingerprint.slice(0,12),saved_at:s.saved_at,bytes:Buffer.byteLength(n,"utf8")}}function Xe(e,t){return t||e>=ze}function Ee(e){return $(e)&&Object.values(e).every(R)}function $(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function R(e){return Number.isInteger(e)&&Number(e)>=0}function Vt(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=1}function K(e,t){return e===void 0||t(e)}function Vr(e){return $(e)&&Object.values(e).every(Vt)}function Xr(e){return $(e)?Object.values(e).every(t=>$(t)&&[t.active,t.isolated,t.degree_leq_one].every(R)):!1}function Yr(e,t,r){let n=["recorded_nodes","informative_edges","redundant_edges","ordering_contradiction_edges"],s=n.filter(i=>e[i]!==void 0).length;if(s!==0&&s!==n.length||!n.every(i=>K(e[i],R)))return;let o={recorded_nodes:e.recorded_nodes??t,informative_edges:e.informative_edges??r,redundant_edges:e.redundant_edges??0,ordering_contradiction_edges:e.ordering_contradiction_edges??0};return o.recorded_nodes<=t&&o.informative_edges<=r&&o.redundant_edges<=r&&o.ordering_contradiction_edges<=r?o:void 0}function Jr(e,t,r){let n=[...t,...r,"finding_subjects_by_code"],s=n.filter(o=>e[o]!==void 0).length;return s!==0&&s!==n.length?!1:t.every(o=>K(e[o],R))&&r.every(o=>K(e[o],R)&&(e[o]===void 0||Number(e[o])<=1e4))&&K(e.finding_subjects_by_code,Ee)}function Qr(e,t,r,n){let s=Yr(e,r,n);if(s===void 0)return;let o=["articulation_points","bridge_edges","outcome_nodes","active_outcome_reachable_nodes","active_outcome_unreachable_nodes","terminal_nodes","terminal_outcome_reachable_nodes","terminal_outcome_unreachable_nodes","outcome_reachable_nodes","outcome_unreachable_nodes"],i=["active_outcome_reachability_basis_points","terminal_outcome_reachability_basis_points","outcome_reachability_basis_points"];if(!Jr(e,o,i)||e.edge_basis!==void 0&&e.edge_basis!=="deduplicated_directed")return;let d=Ee(e.finding_subjects_by_code)?e.finding_subjects_by_code:{};return{edge_basis:"deduplicated_directed",...s,...Object.fromEntries(o.map(c=>[c,e[c]??0])),...Object.fromEntries(i.map(c=>[c,e[c]??0])),finding_subjects_by_code:Object.fromEntries(ke.map(c=>[c,d[c]??t[c]??0]))}}function Zr(e,t,r,n,s){let o=[r,n,s],i=o.filter(a=>a!==void 0).length;if(i===0)return{edge_share_by_kind:{},semantic_edges:0,semantic_edge_share:0};if(i!==o.length||!Vr(r)||!R(n)||!Vt(s))return;let d=Object.entries(t);if(d.reduce((a,[,u])=>a+u,0)!==e||Object.keys(r).length!==d.length||d.some(([a,u])=>r[a]!==(e===0?0:u/e)))return;let c=d.reduce((a,[u,f])=>a+(Be(u)?f:0),0);if(!(n!==c||s!==(e===0?0:c/e)))return{edge_share_by_kind:r,semantic_edges:n,semantic_edge_share:s}}function es(e){if(e!==null)try{let t=JSON.parse(e);if(!$(t))return;let r=t,n=r.profile;if(typeof r.saved_at!="string"||typeof r.fingerprint!="string")return;let s=r.affected_subjects_by_code;if(!Ee(s)||!$(n)||![n.nodes,n.edges,n.active_nodes,n.missing_nodes,n.isolated_active_nodes,n.degree_leq_one_active_nodes].every(R)||!Ee(n.edges_by_kind)||!K(n.coverage_by_type,Xr))return;let o=Zr(n.edges,n.edges_by_kind,n.edge_share_by_kind,n.semantic_edges,n.semantic_edge_share);if(o===void 0)return;let i=Qr(n,s,n.nodes,n.edges);if(i===void 0)return;let{coverage_by_type:d={}}=n;return{...r,profile:{...n,...o,...i,coverage_by_type:d}}}catch{return}}async function Xt(e){return es(await B(Wt(e)))}async function Yt(e,t){await Se(Wt(e),JSON.stringify(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]="1eb0e2cb-084a-5a54-b41c-29dfdd6d2f34")}catch{}})();var ts={missing_reference_active:{op:"investigate",confidence:"medium",rationale:"Restore or re-create the referenced item, or remove/retype the reference on the active holder; the correct fix depends on why the target is absent."},missing_reference_terminal:{op:"waive",confidence:"high",rationale:"Terminal-holder reference to an absent item is historical debt; waive it or clean it up only in a dedicated changelog-safe closed-item batch."},legacy_no_blocker_sentinel:{op:"remove",confidence:"high",rationale:"The pre-structured-dependency no-active-blocker sentinel is retired and carries no information; blocker state derives from blocked_by edges."},ordering_cycle:{op:"investigate",confidence:"low",rationale:"Every cycle member is unschedulable until one ordering edge is removed or retyped; the planner never chooses which edge to cut."},legacy_ordering_cycle:{op:"waive",confidence:"high",rationale:"Terminal-only ordering cycles have no scheduling effect; repairing them would mutate closed history (changelog drag)."},ordering_storage_contradiction:{op:"remove",confidence:"high",rationale:"The structured ordering row asserts the opposite precedence from the same-target scalar blocker; remove that exact dependency row or replace both representations with one unambiguous edge."},legacy_ordering_storage_contradiction:{op:"remove",confidence:"high",rationale:"The terminal holder contains a proven contradictory structured ordering row; remove it in a dedicated changelog-safe batch while preserving the scalar blocker as history."},duplicate_edge:{op:"remove",confidence:"high",rationale:"Parallel same-family spellings state one relationship twice; remove all but one stored spelling, keeping the holder's canonical direction."},legacy_duplicate_edge:{op:"waive",confidence:"high",rationale:"Duplicated spellings between terminal items are historical noise; waive or batch changelog-safe cleanup."},duplicate_dependency_row:{op:"remove",confidence:"high",rationale:"The identical dependency row is stored more than once on the holder; drop the repeats so the row exists exactly once \u2014 graph semantics are unchanged."},legacy_duplicate_dependency_row:{op:"waive",confidence:"high",rationale:"Repeated identical rows on terminal holders are storage noise; waive or clean up only in a changelog-safe closed-item batch."},stale_lifecycle_block:{op:"investigate",confidence:"medium",rationale:`Add a local ordering edge, declare an external blocker with --dep "id=<external-ref>,kind=blocked_by,source_kind=external", or move the item back to an active status; only the holder's owner knows which is true.`},isolated_active_node:{op:"investigate",confidence:"medium",rationale:"Link the item to its parent, prerequisite, or origin \u2014 or register it as an explicitly exempt isolate; the audit never fabricates an edge."},sparse_active_node:{op:"investigate",confidence:"low",rationale:"Investigate for an honest second edge (story-to-task, defect family, cross-epic complement); sparse is not automatically defective."}};function Jt(e){return`${e.source} -${e.kind}-> ${e.target}`}function ns(e){let[t,...r]=e.edges;return r.map(n=>({op:"remove",code:"duplicate_edge",subject:Jt(n),rationale:"This stored spelling restates the kept canonical edge of the same semantic family; removing it leaves the relationship stated exactly once.",evidence:[`keep: ${Jt(t)}`,`group: ${ve(e)}`],confidence:"high"}))}function rs(e,t){if(e.code==="duplicate_edge")return e.sample.flatMap(n=>ns(t.get(n)));let r=ts[e.code];return e.sample.map(n=>({op:r.op,code:e.code,subject:n,rationale:r.rationale,evidence:[e.policy],confidence:r.confidence}))}function Qt(e,t={}){let{redundancyLimit:r,...n}=t,s=xe(e,n),o=new Map(qe(e).map(a=>[ve(a),a])),i=s.findings.flatMap(a=>rs(a,o)),d=s.findings.some(a=>a.sample_truncated);t.signal?.throwIfAborted();let c=j(e.graph,{limit:r??t.maxSampleSize??25,...t.signal===void 0?{}:{signal:t.signal}});for(let a of c.value)i.push({op:"remove",code:"redundant_edge",subject:`${a.edge.source} -> ${a.edge.target} (${a.edge.kind})`,rationale:"The stored edge is implied by a longer same-family witness path; shortcut edges are sometimes deliberate emphasis, so confirm intent before removing.",evidence:[`witness: ${a.witness.join(" -> ")}`],confidence:"medium"});return d=d||c.meta.truncated,{steps:i,report:s,truncated:d,cost:{visitedNodes:c.meta.visitedNodes,inspectedEdges:c.meta.inspectedEdges}}}(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]="ee0547d9-ae0f-5762-8bff-e25f0a3cd4d5")}catch{}})();var ss=["tree","graph","context"],os=["none","repeated"],is=["outgoing","incoming","both"],ds=32,cs=200,as=400,us=16e3;function ls(e){let t=e?.trim().toLowerCase()??"tree";if(ss.includes(t))return t;throw new k(`Invalid --format value "${e}". Use "tree", "graph", or "context".`,w.USAGE)}function I(e,t){if(e===void 0)return;let r=typeof e=="number"?e:Number(e.trim());if(!Number.isInteger(r)||r<1)throw new k(`Invalid --${t} value "${e}". Use a positive integer.`,w.USAGE);return r}function Ie(e){if(e===void 0)return;let t=typeof e=="number"?e:Number(e.trim());if(!Number.isInteger(t)||t<0)throw new k(`Invalid --max-depth value "${e}". Use a non-negative integer.`,w.USAGE);return t}function fs(e){let t=e?.trim().toLowerCase()??"none";if(os.includes(t))return t;throw new k(`Invalid --collapse value "${e}". Use "none" or "repeated".`,w.USAGE)}function Je(e){let t=e?.trim().toLowerCase()??"both";if(is.includes(t))return t;throw new k(`Invalid --direction value "${e}". Use "outgoing", "incoming", or "both".`,w.USAGE)}function Qe(e,t=E()){if(e===void 0)return;let r=(Array.isArray(e)?e:[e]).flatMap(s=>s.split(",")).map(s=>s.trim()).filter(s=>s.length>0);if(r.length===0)return;let n=new Set;for(let s of r){let o=t.resolve(s);if(!o){let i=t.list().map(d=>d.kind).join(", ");throw new k(`Invalid --kind value "${s}". Registered kinds: ${i}.`,w.USAGE)}n.add(o.kind)}return[...n].sort()}function ps(e){if(!e||e.length===0)return[];let t=e.map(({id:n,kind:s})=>({id:n.trim(),kind:s.trim().toLowerCase()})).sort((n,s)=>{let o=n.kind.localeCompare(s.kind);return o!==0?o:n.id.localeCompare(s.id)}),r=new Map;for(let n of t){let s=`${n.kind.toLowerCase()}::${n.id.toLowerCase()}`;r.has(s)||r.set(s,{id:n.id,kind:n.kind})}return[...r.values()]}function gs(e){return{id:e.id,title:e.title,type:e.type,status:e.status,dependencies:ps(e.dependencies)}}function ms(e){return ee(new TextEncoder().encode(JSON.stringify({...e,dependencies:void 0})).byteLength)}function hs(e,t,r,n,s,o,i,d,c){for(let a of t.dependencies){let u=Math.max(1,Math.ceil(JSON.stringify({from:e.id,to:a.id,kind:a.kind}).length/3));if(d.nodes>=d.nodeLimit){e.truncated=!0,d.reasons.add("node_limit");break}if(d.edges>=d.edgeLimit){e.truncated=!0,d.reasons.add("edge_limit");break}if(d.estimatedTokens+u>=d.tokenBudget){e.truncated=!0,d.reasons.add("token_budget");break}d.edges+=1,d.estimatedTokens+=u,e.dependencies.push(en(a.id,r,n,s,o,i,d,c+1,a.kind))}}function _s(e,t,r,n,s,o,i,d){return i.estimatedTokens>=i.tokenBudget&&t?.dependencies.length?(e.truncated=!0,i.reasons.add("token_budget"),!0):!t||e.cycle?!0:n!==void 0&&d>=n?(t.dependencies.length>0&&(e.truncated=!0,i.reasons.add("max_depth")),!0):s==="repeated"&&o.has(r)?(e.collapsed=!0,!0):!1}function en(e,t,r,n,s,o,i,d=0,c){let a=e.trim().toLowerCase(),u=t.get(a),f={id:u?.id??e,title:u?.title,type:u?.type,status:u?.status,via:c,missing:!u,cycle:r.has(a),dependencies:[]};if(i.nodes+=1,i.estimatedTokens+=ms(f),_s(f,u,a,n,s,o,i,d))return f;s==="repeated"&&o.add(a);let l=new Set(r);return l.add(a),hs(f,u,t,l,n,s,o,i,d),f}function Zt(e,t){return!e||e.missing&&!t.missing?t:{...e,title:e.title??t.title,type:e.type??t.type,status:e.status??t.status}}function ys(e){let t=new Map,r=new Map,n=[e];for(;n.length>0;){let d=n.pop();t.set(d.id,Zt(t.get(d.id),{id:d.id,title:d.title,type:d.type,status:d.status,missing:d.missing}));for(let c of d.dependencies){t.set(c.id,Zt(t.get(c.id),{id:c.id,title:c.title,type:c.type,status:c.status,missing:c.missing}));let a=c.via??"related",u=`${d.id}::${c.id}::${a}`;r.has(u)||r.set(u,{from:d.id,to:c.id,kind:a}),c.cycle||n.push(c)}}let s=[...t.values()].sort((d,c)=>d.id.localeCompare(c.id)),o=[...r.values()].sort((d,c)=>{let a=d.from.localeCompare(c.from);if(a!==0)return a;let u=d.to.localeCompare(c.to);return u!==0?u:d.kind.localeCompare(c.kind)}),i=s.filter(d=>d.missing).map(d=>d.id);return{root_id:e.id,nodes:s,edges:o,missing_ids:i}}function tn(e,t,r){let n=new Set,s=new Set,o=new Set,i=new Set,d=[{id:e,depth:0}],c=0;for(;c<d.length;){let a=d[c++],u=a.id.trim().toLowerCase();n.add(u);let f=t.get(u);if(!f){o.add(u);continue}if(!(r!==void 0&&a.depth>=r)&&!i.has(u)){i.add(u);for(let l of f.dependencies)s.add(`${u}::${l.id.trim().toLowerCase()}::${l.kind}`),d.push({id:l.id,depth:a.depth+1})}}return{node_count:n.size,edge_count:s.size,edge_basis:"deduplicated_directed",missing_count:o.size}}function bs(e,t=E()){let r=Ie(e.maxDepth),n=I(e.nodeLimit,"node-limit"),s=I(e.edgeLimit,"edge-limit"),o=I(e.tokenBudget,"token-budget"),i=Qe(e.kind,t);return{direction:Je(e.direction),...i===void 0?{}:{kinds:i},...r===void 0?{}:{maxDepth:r},...n===void 0?{}:{nodeLimit:n},...s===void 0?{}:{edgeLimit:s},...o===void 0?{}:{tokenBudget:o},...e.cursor?.trim()?{cursor:e.cursor.trim()}:{}}}function ws(e,t,r,n){return kt(e.graph,t,e.details.map(s=>s.id===t&&n.length>0?{...s,evidence:n}:s),r)}function Ye(e,t,r,n){for(let s of r.slice(0,n)){let o=s?.trim();o&&e.push(`${t}:${o}`)}}async function ks(e,t,r,n){let s=await ut(e,t,r.id_prefix,r.item_format,n);if(!s)return[];let{document:o}=await lt(s,{schema:r.schema}),i=o.metadata,d=i.files??[],c=i.tests??[],a=i.docs??[],u=[["files",d.length],["tests",c.length],["docs",a.length],["comments",(i.comments??[]).length],["notes",(i.notes??[]).length],["learnings",(i.learnings??[]).length]];if(u.every(([,l])=>l===0))return[];let f=[`linked:${u.map(([l,p])=>`${l}=${p}`).join(",")}`];return Ye(f,"file",d.map(l=>l.path),3),Ye(f,"test",c.map(l=>l.command??l.path),2),Ye(f,"doc",a.map(l=>l.path),2),f}function vs(e){let{canonicalId:t,context:r,missingCount:n,missingReferences:s,referenceLimit:o,summaryOnly:i}=e;return{id:t,format:"context",node_count:r.nodes.length+1,edge_count:r.edges.length,edge_basis:"deduplicated_directed",missing_count:n,missing_scope:"traversal",missing_reference_count:s.length,...i?{}:{missing_references:s.slice(0,o),context:r}}}function xs(e){let{row:t,missingReachableSet:r,packetIds:n,filteredKinds:s,registry:o}=e;if(t.no_active_blocker_sentinel||!r.has(t.target_id.trim().toLowerCase())||!n.has(t.holder_id))return!1;if(s===void 0)return!0;let i=o.resolve(t.kind);return i!==void 0&&(s.has(i.kind)||i.inverse!==void 0&&s.has(i.inverse))}function nn(e,t,r){let n;for(;;){let s=ee(new TextEncoder().encode(Le(Re("deps",e),t)).byteLength);if(s===n)return s;r(s),n=s}}function Es(e){return e instanceof TypeError&&e.message.startsWith("Relationship context tokenBudget cannot fit ")}function Is(e){try{return ws(e.assembly,e.canonicalId,{...e.contextOptions,...e.internalTokenBudget===void 0?{}:{tokenBudget:e.internalTokenBudget}},e.rootEvidence)}catch(t){if(e.smallestResult!==void 0&&Es(t))return e.smallestResult;throw t}}function Cs(e){let{assembly:t,canonicalId:r,contextOptions:n,rootEvidence:s,summaryOnly:o,outputFormat:i,missingCount:d,missingReferences:c}=e,u=n.edgeLimit??40,f=n.tokenBudget,l,p;for(;;){let g=Is({assembly:t,canonicalId:r,contextOptions:n,internalTokenBudget:f,rootEvidence:s,smallestResult:p});if("format"in g)return g;let m=g;l??=m.meta.tokenBudget,f??=l;let _=vs({canonicalId:r,context:m,missingCount:d,missingReferences:c,referenceLimit:u,summaryOnly:o});if(p=_,o||(m.meta.tokenBudget=l,m.meta.usedTokens=nn(F(_,!1),i,y=>{m.meta.usedTokens=y}),m.meta.usedTokens<=l))return _;if(u>0){u-=1;continue}let b=f,h=b*l/m.meta.usedTokens;f=Math.min(b-1,Math.max(1,Math.floor(h*.9)))}}function Ts(e){let{assembly:t,canonicalId:r,options:n,rootEvidence:s,summaryOnly:o,outputFormat:i}=e,d=bs(n,t.graph.registry()),c=t.graph.closure(r,{direction:d.direction,...d.kinds===void 0?{}:{kinds:d.kinds},maxDepth:d.maxDepth??3}),a=c.value.filter(m=>t.missingIdSet.has(m.toLowerCase())),u=new Set(a.map(m=>m.toLowerCase())),f=t.graph.registry(),l=d.kinds?new Set(d.kinds.map(m=>f.require(m).kind)):void 0,p=new Set([r,...c.value]),g=[...t.dangling.active,...t.dangling.legacy_terminal].filter(m=>xs({row:m,missingReachableSet:u,packetIds:p,filteredKinds:l,registry:f}));return Cs({assembly:t,canonicalId:r,contextOptions:d,rootEvidence:s,summaryOnly:o,outputFormat:i,missingCount:a.length,missingReferences:g})}function Ss(e){let t=[e],r;for(;t.length>0;){let n=t.pop();n.dependencies.length>0&&(r=n,t.push(...n.dependencies))}return r?(r.dependencies.pop(),r.truncated=!0,!0):!1}function Ds(e,t,r,n,s,o,i){let d=s??ds,c=I(r.nodeLimit,"node-limit")??cs,a=I(r.edgeLimit,"edge-limit")??as,u=I(r.tokenBudget,"token-budget")??us,f={nodeLimit:c,edgeLimit:a,tokenBudget:u,nodes:0,edges:0,estimatedTokens:0,reasons:new Set},l=en(e,n,new Set,d,t==="graph"?"repeated":o,new Set,f),p=tn(e,n,void 0),g;for(;;){let m=ys(l),_=f.reasons.size===0?void 0:{reasons:[...f.reasons].sort(),limits:{max_depth:d,node_limit:c,edge_limit:a,token_budget:u},estimated_tokens:0,total_node_count:p.node_count,total_edge_count:p.edge_count,omitted_node_count:Math.max(0,p.node_count-m.nodes.length),omitted_edge_count:Math.max(0,p.edge_count-m.edges.length)},b={id:e,format:t,node_count:m.nodes.length,edge_count:m.edges.length,edge_basis:"deduplicated_directed",missing_count:m.missing_ids.length,..._?{truncation:_}:{}};if(g=t==="tree"?{...b,tree:l}:{...b,graph:m},(g.truncation===void 0?ee(new TextEncoder().encode(Le(Re("deps",F(g,!1)),i)).byteLength):nn(F(g,!1),i,y=>{g.truncation.estimated_tokens=y}))<=u)return g;if(!Ss(l))return f.reasons.add("token_budget"),g;f.reasons.add("token_budget")}}function F(e,t,r={}){let n={name:e.format==="tree"?"dependency_tree":e.format==="graph"?"dependency_graph":"relationship_context",restore_with:"--full"};return{...e,legacy_alias_counts:r,projection:{mode:t?"summary":"full",declared_field_groups:[n],included_field_groups:t?[]:[n.name]}}}async function ei(e,t,r){let n=J(process.cwd(),r.path);if(!await X(Q(n)))throw new k(`Tracker is not initialized at ${n}. Run pm init first.`,w.NOT_FOUND);let s=ls(t.format),o=Ie(t.maxDepth),i=fs(t.collapse);re(t.summary===!0,t.full===!0,"--summary");let d=t.summary===!0,c=await se(n),a=Y(c,A()),u=await oe(n,c.item_format,a.type_to_folder,void 0,c.schema),f=Z(c.schema),l=new Map(u.map(g=>[g.id.trim().toLowerCase(),gs(g)])),p=Ne(u,g=>S(g,f));for(let g of[...p.active,...p.legacy_terminal]){let m=l.get(g.holder_id.trim().toLowerCase()),_=g.kind.trim().toLowerCase();m&&!m.dependencies.some(b=>b.id.trim().toLowerCase()===g.target_id.trim().toLowerCase()&&b.kind===_)&&m.dependencies.push({id:g.target_id,kind:_})}if(!l.has(e.trim().toLowerCase()))throw new k(`Item ${e} not found`,w.NOT_FOUND);if(s==="context"){let g=l.get(e.trim().toLowerCase()).id,m=d?[]:await ks(n,g,c,a.type_to_folder),_=y=>S(y,f),b=D(),h=ue().lookup(n,ae(u,_,b),()=>P(u,_,b));return F(Ts({assembly:h.assembly,canonicalId:g,options:t,rootEvidence:m,summaryOnly:d,outputFormat:r.json===!0?"json":"toon"}),d,h.assembly.legacyAliasCounts)}return d?F({id:e,format:s,...tn(e,l,o)},!0,Object.fromEntries(Object.entries(P(u,g=>S(g,f)).legacyAliasCounts))):F(Ds(e,s,t,l,o,i,r.json===!0?"json":"toon"),!1,Object.fromEntries(Object.entries(P(u,g=>S(g,f)).legacyAliasCounts)))}(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]="6c8bfb7a-687a-5fbb-b408-ffdbab1187a9")}catch{}})();var dn=new Set(["ancestors","descendants","predecessors","successors","paths","impact","dominators"]),T=10;function rn(e,t,r){return{...e,projection:{mode:t?"summary":"full",declared_field_groups:r===void 0?[]:[{name:r,restore_with:"--full"}],included_field_groups:r===void 0||t?[]:[r]}}}function sn(e){return e===void 0?[]:(Array.isArray(e)?e:[e]).flatMap(t=>t.split(",")).map(t=>t.trim()).filter(t=>t.length>0)}function Rs(e,t,r){let n=e.trim().toLowerCase();if(!De.includes(n))throw ft({command_path:"graph",token:n||"<empty>",allowed:De});let s=n;if(dn.has(s)&&!t?.trim())throw new k(`graph ${s} requires an item id.`,w.USAGE);if(s==="paths"&&!r?.trim())throw new k("graph paths requires a source and a target item id.",w.USAGE);return s}function Ze(e){throw e instanceof TypeError?new k(e.message,w.USAGE):e}function et(e){return{truncated:e.truncated,cost:{visited_nodes:e.visitedNodes,inspected_edges:e.inspectedEdges}}}function on(e,t){let r=t.trim().toLowerCase();for(let n of e.details)if(n.id.trim().toLowerCase()===r&&!e.missingIdSet.has(n.id.toLowerCase()))return n.id;throw new k(`Item ${t} not found`,w.NOT_FOUND)}function Ls(e,t,r){let n={ancestors:Et,descendants:It,predecessors:Ct,successors:Tt}[e],s;try{s=n(r.assembly.graph,t,{...r.kinds===void 0?{}:{kinds:r.kinds},...r.maxDepth===void 0?{}:{maxDepth:r.maxDepth},...r.limit===void 0?{}:{limit:r.limit},...r.after===void 0?{}:{after:r.after}})}catch(i){Ze(i)}let o=et(s.meta);return{subcommand:e,root:t,count:s.value.length,...o,...s.meta.nextCursor===void 0?{}:{next_cursor:s.meta.nextCursor},...r.summary?{}:{ids:s.value}}}function As(e,t,r){let n=St(r.assembly.graph,e,t,{direction:r.direction,...r.kinds===void 0?{}:{kinds:r.kinds},...r.maxDepth===void 0?{}:{maxDepth:r.maxDepth},...r.maxPaths===void 0?{}:{maxPaths:r.maxPaths}});return{subcommand:"paths",root:e,target:t,direction:r.direction,count:n.value.length,...et(n.meta),...r.summary?{}:{paths:n.value.map(s=>({nodes:s.nodes,kinds:s.edges.map(o=>o.kind),length:s.length}))}}}function Ns(e,t){let r;try{r=ht(t.assembly.graph,e,{direction:t.direction,...t.kinds===void 0?{}:{kinds:t.kinds},...t.maxDepth===void 0?{}:{maxDepth:t.maxDepth},...t.unbounded?{}:{limit:t.limit??T},...t.after===void 0?{}:{after:t.after}})}catch(n){Ze(n)}return{subcommand:"impact",root:e,direction:t.direction,count:r.affected.length,truncated:r.truncated,...r.nextCursor===void 0?{}:{next_cursor:r.nextCursor},cost:{visited_nodes:r.cost.visitedNodes,inspected_edges:r.cost.inspectedEdges},...t.summary?{}:{affected:r.affected}}}function Os(e){let t=e.assembly.graph,r=e.limit??T,n=ce(t,{registry:t.registry()}),s=_t(t);return{subcommand:"analyze",node_count:t.nodes().length,edge_count:t.edges().length,edge_basis:"deduplicated_directed",sample_limit:r,execution:{acyclic:n.acyclic,ordered_node_count:n.order.length,layer_count:n.layers.length,frontier_count:n.frontier.length,critical_path_length:n.criticalPathLength,cycle_count:n.cycles.length,...e.summary?{}:{frontier:n.frontier.slice(0,r),critical_path:n.criticalPath.slice(0,r),cycles:n.cycles.slice(0,r)}},knowledge:{component_count:s.components.length,largest_component_size:s.components[0]?.length??0,orphan_count:s.orphans.length,...e.summary?{}:{orphans:s.orphans.slice(0,r),hubs:s.hubs.slice(0,r)}}}}function Ms(e,t){let r=xe(e.assembly,{isTerminal:t,...e.sample===void 0?{}:{maxSampleSize:e.sample},...e.exemptIsolates.length===0?{}:{exemptIsolates:e.exemptIsolates},...e.exemptIsolateTypes.length===0?{}:{isolateExemptTypes:e.exemptIsolateTypes}}),n={},s={},o={},i={};for(let d of r.findings)n[d.severity]=(n[d.severity]??0)+1,s[d.code]=(s[d.code]??0)+1,o[d.severity]=(o[d.severity]??0)+d.count,i[d.code]=(i[d.code]??0)+d.count;return{subcommand:"audit",finding_count:r.findings.length,findings_by_severity:n,findings_by_code:s,affected_subjects_by_severity:o,affected_subjects_by_code:i,profile:r.profile,legacy_alias_counts:e.assembly.legacyAliasCounts,...e.summary?{}:{findings:r.findings}}}function Ps(e){let t=e.limit??T,r={};e.kinds!==void 0&&(r.kinds=e.kinds);let n=Rt(e.assembly.graph,r),s=n.value;return{subcommand:"communities",community_count:s.communities.length,largest_community_size:s.communities[0]?.size??0,iterations:s.iterations,converged:s.converged,truncated:!s.converged||s.communities.length>t,cost:{visited_nodes:n.meta.visitedNodes,inspected_edges:n.meta.inspectedEdges},...e.summary?{}:{communities:s.communities.slice(0,t).map(o=>({representative:o.representative,size:o.size,members:o.members.slice(0,t)}))}}}function js(e){let t;try{t=j(e.assembly.graph,{...e.kinds===void 0?{}:{kinds:e.kinds},...e.maxDepth===void 0?{}:{maxDepth:e.maxDepth},...e.limit===void 0?{}:{limit:e.limit}})}catch(r){Ze(r)}return{subcommand:"redundancy",redundant_count:t.value.length,...et(t.meta),...e.summary?{}:{redundant:t.value.map(r=>({source:r.edge.source,target:r.edge.target,kind:r.edge.kind,witness:r.witness}))}}}function $s(e,t){let r=t.limit??T,n=Lt(t.assembly.graph,e,{direction:t.direction,...t.kinds===void 0?{}:{kinds:t.kinds},...t.maxDepth===void 0?{}:{maxDepth:t.maxDepth}}),s=n.value.rows.filter(o=>o.dominatedCount>0);return{subcommand:"dominators",root:e,direction:t.direction,reachable_count:n.value.reachableCount,bottleneck_count:s.length,truncated:n.meta.truncated||s.length>r,cost:{visited_nodes:n.meta.visitedNodes,inspected_edges:n.meta.inspectedEdges},...t.summary?{}:{bottlenecks:s.slice(0,r).map(o=>({id:o.id,idom:o.idom,dominated_count:o.dominatedCount}))}}}function Fs(e){let t=e.limit??T,r=Pt(e.assembly.graph),n=r.rows.filter(s=>s.critical).length;return{subcommand:"slack",acyclic:r.acyclic,makespan:r.makespan,scheduled_count:r.scheduledCount,critical_count:n,critical_path_length:r.criticalPathLength,cycle_count:r.cycles.length,truncated:r.rows.length>t,...e.summary?{}:{critical_path:r.criticalPath,rows:r.rows.slice(0,t).map(s=>({id:s.id,earliest_start:s.earliestStart,latest_start:s.latestStart,slack:s.slack,critical:s.critical}))}}}function Gs(e){let t=e.limit??T,r=Mt(e.assembly.graph,e.kinds===void 0?{}:{kinds:e.kinds}),n=r.value;return{subcommand:"centrality",node_count:n.nodeCount,edge_count:n.edgeCount,edge_basis:"simple_undirected",truncated:n.rows.length>t,cost:{visited_nodes:r.meta.visitedNodes,inspected_edges:r.meta.inspectedEdges},...e.summary?{}:{rows:n.rows.slice(0,t).map(s=>({id:s.id,degree:s.degree,in_degree:s.inDegree,out_degree:s.outDegree,betweenness:s.betweenness,closeness:s.closeness}))}}}function Us(e){let t=e.limit??T,r=we(e.assembly.graph,e.kinds===void 0?{}:{kinds:e.kinds}),{articulationPoints:n,bridges:s}=r.value;return{subcommand:"articulation",articulation_count:n.length,bridge_count:s.length,truncated:n.length>t||s.length>t,cost:{visited_nodes:r.meta.visitedNodes,inspected_edges:r.meta.inspectedEdges},...e.summary?{}:{articulation_points:n.slice(0,t),bridges:s.slice(0,t)}}}function Bs(e,t){let r=e.limit??T,n=Qt(e.assembly,{isTerminal:t,redundancyLimit:r,...e.sample===void 0?{}:{maxSampleSize:e.sample},...e.exemptIsolates.length===0?{}:{exemptIsolates:e.exemptIsolates},...e.exemptIsolateTypes.length===0?{}:{isolateExemptTypes:e.exemptIsolateTypes}}),s={},o={};for(let i of n.steps)s[i.op]=(s[i.op]??0)+1,o[i.code]=(o[i.code]??0)+1;return{subcommand:"plan",step_count:n.steps.length,steps_by_op:s,steps_by_code:o,finding_count:n.report.findings.length,truncated:n.truncated||n.steps.length>r,cost:{visited_nodes:n.cost.visitedNodes,inspected_edges:n.cost.inspectedEdges},...e.summary?{}:{steps:n.steps.slice(0,r)}}}function cn(e,t,r,n){return JSON.stringify({subcommand:e,root:t??null,target:r??null,kinds:n.kinds??null,maxDepth:n.maxDepth??null,limit:n.limit??null,after:n.after??null,direction:n.direction,maxPaths:n.maxPaths??null,sample:n.sample??null,exemptIsolates:[...new Set(n.exemptIsolates.map(s=>s.toLowerCase()))].sort(),exemptIsolateTypes:[...new Set(n.exemptIsolateTypes.map(s=>s.toLowerCase()))].sort(),summary:n.summary,unbounded:n.unbounded})}function an(e,t,r,n,s){return e==="analyze"?Os(n):e==="audit"?Ms(n,s):e==="plan"?Bs(n,s):e==="communities"?Ps(n):e==="redundancy"?js(n):e==="dominators"?$s(t,n):e==="slack"?Fs(n):e==="centrality"?Gs(n):e==="articulation"?Us(n):e==="paths"?As(t,r,n):e==="impact"?Ns(t,n):Ls(e,t,n)}function qs(e,t){if(e!=="index"&&(t.rebuild===!0||t.clear===!0))throw new k("--rebuild and --clear apply only to graph index.",w.USAGE);if(e!=="audit"&&t.saveBaseline===!0)throw new k("--save-baseline applies only to graph audit.",w.USAGE);if(e==="slack"&&t.kind!==void 0)throw new k("graph slack analyzes every ordering kind; --kind is not supported.",w.USAGE);if(t.rebuild===!0&&t.clear===!0)throw new k("graph index accepts either --rebuild or --clear, not both.",w.USAGE);if(e==="impact"&&t.full===!0&&t.limit!==void 0)throw new k("graph impact accepts either --full or --limit, not both.",w.USAGE)}async function zs(e,t,r,n,s,o){let i="status";if(o.clear===!0&&(await Ve(e),i="cleared"),o.rebuild===!0){await Ve(e);let c=await We(e,t),a={assembly:r.assembly,direction:"both",exemptIsolates:[],exemptIsolateTypes:[],saveBaseline:!1,summary:!0,unbounded:!1};for(let u of["analyze","audit"])await He(e,t,c,cn(u,void 0,void 0,a),an(u,void 0,void 0,a,s));i="rebuilt"}let d=await Ht(e,t);return{subcommand:"index",action:i,state:d.exists?d.fresh?"fresh":"stale":"absent",entry_count:d.entry_count,item_count:n,min_items_threshold:ze,persist_enabled:Xe(n,d.exists),current_fingerprint:t.slice(0,12),...d.saved_at===void 0?{}:{saved_at:d.saved_at},...d.bytes===void 0?{}:{bytes:d.bytes}}}async function Ks(e,t,r,n){let s={saved_at:new Date().toISOString(),fingerprint:t,affected_subjects_by_code:r.affected_subjects_by_code,profile:r.profile},o=await Xt(e);return n&&await Yt(e,s),o===void 0?r:{...r,baseline:Bt(o,s)}}async function Ws(e,t,r,n,s){try{await He(e,t,r,n,s)}catch{}}async function Ci(e,t,r,n,s){let o=Rs(e,t,r);re(n.summary===!0,n.full===!0,"--summary");let i=J(process.cwd(),s.path);if(!await X(Q(i)))throw new k(`Tracker is not initialized at ${i}. Run pm init first.`,w.NOT_FOUND);let d=await se(i),c=Y(d,A()),a=await oe(i,d.item_format,c.type_to_folder,void 0,d.schema),u=Z(d.schema),f=U=>S(U,u);qs(o,n);let l=D(),p=Qe(n.kind,l),g=ue().lookup(i,ae(a,f,l),()=>P(a,f,l)),m={assembly:g.assembly,...p===void 0?{}:{kinds:p},maxDepth:Ie(n.maxDepth),limit:I(n.limit,"limit"),after:n.after?.trim()||void 0,direction:Je(n.direction),maxPaths:I(n.maxPaths,"max-paths"),sample:I(n.sample,"sample"),exemptIsolates:sn(n.exemptIsolate),exemptIsolateTypes:sn(n.exemptIsolateType),saveBaseline:n.saveBaseline===!0,summary:n.summary===!0,unbounded:n.full===!0};if(o==="index")return rn(await zs(i,g.fingerprint,m,a.length,f,n),!1);let _=dn.has(o)?on(m.assembly,t):void 0,b=o==="paths"?on(m.assembly,r):void 0,h=cn(o,_,b,m),y=await We(i,g.fingerprint),C=y.results[h],v=g.memoize(h,()=>C!==void 0?structuredClone(C):an(o,_,b,m,f)),H=Xe(a.length,y.exists);!v.reused&&C===void 0&&H&&await Ws(i,g.fingerprint,y,h,v.value);let G=v.value.subcommand==="audit"?await Ks(i,g.fingerprint,v.value,m.saveBaseline):v.value;return G.cache={fingerprint:g.fingerprint.slice(0,12),assembly:g.assemblyReused?"hit":"miss",result:v.reused?"hit":"miss",durable:C!==void 0?"hit":H?"miss":"off"},rn(G,m.summary,"result_rows")}export{ce as a,ht as b,_t as c,Xs as d,N as e,Qs as f,Zs as g,Ae as h,D as i,xn as j,In as k,Ne as l,Cn as m,P as n,ae as o,Oe as p,ue as q,ao as r,kt as s,ei as t,Et as u,It as v,Ct as w,Tt as x,St as y,he as z,Rt as A,j as B,Lt as C,Mt as D,we as E,Pt as F,Nr as G,Ut as H,ve as I,qe as J,xe as K,Bt as L,zt as M,ze as N,W as O,Wt as P,We as Q,He as R,Ve as S,Ht as T,Xe as U,Xt as V,Yt as W,Qt as X,Rs as Y,Ci as Z};
|
|
2
|
+
//# sourceMappingURL=chunk-7NJ4QYQ2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{F as C}from"./chunk-KYUQGTSB.js";import{Ka as c}from"./chunk-QUMB2J27.js";import{Ka as A,La as m,Na as O,oa as u}from"./chunk-Q4YY3XNF.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]="940f11a8-f40d-5169-ba74-e91920d32c4a")}catch{}})();var v={fetch:"get",read:"get",show:"get",view:"get",comment:"comments",note:"notes",learning:"learnings"};(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]="f7e87e15-b5f3-53ab-86e2-768e94d5d329")}catch{}})();var _=[{target:"title",keys:["title"],option:"--title, -t <value>",description:"Item title [required] (or pass title as the first positional argument)"},{target:"id",keys:["id"],option:"--id <value>",description:"Explicit item id (normalized with the configured id_prefix)"},{target:"description",keys:["description"],option:"--description, -d <value>",description:"Item description (allow empty string)"},{target:"type",keys:["type"],option:"--type <value>",description:"Item type (built-ins plus any configured custom types)"},{target:"template",keys:["template"],option:"--template <value>",description:"Apply named create template defaults before explicit flags"},{target:"createMode",keys:["createMode","create_mode"],option:"--create-mode <value>",description:"Create required-option policy mode: strict|progressive",aliasOptions:[{option:"--create_mode <value>",description:"Alias for --create-mode"}]},{target:"schedulePreset",keys:["schedulePreset","schedule_preset"],option:"--schedule-preset <value>",description:"Scheduling preset for Reminder|Meeting|Event: lightweight",aliasOptions:[{option:"--schedule_preset <value>",description:"Alias for --schedule-preset"}]},{target:"status",keys:["status"],option:"--status, -s <value>",description:"Item status"},{target:"closeReason",keys:["closeReason","close_reason"],option:"--close-reason <value>",description:"Close reason when creating directly in a terminal status",aliasOptions:[{option:"--close_reason <value>",description:"Alias for --close-reason"}]},{target:"completedAt",keys:["completedAt","completed_at"],option:"--completed-at <value>",description:"Actual completion time for a terminal imported item",aliasOptions:[{option:"--completed_at <value>",description:"Alias for --completed-at"}]},{target:"priority",keys:["priority"],option:"--priority, -p <value>",description:"Priority 0..4"},{target:"tags",keys:["tags"],option:"--tags <value>",description:"Comma-separated tags"},{target:"addTags",keys:["addTags","add_tags"],option:"--add-tags <value>",description:"Add tags additively on top of --tags (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--add_tags <value>",description:"Alias for --add-tags"}]},{target:"body",keys:["body"],option:"--body, -b <value>",description:"Item markdown body (allow empty string)"},{target:"deadline",keys:["deadline"],option:"--deadline <value>",description:"Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)"},{target:"estimatedMinutes",keys:["estimate","estimatedMinutes","estimated_minutes"],option:"--estimate, --estimated-minutes <value>",description:"Estimated minutes",aliasOptions:[{option:"--estimated_minutes <value>",description:"Alias for --estimated-minutes"}]},{target:"acceptanceCriteria",keys:["acceptanceCriteria","acceptance_criteria","ac"],option:"--acceptance-criteria <value>",description:"Acceptance criteria (repeatable; values join with '; '; allow empty string)",repeatable:!0,aliasOptions:[{option:"--acceptance_criteria <value>",description:"Alias for --acceptance-criteria"},{option:"--ac <value>",description:"Alias for --acceptance-criteria"}]},{target:"definitionOfReady",keys:["definitionOfReady","definition_of_ready"],option:"--definition-of-ready <value>",description:"Definition of ready (allow empty string)",aliasOptions:[{option:"--definition_of_ready <value>",description:"Alias for --definition-of-ready"}]},{target:"order",keys:["order"],option:"--order <value>",description:"Planning order/rank integer"},{target:"rank",keys:["rank"],option:"--rank <value>",description:"Alias for --order"},{target:"goal",keys:["goal"],option:"--goal <value>",description:"Goal identifier"},{target:"objective",keys:["objective"],option:"--objective <value>",description:"Objective identifier"},{target:"value",keys:["value"],option:"--value <value>",description:"Business value summary"},{target:"impact",keys:["impact"],option:"--impact <value>",description:"Business impact summary"},{target:"outcome",keys:["outcome"],option:"--outcome <value>",description:"Expected outcome summary"},{target:"whyNow",keys:["whyNow","why_now"],option:"--why-now <value>",description:"Why-now rationale",aliasOptions:[{option:"--why_now <value>",description:"Alias for --why-now"}]},{target:"author",keys:["author"],option:"--author <value>",description:"Mutation author"},{target:"message",keys:["message"],option:"--message <value>",description:"History message (allow empty string)"},{target:"assignee",keys:["assignee"],option:"--assignee <value>",description:"Item assignee"},{target:"parent",keys:["parent"],option:"--parent <value>",description:"Parent item ID"},{target:"allowMissingParent",keys:["allowMissingParent","allow_missing_parent"],option:"--allow-missing-parent",description:"Allow creating with an unresolved parent reference and emit a validation warning"},{target:"allowUnresolvedDeps",keys:["allowUnresolvedDeps","allow_unresolved_deps"],option:"--allow-unresolved-deps",description:"Allow unresolved local dependency targets and emit explicit warning receipts"},{target:"reviewer",keys:["reviewer"],option:"--reviewer <value>",description:"Reviewer"},{target:"risk",keys:["risk"],option:"--risk <value>",description:"Risk level: low|med|medium|high|critical (med persists as medium)"},{target:"confidence",keys:["confidence"],option:"--confidence <value>",description:"Confidence level: 0..100|low|med|medium|high (med persists as medium)"},{target:"sprint",keys:["sprint"],option:"--sprint <value>",description:"Sprint identifier"},{target:"release",keys:["release"],option:"--release <value>",description:"Release identifier"},{target:"blockedBy",keys:["blockedBy","blocked_by"],option:"--blocked-by <value>",description:"Set latest blocked-by item ID or reason; resolved item IDs append a blocked_by dependency edge",aliasOptions:[{option:"--blocked_by <value>",description:"Alias for --blocked-by"}]},{target:"blockedReason",keys:["blockedReason","blocked_reason"],option:"--blocked-reason <value>",description:"Blocked reason",aliasOptions:[{option:"--blocked_reason <value>",description:"Alias for --blocked-reason"}]},{target:"unblockNote",keys:["unblockNote","unblock_note"],option:"--unblock-note <value>",description:"Unblock rationale note",aliasOptions:[{option:"--unblock_note <value>",description:"Alias for --unblock-note"}]},{target:"reporter",keys:["reporter"],option:"--reporter <value>",description:"Issue reporter"},{target:"severity",keys:["severity"],option:"--severity <value>",description:"Issue severity: low|med|medium|high|critical (med persists as medium)"},{target:"environment",keys:["environment"],option:"--environment <value>",description:"Issue environment context"},{target:"reproSteps",keys:["reproSteps","repro_steps"],option:"--repro-steps <value>",description:"Issue reproduction steps",aliasOptions:[{option:"--repro_steps <value>",description:"Alias for --repro-steps"}]},{target:"resolution",keys:["resolution"],option:"--resolution <value>",description:"Issue resolution summary"},{target:"expectedResult",keys:["expectedResult","expected_result","expected"],option:"--expected-result <value>",description:"Issue expected behavior",aliasOptions:[{option:"--expected_result <value>",description:"Alias for --expected-result"},{option:"--expected <value>",description:"Short alias for --expected-result"}]},{target:"actualResult",keys:["actualResult","actual_result","actual"],option:"--actual-result <value>",description:"Issue observed behavior",aliasOptions:[{option:"--actual_result <value>",description:"Alias for --actual-result"},{option:"--actual <value>",description:"Short alias for --actual-result"}]},{target:"affectedVersion",keys:["affectedVersion","affected_version"],option:"--affected-version <value>",description:"Affected version identifier",aliasOptions:[{option:"--affected_version <value>",description:"Alias for --affected-version"}]},{target:"fixedVersion",keys:["fixedVersion","fixed_version"],option:"--fixed-version <value>",description:"Fixed version identifier",aliasOptions:[{option:"--fixed_version <value>",description:"Alias for --fixed-version"}]},{target:"component",keys:["component"],option:"--component <value>",description:"Issue component ownership"},{target:"regression",keys:["regression"],option:"--regression [value]",description:"Regression marker; bare flag means true, or pass true|false|1|0"},{target:"customerImpact",keys:["customerImpact","customer_impact"],option:"--customer-impact <value>",description:"Customer impact summary",aliasOptions:[{option:"--customer_impact <value>",description:"Alias for --customer-impact"}]},{target:"dep",keys:["dep"],option:"--dep <value>",description:"Seed dependency entry (key=value CSV, markdown key:value lines, or - for stdin; repeatable)",repeatable:!0},{target:"typeOption",keys:["typeOption","type_option"],option:"--type-option <value>",description:"Type option key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",repeatable:!0,aliasOptions:[{option:"--type_option <value>",description:"Alias for --type-option"}]},{target:"field",keys:["field"],option:"--field <name=value>",description:"Set a field declared by an active extension registerItemFields registration (repeatable)",repeatable:!0},{target:"unset",keys:["unset"],option:"--unset <field>",description:"Clear scalar metadata field by name (repeatable)",repeatable:!0},{target:"reminder",keys:["reminder"],option:"--reminder <value>",description:"Seed reminder entry at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"event",keys:["event"],option:"--event <value>",description:"Seed event entry start=<iso|relative>,end=<iso|relative>,duration=<relative|30min|PT30M>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"comment",keys:["comment"],option:"--comment <value>",description:"Seed comment entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"note",keys:["note"],option:"--note <value>",description:"Seed note entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"learning",keys:["learning"],option:"--learning <value>",description:"Seed learning entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"file",keys:["file"],option:"--file <value>",description:"Seed linked file entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"test",keys:["test"],option:"--test <value>",description:"Seed linked test entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"doc",keys:["doc"],option:"--doc <value>",description:"Seed linked doc entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0}],y=_.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),R=_.filter(e=>e.repeatable===!0).map(e=>({target:e.target,keys:e.keys})),T=[{target:"title",keys:["title"],option:"--title, -t <value>",description:"Set title"},{target:"description",keys:["description"],option:"--description, -d <value>",description:"Set description"},{target:"body",keys:["body"],option:"--body, -b <value>",description:"Set body (allow empty string)"},{target:"status",keys:["status"],option:"--status, -s <value>",description:"Set status (use close command for closed)"},{target:"closeReason",keys:["closeReason","close_reason"],option:"--close-reason <value>",description:"Set close reason",aliasOptions:[{option:"--close_reason <value>",description:"Alias for --close-reason"}]},{target:"priority",keys:["priority"],option:"--priority, -p <value>",description:"Set priority"},{target:"type",keys:["type"],option:"--type <value>",description:"Set type"},{target:"tags",keys:["tags"],option:"--tags <value>",description:"Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively."},{target:"addTags",keys:["addTags","add_tags"],option:"--add-tags <value>",description:"Add tags to the existing list without replacing it (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--add_tags <value>",description:"Alias for --add-tags"}]},{target:"removeTags",keys:["removeTags","remove_tags"],option:"--remove-tags <value>",description:"Remove tags from the existing list (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--remove_tags <value>",description:"Alias for --remove-tags"}]},{target:"deadline",keys:["deadline"],option:"--deadline <value>",description:"Set deadline (ISO/date string or relative)"},{target:"estimatedMinutes",keys:["estimate","estimatedMinutes","estimated_minutes"],option:"--estimate, --estimated-minutes <value>",description:"Set estimated minutes",aliasOptions:[{option:"--estimated_minutes <value>",description:"Alias for --estimated-minutes"}]},{target:"acceptanceCriteria",keys:["acceptanceCriteria","acceptance_criteria","ac"],option:"--acceptance-criteria <value>",description:"Replace the complete acceptance-criteria list (repeatable values join with '; '); use --remove-ac plus --add-ac for one-entry repair",repeatable:!0,aliasOptions:[{option:"--acceptance_criteria <value>",description:"Alias for --acceptance-criteria"},{option:"--ac <value>",description:"Alias for --acceptance-criteria"}]},{target:"addAc",keys:["addAc","add_ac"],option:"--add-ac <value>",description:"Add one semicolon-free acceptance criterion without replacing the existing list (repeatable)",repeatable:!0,aliasOptions:[{option:"--add_ac <value>",description:"Alias for --add-ac"}]},{target:"removeAc",keys:["removeAc","remove_ac"],option:"--remove-ac <value>",description:"Remove one semicolon-free acceptance criterion by exact text match; fails if any selector is unmatched (repeatable)",repeatable:!0,aliasOptions:[{option:"--remove_ac <value>",description:"Alias for --remove-ac"}]},{target:"definitionOfReady",keys:["definitionOfReady","definition_of_ready"],option:"--definition-of-ready <value>",description:"Set definition of ready",aliasOptions:[{option:"--definition_of_ready <value>",description:"Alias for --definition-of-ready"}]},{target:"order",keys:["order"],option:"--order <value>",description:"Set planning order/rank integer"},{target:"rank",keys:["rank"],option:"--rank <value>",description:"Alias for --order"},{target:"goal",keys:["goal"],option:"--goal <value>",description:"Set goal identifier"},{target:"objective",keys:["objective"],option:"--objective <value>",description:"Set objective identifier"},{target:"value",keys:["value"],option:"--value <value>",description:"Set business value summary"},{target:"impact",keys:["impact"],option:"--impact <value>",description:"Set business impact summary"},{target:"outcome",keys:["outcome"],option:"--outcome <value>",description:"Set expected outcome summary"},{target:"whyNow",keys:["whyNow","why_now"],option:"--why-now <value>",description:"Set why-now rationale",aliasOptions:[{option:"--why_now <value>",description:"Alias for --why-now"}]},{target:"author",keys:["author"],option:"--author <value>",description:"Mutation author"},{target:"message",keys:["message"],option:"--message <value>",description:"Mutation message"},{target:"assignee",keys:["assignee"],option:"--assignee <value>",description:"Set assignee"},{target:"parent",keys:["parent"],option:"--parent <value>",description:"Set parent item ID"},{target:"allowMissingParent",keys:["allowMissingParent","allow_missing_parent"],option:"--allow-missing-parent",description:"Allow updating to an unresolved parent reference and emit a validation warning"},{target:"allowUnresolvedDeps",keys:["allowUnresolvedDeps","allow_unresolved_deps"],option:"--allow-unresolved-deps",description:"Allow unresolved local dependency targets and emit explicit warning receipts"},{target:"completedAt",keys:["completedAt","completed_at"],option:"--completed-at <value>",description:"Correct the actual completion timestamp on a terminal item"},{target:"reviewer",keys:["reviewer"],option:"--reviewer <value>",description:"Set reviewer"},{target:"risk",keys:["risk"],option:"--risk <value>",description:"Set risk level: low|med|medium|high|critical (med persists as medium)"},{target:"confidence",keys:["confidence"],option:"--confidence <value>",description:"Set confidence level: 0..100|low|med|medium|high (med persists as medium)"},{target:"sprint",keys:["sprint"],option:"--sprint <value>",description:"Set sprint identifier"},{target:"release",keys:["release"],option:"--release <value>",description:"Set release identifier"},{target:"blockedBy",keys:["blockedBy","blocked_by"],option:"--blocked-by <value>",description:"Set latest blocked-by item ID or reason; resolved item IDs append a blocked_by dependency edge",aliasOptions:[{option:"--blocked_by <value>",description:"Alias for --blocked-by"}]},{target:"blockedReason",keys:["blockedReason","blocked_reason"],option:"--blocked-reason <value>",description:"Set blocked reason",aliasOptions:[{option:"--blocked_reason <value>",description:"Alias for --blocked-reason"}]},{target:"unblockNote",keys:["unblockNote","unblock_note"],option:"--unblock-note <value>",description:"Set unblock rationale note",aliasOptions:[{option:"--unblock_note <value>",description:"Alias for --unblock-note"}]},{target:"reporter",keys:["reporter"],option:"--reporter <value>",description:"Set issue reporter"},{target:"severity",keys:["severity"],option:"--severity <value>",description:"Set issue severity: low|med|medium|high|critical (med persists as medium)"},{target:"environment",keys:["environment"],option:"--environment <value>",description:"Set issue environment context"},{target:"reproSteps",keys:["reproSteps","repro_steps"],option:"--repro-steps <value>",description:"Set issue reproduction steps",aliasOptions:[{option:"--repro_steps <value>",description:"Alias for --repro-steps"}]},{target:"resolution",keys:["resolution"],option:"--resolution <value>",description:"Set issue resolution summary"},{target:"expectedResult",keys:["expectedResult","expected_result","expected"],option:"--expected-result <value>",description:"Set issue expected behavior",aliasOptions:[{option:"--expected_result <value>",description:"Alias for --expected-result"},{option:"--expected <value>",description:"Short alias for --expected-result"}]},{target:"actualResult",keys:["actualResult","actual_result","actual"],option:"--actual-result <value>",description:"Set issue observed behavior",aliasOptions:[{option:"--actual_result <value>",description:"Alias for --actual-result"},{option:"--actual <value>",description:"Short alias for --actual-result"}]},{target:"affectedVersion",keys:["affectedVersion","affected_version"],option:"--affected-version <value>",description:"Set affected version identifier",aliasOptions:[{option:"--affected_version <value>",description:"Alias for --affected-version"}]},{target:"fixedVersion",keys:["fixedVersion","fixed_version"],option:"--fixed-version <value>",description:"Set fixed version identifier",aliasOptions:[{option:"--fixed_version <value>",description:"Alias for --fixed-version"}]},{target:"component",keys:["component"],option:"--component <value>",description:"Set issue component ownership"},{target:"regression",keys:["regression"],option:"--regression [value]",description:"Set regression marker; bare flag means true, or pass true|false|1|0"},{target:"customerImpact",keys:["customerImpact","customer_impact"],option:"--customer-impact <value>",description:"Set customer impact summary",aliasOptions:[{option:"--customer_impact <value>",description:"Alias for --customer-impact"}]},{target:"dep",keys:["dep"],option:"--dep <value>",description:"Add dependency entries id=<id>,kind=<value>,author=<value>,created_at=<iso|now>,source_kind=<value> (repeatable)",repeatable:!0},{target:"depRemove",keys:["depRemove","dep_remove"],option:"--dep-remove <value>",description:"Remove dependencies by id or id=<id>,kind=<value>,source_kind=<value> selectors (repeatable)",repeatable:!0,aliasOptions:[{option:"--dep_remove <value>",description:"Alias for --dep-remove"}]},{target:"comment",keys:["comment"],option:"--comment <value>",description:"Append comment seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"note",keys:["note"],option:"--note <value>",description:"Append note seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"learning",keys:["learning"],option:"--learning <value>",description:"Append learning seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"file",keys:["file"],option:"--file <value>",description:"Append linked file path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"test",keys:["test"],option:"--test <value>",description:"Append linked test command=<value>,path=<value>,scope=<project|global>,timeout_seconds=<n>,pm_context_mode=<schema|tracker|auto> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"doc",keys:["doc"],option:"--doc <value>",description:"Append linked doc path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"reminder",keys:["reminder"],option:"--reminder <value>",description:"Set reminders at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"event",keys:["event"],option:"--event <value>",description:"Set events start=<iso|relative>,end=<iso|relative>,duration=<relative|30min|PT30M>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"typeOption",keys:["typeOption","type_option"],option:"--type-option <value>",description:"Set type options key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",repeatable:!0,aliasOptions:[{option:"--type_option <value>",description:"Alias for --type-option"}]},{target:"field",keys:["field"],option:"--field <name=value>",description:"Set a field declared by an active extension registerItemFields registration (repeatable)",repeatable:!0},{target:"unset",keys:["unset"],option:"--unset <field>",description:"Clear scalar metadata field by name (repeatable)",repeatable:!0}],N=T.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),E=T.filter(e=>e.repeatable===!0).map(e=>({target:e.target,keys:e.keys}));(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]="cf238c71-1626-5e48-9207-7acf22c0d680")}catch{}})();var k=new Set(["--author","--follow","--help","--lean","--token-accounting","--output-include","--output-limit","--output-budget","--output-format","--output-session","--output-row-contract","--no-changed-fields","--no-extensions","--no-pager","--pm-path","--profile","--quiet","--interval-ms"]),b=new Set([...A,...m]),I=new Set(["--brief","--format","--full","--full-changed-fields","--id-only","--no-truncate","--stream"]),L=new Set(["--body-file","--file","--stdin-json"]),h=new Set(["--global","--local","--project"]),P=new Set(["--activity-limit","--default-depth","--section-activity","--section-blockers","--section-files","--section-hierarchy","--section-progress","--section-staleness","--section-tests","--section-workload","--stale-threshold-days"]),w=new Set(["action","path","pmExecutable","timeoutMs"]),G=new Set(["configAction","id","name","query","reason","subcommand","target","text"]),M={assurance:{id:"<id>",kind:"<kind>",preset:"[kind]|[id]",subcommand:"<action>"},event:{title:"<title>"},files:{lookupPath:"lookup <path...>"},meet:{title:"<title>"},merge:{subcommand:"<subcommand>"},remind:{title:"<title>"},workspace:{name:"<name>",subcommand:"snapshot",snapshotAction:"<snapshot-action>",target:"<target>"}},F={assurance:{"--tree":"treeId","--owner":"owner","--apply":"apply","--enforcement":"enforcement"},init:{"--id-prefix":"idPrefix","--no-merge-fence":"mergeFence","--workspace":"workspace"},create:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},update:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},"update-many":{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},files:{"--note":"addNote"},docs:{"--note":"addNote"},comments:{"--full-history":"full"},notes:{"--file":"text","--full-history":"full"},learnings:{"--full-history":"full"},gc:{"--scope":"gcScope"},contracts:{"--action":"contractAction"},schema:{"--no-allow-unset":"allowUnset","--type":"fieldTypeScope"},"history-author-acknowledge":{"--event":"historyEvent","--all-actionable":"allActionable"},"extension-init":{"--capability":"capability"},"package-init":{"--capability":"capability"},"extension-install":{"--gh":"github"},"package-install":{"--gh":"github"},"extension-adopt":{"--gh":"github"},"package-adopt":{"--gh":"github"},extension:{"--gh":"github","--scaffold":"init"},package:{"--gh":"github","--scaffold":"init"},install:{"--gh":"github"}},D={"--pm-path":"path"},f={stats:{"--analytics":["measurements","metric","measurementLimit","observe","improvementDirection","measurementSource","measurementItem","measurementRevision","author","message","provenanceCoverage","fleetAttribution","since","eventLimit","minimumSample"]}};function x(e){return e.startsWith("extension-")?`extension ${e.slice(10)}`:e.startsWith("package-")?`package ${e.slice(8)}`:e}function S(e,t){let i=F[e]?.[t]??D[t];return i!==void 0?i:t.replace(/^--/,"").replaceAll("_","-").replace(/-([a-z])/g,(r,o)=>o.toUpperCase())}function U(e){let t=new Set;return e.filter(({flag:i})=>!i.startsWith("--")||t.has(i)?!1:(t.add(i),!0))}function V(e,t){return t.find(({aliases:i})=>i?.includes(e))?.flag}function X(e,t,i,r){let o=f[e]?.[t.flag];if(o!==void 0&&o.every(a=>r.has(a)))return{surface:"cli",input:t.flag,counterpart:o[0],disposition:"shared",reason:"The validated CLI JSON object fans out across strict SDK parameters."};let n=S(e,t.flag);if(r.has(n))return{surface:"cli",input:t.flag,counterpart:n,disposition:"shared",reason:"The CLI flag maps directly to a strict SDK action parameter."};let s=V(t.flag,i);if(s!==void 0){let a=S(e,s);if(r.has(a))return{surface:"cli",input:t.flag,counterpart:a,disposition:"compatibility_alias",reason:`Compatibility spelling for ${s}.`}}return k.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_transport",reason:"CLI process transport is supplied by the in-process SDK host."}:I.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_presentation",reason:"CLI rendering or mutation projection does not alter the SDK result envelope."}:L.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_adapter",reason:"Local file or stdin adaptation is a CLI boundary concern."}:P.has(t.flag)?{surface:"cli",input:t.flag,counterpart:"key",disposition:"compatibility_alias",reason:"CLI config shorthand normalizes to the SDK configAction/key/value contract."}:h.has(t.flag)?{surface:"cli",input:t.flag,counterpart:"scope",disposition:"cli_scope_selector",reason:"Mutually exclusive CLI scope switches normalize to the SDK scope parameter."}:{surface:"cli",input:t.flag,counterpart:n,disposition:"unclassified",reason:"The CLI flag has no strict SDK parameter or approved boundary classification."}}function B(e,t,i){let r=Object.entries(f[e]??{}).find(([s,a])=>a.includes(t)&&i.some(({input:p,disposition:d})=>p===s&&d==="shared"));if(r!==void 0)return{surface:"sdk",input:t,counterpart:r[0],disposition:"shared",reason:"The strict SDK parameter is reachable through the validated CLI JSON object."};let o=i.find(({counterpart:s,disposition:a})=>s===t&&(a==="shared"||a==="compatibility_alias"||a==="cli_scope_selector"));if(o!==void 0)return{surface:"sdk",input:t,counterpart:o.input,disposition:"shared",reason:"The strict SDK parameter is reachable from the CLI contract."};let n=M[e]?.[t];return n!==void 0?{surface:"sdk",input:t,counterpart:n,disposition:"shared",reason:"The strict SDK parameter maps to a canonical CLI positional argument."}:w.has(t)?{surface:"sdk",input:t,disposition:"sdk_transport",reason:"The SDK host supplies in-process transport and workspace selection."}:G.has(t)?{surface:"sdk",input:t,disposition:"cli_positional",reason:"The CLI accepts this SDK parameter as a positional command argument."}:{surface:"sdk",input:t,disposition:"sdk_native",reason:"The typed SDK exposes this structured input without a canonical CLI long flag."}}function K(e={}){let t=e.actions??u,i=e.resolveFlags??c,r=e.resolveParameters??C;return t.map(o=>{let n=x(o),s=U(i(n)).filter(({flag:l})=>O(o)!==void 0||!b.has(l)),a=new Set(r(o)??[]),p=s.map(l=>X(o,l,s,a)),d=[...a].sort((l,g)=>l.localeCompare(g)).map(l=>B(o,l,p));return{action:o,command:n,cli:p,sdk:d,unclassified:[...p,...d].filter(({disposition:l})=>l==="unclassified")}})}(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]="969b5bd2-e7de-5db8-bef2-6748675a100c")}catch{}})();export{v as a,_ as b,y as c,R as d,T as e,N as f,E as g,K as h};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{F as C}from"./chunk-4X57RE4U.js";import{Ka as c}from"./chunk-U65UC4G3.js";import{Va as A,Wa as m,Ya as O,oa as u}from"./chunk-OKA6ELTL.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]="940f11a8-f40d-5169-ba74-e91920d32c4a")}catch{}})();var v={fetch:"get",read:"get",show:"get",view:"get",comment:"comments",note:"notes",learning:"learnings"};(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]="f7e87e15-b5f3-53ab-86e2-768e94d5d329")}catch{}})();var _=[{target:"title",keys:["title"],option:"--title, -t <value>",description:"Item title [required] (or pass title as the first positional argument)"},{target:"id",keys:["id"],option:"--id <value>",description:"Explicit item id (normalized with the configured id_prefix)"},{target:"description",keys:["description"],option:"--description, -d <value>",description:"Item description (allow empty string)"},{target:"type",keys:["type"],option:"--type <value>",description:"Item type (built-ins plus any configured custom types)"},{target:"template",keys:["template"],option:"--template <value>",description:"Apply named create template defaults before explicit flags"},{target:"createMode",keys:["createMode","create_mode"],option:"--create-mode <value>",description:"Create required-option policy mode: strict|progressive",aliasOptions:[{option:"--create_mode <value>",description:"Alias for --create-mode"}]},{target:"schedulePreset",keys:["schedulePreset","schedule_preset"],option:"--schedule-preset <value>",description:"Scheduling preset for Reminder|Meeting|Event: lightweight",aliasOptions:[{option:"--schedule_preset <value>",description:"Alias for --schedule-preset"}]},{target:"status",keys:["status"],option:"--status, -s <value>",description:"Item status"},{target:"closeReason",keys:["closeReason","close_reason"],option:"--close-reason <value>",description:"Close reason when creating directly in a terminal status",aliasOptions:[{option:"--close_reason <value>",description:"Alias for --close-reason"}]},{target:"completedAt",keys:["completedAt","completed_at"],option:"--completed-at <value>",description:"Actual completion time for a terminal imported item",aliasOptions:[{option:"--completed_at <value>",description:"Alias for --completed-at"}]},{target:"priority",keys:["priority"],option:"--priority, -p <value>",description:"Priority 0..4"},{target:"tags",keys:["tags"],option:"--tags <value>",description:"Comma-separated tags"},{target:"addTags",keys:["addTags","add_tags"],option:"--add-tags <value>",description:"Add tags additively on top of --tags (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--add_tags <value>",description:"Alias for --add-tags"}]},{target:"body",keys:["body"],option:"--body, -b <value>",description:"Item markdown body (allow empty string)"},{target:"deadline",keys:["deadline"],option:"--deadline <value>",description:"Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)"},{target:"estimatedMinutes",keys:["estimate","estimatedMinutes","estimated_minutes"],option:"--estimate, --estimated-minutes <value>",description:"Estimated minutes",aliasOptions:[{option:"--estimated_minutes <value>",description:"Alias for --estimated-minutes"}]},{target:"acceptanceCriteria",keys:["acceptanceCriteria","acceptance_criteria","ac"],option:"--acceptance-criteria <value>",description:"Acceptance criteria (repeatable; values join with '; '; allow empty string)",repeatable:!0,aliasOptions:[{option:"--acceptance_criteria <value>",description:"Alias for --acceptance-criteria"},{option:"--ac <value>",description:"Alias for --acceptance-criteria"}]},{target:"definitionOfReady",keys:["definitionOfReady","definition_of_ready"],option:"--definition-of-ready <value>",description:"Definition of ready (allow empty string)",aliasOptions:[{option:"--definition_of_ready <value>",description:"Alias for --definition-of-ready"}]},{target:"order",keys:["order"],option:"--order <value>",description:"Planning order/rank integer"},{target:"rank",keys:["rank"],option:"--rank <value>",description:"Alias for --order"},{target:"goal",keys:["goal"],option:"--goal <value>",description:"Goal identifier"},{target:"objective",keys:["objective"],option:"--objective <value>",description:"Objective identifier"},{target:"value",keys:["value"],option:"--value <value>",description:"Business value summary"},{target:"impact",keys:["impact"],option:"--impact <value>",description:"Business impact summary"},{target:"outcome",keys:["outcome"],option:"--outcome <value>",description:"Expected outcome summary"},{target:"whyNow",keys:["whyNow","why_now"],option:"--why-now <value>",description:"Why-now rationale",aliasOptions:[{option:"--why_now <value>",description:"Alias for --why-now"}]},{target:"author",keys:["author"],option:"--author <value>",description:"Mutation author"},{target:"message",keys:["message"],option:"--message <value>",description:"History message (allow empty string)"},{target:"assignee",keys:["assignee"],option:"--assignee <value>",description:"Item assignee"},{target:"parent",keys:["parent"],option:"--parent <value>",description:"Parent item ID"},{target:"allowMissingParent",keys:["allowMissingParent","allow_missing_parent"],option:"--allow-missing-parent",description:"Allow creating with an unresolved parent reference and emit a validation warning"},{target:"allowUnresolvedDeps",keys:["allowUnresolvedDeps","allow_unresolved_deps"],option:"--allow-unresolved-deps",description:"Allow unresolved local dependency targets and emit explicit warning receipts"},{target:"reviewer",keys:["reviewer"],option:"--reviewer <value>",description:"Reviewer"},{target:"risk",keys:["risk"],option:"--risk <value>",description:"Risk level: low|med|medium|high|critical (med persists as medium)"},{target:"confidence",keys:["confidence"],option:"--confidence <value>",description:"Confidence level: 0..100|low|med|medium|high (med persists as medium)"},{target:"sprint",keys:["sprint"],option:"--sprint <value>",description:"Sprint identifier"},{target:"release",keys:["release"],option:"--release <value>",description:"Release identifier"},{target:"blockedBy",keys:["blockedBy","blocked_by"],option:"--blocked-by <value>",description:"Set latest blocked-by item ID or reason; resolved item IDs append a blocked_by dependency edge",aliasOptions:[{option:"--blocked_by <value>",description:"Alias for --blocked-by"}]},{target:"blockedReason",keys:["blockedReason","blocked_reason"],option:"--blocked-reason <value>",description:"Blocked reason",aliasOptions:[{option:"--blocked_reason <value>",description:"Alias for --blocked-reason"}]},{target:"unblockNote",keys:["unblockNote","unblock_note"],option:"--unblock-note <value>",description:"Unblock rationale note",aliasOptions:[{option:"--unblock_note <value>",description:"Alias for --unblock-note"}]},{target:"reporter",keys:["reporter"],option:"--reporter <value>",description:"Issue reporter"},{target:"severity",keys:["severity"],option:"--severity <value>",description:"Issue severity: low|med|medium|high|critical (med persists as medium)"},{target:"environment",keys:["environment"],option:"--environment <value>",description:"Issue environment context"},{target:"reproSteps",keys:["reproSteps","repro_steps"],option:"--repro-steps <value>",description:"Issue reproduction steps",aliasOptions:[{option:"--repro_steps <value>",description:"Alias for --repro-steps"}]},{target:"resolution",keys:["resolution"],option:"--resolution <value>",description:"Issue resolution summary"},{target:"expectedResult",keys:["expectedResult","expected_result","expected"],option:"--expected-result <value>",description:"Issue expected behavior",aliasOptions:[{option:"--expected_result <value>",description:"Alias for --expected-result"},{option:"--expected <value>",description:"Short alias for --expected-result"}]},{target:"actualResult",keys:["actualResult","actual_result","actual"],option:"--actual-result <value>",description:"Issue observed behavior",aliasOptions:[{option:"--actual_result <value>",description:"Alias for --actual-result"},{option:"--actual <value>",description:"Short alias for --actual-result"}]},{target:"affectedVersion",keys:["affectedVersion","affected_version"],option:"--affected-version <value>",description:"Affected version identifier",aliasOptions:[{option:"--affected_version <value>",description:"Alias for --affected-version"}]},{target:"fixedVersion",keys:["fixedVersion","fixed_version"],option:"--fixed-version <value>",description:"Fixed version identifier",aliasOptions:[{option:"--fixed_version <value>",description:"Alias for --fixed-version"}]},{target:"component",keys:["component"],option:"--component <value>",description:"Issue component ownership"},{target:"regression",keys:["regression"],option:"--regression [value]",description:"Regression marker; bare flag means true, or pass true|false|1|0"},{target:"customerImpact",keys:["customerImpact","customer_impact"],option:"--customer-impact <value>",description:"Customer impact summary",aliasOptions:[{option:"--customer_impact <value>",description:"Alias for --customer-impact"}]},{target:"dep",keys:["dep"],option:"--dep <value>",description:"Seed dependency entry (key=value CSV, markdown key:value lines, or - for stdin; repeatable)",repeatable:!0},{target:"typeOption",keys:["typeOption","type_option"],option:"--type-option <value>",description:"Type option key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",repeatable:!0,aliasOptions:[{option:"--type_option <value>",description:"Alias for --type-option"}]},{target:"field",keys:["field"],option:"--field <name=value>",description:"Set a field declared by an active extension registerItemFields registration (repeatable)",repeatable:!0},{target:"unset",keys:["unset"],option:"--unset <field>",description:"Clear scalar metadata field by name (repeatable)",repeatable:!0},{target:"reminder",keys:["reminder"],option:"--reminder <value>",description:"Seed reminder entry at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"event",keys:["event"],option:"--event <value>",description:"Seed event entry start=<iso|relative>,end=<iso|relative>,duration=<relative|30min|PT30M>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"comment",keys:["comment"],option:"--comment <value>",description:"Seed comment entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"note",keys:["note"],option:"--note <value>",description:"Seed note entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"learning",keys:["learning"],option:"--learning <value>",description:"Seed learning entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"file",keys:["file"],option:"--file <value>",description:"Seed linked file entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"test",keys:["test"],option:"--test <value>",description:"Seed linked test entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0},{target:"doc",keys:["doc"],option:"--doc <value>",description:"Seed linked doc entry (CSV/markdown pairs or - for stdin; repeatable)",repeatable:!0}],y=_.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),R=_.filter(e=>e.repeatable===!0).map(e=>({target:e.target,keys:e.keys})),T=[{target:"title",keys:["title"],option:"--title, -t <value>",description:"Set title"},{target:"description",keys:["description"],option:"--description, -d <value>",description:"Set description"},{target:"body",keys:["body"],option:"--body, -b <value>",description:"Set body (allow empty string)"},{target:"status",keys:["status"],option:"--status, -s <value>",description:"Set status (use close command for closed)"},{target:"closeReason",keys:["closeReason","close_reason"],option:"--close-reason <value>",description:"Set close reason",aliasOptions:[{option:"--close_reason <value>",description:"Alias for --close-reason"}]},{target:"priority",keys:["priority"],option:"--priority, -p <value>",description:"Set priority"},{target:"type",keys:["type"],option:"--type <value>",description:"Set type"},{target:"tags",keys:["tags"],option:"--tags <value>",description:"Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively."},{target:"addTags",keys:["addTags","add_tags"],option:"--add-tags <value>",description:"Add tags to the existing list without replacing it (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--add_tags <value>",description:"Alias for --add-tags"}]},{target:"removeTags",keys:["removeTags","remove_tags"],option:"--remove-tags <value>",description:"Remove tags from the existing list (repeatable; CSV accepted)",repeatable:!0,aliasOptions:[{option:"--remove_tags <value>",description:"Alias for --remove-tags"}]},{target:"deadline",keys:["deadline"],option:"--deadline <value>",description:"Set deadline (ISO/date string or relative)"},{target:"estimatedMinutes",keys:["estimate","estimatedMinutes","estimated_minutes"],option:"--estimate, --estimated-minutes <value>",description:"Set estimated minutes",aliasOptions:[{option:"--estimated_minutes <value>",description:"Alias for --estimated-minutes"}]},{target:"acceptanceCriteria",keys:["acceptanceCriteria","acceptance_criteria","ac"],option:"--acceptance-criteria <value>",description:"Replace the complete acceptance-criteria list (repeatable values join with '; '); use --remove-ac plus --add-ac for one-entry repair",repeatable:!0,aliasOptions:[{option:"--acceptance_criteria <value>",description:"Alias for --acceptance-criteria"},{option:"--ac <value>",description:"Alias for --acceptance-criteria"}]},{target:"addAc",keys:["addAc","add_ac"],option:"--add-ac <value>",description:"Add one semicolon-free acceptance criterion without replacing the existing list (repeatable)",repeatable:!0,aliasOptions:[{option:"--add_ac <value>",description:"Alias for --add-ac"}]},{target:"removeAc",keys:["removeAc","remove_ac"],option:"--remove-ac <value>",description:"Remove one semicolon-free acceptance criterion by exact text match; fails if any selector is unmatched (repeatable)",repeatable:!0,aliasOptions:[{option:"--remove_ac <value>",description:"Alias for --remove-ac"}]},{target:"definitionOfReady",keys:["definitionOfReady","definition_of_ready"],option:"--definition-of-ready <value>",description:"Set definition of ready",aliasOptions:[{option:"--definition_of_ready <value>",description:"Alias for --definition-of-ready"}]},{target:"order",keys:["order"],option:"--order <value>",description:"Set planning order/rank integer"},{target:"rank",keys:["rank"],option:"--rank <value>",description:"Alias for --order"},{target:"goal",keys:["goal"],option:"--goal <value>",description:"Set goal identifier"},{target:"objective",keys:["objective"],option:"--objective <value>",description:"Set objective identifier"},{target:"value",keys:["value"],option:"--value <value>",description:"Set business value summary"},{target:"impact",keys:["impact"],option:"--impact <value>",description:"Set business impact summary"},{target:"outcome",keys:["outcome"],option:"--outcome <value>",description:"Set expected outcome summary"},{target:"whyNow",keys:["whyNow","why_now"],option:"--why-now <value>",description:"Set why-now rationale",aliasOptions:[{option:"--why_now <value>",description:"Alias for --why-now"}]},{target:"author",keys:["author"],option:"--author <value>",description:"Mutation author"},{target:"message",keys:["message"],option:"--message <value>",description:"Mutation message"},{target:"assignee",keys:["assignee"],option:"--assignee <value>",description:"Set assignee"},{target:"parent",keys:["parent"],option:"--parent <value>",description:"Set parent item ID"},{target:"allowMissingParent",keys:["allowMissingParent","allow_missing_parent"],option:"--allow-missing-parent",description:"Allow updating to an unresolved parent reference and emit a validation warning"},{target:"allowUnresolvedDeps",keys:["allowUnresolvedDeps","allow_unresolved_deps"],option:"--allow-unresolved-deps",description:"Allow unresolved local dependency targets and emit explicit warning receipts"},{target:"completedAt",keys:["completedAt","completed_at"],option:"--completed-at <value>",description:"Correct the actual completion timestamp on a terminal item"},{target:"reviewer",keys:["reviewer"],option:"--reviewer <value>",description:"Set reviewer"},{target:"risk",keys:["risk"],option:"--risk <value>",description:"Set risk level: low|med|medium|high|critical (med persists as medium)"},{target:"confidence",keys:["confidence"],option:"--confidence <value>",description:"Set confidence level: 0..100|low|med|medium|high (med persists as medium)"},{target:"sprint",keys:["sprint"],option:"--sprint <value>",description:"Set sprint identifier"},{target:"release",keys:["release"],option:"--release <value>",description:"Set release identifier"},{target:"blockedBy",keys:["blockedBy","blocked_by"],option:"--blocked-by <value>",description:"Set latest blocked-by item ID or reason; resolved item IDs append a blocked_by dependency edge",aliasOptions:[{option:"--blocked_by <value>",description:"Alias for --blocked-by"}]},{target:"blockedReason",keys:["blockedReason","blocked_reason"],option:"--blocked-reason <value>",description:"Set blocked reason",aliasOptions:[{option:"--blocked_reason <value>",description:"Alias for --blocked-reason"}]},{target:"unblockNote",keys:["unblockNote","unblock_note"],option:"--unblock-note <value>",description:"Set unblock rationale note",aliasOptions:[{option:"--unblock_note <value>",description:"Alias for --unblock-note"}]},{target:"reporter",keys:["reporter"],option:"--reporter <value>",description:"Set issue reporter"},{target:"severity",keys:["severity"],option:"--severity <value>",description:"Set issue severity: low|med|medium|high|critical (med persists as medium)"},{target:"environment",keys:["environment"],option:"--environment <value>",description:"Set issue environment context"},{target:"reproSteps",keys:["reproSteps","repro_steps"],option:"--repro-steps <value>",description:"Set issue reproduction steps",aliasOptions:[{option:"--repro_steps <value>",description:"Alias for --repro-steps"}]},{target:"resolution",keys:["resolution"],option:"--resolution <value>",description:"Set issue resolution summary"},{target:"expectedResult",keys:["expectedResult","expected_result","expected"],option:"--expected-result <value>",description:"Set issue expected behavior",aliasOptions:[{option:"--expected_result <value>",description:"Alias for --expected-result"},{option:"--expected <value>",description:"Short alias for --expected-result"}]},{target:"actualResult",keys:["actualResult","actual_result","actual"],option:"--actual-result <value>",description:"Set issue observed behavior",aliasOptions:[{option:"--actual_result <value>",description:"Alias for --actual-result"},{option:"--actual <value>",description:"Short alias for --actual-result"}]},{target:"affectedVersion",keys:["affectedVersion","affected_version"],option:"--affected-version <value>",description:"Set affected version identifier",aliasOptions:[{option:"--affected_version <value>",description:"Alias for --affected-version"}]},{target:"fixedVersion",keys:["fixedVersion","fixed_version"],option:"--fixed-version <value>",description:"Set fixed version identifier",aliasOptions:[{option:"--fixed_version <value>",description:"Alias for --fixed-version"}]},{target:"component",keys:["component"],option:"--component <value>",description:"Set issue component ownership"},{target:"regression",keys:["regression"],option:"--regression [value]",description:"Set regression marker; bare flag means true, or pass true|false|1|0"},{target:"customerImpact",keys:["customerImpact","customer_impact"],option:"--customer-impact <value>",description:"Set customer impact summary",aliasOptions:[{option:"--customer_impact <value>",description:"Alias for --customer-impact"}]},{target:"dep",keys:["dep"],option:"--dep <value>",description:"Add dependency entries id=<id>,kind=<value>,author=<value>,created_at=<iso|now>,source_kind=<value> (repeatable)",repeatable:!0},{target:"depRemove",keys:["depRemove","dep_remove"],option:"--dep-remove <value>",description:"Remove dependencies by id or id=<id>,kind=<value>,source_kind=<value> selectors (repeatable)",repeatable:!0,aliasOptions:[{option:"--dep_remove <value>",description:"Alias for --dep-remove"}]},{target:"comment",keys:["comment"],option:"--comment <value>",description:"Append comment seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"note",keys:["note"],option:"--note <value>",description:"Append note seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"learning",keys:["learning"],option:"--learning <value>",description:"Append learning seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"file",keys:["file"],option:"--file <value>",description:"Append linked file path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"test",keys:["test"],option:"--test <value>",description:"Append linked test command=<value>,path=<value>,scope=<project|global>,timeout_seconds=<n>,pm_context_mode=<schema|tracker|auto> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"doc",keys:["doc"],option:"--doc <value>",description:"Append linked doc path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"reminder",keys:["reminder"],option:"--reminder <value>",description:"Set reminders at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"event",keys:["event"],option:"--event <value>",description:"Set events start=<iso|relative>,end=<iso|relative>,duration=<relative|30min|PT30M>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)",repeatable:!0},{target:"typeOption",keys:["typeOption","type_option"],option:"--type-option <value>",description:"Set type options key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)",repeatable:!0,aliasOptions:[{option:"--type_option <value>",description:"Alias for --type-option"}]},{target:"field",keys:["field"],option:"--field <name=value>",description:"Set a field declared by an active extension registerItemFields registration (repeatable)",repeatable:!0},{target:"unset",keys:["unset"],option:"--unset <field>",description:"Clear scalar metadata field by name (repeatable)",repeatable:!0}],N=T.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),E=T.filter(e=>e.repeatable===!0).map(e=>({target:e.target,keys:e.keys}));(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]="8b227cb2-a30d-5384-b9c2-558603181c67")}catch{}})();var k=new Set(["--author","--follow","--help","--lean","--token-accounting","--output-include","--output-limit","--output-budget","--output-format","--output-session","--output-cursor","--output-row-contract","--no-changed-fields","--no-extensions","--no-pager","--pm-path","--profile","--quiet","--interval-ms"]),b=new Set([...A,...m]),I=new Set(["--brief","--format","--full","--full-changed-fields","--id-only","--no-truncate","--stream"]),L=new Set(["--body-file","--file","--stdin-json"]),h=new Set(["--global","--local","--project"]),P=new Set(["--activity-limit","--default-depth","--section-activity","--section-blockers","--section-files","--section-hierarchy","--section-progress","--section-staleness","--section-tests","--section-workload","--stale-threshold-days"]),w=new Set(["action","path","pmExecutable","timeoutMs"]),G=new Set(["configAction","id","name","query","reason","subcommand","target","text"]),M={assurance:{id:"<id>",kind:"<kind>",preset:"[kind]|[id]",subcommand:"<action>"},event:{title:"<title>"},files:{lookupPath:"lookup <path...>"},meet:{title:"<title>"},merge:{subcommand:"<subcommand>"},remind:{title:"<title>"},workspace:{name:"<name>",subcommand:"snapshot",snapshotAction:"<snapshot-action>",target:"<target>"}},F={assurance:{"--tree":"treeId","--owner":"owner","--apply":"apply","--enforcement":"enforcement"},init:{"--id-prefix":"idPrefix","--no-merge-fence":"mergeFence","--workspace":"workspace"},create:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},update:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},"update-many":{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},files:{"--note":"addNote"},docs:{"--note":"addNote"},comments:{"--full-history":"full"},notes:{"--file":"text","--full-history":"full"},learnings:{"--full-history":"full"},gc:{"--scope":"gcScope"},contracts:{"--action":"contractAction"},schema:{"--no-allow-unset":"allowUnset","--type":"fieldTypeScope"},"history-author-acknowledge":{"--event":"historyEvent","--all-actionable":"allActionable"},"extension-init":{"--capability":"capability"},"package-init":{"--capability":"capability"},"extension-install":{"--gh":"github"},"package-install":{"--gh":"github"},"extension-adopt":{"--gh":"github"},"package-adopt":{"--gh":"github"},extension:{"--gh":"github","--scaffold":"init"},package:{"--gh":"github","--scaffold":"init"},install:{"--gh":"github"}},D={"--pm-path":"path"},f={stats:{"--analytics":["measurements","metric","measurementLimit","observe","improvementDirection","measurementSource","measurementItem","measurementRevision","author","message","provenanceCoverage","fleetAttribution","since","eventLimit","minimumSample"]}};function x(e){return e.startsWith("extension-")?`extension ${e.slice(10)}`:e.startsWith("package-")?`package ${e.slice(8)}`:e}function S(e,t){let i=F[e]?.[t]??D[t];return i!==void 0?i:t.replace(/^--/,"").replaceAll("_","-").replace(/-([a-z])/g,(r,o)=>o.toUpperCase())}function U(e){let t=new Set;return e.filter(({flag:i})=>!i.startsWith("--")||t.has(i)?!1:(t.add(i),!0))}function V(e,t){return t.find(({aliases:i})=>i?.includes(e))?.flag}function X(e,t,i,r){let o=f[e]?.[t.flag];if(o!==void 0&&o.every(a=>r.has(a)))return{surface:"cli",input:t.flag,counterpart:o[0],disposition:"shared",reason:"The validated CLI JSON object fans out across strict SDK parameters."};let n=S(e,t.flag);if(r.has(n))return{surface:"cli",input:t.flag,counterpart:n,disposition:"shared",reason:"The CLI flag maps directly to a strict SDK action parameter."};let s=V(t.flag,i);if(s!==void 0){let a=S(e,s);if(r.has(a))return{surface:"cli",input:t.flag,counterpart:a,disposition:"compatibility_alias",reason:`Compatibility spelling for ${s}.`}}return k.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_transport",reason:"CLI process transport is supplied by the in-process SDK host."}:I.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_presentation",reason:"CLI rendering or mutation projection does not alter the SDK result envelope."}:L.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_adapter",reason:"Local file or stdin adaptation is a CLI boundary concern."}:P.has(t.flag)?{surface:"cli",input:t.flag,counterpart:"key",disposition:"compatibility_alias",reason:"CLI config shorthand normalizes to the SDK configAction/key/value contract."}:h.has(t.flag)?{surface:"cli",input:t.flag,counterpart:"scope",disposition:"cli_scope_selector",reason:"Mutually exclusive CLI scope switches normalize to the SDK scope parameter."}:{surface:"cli",input:t.flag,counterpart:n,disposition:"unclassified",reason:"The CLI flag has no strict SDK parameter or approved boundary classification."}}function B(e,t,i){let r=Object.entries(f[e]??{}).find(([s,a])=>a.includes(t)&&i.some(({input:p,disposition:d})=>p===s&&d==="shared"));if(r!==void 0)return{surface:"sdk",input:t,counterpart:r[0],disposition:"shared",reason:"The strict SDK parameter is reachable through the validated CLI JSON object."};let o=i.find(({counterpart:s,disposition:a})=>s===t&&(a==="shared"||a==="compatibility_alias"||a==="cli_scope_selector"));if(o!==void 0)return{surface:"sdk",input:t,counterpart:o.input,disposition:"shared",reason:"The strict SDK parameter is reachable from the CLI contract."};let n=M[e]?.[t];return n!==void 0?{surface:"sdk",input:t,counterpart:n,disposition:"shared",reason:"The strict SDK parameter maps to a canonical CLI positional argument."}:w.has(t)?{surface:"sdk",input:t,disposition:"sdk_transport",reason:"The SDK host supplies in-process transport and workspace selection."}:G.has(t)?{surface:"sdk",input:t,disposition:"cli_positional",reason:"The CLI accepts this SDK parameter as a positional command argument."}:{surface:"sdk",input:t,disposition:"sdk_native",reason:"The typed SDK exposes this structured input without a canonical CLI long flag."}}function K(e={}){let t=e.actions??u,i=e.resolveFlags??c,r=e.resolveParameters??C;return t.map(o=>{let n=x(o),s=U(i(n)).filter(({flag:l})=>O(o)!==void 0||!b.has(l)),a=new Set(r(o)??[]),p=s.map(l=>X(o,l,s,a)),d=[...a].sort((l,g)=>l.localeCompare(g)).map(l=>B(o,l,p));return{action:o,command:n,cli:p,sdk:d,unclassified:[...p,...d].filter(({disposition:l})=>l==="unclassified")}})}(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]="969b5bd2-e7de-5db8-bef2-6748675a100c")}catch{}})();export{v as a,_ as b,y as c,R as d,T as e,N as f,E as g,K as h};
|
|
2
|
+
//# sourceMappingURL=chunk-EXZA4257.js.map
|