@unbrained/pm-cli 2026.8.4 → 2026.8.5
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 +39 -13
- package/dist/cli/error-guidance.js +4 -4
- package/dist/cli/register-structured-mutation.d.ts +2 -0
- package/dist/cli/register-structured-mutation.js +124 -12
- package/dist/cli-bundle/bundle-manifest.json +407 -407
- package/dist/cli-bundle/chunks/append-VXXGOXSG.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-QVO3VTA4.js → chunk-2WFXWAYX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NM5G7RLU.js → chunk-3FTILRJ2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VH2EAGUG.js → chunk-42E7YPLG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RB65T4RX.js → chunk-43HQQI6S.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J4EPW4GT.js → chunk-45G53IU4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PQXEB7W4.js → chunk-4VN6GS4U.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-4YUBDMQM.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-D2MBVMVE.js → chunk-54FNT7U2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NRDKVOUE.js → chunk-5ZBOIPGP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3XZYTRPC.js → chunk-6MSQJOTG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GOICHIX4.js → chunk-7A5OT5J2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HTYC76A4.js → chunk-7C4PTJG6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BKMZTZYL.js → chunk-A62CYISG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5H47J5FG.js → chunk-BPELKUQD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HE3DZFN4.js → chunk-BXQLRKWF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BLINBTMX.js → chunk-CSI3WS5I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KH4GVBMC.js → chunk-DXDREUXT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KIKLF2W4.js → chunk-E2RKBKWB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-377OOXUF.js → chunk-EGJ4JTUG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SULWTPQO.js → chunk-FPBQHMFT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V5K52PYW.js → chunk-GE4KCSZP.js} +35 -35
- package/dist/cli-bundle/chunks/{chunk-NPUJ7OLK.js → chunk-HNFD72UK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QMWUL66F.js → chunk-HWRRMBJO.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-L3AZOELJ.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-CGY5I2GO.js → chunk-LKDGK44W.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LN2WFEU4.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-ZSH4GNBH.js → chunk-M72BKL5Q.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HQ2WU7OY.js → chunk-MHK6LIWE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H6FITE7D.js → chunk-NE5VRDAI.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NY4T3JWN.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-DCJ6CM6F.js → chunk-OMXVBQ2N.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-OPVH7SKD.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-CU5ENFNP.js → chunk-OTHLDSFP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NH35JNK5.js → chunk-PMXJEU3F.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SVDH5CHC.js → chunk-Q35VBGOQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5PZGZMPG.js → chunk-R546TPDE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q5F6OI7C.js → chunk-RKAVWO3O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JMKVCQSE.js → chunk-SSF4PIUR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PA5XRN2A.js → chunk-UN66FZRO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FQ4EFFDU.js → chunk-UP7DTVMD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NFF3JAQR.js → chunk-UZBWIUYD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2POYGY53.js → chunk-V3774P7D.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-B5ZLCD5Z.js → chunk-V3EUXXOF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6S7I3UKV.js → chunk-VCKLFEUN.js} +19 -19
- package/dist/cli-bundle/chunks/{chunk-PYYPQLHC.js → chunk-VN5VITU3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-WRL4KNDL.js +20 -0
- package/dist/cli-bundle/chunks/{chunk-UJHUR3LZ.js → chunk-XCEZYMNI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JDPKBV5P.js → chunk-YEWNL576.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OB7TRZ2G.js → chunk-YSO3YFZ4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UVZREFZU.js → chunk-ZYHOB3SN.js} +2 -2
- package/dist/cli-bundle/chunks/close-VZ3OQPN5.js +2 -0
- package/dist/cli-bundle/chunks/close-many-SB4TI27P.js +2 -0
- package/dist/cli-bundle/chunks/comments-BIF3Q4KY.js +2 -0
- package/dist/cli-bundle/chunks/copy-6AI5Z57X.js +2 -0
- package/dist/cli-bundle/chunks/{create-RLLCBCXM.js → create-XLKTXTUF.js} +2 -2
- package/dist/cli-bundle/chunks/delete-ZY2VHQTP.js +2 -0
- package/dist/cli-bundle/chunks/{deps-J4ONTF4X.js → deps-ITTY3GIC.js} +2 -2
- package/dist/cli-bundle/chunks/{docs-YL2DJ4WD.js → docs-W4OSRTYR.js} +2 -2
- package/dist/cli-bundle/chunks/{files-NGNAIYKK.js → files-EOK4AZI4.js} +2 -2
- package/dist/cli-bundle/chunks/focus-DLBNWL7L.js +2 -0
- package/dist/cli-bundle/chunks/{history-compact-HW62K5XP.js → history-compact-7UGTMLL3.js} +2 -2
- package/dist/cli-bundle/chunks/{history-redact-HVBKUJOW.js → history-redact-4DZRMD6Z.js} +2 -2
- package/dist/cli-bundle/chunks/{history-repair-OPNBH5JJ.js → history-repair-UPOSZW5R.js} +2 -2
- package/dist/cli-bundle/chunks/{learnings-F36PZXT6.js → learnings-GMRNCBS3.js} +2 -2
- package/dist/cli-bundle/chunks/{profile-N3XMWBM7.js → profile-2MUUMHRE.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-BKGHBI7Y.js → register-list-query-LR3SQ5ZF.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-SUOHFVWM.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-ARRRKOVN.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-KWV6UD77.js → register-setup-O6AYP6NP.js} +2 -2
- package/dist/cli-bundle/chunks/restore-ZVCVHTB5.js +2 -0
- package/dist/cli-bundle/chunks/{schema-4PJQMGUY.js → schema-FJ4EA3XF.js} +2 -2
- package/dist/cli-bundle/chunks/update-YHV52CSS.js +2 -0
- package/dist/cli-bundle/chunks/update-many-M6YHVNXM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-7J5TUBUJ.js +153 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ONIX2KKW.js → chunk-A7BJ5SS6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-B7LJWAZE.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-QM2BIVK7.js → chunk-BIMTMOS7.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-BOGRY7M6.js → chunk-FGKY4MBE.js} +10 -10
- package/dist/cli-bundle/focused-chunks/chunk-G6ETT4QK.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-C2QSL62X.js → chunk-GJ2TG2CW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-RO5BQFG3.js → chunk-IPWSFADF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UFCPSWIL.js → chunk-MJ7HWSFK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2VIIXOAD.js → chunk-N5XU5UVK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-PG2RIZBX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OYTK4VNH.js → chunk-PIMMYG7Q.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-K37BB4JL.js → chunk-QVHKCI4T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SQXVGHMH.js → chunk-RUR5I3TK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-SV3O7TSH.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-L6A4NVQC.js → chunk-UIL2M2NA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WVGJAD7L.js → chunk-VLYOEYML.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-W7BJEWHX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-DQ4PLKEE.js → chunk-WEM2E2PE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-WVIVUWVL.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-Y4LDYLLT.js +2 -0
- package/dist/cli-bundle/main.js +4 -4
- 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 +28 -28
- 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 +1 -1
- 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 +1 -1
- package/dist/core/extensions/loader.js +5 -2
- package/dist/core/item/item-format.js +14 -20
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/store/item-store.js +2 -2
- package/dist/core/store/settings.js +2 -2
- package/dist/mcp/server.js +12 -6
- package/dist/mcp/tool-definitions.js +14 -7
- package/dist/sdk/cli-contracts/agent-output-contracts.d.ts +18 -18
- package/dist/sdk/cli-contracts/agent-output-contracts.js +51 -23
- package/dist/sdk/cli-contracts/commander-mutation-options.js +26 -2
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +28 -2
- package/dist/sdk/cli-contracts/registration-helpers.js +4 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +10 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +20 -5
- package/dist/sdk/cli-contracts/tool-schema.js +4 -2
- package/dist/sdk/cli-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts.js +4 -4
- package/dist/sdk/cli-program.js +3 -3
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +3 -2
- package/dist/sdk/dependency-provenance.d.ts +2 -0
- package/dist/sdk/dependency-provenance.js +7 -3
- package/dist/sdk/error-code-catalog.d.ts +23 -0
- package/dist/sdk/error-code-catalog.js +25 -5
- package/dist/sdk/generated-error-code-catalog.js +499 -3
- package/dist/sdk/graph/governance.js +3 -3
- package/dist/sdk/graph/remediation.js +3 -3
- package/dist/sdk/graph/run.js +4 -8
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +4 -3
- package/dist/sdk/item-transaction.d.ts +51 -6
- package/dist/sdk/item-transaction.js +132 -22
- package/dist/sdk/lifecycle/create.d.ts +4 -0
- package/dist/sdk/lifecycle/create.js +26 -10
- package/dist/sdk/lifecycle-policy.d.ts +9 -0
- package/dist/sdk/lifecycle-policy.js +22 -9
- package/dist/sdk/merge/driver.js +6 -3
- package/dist/sdk/output-contracts.d.ts +67 -0
- package/dist/sdk/output-contracts.js +173 -0
- package/dist/sdk/package-import-adapters.js +2 -2
- package/dist/sdk/structured-mutations.d.ts +23 -0
- package/dist/sdk/structured-mutations.js +219 -10
- package/dist/sdk/workspace-snapshot.js +58 -12
- package/dist/sdk/workspace.js +30 -4
- package/docs/COMMANDS.md +40 -10
- package/docs/EXTENSIONS.md +1 -1
- package/docs/MERGE_SAFETY.md +2 -0
- package/docs/PR_REVIEW_LOOP.md +10 -4
- package/docs/README.md +22 -22
- package/docs/RELEASING.md +3 -3
- package/docs/SCRIPTING.md +32 -9
- package/docs/SDK.md +91 -11
- package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
- package/docs/TESTING.md +25 -0
- package/docs/examples/sdk-contract-consumer/README.md +11 -1
- package/docs/examples/sdk-contract-consumer/package.json +2 -1
- package/docs/examples/sdk-contract-consumer/parse-receipt.mjs +22 -0
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +292 -14
- package/dist/cli-bundle/chunks/append-DHBRLHHS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-2INN52SU.js +0 -8
- package/dist/cli-bundle/chunks/chunk-6RSK4IFN.js +0 -20
- package/dist/cli-bundle/chunks/chunk-ASJJKA57.js +0 -2
- package/dist/cli-bundle/chunks/chunk-IYAVULRN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-RRQBHQOV.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XBLOD5TZ.js +0 -2
- package/dist/cli-bundle/chunks/close-VLHNN6YB.js +0 -2
- package/dist/cli-bundle/chunks/close-many-LSJNZKU6.js +0 -2
- package/dist/cli-bundle/chunks/comments-AAIA6A6X.js +0 -2
- package/dist/cli-bundle/chunks/copy-Z7YMLEHN.js +0 -2
- package/dist/cli-bundle/chunks/delete-KNOHHQJM.js +0 -2
- package/dist/cli-bundle/chunks/focus-LFRCGALV.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-GU3DCECN.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-PTWH727R.js +0 -2
- package/dist/cli-bundle/chunks/restore-4HZSLILR.js +0 -2
- package/dist/cli-bundle/chunks/update-E6LPS5IV.js +0 -2
- package/dist/cli-bundle/chunks/update-many-OSIC6KRO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5MTKO7TV.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-6GIZK7VQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-AOP2WIZZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CL75YW32.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-E7OFMWGT.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-I5F5UK3Q.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-T5TSY36R.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-VT6BF2IX.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as m}from"./chunk-SSF4PIUR.js";import{Ha as d}from"./chunk-YEWNL576.js";import{$d as g,Be as p,be as A}from"./chunk-GE4KCSZP.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 C={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]="3b9b9ebe-8d98-5983-8257-b7b77c7e6194")}catch{}})();var f=[{target:"status",keys:["status"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag","tags"]},{target:"priority",keys:["priority"]},{target:"deadlineBefore",keys:["deadlineBefore"]},{target:"deadlineAfter",keys:["deadlineAfter"]},{target:"updatedAfter",keys:["updatedAfter"]},{target:"updatedBefore",keys:["updatedBefore"]},{target:"createdAfter",keys:["createdAfter"]},{target:"createdBefore",keys:["createdBefore"]},{target:"ids",keys:["ids"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"parent",keys:["parent"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"limit",keys:["limit"]},{target:"offset",keys:["offset"]},{target:"after",keys:["after"]},{target:"fields",keys:["fields"]},{target:"sort",keys:["sort"]},{target:"order",keys:["order"]},{target:"treeDepth",keys:["treeDepth","tree_depth"]}],k=[{target:"mode",keys:["mode"]},{target:"matchMode",keys:["matchMode","match_mode"]},{target:"minScore",keys:["minScore","min_score"]},{target:"semanticWeight",keys:["semanticWeight","semantic_weight"]},{target:"status",keys:["status"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag","tags"]},{target:"priority",keys:["priority"]},{target:"deadlineBefore",keys:["deadlineBefore"]},{target:"deadlineAfter",keys:["deadlineAfter"]},{target:"updatedAfter",keys:["updatedAfter"]},{target:"updatedBefore",keys:["updatedBefore"]},{target:"createdAfter",keys:["createdAfter"]},{target:"createdBefore",keys:["createdBefore"]},{target:"assignee",keys:["assignee"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"parent",keys:["parent"]},{target:"fields",keys:["fields"]},{target:"limit",keys:["limit"]},{target:"after",keys:["after"]}],S=[{target:"view",keys:["view"]},{target:"date",keys:["date"]},{target:"from",keys:["from"]},{target:"to",keys:["to"]},{target:"limit",keys:["limit"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag"]},{target:"priority",keys:["priority"]},{target:"status",keys:["status"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"include",keys:["include"]},{target:"recurrenceLookaheadDays",keys:["recurrenceLookaheadDays","recurrence_lookahead_days"]},{target:"recurrenceLookbackDays",keys:["recurrenceLookbackDays","recurrence_lookback_days"]},{target:"occurrenceLimit",keys:["occurrenceLimit","occurrence_limit"]},{target:"format",keys:["format"]}],v=[{target:"date",keys:["date"]},{target:"from",keys:["from"]},{target:"to",keys:["to"]},{target:"type",keys:["type"]},{target:"tag",keys:["tag"]},{target:"priority",keys:["priority"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"parent",keys:["parent"]},{target:"limit",keys:["limit","maxItems","max_items"]},{target:"after",keys:["after"]},{target:"format",keys:["format"]},{target:"depth",keys:["depth"]},{target:"fields",keys:["fields"]},{target:"activityLimit",keys:["activityLimit","activity_limit"]},{target:"staleThreshold",keys:["staleThreshold","stale_threshold"]},{target:"tokenBudget",keys:["tokenBudget","token_budget"]}],N=[{target:"type",keys:["type"]},{target:"tag",keys:["tag"]},{target:"priority",keys:["priority"]},{target:"assignee",keys:["assignee"]},{target:"assigneeFilter",keys:["assigneeFilter","assignee_filter"]},{target:"sprint",keys:["sprint"]},{target:"release",keys:["release"]},{target:"parent",keys:["parent"]},{target:"limit",keys:["limit"]},{target:"blockedLimit",keys:["blockedLimit","blocked_limit"]},{target:"format",keys:["format"]},{target:"tokenBudget",keys:["tokenBudget","token_budget"]}],R=[{target:"id",keys:["id"]},{target:"op",keys:["op"]},{target:"author",keys:["author"]},{target:"from",keys:["from"]},{target:"to",keys:["to"]},{target:"limit",keys:["limit"]}];function E(e,t){for(let a of t.keys){let o=e[a];if(typeof o=="string")return o}}function b(e,t){for(let a of t.keys)if(Object.hasOwn(e,a))return e[a]}function I(e,t){for(let a of t.keys){let o=e[a];if(Array.isArray(o))return o}}(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]="b0f52c3d-091d-51db-a4c1-bb177414dd7f")}catch{}})();var c=[{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:"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}],L=c.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),h=c.filter(e=>e.repeatable===!0).map(e=>({target:e.target,keys:e.keys})),u=[{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:"Set acceptance criteria (repeatable; values join with '; ')",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 (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:"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}],P=u.filter(e=>e.repeatable!==!0).map(e=>({target:e.target,keys:e.keys})),w=u.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]="5f5b9bd3-1b92-5fb2-b649-6eb942a7a3c4")}catch{}})();var M=new Set(["--author","--follow","--help","--lean","--token-accounting","--output-include","--output-limit","--output-budget","--output-format","--no-changed-fields","--no-extensions","--no-pager","--pm-path","--profile","--quiet","--interval-ms"]),F=new Set(g),G=new Set(["--brief","--format","--full","--full-changed-fields","--id-only","--no-truncate","--stream"]),D=new Set(["--body-file","--file","--stdin-json"]),x=new Set(["--global","--local","--project"]),U=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"]),B=new Set(["action","path","pmExecutable","timeoutMs"]),V=new Set(["configAction","id","name","query","reason","subcommand","target","text"]),X={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>"}},H={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"},notes:{"--file":"text"},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"}};function K(e){return e.startsWith("extension-")?`extension ${e.slice(10)}`:e.startsWith("package-")?`package ${e.slice(8)}`:e}function y(e,t){let a=H[e]?.[t];return a!==void 0?a:t.replace(/^--/,"").replaceAll("_","-").replace(/-([a-z])/g,(o,i)=>i.toUpperCase())}function Y(e){let t=new Set;return e.filter(({flag:a})=>!a.startsWith("--")||t.has(a)?!1:(t.add(a),!0))}function j(e,t){return t.find(({aliases:a})=>a?.includes(e))?.flag}function W(e,t,a,o){let i=y(e,t.flag);if(o.has(i))return{surface:"cli",input:t.flag,counterpart:i,disposition:"shared",reason:"The CLI flag maps directly to a strict SDK action parameter."};let n=j(t.flag,a);if(n!==void 0){let r=y(e,n);if(o.has(r))return{surface:"cli",input:t.flag,counterpart:r,disposition:"compatibility_alias",reason:`Compatibility spelling for ${n}.`}}return M.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_transport",reason:"CLI process transport is supplied by the in-process SDK host."}:G.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_presentation",reason:"CLI rendering or mutation projection does not alter the SDK result envelope."}:D.has(t.flag)?{surface:"cli",input:t.flag,disposition:"cli_adapter",reason:"Local file or stdin adaptation is a CLI boundary concern."}:U.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."}:x.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:i,disposition:"unclassified",reason:"The CLI flag has no strict SDK parameter or approved boundary classification."}}function z(e,t,a){let o=a.find(({counterpart:n,disposition:r})=>n===t&&(r==="shared"||r==="compatibility_alias"||r==="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 i=X[e]?.[t];return i!==void 0?{surface:"sdk",input:t,counterpart:i,disposition:"shared",reason:"The strict SDK parameter maps to a canonical CLI positional argument."}:B.has(t)?{surface:"sdk",input:t,disposition:"sdk_transport",reason:"The SDK host supplies in-process transport and workspace selection."}:V.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 q(e={}){let t=e.actions??p,a=e.resolveFlags??d,o=e.resolveParameters??m;return t.map(i=>{let n=K(i),r=Y(a(n)).filter(({flag:s})=>A(i)!==void 0||!F.has(s)),_=new Set(o(i)??[]),l=r.map(s=>W(i,s,r,_)),T=[..._].sort((s,O)=>s.localeCompare(O)).map(s=>z(i,s,l));return{action:i,command:n,cli:l,sdk:T,unclassified:[...l,...T].filter(({disposition:s})=>s==="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]="93c3ffe8-6735-5139-b91f-59002f74a670")}catch{}})();export{C as a,f as b,k as c,S as d,v as e,N as f,R as g,E as h,b as i,I as j,c as k,L as l,h as m,u as n,P as o,w as p,q};
|
|
2
|
+
//# sourceMappingURL=chunk-LN2WFEU4.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Ba as m,Ca as c,aa as l}from"./chunk-
|
|
1
|
+
import{Ba as m,Ca as c,aa as l}from"./chunk-GE4KCSZP.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]="989b570c-112e-5ee3-8731-ab34f215ba45")}catch{}})();var A=new Map(l.map(e=>[e.toLowerCase(),e])),b=/^[A-Za-z][A-Za-z0-9_-]*$/;function p(e,t){if(!b.test(e))throw new Error(`${t} "${e}" is not a valid identifier. Use a single letter-led token of letters, digits, hyphen, or underscore with no spaces or punctuation (e.g. "Spike" or "code-review").`)}function u(e){return A.get(e.trim().toLowerCase())}function g(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function T(e){return e.replace(/[\\"`$]/g,t=>`\\${t}`)}function h(e){let t=new Map;for(let i of e){let n=i.trim();if(n.length===0)continue;let o=n.toLowerCase();t.has(o)||t.set(o,n)}return[...t.values()].sort((i,n)=>i.localeCompare(n))}function E(e){let t=(e.name??"").trim();if(t.length===0)throw new Error("Type name must not be empty.");p(t,"Type name");let i=u(t);if(i)throw new Error(`Cannot redefine built-in item type "${i}". Built-in types are reserved: ${l.join(", ")}.`);let n=e.description?.trim(),o=e.defaultStatus?.trim(),r=e.folder?.trim(),a=r&&r.length>0?c(r):void 0,s=h(e.aliases??[]);for(let f of s){p(f,"Alias");let d=u(f);if(d)throw new Error(`Alias "${f}" collides with built-in item type "${d}". Built-in types are reserved: ${l.join(", ")}.`)}return{name:t,description:n&&n.length>0?n:void 0,defaultStatus:o&&o.length>0?o:void 0,folder:a,aliases:s}}function v(e,t){let i=e.name.toLowerCase(),n=new Map;for(let r of t.definitions){if(typeof r.name!="string")continue;let a=r.name.trim();if(!(a.length===0||a.toLowerCase()===i)){n.set(a.toLowerCase(),a);for(let s of g(r.aliases))s.trim().length>0&&n.set(s.trim().toLowerCase(),a)}}let o=n.get(i);if(o)throw new Error(`Type name "${e.name}" collides with an alias of existing item type "${o}".`);for(let r of e.aliases){let a=n.get(r.toLowerCase());if(a)throw new Error(`Alias "${r}" already maps to existing item type "${a}".`)}}function y(e,t){return typeof t=="string"&&t.trim().length>0?c(t).toLowerCase():m(e).toLowerCase()}function N(e,t,i){let n=e.name.toLowerCase(),o=y(e.name,e.folder),r=s=>{throw new Error(`Item type "${e.name}" would store items in folder "${o}", which already belongs to existing item type "${s}". Pass a distinct --folder to keep their storage separate.`)};for(let s of t.definitions){if(typeof s.name!="string")continue;let f=s.name.trim();f.length===0||f.toLowerCase()===n||y(f,s.folder)===o&&r(f)}let a=i?.get(o);a!==void 0&&a.toLowerCase()!==n&&r(a)}function _(e){if(e==null||e.trim().length===0)return{definitions:[]};let t;try{t=JSON.parse(e)}catch{throw new Error("schema/types.json contains invalid JSON.")}return{definitions:$(t)}}function $(e){let t=x(e);if(!t)return[];let i=[];for(let n of t){if(typeof n!="object"||n===null||Array.isArray(n))continue;let o=n;typeof o.name!="string"||o.name.trim().length===0||i.push(o)}return i}function x(e){if(Array.isArray(e))return e;if(typeof e!="object"||e===null)return;let t=e;if(Array.isArray(t.definitions))return t.definitions;if(typeof t.item_types=="object"&&t.item_types!==null){let i=t.item_types;if(Array.isArray(i.definitions))return i.definitions}}function j(e,t){let i=t.name.toLowerCase(),n=e.definitions.slice(),o=n.findIndex(f=>typeof f.name=="string"&&f.name.trim().toLowerCase()===i),r=o>=0?n[o]:void 0,a=h([...g(r?.aliases),...t.aliases]),s={...r,name:t.name};return t.folder!==void 0&&(s.folder=t.folder),a.length>0?s.aliases=a:s.aliases!==void 0&&delete s.aliases,w(s,"description",t.description),w(s,"default_status",t.defaultStatus),o>=0?n[o]=s:n.push(s),n.sort((f,d)=>f.name.localeCompare(d.name)),{file:{definitions:n},definition:s,replaced:o>=0,...r&&typeof r.name=="string"?{previousName:r.name}:{}}}function F(e,t){let i=(t??"").trim();if(i.length===0)throw new Error("Type name must not be empty.");let n=u(i);if(n)throw new Error(`Cannot remove built-in item type "${n}". Built-in types are reserved: ${l.join(", ")}.`);let o=i.toLowerCase(),r=e.definitions.slice(),a=r.findIndex(f=>typeof f.name=="string"&&f.name.trim().toLowerCase()===o);if(a<0)return{file:{definitions:r},removed:!1};let[s]=r.splice(a,1);return{file:{definitions:r},removed:!0,definition:s}}function w(e,t,i){let n=e;i!==void 0&&(n[t]=i)}function S(e){return`${JSON.stringify({definitions:e.definitions},null,2)}
|
|
2
2
|
`}function L(e,t){let i=e.trim().length>0?e.trim():e,n=t?.trim()||".agents/pm/schema/types.json";return`To register a custom type, run: pm schema add-type "${T(i)}" (writes ${n}).`}function D(e,t,i){return`Invalid type value "${e}". Allowed: ${t.join(", ")}. ${L(e,i)}`}export{u as a,T as b,E as c,v as d,N as e,_ as f,j as g,F as h,S as i,L as j,D as k};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-M72BKL5Q.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as i,e as o,g as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as i,e as o,g as d}from"./chunk-54FNT7U2.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="26e30c82-7d6d-51b9-909f-b779213846b1")}catch{}})();async function p(n,e,r){return d(n,e,r,{input:await o(e,"learning"),collectionKey:"learnings",op:"learning_add",editOp:"learning_edit",deleteOp:"learning_delete",parseText:a=>i(a),createEntry:a=>a,bypassOwnershipConflict:!!(e.edit===void 0&&e.delete===void 0&&e.ownershipAppendBypass),conflictGuidance:{required:"For an approved append-only handoff on another owner's item, use the package-provided ownership bypass before considering --force.",examples:['pm learnings pm-a1b2 --add "review learning" --author "reviewer" --force'],nextSteps:["Use an installed package's narrow append-only ownership bypass when available.","Use --force only when an ownership override is explicitly approved."]}})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MHK6LIWE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c0fb747e-1f9f-55c4-808b-b77d3a881f87")}catch{}})();var M=5,L=1e4,R=8;function v(e,n){if(!Number.isFinite(n)||!Number.isInteger(n)||n<0)throw new TypeError(`Invalid path ${e} bound: ${String(n)}`)}function m(e,n){return n.hierarchyDirection==="target_parent"?e.target:e.source}function h(e,n){return(n.precedence??"source_before_target")==="target_before_source"?e.target:e.source}function we(e,n){let s=h(e,n);return{predecessor:s,successor:s===e.source?e.target:e.source}}function P(e,n,s){if(n===void 0)return;let o=e.registry(),i=new Set;for(let t of n){let r=o.require(t);if(!r[s])throw new TypeError(`Relationship kind ${r.kind} is not a ${s} kind`);i.add(r.kind)}return i}function j(e,n,s,o,i){let t=e.registry(),r=e.neighborEdges(n,{direction:"both",...s===void 0?{}:{kinds:[...s]}}),d=[],c=new Set;for(let a of r.value){let u=t.require(a.edge.kind);u[o]&&i(a,u,n)&&(c.has(a.id)||(c.add(a.id),d.push(a.id)))}return{neighbors:d,inspectedEdges:r.meta.inspectedEdges}}function F(e,n,s,o,i,t){if(n>=s)return e.neighbors.some(r=>!t.seen.has(r))&&(t.truncated=!0),!1;for(let r of e.neighbors)if(!t.seen.has(r)){if(t.seen.add(r),t.queue.push({id:r,depth:n+1}),!t.resumed){r===i&&(t.resumed=!0);continue}if(t.value.length>=o)return t.truncated=!0,!0;t.value.push(r)}return!1}function y(e,n,s,o,i){if(!e.hasNode(n))throw new TypeError(`Relationship node not found: ${n}`);let t=P(e,s.kinds,o),r=s.limit??Number.POSITIVE_INFINITY,d=s.maxDepth??Number.POSITIVE_INFINITY,c=s.after,a={seen:new Set([n]),value:[],queue:[{id:n,depth:0}],resumed:c===void 0,truncated:!1},u=0,l=0;for(let f=0;f<a.queue.length;f+=1){s.signal?.throwIfAborted();let g=a.queue[f];u+=1;let T=j(e,g.id,t,o,i);if(l+=T.inspectedEdges,F(T,g.depth,d,r,c,a))break}if(!a.resumed)throw new TypeError(`Traversal cursor not found in sequence: ${c}`);return{value:a.value,meta:{visitedNodes:u,inspectedEdges:l,truncated:a.truncated,nextCursor:a.value.at(-1)}}}function D(e,n){if(!e.hasNode(n))throw new TypeError(`Relationship node not found: ${n}`)}function A(e,n,s,o,i){let t=e.neighborEdges(n.nodes.at(-1),{direction:o,...s.kinds===void 0?{}:{kinds:s.kinds}});return i.inspectedEdges+=t.meta.inspectedEdges,t.value.filter(r=>!n.nodeSet.has(r.id))}function O(e,n,s,o,i,t,r){for(let d of A(e,n,o,i,r)){let c=[...n.nodes,d.id],a=new Set(n.nodeSet).add(d.id),u=[...n.edges,d.edge];if(d.id===s){if(r.value.push({nodes:c,edges:u,length:u.length}),r.value.length>=t)return!0}else r.queue.push({nodes:c,nodeSet:a,edges:u})}return!1}function ve(e,n,s={}){return y(e,n,s,"hierarchy",(o,i)=>m(o.edge,i)===o.id)}function ke(e,n,s={}){return y(e,n,s,"hierarchy",(o,i,t)=>m(o.edge,i)===t)}function xe(e,n,s={}){return y(e,n,s,"ordering",(o,i)=>h(o.edge,i)===o.id)}function Ee(e,n,s={}){return y(e,n,s,"ordering",(o,i,t)=>h(o.edge,i)===t)}function B(e,n,s,o,i,t,r,d){let c={value:[],queue:[{nodes:[n],nodeSet:new Set([n]),edges:[]}],inspectedEdges:0},a=0,u=!1,l=i+1;for(let f=0;f<c.queue.length;f+=1){if(o.signal?.throwIfAborted(),c.value.length>=l||a>=t){u=!0;break}let g=c.queue[f];if(a+=1,g.edges.length>=r){A(e,g,o,d,c).length>0&&(u=!0);continue}if(O(e,g,s,o,d,l,c)){u=!0;break}}return{value:c.value.slice(0,i),meta:{visitedNodes:a,inspectedEdges:c.inspectedEdges,truncated:u}}}function Ie(e,n,s,o={}){D(e,n),D(e,s);let i=o.maxPaths??M,t=o.maxVisitedPaths??L,r=o.maxDepth??R;v("maxPaths",i),v("maxVisitedPaths",t),v("maxDepth",r);let d=o.direction??"outgoing";o.signal?.throwIfAborted();for(let c of o.kinds??[])e.registry().require(c);return n===s?i===0?{value:[],meta:{visitedNodes:1,inspectedEdges:0,truncated:!0}}:{value:[{nodes:[n],edges:[],length:0}],meta:{visitedNodes:1,inspectedEdges:0,truncated:!1}}:B(e,n,s,o,i,t,r,d)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="24898402-1568-5b05-9072-f89dd91f25a6")}catch{}})();var U=16,K=2,V=8;function b(e,n){if(!Number.isInteger(n)||n<1)throw new TypeError(`Invalid ${e} bound: ${String(n)}`)}function Y(e,n,s){let o=e.registry(),i=n===void 0?void 0:new Set(n.map(t=>o.require(t).kind));for(let t of e.edges()){if(t.source===t.target)continue;let r=o.require(t.kind);i!==void 0&&!(i.has(r.kind)||r.inverse!==void 0&&i.has(r.inverse))||s(t,r)}}function X(e,n){let s=new Map;Y(e,n,o=>{N(s,o.source,o.target),N(s,o.target,o.source)});for(let o of s.values())o.sort();return s}function N(e,n,s){let o=e.get(n);o===void 0?e.set(n,[s]):o.push(s)}function H(e,n){let s=new Map;for(let t of e){let r=n.get(t);s.set(r,(s.get(r)??0)+1)}let o,i=0;for(let[t,r]of s)(r>i||r===i&&t<o)&&(o=t,i=r);return o}function W(e,n){let s=new Map;for(let[i,t]of e){let r=s.get(t);r===void 0?s.set(t,[i]):r.push(i)}let o=[];for(let i of s.values())i.length<n||(i.sort(),o.push({representative:i[0],size:i.length,members:i}));return o.sort((i,t)=>t.size-i.size||i.representative.localeCompare(t.representative))}function Ae(e,n={}){let s=n.maxIterations??U,o=n.minSize??K;b("maxIterations",s),b("minSize",o);let i=X(e,n.kinds),t=e.nodes(),r=new Map(t.map(l=>[l,l])),d=0,c=!1,a=0,u=0;for(;d<s&&!c;){n.signal?.throwIfAborted(),d+=1,c=!0;for(let l of t){a+=1;let f=i.get(l);if(f===void 0)continue;u+=f.length;let g=H(f,r);g!==r.get(l)&&(r.set(l,g),c=!1)}}return{value:{communities:W(r,o),iterations:d,converged:c},meta:{visitedNodes:a,inspectedEdges:u,truncated:!c}}}function _(e){return e.direction==="directed"&&(e.ordering||e.hierarchy)}function w(e){return e.inverse!==void 0&&e.inverse<e.kind?e.inverse:e.kind}function k(e,n){return(n.hierarchy?m(e,n):e.source===h(e,n)?e.target:e.source)===e.target?{from:e.source,to:e.target}:{from:e.target,to:e.source}}function G(e,n){if(n===void 0)return;let s=e.registry(),o=new Set;for(let i of n){let t=s.require(i);if(!_(t))throw new TypeError(`Relationship kind ${t.kind} is not a directed ordering or hierarchy kind`);o.add(w(t))}return o}function Z(e,n){let s=e.registry(),o=new Map;for(let i of e.edges()){let t=s.require(i.kind);if(!_(t))continue;let r=w(t);if(n!==void 0&&!n.has(r))continue;let d=k(i,t);if(d.from===d.to)continue;let c=o.get(r);c===void 0&&(c={adjacency:new Map,records:[]},o.set(r,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:i})}return o}function z(e){let n=new Map;for(let[s,o]of e.adjacency)n.set(s,[...o].sort());return n}function J(e,n,s,o){let i=[o];for(let t=s;t!==n;t=e.get(t))i.push(t);return i.push(n),i.reverse()}function Q(e,n,s,o,i,t){for(let r of e.get(s.id)??[])if(t.inspectedEdges+=1,!(s.depth===0&&r===n.to)&&!o.has(r)){if(o.set(r,s.id),r===n.to)return J(o,n.from,s.id,r);i.push({id:r,depth:s.depth+1})}}function ee(e,n,s,o){let i=new Map([[n.from,n.from]]),t=[{id:n.from,depth:0}];for(let r=0;r<t.length;r+=1){let d=t[r];if(o.visitedNodes+=1,d.depth>=s)continue;let c=Q(e,n,d,i,t,o);if(c!==void 0)return c}}function Ne(e,n={}){let s=n.maxDepth??V;b("maxDepth",s),n.limit!==void 0&&b("limit",n.limit);let o=n.limit??Number.POSITIVE_INFINITY,i=G(e,n.kinds),t=Z(e,i),r=[],d={visitedNodes:0,inspectedEdges:0},c=!1;e:for(let a of[...t.keys()].sort()){let u=t.get(a),l=z(u);for(let f of u.records){n.signal?.throwIfAborted();let g=ee(l,f,s,d);if(g!==void 0){if(r.length>=o){c=!0;break e}r.push({edge:f.edge,witness:g})}}}return{value:r,meta:{visitedNodes:d.visitedNodes,inspectedEdges:d.inspectedEdges,truncated:c}}}function ne(e,n,s,o,i){let t=new Set,r=[];for(let d of s){if(d.id===e||t.has(d.id))continue;if(!i.seen.has(d.id)){if(n>=o){i.truncated=!0;continue}i.seen.add(d.id),i.queue.push({id:d.id,depth:n+1})}t.add(d.id),r.push(d.id);let c=i.predecessors.get(d.id);c===void 0&&(c=new Set,i.predecessors.set(d.id,c)),c.add(e)}return r}function te(e,n,s){let o=s.direction??"outgoing",i=s.maxDepth??Number.POSITIVE_INFINITY,t=[],r=new Map,d={seen:new Set([n]),queue:[{id:n,depth:0}],predecessors:new Map,truncated:!1},c=0;for(let a=0;a<d.queue.length;a+=1){s.signal?.throwIfAborted();let{id:u,depth:l}=d.queue[a];t.push(u);let f=e.neighborEdges(u,{direction:o,...s.kinds===void 0?{}:{kinds:s.kinds}});c+=f.meta.inspectedEdges,r.set(u,ne(u,l,f.value,i,d))}return{order:t,successors:r,predecessors:d.predecessors,inspectedEdges:c,truncated:d.truncated}}function oe(e,n){let s=[],o=new Set([n]),i=[{id:n,index:0}];for(;i.length>0;){let t=i.at(-1),r=e.successors.get(t.id);if(t.index<r.length){let d=r[t.index];t.index+=1,o.has(d)||(o.add(d),i.push({id:d,index:0}))}else s.push(t.id),i.pop()}return s.reverse()}function ie(e,n,s,o){let i=e,t=n;for(;i!==t;){for(;o.get(i)>o.get(t);)i=s.get(i);for(;o.get(t)>o.get(i);)t=s.get(t)}return i}function se(e,n,s){let o;for(let i of[...e].sort())n.has(i)&&(o=o===void 0?i:ie(o,i,n,s));return o}function re(e,n,s,o,i){let t=new Map([[n,n]]),r=!0;for(;r;){r=!1;for(let d of s){if(i?.throwIfAborted(),d===n)continue;let c=se(e.predecessors.get(d),t,o);c!==void 0&&t.get(d)!==c&&(t.set(d,c),r=!0)}}return t}function Se(e,n,s={}){if(!e.hasNode(n))throw new TypeError(`Relationship node not found: ${n}`);if(s.maxDepth!==void 0&&(!Number.isInteger(s.maxDepth)||s.maxDepth<0))throw new TypeError(`Invalid maxDepth bound: ${String(s.maxDepth)}`);let o=te(e,n,s),i=oe(o,n),t=new Map(i.map((a,u)=>[a,u])),r=re(o,n,i,t,s.signal),d=new Map(i.map(a=>[a,1]));for(let a=i.length-1;a>=0;a-=1){let u=i[a];if(u===n)continue;let l=r.get(u);d.set(l,d.get(l)+d.get(u))}let c=i.filter(a=>a!==n).map(a=>({id:a,idom:r.get(a),dominatedCount:d.get(a)-1})).sort((a,u)=>u.dominatedCount-a.dominatedCount||a.id.localeCompare(u.id));return{value:{root:n,reachableCount:o.order.length,rows:c},meta:{visitedNodes:o.order.length,inspectedEdges:o.inspectedEdges,truncated:o.truncated}}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="251ae2b0-10f4-528d-86b0-d224b126f8eb")}catch{}})();var de=25,S={error:0,warning:1,info:2};function E(e,n,s,o,i,t,r){let d=[...i].sort((c,a)=>c.localeCompare(a));return{code:e,severity:n,policy:s,message:o(d.length),count:d.length,sample:d.slice(0,t),sample_truncated:d.length>t,remediation:r}}function ce(e){let n=e.graph.registry(),s=new Map;for(let o of e.graph.edges()){let i=n.require(o.kind);if(!i.ordering)continue;let[t,r]=(i.precedence??"source_before_target")==="target_before_source"?[o.target,o.source]:[o.source,o.target],d=s.get(t);d?d.push(r):s.set(t,[r])}for(let o of s.values())o.sort((i,t)=>i.localeCompare(t));return s}function $(e,n){n.indexes.set(e,n.nextIndex),n.lowLinks.set(e,n.nextIndex),n.nextIndex+=1,n.stack.push(e),n.onStack.add(e)}function ae(e,n,s,o){let i=s.get(e.node)??[];if(e.neighborIndex>=i.length)return!1;let t=i[e.neighborIndex];return e.neighborIndex+=1,o.indexes.has(t)?o.onStack.has(t)&&o.lowLinks.set(e.node,Math.min(o.lowLinks.get(e.node),o.indexes.get(t))):($(t,o),n.push({node:t,neighborIndex:0})),!0}function ue(e,n,s,o){n.pop();let i=n.at(-1);if(i&&o.lowLinks.set(i.node,Math.min(o.lowLinks.get(i.node),o.lowLinks.get(e.node))),o.lowLinks.get(e.node)!==o.indexes.get(e.node))return;let t=[];for(;;){let r=o.stack.pop();if(o.onStack.delete(r),t.push(r),r===e.node)break}(t.length>1||t.length===1&&s.get(t[0])?.includes(t[0]))&&o.components.push(t.sort((r,d)=>r.localeCompare(d)))}function le(e){let n={indexes:new Map,lowLinks:new Map,onStack:new Set,stack:[],components:[],nextIndex:0},s=[...e.keys()].sort((o,i)=>o.localeCompare(i));for(let o of s){if(n.indexes.has(o))continue;let i=[{node:o,neighborIndex:0}];for($(o,n);i.length>0;){let t=i.at(-1);ae(t,i,e,n)||ue(t,i,e,n)}}return n.components.sort((o,i)=>o[0].localeCompare(i[0]))}function x(e){return`${e.holder_id} -> ${e.target_id} (${e.kind})`}function p(e,n,s,o,i,t,r,d){n.length!==0&&e.push(E(o,i,t,r,n,s,d))}function fe(e,n,s){let o=[],i=[...e.dangling.active,...e.dangling.legacy_terminal].filter(t=>!t.no_active_blocker_sentinel);return p(o,i.filter(t=>!n(t.holder_status)).map(x),s,"missing_reference_active","error","Active items must not reference absent targets; missing prerequisites distort scheduling.",t=>`${t} active dangling reference(s) to absent items`,"Restore or re-create the referenced item, or remove/retype the reference on the holder."),p(o,i.filter(t=>n(t.holder_status)).map(x),s,"missing_reference_terminal","info","Terminal items may retain historical references, but absent targets remain unexplainable context.",t=>`${t} terminal dangling reference(s) to absent items`,"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch."),p(o,e.dangling.no_active_blocker_sentinels.map(x),s,"legacy_no_blocker_sentinel","info","The pre-structured-dependency no-active-blocker sentinel is retired; real edges carry blocker state.",t=>`${t} legacy no-active-blocker sentinel reference(s)`,"Delete the sentinel reference; blocker state is derived from blocked_by edges."),o}function I(e,n){let s=n.get(e);return s?!s.terminal:!0}function ge(e,n,s,o){let i=[],t=ce(e);for(let c of le(t)){let a=c.some(u=>I(u,n));i.push(a?E("ordering_cycle","error","Order-bearing relationship kinds must stay acyclic; a cycle makes every member unschedulable.",u=>`execution-order cycle across ${u} item(s)`,c,o,"Remove or retype one ordering edge inside the cycle, or split the work so precedence is linear."):E("legacy_ordering_cycle","info","Ordering cycles between exclusively terminal items are historical contradictions with no scheduling effect.",u=>`terminal-only execution-order cycle across ${u} item(s)`,c,o,"Leave as history debt, or clean up in a dedicated changelog-safe closed-item batch; never repair closed items ad hoc."))}let r=new Map;for(let[c,a]of t)for(let u of a){let l=r.get(u);l?l.push(c):r.set(u,[c])}let d=[...n.values()].filter(c=>!c.missing&&!c.terminal&&s(c.status)&&!(r.get(c.id)??[]).some(a=>{let u=n.get(a);return u===void 0||!u.terminal})).map(c=>c.id);return p(i,d,o,"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`,"Re-open the missing prerequisite as an edge, or move the item back to an active status."),i}function pe(e){let n=e.edges.map(s=>s.kind).sort((s,o)=>s.localeCompare(o));return`${e.from} -> ${e.to} (${n.join(" + ")})`}function he(e){let n=e.graph.registry(),s=new Map;for(let i of e.graph.edges()){let t=n.require(i.kind);if(!_(t))continue;let r=k(i,t);if(r.from===r.to)continue;let d=`${w(t)}::${r.from}::${r.to}`,c=s.get(d);c?c.edges.push(i):s.set(d,{...r,edges:[i]})}let o=[...s.values()].filter(i=>i.edges.length>=2);for(let i of o)i.edges.sort((t,r)=>t.kind.localeCompare(r.kind));return o.sort((i,t)=>i.from.localeCompare(t.from)||i.to.localeCompare(t.to))}function me(e,n,s){let o=[],i=[];for(let r of he(e))(I(r.from,n)||I(r.to,n)?o:i).push(pe(r));let t=[];return p(t,o,s,"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.",r=>`${r} duplicated relationship(s) between active endpoints`,"Remove all but one stored spelling of the relationship; keep the canonical direction the holder declared first."),p(t,i,s,"legacy_duplicate_edge","info","Duplicated spellings between exclusively terminal items are historical noise with no scheduling effect.",r=>`${r} duplicated relationship(s) between terminal endpoints`,"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch."),t}function ye(e,n){let s=[],o=[];for(let t of e.duplicateRows??[])(t.legacy_terminal?o:s).push(`${t.holder_id} -> ${t.target_id} (${t.kind} x${t.occurrences})`);let i=[];return p(i,s,n,"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.",t=>`${t} 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."),p(i,o,n,"legacy_duplicate_dependency_row","info","Identical repeated dependency rows on terminal holders are historical storage noise with no scheduling effect.",t=>`${t} 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."),i}function be(e,n,s,o,i){e.active+=1;let t=n.type??"(untyped)",r=e.byType.get(t);r||(r={active:0,isolated:0,degree_leq_one:0},e.byType.set(t,r)),r.active+=1,!(s>1)&&(e.degreeLeqOne+=1,r.degree_leq_one+=1,s===0&&(e.isolated+=1,r.isolated+=1),!(o.has(n.id.toLowerCase())||i.has(t.toLowerCase()))&&(s===0?e.isolates.push(n.id):e.sparse.push(n.id)))}function _e(e,n,s,o,i,t){let r={active:0,missing:0,isolated:0,degreeLeqOne:0,isolates:[],sparse:[],byType:new Map};for(let u of e.graph.nodes()){let l=n.get(u);if(l){if(l.missing){r.missing+=1;continue}l.terminal||be(r,l,e.graph.incidentEdges(u).length,s,o)}}let{isolates:d,sparse:c}=r,a=[];return p(a,d,i,"isolated_active_node","warning","Active work should be reachable from the graph unless explicitly declared a valid isolate.",u=>`${u} active item(s) with no relationships`,"Link the item to its parent, prerequisite, or origin \u2014 or register it as an exempt isolate."),p(a,c,i,"sparse_active_node","info","Active items with a single edge often miss an honest semantic partner; sparse is not automatically defective.",u=>`${u} active item(s) with exactly one relationship`,"Investigate for an honest second edge (story->task, defect family, cross-epic complement); do not fabricate one."),{findings:a,profile:{nodes:e.graph.nodes().length,edges:e.graph.edges().length,edge_basis:"deduplicated_directed",edges_by_kind:Object.fromEntries(Object.entries(t).sort(([u],[l])=>u.localeCompare(l))),active_nodes:r.active,missing_nodes:r.missing,isolated_active_nodes:r.isolated,degree_leq_one_active_nodes:r.degreeLeqOne,coverage_by_type:Object.fromEntries([...r.byType.entries()].sort(([u],[l])=>u<l?-1:1))}}}function $e(e,n={}){let s=n.isTerminal??(l=>l==="closed"||l==="canceled"),o=n.isBlocked??(l=>l==="blocked"),i=n.maxSampleSize??de;if(!Number.isInteger(i)||i<1)throw new TypeError(`Invalid audit sample bound: ${String(n.maxSampleSize)}`);let t=new Set((n.exemptIsolates??[]).filter(l=>typeof l=="string").map(l=>l.trim().toLowerCase())),r=new Set((n.isolateExemptTypes??[]).filter(l=>typeof l=="string").map(l=>l.trim().toLowerCase())),d=new Map(e.details.map(l=>[l.id,{id:l.id,status:l.status,missing:e.missingIdSet.has(l.id.toLowerCase()),terminal:s(l.status),...l.type===void 0?{}:{type:l.type}}]));n.signal?.throwIfAborted();let c={};for(let l of e.graph.edges())c[l.kind]=(c[l.kind]??0)+1;let a=fe(e,s,i);n.signal?.throwIfAborted(),a.push(...ge(e,d,o,i)),n.signal?.throwIfAborted(),a.push(...me(e,d,i),...ye(e,i)),n.signal?.throwIfAborted();let u=_e(e,d,t,r,i,c);return a.push(...u.findings),a.sort((l,f)=>S[l.severity]-S[f.severity]||l.code.localeCompare(f.code)||l.sample[0].localeCompare(f.sample[0])),{findings:a,profile:u.profile}}function q(e,n){let s=[...new Set([...Object.keys(e),...Object.keys(n)])].sort(),o={};for(let i of s){let t=(n[i]??0)-(e[i]??0);t!==0&&(o[i]=t)}return o}function C(e){return e.profile.coverage_by_type??{}}function Me(e,n){let s={},o=C(e),i=C(n),t=[...new Set([...Object.keys(o),...Object.keys(i)])].sort();for(let r of t){let d=o[r],c=i[r],a={active:(c?.active??0)-(d?.active??0),isolated:(c?.isolated??0)-(d?.isolated??0),degree_leq_one:(c?.degree_leq_one??0)-(d?.degree_leq_one??0)};Object.values(a).some(u=>u!==0)&&(s[r]=a)}return{baseline_saved_at:e.saved_at,same_snapshot:e.fingerprint===n.fingerprint,affected_subjects_by_code:q(e.affected_subjects_by_code,n.affected_subjects_by_code),profile:{nodes:n.profile.nodes-e.profile.nodes,edges:n.profile.edges-e.profile.edges,active_nodes:n.profile.active_nodes-e.profile.active_nodes,missing_nodes:n.profile.missing_nodes-e.profile.missing_nodes,isolated_active_nodes:n.profile.isolated_active_nodes-e.profile.isolated_active_nodes,degree_leq_one_active_nodes:n.profile.degree_leq_one_active_nodes-e.profile.degree_leq_one_active_nodes,edges_by_kind:q(e.profile.edges_by_kind,n.profile.edges_by_kind),coverage_by_type:s}}}export{we as a,ve as b,ke as c,xe as d,Ee as e,Ie as f,Y as g,Ae as h,Ne as i,Se as j,le as k,pe as l,he as m,$e as n,Me as o};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c0fb747e-1f9f-55c4-808b-b77d3a881f87")}catch{}})();var M=5,L=1e4,P=8;function v(e,n){if(!Number.isFinite(n)||!Number.isInteger(n)||n<0)throw new TypeError(`Invalid path ${e} bound: ${String(n)}`)}function m(e,n){return n.hierarchyDirection==="target_parent"?e.target:e.source}function h(e,n){return(n.precedence??"source_before_target")==="target_before_source"?e.target:e.source}function we(e,n){let s=h(e,n);return{predecessor:s,successor:s===e.source?e.target:e.source}}function R(e,n,s){if(n===void 0)return;let o=e.registry(),i=new Set;for(let t of n){let r=o.require(t);if(!r[s])throw new TypeError(`Relationship kind ${r.kind} is not a ${s} kind`);i.add(r.kind)}return i}function j(e,n,s,o,i){let t=e.registry(),r=e.neighborEdges(n,{direction:"both",...s===void 0?{}:{kinds:[...s]}}),d=[],c=new Set;for(let a of r.value){let u=t.require(a.edge.kind);u[o]&&i(a,u,n)&&(c.has(a.id)||(c.add(a.id),d.push(a.id)))}return{neighbors:d,inspectedEdges:r.meta.inspectedEdges}}function F(e,n,s,o,i,t){if(n>=s)return e.neighbors.some(r=>!t.seen.has(r))&&(t.truncated=!0),!1;for(let r of e.neighbors)if(!t.seen.has(r)){if(t.seen.add(r),t.queue.push({id:r,depth:n+1}),!t.resumed){r===i&&(t.resumed=!0);continue}if(t.value.length>=o)return t.truncated=!0,!0;t.value.push(r)}return!1}function y(e,n,s,o,i){if(!e.hasNode(n))throw new TypeError(`Relationship node not found: ${n}`);let t=R(e,s.kinds,o),r=s.limit??Number.POSITIVE_INFINITY,d=s.maxDepth??Number.POSITIVE_INFINITY,c=s.after,a={seen:new Set([n]),value:[],queue:[{id:n,depth:0}],resumed:c===void 0,truncated:!1},u=0,l=0;for(let f=0;f<a.queue.length;f+=1){s.signal?.throwIfAborted();let g=a.queue[f];u+=1;let T=j(e,g.id,t,o,i);if(l+=T.inspectedEdges,F(T,g.depth,d,r,c,a))break}if(!a.resumed)throw new TypeError(`Traversal cursor not found in sequence: ${c}`);return{value:a.value,meta:{visitedNodes:u,inspectedEdges:l,truncated:a.truncated,nextCursor:a.value.at(-1)}}}function D(e,n){if(!e.hasNode(n))throw new TypeError(`Relationship node not found: ${n}`)}function A(e,n,s,o,i){let t=e.neighborEdges(n.nodes.at(-1),{direction:o,...s.kinds===void 0?{}:{kinds:s.kinds}});return i.inspectedEdges+=t.meta.inspectedEdges,t.value.filter(r=>!n.nodeSet.has(r.id))}function O(e,n,s,o,i,t,r){for(let d of A(e,n,o,i,r)){let c=[...n.nodes,d.id],a=new Set(n.nodeSet).add(d.id),u=[...n.edges,d.edge];if(d.id===s){if(r.value.push({nodes:c,edges:u,length:u.length}),r.value.length>=t)return!0}else r.queue.push({nodes:c,nodeSet:a,edges:u})}return!1}function ve(e,n,s={}){return y(e,n,s,"hierarchy",(o,i)=>m(o.edge,i)===o.id)}function ke(e,n,s={}){return y(e,n,s,"hierarchy",(o,i,t)=>m(o.edge,i)===t)}function xe(e,n,s={}){return y(e,n,s,"ordering",(o,i)=>h(o.edge,i)===o.id)}function Ee(e,n,s={}){return y(e,n,s,"ordering",(o,i,t)=>h(o.edge,i)===t)}function B(e,n,s,o,i,t,r,d){let c={value:[],queue:[{nodes:[n],nodeSet:new Set([n]),edges:[]}],inspectedEdges:0},a=0,u=!1,l=i+1;for(let f=0;f<c.queue.length;f+=1){if(o.signal?.throwIfAborted(),c.value.length>=l||a>=t){u=!0;break}let g=c.queue[f];if(a+=1,g.edges.length>=r){A(e,g,o,d,c).length>0&&(u=!0);continue}if(O(e,g,s,o,d,l,c)){u=!0;break}}return{value:c.value.slice(0,i),meta:{visitedNodes:a,inspectedEdges:c.inspectedEdges,truncated:u}}}function Ie(e,n,s,o={}){D(e,n),D(e,s);let i=o.maxPaths??M,t=o.maxVisitedPaths??L,r=o.maxDepth??P;v("maxPaths",i),v("maxVisitedPaths",t),v("maxDepth",r);let d=o.direction??"outgoing";o.signal?.throwIfAborted();for(let c of o.kinds??[])e.registry().require(c);return n===s?i===0?{value:[],meta:{visitedNodes:1,inspectedEdges:0,truncated:!0}}:{value:[{nodes:[n],edges:[],length:0}],meta:{visitedNodes:1,inspectedEdges:0,truncated:!1}}:B(e,n,s,o,i,t,r,d)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="24898402-1568-5b05-9072-f89dd91f25a6")}catch{}})();var U=16,K=2,V=8;function b(e,n){if(!Number.isInteger(n)||n<1)throw new TypeError(`Invalid ${e} bound: ${String(n)}`)}function Y(e,n,s){let o=e.registry(),i=n===void 0?void 0:new Set(n.map(t=>o.require(t).kind));for(let t of e.edges()){if(t.source===t.target)continue;let r=o.require(t.kind);i!==void 0&&!(i.has(r.kind)||r.inverse!==void 0&&i.has(r.inverse))||s(t,r)}}function X(e,n){let s=new Map;Y(e,n,o=>{N(s,o.source,o.target),N(s,o.target,o.source)});for(let o of s.values())o.sort();return s}function N(e,n,s){let o=e.get(n);o===void 0?e.set(n,[s]):o.push(s)}function H(e,n){let s=new Map;for(let t of e){let r=n.get(t);s.set(r,(s.get(r)??0)+1)}let o,i=0;for(let[t,r]of s)(r>i||r===i&&t<o)&&(o=t,i=r);return o}function W(e,n){let s=new Map;for(let[i,t]of e){let r=s.get(t);r===void 0?s.set(t,[i]):r.push(i)}let o=[];for(let i of s.values())i.length<n||(i.sort(),o.push({representative:i[0],size:i.length,members:i}));return o.sort((i,t)=>t.size-i.size||i.representative.localeCompare(t.representative))}function Ae(e,n={}){let s=n.maxIterations??U,o=n.minSize??K;b("maxIterations",s),b("minSize",o);let i=X(e,n.kinds),t=e.nodes(),r=new Map(t.map(l=>[l,l])),d=0,c=!1,a=0,u=0;for(;d<s&&!c;){n.signal?.throwIfAborted(),d+=1,c=!0;for(let l of t){a+=1;let f=i.get(l);if(f===void 0)continue;u+=f.length;let g=H(f,r);g!==r.get(l)&&(r.set(l,g),c=!1)}}return{value:{communities:W(r,o),iterations:d,converged:c},meta:{visitedNodes:a,inspectedEdges:u,truncated:!c}}}function _(e){return e.direction==="directed"&&(e.ordering||e.hierarchy)}function w(e){return e.inverse!==void 0&&e.inverse<e.kind?e.inverse:e.kind}function k(e,n){return(n.hierarchy?m(e,n):e.source===h(e,n)?e.target:e.source)===e.target?{from:e.source,to:e.target}:{from:e.target,to:e.source}}function G(e,n){if(n===void 0)return;let s=e.registry(),o=new Set;for(let i of n){let t=s.require(i);if(!_(t))throw new TypeError(`Relationship kind ${t.kind} is not a directed ordering or hierarchy kind`);o.add(w(t))}return o}function Z(e,n){let s=e.registry(),o=new Map;for(let i of e.edges()){let t=s.require(i.kind);if(!_(t))continue;let r=w(t);if(n!==void 0&&!n.has(r))continue;let d=k(i,t);if(d.from===d.to)continue;let c=o.get(r);c===void 0&&(c={adjacency:new Map,records:[]},o.set(r,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:i})}return o}function z(e){let n=new Map;for(let[s,o]of e.adjacency)n.set(s,[...o].sort());return n}function J(e,n,s,o){let i=[o];for(let t=s;t!==n;t=e.get(t))i.push(t);return i.push(n),i.reverse()}function Q(e,n,s,o,i,t){for(let r of e.get(s.id)??[])if(t.inspectedEdges+=1,!(s.depth===0&&r===n.to)&&!o.has(r)){if(o.set(r,s.id),r===n.to)return J(o,n.from,s.id,r);i.push({id:r,depth:s.depth+1})}}function ee(e,n,s,o){let i=new Map([[n.from,n.from]]),t=[{id:n.from,depth:0}];for(let r=0;r<t.length;r+=1){let d=t[r];if(o.visitedNodes+=1,d.depth>=s)continue;let c=Q(e,n,d,i,t,o);if(c!==void 0)return c}}function Ne(e,n={}){let s=n.maxDepth??V;b("maxDepth",s),n.limit!==void 0&&b("limit",n.limit);let o=n.limit??Number.POSITIVE_INFINITY,i=G(e,n.kinds),t=Z(e,i),r=[],d={visitedNodes:0,inspectedEdges:0},c=!1;e:for(let a of[...t.keys()].sort()){let u=t.get(a),l=z(u);for(let f of u.records){n.signal?.throwIfAborted();let g=ee(l,f,s,d);if(g!==void 0){if(r.length>=o){c=!0;break e}r.push({edge:f.edge,witness:g})}}}return{value:r,meta:{visitedNodes:d.visitedNodes,inspectedEdges:d.inspectedEdges,truncated:c}}}function ne(e,n,s,o,i){let t=new Set,r=[];for(let d of s){if(d.id===e||t.has(d.id))continue;if(!i.seen.has(d.id)){if(n>=o){i.truncated=!0;continue}i.seen.add(d.id),i.queue.push({id:d.id,depth:n+1})}t.add(d.id),r.push(d.id);let c=i.predecessors.get(d.id);c===void 0&&(c=new Set,i.predecessors.set(d.id,c)),c.add(e)}return r}function te(e,n,s){let o=s.direction??"outgoing",i=s.maxDepth??Number.POSITIVE_INFINITY,t=[],r=new Map,d={seen:new Set([n]),queue:[{id:n,depth:0}],predecessors:new Map,truncated:!1},c=0;for(let a=0;a<d.queue.length;a+=1){s.signal?.throwIfAborted();let{id:u,depth:l}=d.queue[a];t.push(u);let f=e.neighborEdges(u,{direction:o,...s.kinds===void 0?{}:{kinds:s.kinds}});c+=f.meta.inspectedEdges,r.set(u,ne(u,l,f.value,i,d))}return{order:t,successors:r,predecessors:d.predecessors,inspectedEdges:c,truncated:d.truncated}}function oe(e,n){let s=[],o=new Set([n]),i=[{id:n,index:0}];for(;i.length>0;){let t=i.at(-1),r=e.successors.get(t.id);if(t.index<r.length){let d=r[t.index];t.index+=1,o.has(d)||(o.add(d),i.push({id:d,index:0}))}else s.push(t.id),i.pop()}return s.reverse()}function ie(e,n,s,o){let i=e,t=n;for(;i!==t;){for(;o.get(i)>o.get(t);)i=s.get(i);for(;o.get(t)>o.get(i);)t=s.get(t)}return i}function se(e,n,s){let o;for(let i of[...e].sort())n.has(i)&&(o=o===void 0?i:ie(o,i,n,s));return o}function re(e,n,s,o,i){let t=new Map([[n,n]]),r=!0;for(;r;){r=!1;for(let d of s){if(i?.throwIfAborted(),d===n)continue;let c=se(e.predecessors.get(d),t,o);c!==void 0&&t.get(d)!==c&&(t.set(d,c),r=!0)}}return t}function Se(e,n,s={}){if(!e.hasNode(n))throw new TypeError(`Relationship node not found: ${n}`);if(s.maxDepth!==void 0&&(!Number.isInteger(s.maxDepth)||s.maxDepth<0))throw new TypeError(`Invalid maxDepth bound: ${String(s.maxDepth)}`);let o=te(e,n,s),i=oe(o,n),t=new Map(i.map((a,u)=>[a,u])),r=re(o,n,i,t,s.signal),d=new Map(i.map(a=>[a,1]));for(let a=i.length-1;a>=0;a-=1){let u=i[a];if(u===n)continue;let l=r.get(u);d.set(l,d.get(l)+d.get(u))}let c=i.filter(a=>a!==n).map(a=>({id:a,idom:r.get(a),dominatedCount:d.get(a)-1})).sort((a,u)=>u.dominatedCount-a.dominatedCount||a.id.localeCompare(u.id));return{value:{root:n,reachableCount:o.order.length,rows:c},meta:{visitedNodes:o.order.length,inspectedEdges:o.inspectedEdges,truncated:o.truncated}}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="76fa19c7-a421-5026-8de8-450285987c4e")}catch{}})();var de=25,S={error:0,warning:1,info:2};function E(e,n,s,o,i,t,r){let d=[...i].sort((c,a)=>c.localeCompare(a));return{code:e,severity:n,policy:s,message:o(d.length),count:d.length,sample:d.slice(0,t),sample_truncated:d.length>t,remediation:r}}function ce(e){let n=e.graph.registry(),s=new Map;for(let o of e.graph.edges()){let i=n.require(o.kind);if(!i.ordering)continue;let[t,r]=(i.precedence??"source_before_target")==="target_before_source"?[o.target,o.source]:[o.source,o.target],d=s.get(t);d?d.push(r):s.set(t,[r])}for(let o of s.values())o.sort((i,t)=>i.localeCompare(t));return s}function q(e,n){n.indexes.set(e,n.nextIndex),n.lowLinks.set(e,n.nextIndex),n.nextIndex+=1,n.stack.push(e),n.onStack.add(e)}function ae(e,n,s,o){let i=s.get(e.node)??[];if(e.neighborIndex>=i.length)return!1;let t=i[e.neighborIndex];return e.neighborIndex+=1,o.indexes.has(t)?o.onStack.has(t)&&o.lowLinks.set(e.node,Math.min(o.lowLinks.get(e.node),o.indexes.get(t))):(q(t,o),n.push({node:t,neighborIndex:0})),!0}function ue(e,n,s,o){n.pop();let i=n.at(-1);if(i&&o.lowLinks.set(i.node,Math.min(o.lowLinks.get(i.node),o.lowLinks.get(e.node))),o.lowLinks.get(e.node)!==o.indexes.get(e.node))return;let t=[];for(;;){let r=o.stack.pop();if(o.onStack.delete(r),t.push(r),r===e.node)break}(t.length>1||t.length===1&&s.get(t[0])?.includes(t[0]))&&o.components.push(t.sort((r,d)=>r.localeCompare(d)))}function le(e){let n={indexes:new Map,lowLinks:new Map,onStack:new Set,stack:[],components:[],nextIndex:0},s=[...e.keys()].sort((o,i)=>o.localeCompare(i));for(let o of s){if(n.indexes.has(o))continue;let i=[{node:o,neighborIndex:0}];for(q(o,n);i.length>0;){let t=i.at(-1);ae(t,i,e,n)||ue(t,i,e,n)}}return n.components.sort((o,i)=>o[0].localeCompare(i[0]))}function x(e){return`${e.holder_id} -> ${e.target_id} (${e.kind})`}function p(e,n,s,o,i,t,r,d){n.length!==0&&e.push(E(o,i,t,r,n,s,d))}function fe(e,n,s){let o=[],i=[...e.dangling.active,...e.dangling.legacy_terminal].filter(t=>!t.no_active_blocker_sentinel);return p(o,i.filter(t=>!n(t.holder_status)).map(x),s,"missing_reference_active","error","Active items must not reference absent targets; missing prerequisites distort scheduling.",t=>`${t} active dangling reference(s) to absent items`,"Restore or re-create the referenced item, or remove/retype the reference on the holder."),p(o,i.filter(t=>n(t.holder_status)).map(x),s,"missing_reference_terminal","info","Terminal items may retain historical references, but absent targets remain unexplainable context.",t=>`${t} terminal dangling reference(s) to absent items`,"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch."),p(o,e.dangling.no_active_blocker_sentinels.map(x),s,"legacy_no_blocker_sentinel","info","The pre-structured-dependency no-active-blocker sentinel is retired; real edges carry blocker state.",t=>`${t} legacy no-active-blocker sentinel reference(s)`,"Delete the sentinel reference; blocker state is derived from blocked_by edges."),o}function I(e,n){let s=n.get(e);return s?!s.terminal:!0}function ge(e,n,s,o){let i=[],t=ce(e);for(let c of le(t)){let a=c.some(u=>I(u,n));i.push(a?E("ordering_cycle","error","Order-bearing relationship kinds must stay acyclic; a cycle makes every member unschedulable.",u=>`execution-order cycle across ${u} item(s)`,c,o,"Remove or retype one ordering edge inside the cycle, or split the work so precedence is linear."):E("legacy_ordering_cycle","info","Ordering cycles between exclusively terminal items are historical contradictions with no scheduling effect.",u=>`terminal-only execution-order cycle across ${u} item(s)`,c,o,"Leave as history debt, or clean up in a dedicated changelog-safe closed-item batch; never repair closed items ad hoc."))}let r=new Map;for(let[c,a]of t)for(let u of a){let l=r.get(u);l?l.push(c):r.set(u,[c])}let d=[...n.values()].filter(c=>!c.missing&&!c.terminal&&s(c.status)&&!(r.get(c.id)??[]).some(a=>{let u=n.get(a);return u===void 0||!u.terminal})).map(c=>c.id);return p(i,d,o,"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.'),i}function pe(e){let n=e.edges.map(s=>s.kind).sort((s,o)=>s.localeCompare(o));return`${e.from} -> ${e.to} (${n.join(" + ")})`}function he(e){let n=e.graph.registry(),s=new Map;for(let i of e.graph.edges()){let t=n.require(i.kind);if(!_(t))continue;let r=k(i,t);if(r.from===r.to)continue;let d=`${w(t)}::${r.from}::${r.to}`,c=s.get(d);c?c.edges.push(i):s.set(d,{...r,edges:[i]})}let o=[...s.values()].filter(i=>i.edges.length>=2);for(let i of o)i.edges.sort((t,r)=>t.kind.localeCompare(r.kind));return o.sort((i,t)=>i.from.localeCompare(t.from)||i.to.localeCompare(t.to))}function me(e,n,s){let o=[],i=[];for(let r of he(e))(I(r.from,n)||I(r.to,n)?o:i).push(pe(r));let t=[];return p(t,o,s,"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.",r=>`${r} duplicated relationship(s) between active endpoints`,"Remove all but one stored spelling of the relationship; keep the canonical direction the holder declared first."),p(t,i,s,"legacy_duplicate_edge","info","Duplicated spellings between exclusively terminal items are historical noise with no scheduling effect.",r=>`${r} duplicated relationship(s) between terminal endpoints`,"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch."),t}function ye(e,n){let s=[],o=[];for(let t of e.duplicateRows??[])(t.legacy_terminal?o:s).push(`${t.holder_id} -> ${t.target_id} (${t.kind} x${t.occurrences})`);let i=[];return p(i,s,n,"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.",t=>`${t} 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."),p(i,o,n,"legacy_duplicate_dependency_row","info","Identical repeated dependency rows on terminal holders are historical storage noise with no scheduling effect.",t=>`${t} 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."),i}function be(e,n,s,o,i){e.active+=1;let t=n.type??"(untyped)",r=e.byType.get(t);r||(r={active:0,isolated:0,degree_leq_one:0},e.byType.set(t,r)),r.active+=1,!(s>1)&&(e.degreeLeqOne+=1,r.degree_leq_one+=1,s===0&&(e.isolated+=1,r.isolated+=1),!(o.has(n.id.toLowerCase())||i.has(t.toLowerCase()))&&(s===0?e.isolates.push(n.id):e.sparse.push(n.id)))}function _e(e,n,s,o,i,t){let r={active:0,missing:0,isolated:0,degreeLeqOne:0,isolates:[],sparse:[],byType:new Map};for(let u of e.graph.nodes()){let l=n.get(u);if(l){if(l.missing){r.missing+=1;continue}l.terminal||be(r,l,e.graph.incidentEdges(u).length,s,o)}}let{isolates:d,sparse:c}=r,a=[];return p(a,d,i,"isolated_active_node","warning","Active work should be reachable from the graph unless explicitly declared a valid isolate.",u=>`${u} active item(s) with no relationships`,"Link the item to its parent, prerequisite, or origin \u2014 or register it as an exempt isolate."),p(a,c,i,"sparse_active_node","info","Active items with a single edge often miss an honest semantic partner; sparse is not automatically defective.",u=>`${u} active item(s) with exactly one relationship`,"Investigate for an honest second edge (story->task, defect family, cross-epic complement); do not fabricate one."),{findings:a,profile:{nodes:e.graph.nodes().length,edges:e.graph.edges().length,edge_basis:"deduplicated_directed",edges_by_kind:Object.fromEntries(Object.entries(t).sort(([u],[l])=>u.localeCompare(l))),active_nodes:r.active,missing_nodes:r.missing,isolated_active_nodes:r.isolated,degree_leq_one_active_nodes:r.degreeLeqOne,coverage_by_type:Object.fromEntries([...r.byType.entries()].sort(([u],[l])=>u<l?-1:1))}}}function qe(e,n={}){let s=n.isTerminal??(l=>l==="closed"||l==="canceled"),o=n.isBlocked??(l=>l==="blocked"),i=n.maxSampleSize??de;if(!Number.isInteger(i)||i<1)throw new TypeError(`Invalid audit sample bound: ${String(n.maxSampleSize)}`);let t=new Set((n.exemptIsolates??[]).filter(l=>typeof l=="string").map(l=>l.trim().toLowerCase())),r=new Set((n.isolateExemptTypes??[]).filter(l=>typeof l=="string").map(l=>l.trim().toLowerCase())),d=new Map(e.details.map(l=>[l.id,{id:l.id,status:l.status,missing:e.missingIdSet.has(l.id.toLowerCase()),terminal:s(l.status),...l.type===void 0?{}:{type:l.type}}]));n.signal?.throwIfAborted();let c={};for(let l of e.graph.edges())c[l.kind]=(c[l.kind]??0)+1;let a=fe(e,s,i);n.signal?.throwIfAborted(),a.push(...ge(e,d,o,i)),n.signal?.throwIfAborted(),a.push(...me(e,d,i),...ye(e,i)),n.signal?.throwIfAborted();let u=_e(e,d,t,r,i,c);return a.push(...u.findings),a.sort((l,f)=>S[l.severity]-S[f.severity]||l.code.localeCompare(f.code)||l.sample[0].localeCompare(f.sample[0])),{findings:a,profile:u.profile}}function C(e,n){let s=[...new Set([...Object.keys(e),...Object.keys(n)])].sort(),o={};for(let i of s){let t=(n[i]??0)-(e[i]??0);t!==0&&(o[i]=t)}return o}function $(e){return e.profile.coverage_by_type??{}}function Me(e,n){let s={},o=$(e),i=$(n),t=[...new Set([...Object.keys(o),...Object.keys(i)])].sort();for(let r of t){let d=o[r],c=i[r],a={active:(c?.active??0)-(d?.active??0),isolated:(c?.isolated??0)-(d?.isolated??0),degree_leq_one:(c?.degree_leq_one??0)-(d?.degree_leq_one??0)};Object.values(a).some(u=>u!==0)&&(s[r]=a)}return{baseline_saved_at:e.saved_at,same_snapshot:e.fingerprint===n.fingerprint,affected_subjects_by_code:C(e.affected_subjects_by_code,n.affected_subjects_by_code),profile:{nodes:n.profile.nodes-e.profile.nodes,edges:n.profile.edges-e.profile.edges,active_nodes:n.profile.active_nodes-e.profile.active_nodes,missing_nodes:n.profile.missing_nodes-e.profile.missing_nodes,isolated_active_nodes:n.profile.isolated_active_nodes-e.profile.isolated_active_nodes,degree_leq_one_active_nodes:n.profile.degree_leq_one_active_nodes-e.profile.degree_leq_one_active_nodes,edges_by_kind:C(e.profile.edges_by_kind,n.profile.edges_by_kind),coverage_by_type:s}}}export{we as a,ve as b,ke as c,xe as d,Ee as e,Ie as f,Y as g,Ae as h,Ne as i,Se as j,le as k,pe as l,he as m,qe as n,Me as o};
|
|
2
|
+
//# sourceMappingURL=chunk-NE5VRDAI.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as d,C as u}from"./chunk-GE4KCSZP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="a7ae3c89-b50b-5e4f-8273-8318bc976d84")}catch{}})();var y=Object.freeze({requireCloseReason:!0,orderingEdges:"preserve"});function f(e){let o=[{source:"explicit",value:e.explicit},{source:"duplicate",value:e.duplicateOf===void 0?void 0:`Duplicate of ${e.duplicateOf}`},{source:"resolution",value:e.resolution},{source:"message",value:e.message}];for(let s of o){let n=s.value?.trim();if(n)return{closeReason:n,source:s.source}}return{source:"none"}}function _(e,o){return g(e,o,{operation:"close"})}function g(e,o,s){let n=f(e);if(!o||n.closeReason!==void 0)return n;let c=s.operation==="create"?[`pm create --title "<title>" --type <type> --status ${s.status??"closed"} --close-reason "<closing summary>"`,`pm create --title "<title>" --type <type> --status ${s.status??"closed"} --resolution "<resolution summary>"`,"pm create --stdin-json < item.json"]:['pm close <id> "Done: <what changed and why>"','pm close <id> --reason "<closing summary>"','pm close <id> -m "<closing summary>"',"pm close <id> --duplicate-of <canonical-id>"];throw new u("Close reason text is required because governance.require_close_reason is enabled",d.USAGE,{code:"close_reason_required",required:"Provide an author-controlled closing summary as the reason, message, resolution, or duplicate target.",why:"governance.require_close_reason is enabled, so tools must not invent immutable closure evidence.",examples:c,nextSteps:[`Re-run the ${s.operation} operation with a closing summary.`,"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled"]})}function h(e,o){let s=typeof e.blocked_by=="string"?e.blocked_by.trim():"",n=e.blocked_by!==void 0,c=e.dependencies??[],l=c.filter(r=>r.kind==="blocked_by"),a=e.blocked_reason!==void 0,i=[];if(n&&(delete e.blocked_by,i.push("blocked_by")),a&&(delete e.blocked_reason,i.push("blocked_reason")),o.orderingEdges==="remove"&&l.length>0){let r=c.filter(p=>p.kind!=="blocked_by");r.length>0?e.dependencies=r:delete e.dependencies,i.push("dependencies")}let t=[...new Set([...s?[s]:[],...l.map(r=>r.id)])];return t.length===0?{changedFields:i,warnings:[]}:{changedFields:i,warnings:[o.orderingEdges==="preserve"?`closed_preserved_predecessors:${e.id}:${t.join(",")}`:`closed_removed_predecessors:${e.id}:${t.join(",")}`]}}export{y as a,f as b,_ as c,g as d,h as e};
|
|
2
|
+
//# sourceMappingURL=chunk-NY4T3JWN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o,p as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{o,p as s}from"./chunk-4VN6GS4U.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]="c4c82f8f-7890-5ed2-8f0f-a82ba42cf807")}catch{}})();async function f(e,t,n){let d=await o(e,t,n,{metadataKey:"docs",op:"docs_add",bareNoun:"doc",supportsAppendStable:!1});return s(d,"docs")}export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OMXVBQ2N.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as z,c as N,e as M,f as x,g as G,h as p,i as _,j as b,l as H,m as w,o as U,p as k}from"./chunk-LN2WFEU4.js";import{Z as V,z as j}from"./chunk-A62CYISG.js";import{A as v,Af as P,C as R,Cc as I,La as C,Oa as D,Re as y,Ue as L,b as F,oc as O}from"./chunk-GE4KCSZP.js";import{Option as X}from"commander";(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]="e520de00-0810-5356-9290-324cf1d3c133")}catch{}})();async function ue(e,t,r,n,i){let s=C(process.cwd(),n.path),l=await I("command_result",{command:e,args:t,options:r,global:n,pm_root:s,result:i});return l.handled?l.result:i}function de(e,t){for(let[r,n]of Object.entries(t))e.setOptionValueWithSource(r,n,"cli")}function q(e,t){let r=[],n=new Set;for(let i of t.keys){if(!Object.hasOwn(e,i))continue;let s=e[i];if(s!=null){if(typeof s=="string"){r.push(s);continue}if(!Array.isArray(s)||!s.every(l=>typeof l=="string"))return;n.has(s)||(n.add(s),r.push(...s))}}return r.length>0?r.join("; "):void 0}var B=Symbol("pm.resolvedGlobalOptions");function K(e){return typeof e=="object"&&e!==null?e:{}}function u(e,t){return e.find(n=>n.target===t)??{target:t,keys:[t]}}function fe(e,t){e[B]={...t}}function me(e){delete e[B]}function E(e,t){return typeof e[t]=="string"?e[t]:void 0}function pe(e){let t=Q(e),r=e[B];if(r)return{...r,...t.length>0?{command:t}:{}};let n=K(e),i=typeof n.optsWithGlobals=="function"?n.optsWithGlobals():typeof n.opts=="function"?n.opts():{};return{json:i.json===!0?!0:void 0,quiet:!!i.quiet,noChangedFields:i.changedFields===!1,...i.fullChangedFields===!0?{fullChangedFields:!0}:{},idOnly:i.idOnly===!0,...i.lean===!0?{lean:!0}:{},...i.tokenAccounting===!0?{tokenAccounting:!0}:{},outputInclude:E(i,"outputInclude"),outputLimit:E(i,"outputLimit"),outputBudget:E(i,"outputBudget"),...i.outputFormat==="toon"||i.outputFormat==="json"?{outputFormat:i.outputFormat}:{},path:typeof i.pmPath=="string"?i.pmPath:typeof i.path=="string"?i.path:void 0,noExtensions:i.extensions===!1,noPager:!!i.noPager,profile:!!i.profile,...t.length>0?{command:t}:{},...typeof i.author=="string"?{author:i.author}:{}}}function Q(e){let t=[],r=e;for(;r?.parent;)t.unshift(r.name()),r=r.parent;return t.join(" ")}async function ge(e){if(e.json===!0)return e;let t=C(process.cwd(),e.path);if(!await F(D(t)))return e;let r=await P(t);return{...e,defaultOutputFormat:r.output.default_format}}function Z(e,t){let r=t??[];return r.push(e),r}function d(e,t,r){if(typeof r!="string")return;let n=r.trim();n.length!==0&&e.push(t,n)}function f(e,t,r){r===!0&&e.push(t)}function h(e,t,r){if(Array.isArray(r))for(let n of r){if(typeof n!="string")continue;let i=n.trim();i.length!==0&&e.push(t,i)}}function a(e,t){return e[t]===!0?!0:void 0}function m(e,t){return e[t]===!1?!0:void 0}function ye(e,t){return typeof e[t]=="string"?e[t]:void 0}function ee(e,t,r,n=!1,i=void 0){let s=new X(t,r).hideHelp();n&&s.argParser(i??Z),e.addOption(s)}function he(e,t,r){for(let[n,i]of t)ee(e,n,i,r)}function J(e,t){return t.some(r=>e[r]===!0)?!0:void 0}function W(e,t){let r=_(e,t);return typeof r=="string"||typeof r=="number"&&Number.isFinite(r)?r:void 0}function T(e,t){for(let[r,n]of Object.entries(t))r==="__proto__"||r==="constructor"||r==="prototype"||Object.hasOwn(e,r)||(e[r]=n)}function Ae(e,t){let r=["test",e,"--run","--json","--progress"];return h(r,"--add",t.add),h(r,"--add-json",t.addJson),h(r,"--remove",t.remove),d(r,"--match",t.match),d(r,"--only-index",t.onlyIndex),f(r,"--only-last",t.onlyLast),h(r,"--measure",t.measure),d(r,"--metric-below",t.metricBelow),d(r,"--metric-diff",t.metricDiff),$(r,t),d(r,"--author",t.author),d(r,"--message",t.message),f(r,"--force",t.force),r}function $(e,t){d(e,"--timeout",t.timeout),h(e,"--env-set",t.envSet),h(e,"--env-clear",t.envClear),f(e,"--shared-host-safe",t.sharedHostSafe),d(e,"--pm-context",t.pmContext),f(e,"--override-linked-pm-context",t.overrideLinkedPmContext),f(e,"--fail-on-context-mismatch",t.failOnContextMismatch),f(e,"--fail-on-skipped",t.failOnSkipped),f(e,"--fail-on-empty-test-run",t.failOnEmptyTestRun),f(e,"--require-assertions-for-pm",t.requireAssertionsForPm),f(e,"--check-context",t.checkContext),f(e,"--auto-pm-context",t.autoPmContext)}function ve(e){let t=["test-all","--json","--progress"];return d(t,"--status",e.status),d(t,"--limit",e.limit),d(t,"--offset",e.offset),$(t,e),t}function te(e){return e.join(",")}function Re(e,t={}){let r=l=>p(e,u(H,l)),n=l=>b(e,u(w,l)),i=r("type");if(t.requireType!==!1&&i===void 0)throw new R("Missing required option --type <value>. Why required: create resolves runtime schema fields/workflow from item type. Retry: add --type <built-in or configured custom type> (example: --type Task).",v.USAGE);let s={title:r("title"),description:r("description"),type:i,template:r("template"),createMode:r("createMode"),schedulePreset:r("schedulePreset"),status:r("status"),closeReason:r("closeReason"),completedAt:r("completedAt"),priority:r("priority"),tags:r("tags"),addTags:n("addTags"),body:r("body"),deadline:r("deadline"),estimatedMinutes:r("estimatedMinutes"),acceptanceCriteria:q(e,u(w,"acceptanceCriteria")),definitionOfReady:r("definitionOfReady"),order:r("order"),rank:r("rank"),goal:r("goal"),objective:r("objective"),value:r("value"),impact:r("impact"),outcome:r("outcome"),whyNow:r("whyNow"),author:r("author"),message:r("message"),assignee:r("assignee"),parent:r("parent"),allowMissingParent:J(e,["allowMissingParent","allow_missing_parent"])===!0,allowDuplicate:a(e,"allowDuplicate")===!0,reviewer:r("reviewer"),risk:r("risk"),confidence:r("confidence"),sprint:r("sprint"),release:r("release"),blockedBy:r("blockedBy"),blockedReason:r("blockedReason"),unblockNote:r("unblockNote"),reporter:r("reporter"),severity:r("severity"),environment:r("environment"),reproSteps:r("reproSteps"),resolution:r("resolution"),expectedResult:r("expectedResult"),actualResult:r("actualResult"),affectedVersion:r("affectedVersion"),fixedVersion:r("fixedVersion"),component:r("component"),regression:e.regression===!0?"true":r("regression"),customerImpact:r("customerImpact"),dep:n("dep"),comment:n("comment"),note:n("note"),learning:n("learning"),file:n("file"),test:n("test"),doc:n("doc"),reminder:n("reminder"),event:n("event"),typeOption:n("typeOption"),field:n("field"),unset:n("unset"),clearDeps:a(e,"clearDeps"),clearComments:a(e,"clearComments"),clearNotes:a(e,"clearNotes"),clearLearnings:a(e,"clearLearnings"),clearFiles:a(e,"clearFiles"),clearTests:a(e,"clearTests"),clearDocs:a(e,"clearDocs"),clearReminders:a(e,"clearReminders"),clearEvents:a(e,"clearEvents"),clearTypeOptions:a(e,"clearTypeOptions")};return T(s,e),s}function Ce(e){let t=i=>p(e,u(U,i)),r=i=>b(e,u(k,i)),n={title:t("title"),description:t("description"),body:t("body"),status:t("status"),closeReason:t("closeReason"),priority:t("priority"),type:t("type"),tags:t("tags"),addTags:r("addTags"),removeTags:r("removeTags"),deadline:t("deadline"),estimatedMinutes:t("estimatedMinutes"),acceptanceCriteria:q(e,u(k,"acceptanceCriteria")),addAc:r("addAc"),removeAc:r("removeAc"),definitionOfReady:t("definitionOfReady"),order:t("order"),rank:t("rank"),goal:t("goal"),objective:t("objective"),value:t("value"),impact:t("impact"),outcome:t("outcome"),whyNow:t("whyNow"),author:t("author"),message:t("message"),force:!!e.force,ownershipMetadataBypass:e.ownershipMetadataBypass===!0?!0:void 0,ownershipDependencyBypass:e.ownershipDependencyBypass===!0?!0:void 0,assignee:t("assignee"),parent:t("parent"),reviewer:t("reviewer"),risk:t("risk"),confidence:t("confidence"),sprint:t("sprint"),release:t("release"),blockedBy:t("blockedBy"),blockedReason:t("blockedReason"),unblockNote:t("unblockNote"),reporter:t("reporter"),severity:t("severity"),environment:t("environment"),reproSteps:t("reproSteps"),resolution:t("resolution"),expectedResult:t("expectedResult"),actualResult:t("actualResult"),affectedVersion:t("affectedVersion"),fixedVersion:t("fixedVersion"),component:t("component"),regression:e.regression===!0?"true":t("regression"),customerImpact:t("customerImpact"),dep:r("dep"),depRemove:r("depRemove"),replaceDeps:a(e,"replaceDeps"),replaceTests:a(e,"replaceTests"),replaceFiles:a(e,"replaceFiles"),replaceDocs:a(e,"replaceDocs"),comment:r("comment"),note:r("note"),learning:r("learning"),file:r("file"),test:r("test"),doc:r("doc"),reminder:r("reminder"),event:r("event"),typeOption:r("typeOption"),field:r("field"),unset:r("unset"),clearDeps:a(e,"clearDeps"),clearComments:a(e,"clearComments"),clearNotes:a(e,"clearNotes"),clearLearnings:a(e,"clearLearnings"),clearFiles:a(e,"clearFiles"),clearTests:a(e,"clearTests"),clearDocs:a(e,"clearDocs"),clearReminders:a(e,"clearReminders"),clearEvents:a(e,"clearEvents"),clearTypeOptions:a(e,"clearTypeOptions")};return T(n,e),n}var re=new Set(["filterStatus","filterType","filterTag","filterPriority","filterDeadlineBefore","filterDeadlineAfter","filterUpdatedAfter","filterUpdatedBefore","filterCreatedAfter","filterCreatedBefore","filterAssignee","filterAssigneeFilter","filterAssignee_filter","filterParent","filterSprint","filterRelease","filterAcMissing","filterEstimatesMissing","filterEstimateMissing","filterResolutionMissing","filterMetadataMissing","filterReviewerMissing","filterRiskMissing","filterConfidenceMissing","filterSprintMissing","filterReleaseMissing","filterHasNotes","filterNoNotes","filterHasLearnings","filterNoLearnings","filterHasFiles","filterNoFiles","filterHasDocs","filterNoDocs","filterHasTests","filterNoTests","filterHasComments","filterNoComments","filterHasDeps","filterNoDeps","filterHasBody","filterEmptyBody","filterHasLinkedCommand","filterNoLinkedCommand","ids","limit","offset","dryRun","rollback","checkpoint"]);function Te(e){let t={};for(let[r,n]of Object.entries(e))re.has(r)||(t[r]=n);return t}function o(e,t){let r=u(z,t),n=p(e,r);if(n!==void 0)return n;for(let i of r.keys){let s=e[i];if(Array.isArray(s)){let l=s.filter(c=>typeof c=="string");if(l.length>0)return l.join(",")}if(t==="ids"&&typeof s=="string")return s;if(typeof s=="number"&&Number.isFinite(s))return String(s)}}function Y(e){let t=a(e,"filterFilesMissing"),r=a(e,"filterDocsMissing");return{filterReviewerMissing:a(e,"filterReviewerMissing"),filterRiskMissing:a(e,"filterRiskMissing"),filterConfidenceMissing:a(e,"filterConfidenceMissing"),filterSprintMissing:a(e,"filterSprintMissing"),filterReleaseMissing:a(e,"filterReleaseMissing"),hasNotes:a(e,"hasNotes"),hasLearnings:a(e,"hasLearnings"),hasFiles:a(e,"hasFiles"),hasDocs:a(e,"hasDocs"),hasTests:a(e,"hasTests"),hasComments:a(e,"hasComments"),hasDeps:a(e,"hasDeps"),hasBody:a(e,"hasBody"),hasLinkedCommand:a(e,"hasLinkedCommand"),noNotes:m(e,"notes"),noLearnings:m(e,"learnings"),noFiles:m(e,"files")??t,filterFilesMissing:t,noDocs:m(e,"docs")??r,filterDocsMissing:r,noTests:m(e,"tests"),noComments:m(e,"comments"),noDeps:m(e,"deps"),emptyBody:a(e,"emptyBody"),noLinkedCommand:m(e,"linkedCommand")}}function Se(e){let t={status:o(e,"status"),type:o(e,"type"),tag:o(e,"tag"),priority:o(e,"priority"),deadlineBefore:o(e,"deadlineBefore"),deadlineAfter:o(e,"deadlineAfter"),updatedAfter:o(e,"updatedAfter"),updatedBefore:o(e,"updatedBefore"),createdAfter:o(e,"createdAfter"),createdBefore:o(e,"createdBefore"),today:a(e,"today"),recent:a(e,"recent"),ids:o(e,"ids"),assignee:o(e,"assignee"),assigneeFilter:o(e,"assigneeFilter"),parent:o(e,"parent"),sprint:o(e,"sprint"),release:o(e,"release"),limit:o(e,"limit"),offset:o(e,"offset"),noTruncate:m(e,"truncate"),includeBody:a(e,"includeBody"),strictRead:a(e,"strictRead"),compact:a(e,"compact"),brief:a(e,"brief"),full:a(e,"full"),fields:o(e,"fields"),sort:o(e,"sort"),order:o(e,"order"),tree:a(e,"tree"),treeDepth:o(e,"treeDepth"),filterAcMissing:a(e,"filterAcMissing"),filterEstimatesMissing:J(e,["filterEstimatesMissing","filterEstimateMissing"]),filterResolutionMissing:a(e,"filterResolutionMissing"),filterMetadataMissing:a(e,"filterMetadataMissing"),...Y(e)};return T(t,e),t}function Oe(e){return{groupBy:typeof e.groupBy=="string"?e.groupBy:void 0,count:e.count===!0?!0:void 0,completion:e.completion===!0?!0:void 0,sum:typeof e.sum=="string"?e.sum:void 0,avg:typeof e.avg=="string"?e.avg:void 0,includeUnparented:e.includeUnparented===!0||e.include_unparented===!0,status:typeof e.status=="string"?e.status:void 0,type:o(e,"type"),tag:o(e,"tag"),priority:o(e,"priority"),deadlineBefore:o(e,"deadlineBefore"),deadlineAfter:o(e,"deadlineAfter"),assignee:o(e,"assignee"),assigneeFilter:o(e,"assigneeFilter"),parent:o(e,"parent"),sprint:o(e,"sprint"),release:o(e,"release")}}function Ne(e,t,r){if(O(t),r.quiet)return;let n=Array.isArray(t.warnings)?t.warnings:[],i={type:"meta",command:e,count:t.count,now:t.now,filters:t.filters};if(n.length>0&&(i.warnings=n),!!y(`${JSON.stringify(i)}
|
|
2
|
+
`)){for(let s of t.items)if(!y(`${JSON.stringify({type:"item",command:e,item:s})}
|
|
3
|
+
`))return;y(`${JSON.stringify({type:"end",command:e,count:t.count})}
|
|
4
|
+
`)}}function Me(e,t,r){if(O(e),r.quiet)return;let n={type:"meta",command:"activity",count:e.count,filters:{id:t.id??null,op:t.op??null,author:t.author??null,from:t.from??null,to:t.to??null,limit:t.limit??null}};if(!y(`${JSON.stringify(n)}
|
|
5
|
+
`))return;let i=e.compact&&e.compact_activity?e.compact_activity:e.activity??[];for(let s of i)if(!y(`${JSON.stringify({type:"entry",command:"activity",entry:s})}
|
|
6
|
+
`))return;y(`${JSON.stringify({type:"end",command:"activity",count:e.count})}
|
|
7
|
+
`)}function xe(e){let t=S=>p(e,u(N,S)),r=S=>{let A=_(e,u(N,S));if(typeof A=="string"||typeof A=="number"&&Number.isFinite(A))return A},n=t("fields"),i=e.compact===!0,s=e.full===!0,l=!i&&!s&&n===void 0,g={mode:e.semantic===!0?"semantic":e.hybrid===!0?"hybrid":t("mode"),matchMode:t("matchMode"),minScore:r("minScore"),count:a(e,"count"),semanticWeight:r("semanticWeight"),includeLinked:a(e,"includeLinked"),titleExact:a(e,"titleExact"),phraseExact:a(e,"phraseExact"),highlight:a(e,"highlight"),status:t("status"),type:t("type"),tag:t("tag"),priority:t("priority"),deadlineBefore:t("deadlineBefore"),deadlineAfter:t("deadlineAfter"),updatedAfter:t("updatedAfter"),updatedBefore:t("updatedBefore"),createdAfter:t("createdAfter"),createdBefore:t("createdBefore"),assignee:t("assignee"),sprint:t("sprint"),release:t("release"),parent:t("parent"),limit:t("limit"),fields:n,compact:i||l?!0:void 0,full:a(e,"full"),...Y(e)};return T(g,e),g}function _e(e){let t=e.map(r=>r.trim()).filter(r=>r.length>0).join(" ");if(t.length===0)throw new R("Search query must not be empty",v.USAGE);return t}function be(e){let t=r=>p(e,u(G,r));return{id:t("id"),op:t("op"),author:t("author"),from:t("from"),to:t("to"),limit:t("limit"),compact:e.full===!0||e.provenance===!0?!1:e.compact!==!1,unbounded:a(e,"unbounded"),provenance:a(e,"provenance"),provenanceSummary:a(e,"provenanceSummary"),harness:Array.isArray(e.harness)?e.harness:void 0,agentInstance:Array.isArray(e.agentInstance)?e.agentInstance:void 0,provenanceFilter:Array.isArray(e.provenanceFilter)?e.provenanceFilter:void 0}}var ne=new Set(["","rows","ndjson","jsonl","true","1","yes","on"]),ie=new Set(["false","off","none","0"]);function we(e){if(e===!0)return!0;if(e===!1||e===void 0||e===null)return!1;if(typeof e=="string"){let t=e.trim().toLowerCase();if(ne.has(t))return!0;if(ie.has(t))return!1}throw new R("Activity --stream accepts rows|ndjson|jsonl (or no value)",v.USAGE)}function ke(e){let t=l=>p(e,u(M,l)),r=l=>W(e,u(M,l)),n=e.section,i=Array.isArray(n)?n.filter(l=>typeof l=="string"&&l.trim().length>0):typeof n=="string"&&n.trim().length>0?[n]:void 0,s={date:t("date"),from:t("from"),to:t("to"),past:e.past===!0?!0:void 0,type:t("type"),tag:t("tag"),priority:t("priority"),assignee:t("assignee"),assigneeFilter:t("assigneeFilter"),sprint:t("sprint"),release:t("release"),parent:t("parent"),limit:t("limit"),format:t("format"),depth:t("depth"),fields:t("fields"),section:i&&i.length>0?i:void 0,activityLimit:t("activityLimit"),staleThreshold:t("staleThreshold"),tokenBudget:r("tokenBudget"),noExtensionHealth:e.extensionHealth===!1?!0:void 0,noTags:e.tags===!1?!0:void 0};for(let[l,c]of Object.entries(e))Object.hasOwn(s,l)||(s[l]=c);return s}function Ee(e){let t=i=>p(e,u(x,i)),r=i=>W(e,u(x,i)),n={type:t("type"),tag:t("tag"),priority:r("priority"),assignee:t("assignee"),assigneeFilter:t("assigneeFilter"),sprint:t("sprint"),release:t("release"),parent:t("parent"),limit:t("limit"),blockedLimit:t("blockedLimit"),readyOnly:e.readyOnly===!0||e.ready_only===!0?!0:void 0,format:t("format"),tokenBudget:r("tokenBudget")};for(let[i,s]of Object.entries(e))Object.hasOwn(n,i)||(n[i]=s);return n}function ae(e){if(!e||typeof e!="object")return[];let t=e,r=new Set,n=c=>{if(typeof c!="string")return;let g=c.trim();g.length!==0&&r.add(g)};n(t.id);let i=t.item;i&&typeof i=="object"&&n(i.id);let s=t.ids;if(Array.isArray(s))for(let c of s)n(c);let l=t.items;if(Array.isArray(l))for(let c of l)!c||typeof c!="object"||n(c.id);return[...r].sort((c,g)=>c.localeCompare(g))}async function Be(e,t){let r=C(process.cwd(),e.path),n=await V(r,ae(t),{background:!j()});e.profile&&n.warnings.length>0&&L(`profile:search_refresh_warnings=${te(n.warnings)}`)}export{ue as a,de as b,fe as c,me as d,pe as e,Q as f,ge as g,Z as h,ye as i,ee as j,he as k,Ae as l,ve as m,te as n,Re as o,Ce as p,Te as q,Se as r,Oe as s,Ne as t,Me as u,xe as v,_e as w,be as x,we as y,ke as z,Ee as A,Be as B};
|
|
8
|
+
//# sourceMappingURL=chunk-OPVH7SKD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ie,e as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as ie,e as x}from"./chunk-YSO3YFZ4.js";import{A as u,Af as V,C as p,Da as S,Ec as z,Hf as Z,Jf as ee,La as N,Lf as D,Mf as te,Nc as G,Oa as M,Pa as j,R as L,Ra as q,Rf as ae,Ze as Y,_e as B,b as T,d as P,f as $,hd as U,id as K,lc as v,mf as J,qc as H,rc as W,uc as I,v as O,vf as Q,zd as X}from"./chunk-GE4KCSZP.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new o.Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="4eb2056a-4444-514a-a0db-79b8875c3d65")}catch{}})();function ne(o,i){return[...new Set([...O.filter(t=>o[t]!==void 0),...Object.keys(o).filter(t=>o[t]!==void 0),...i.length>0?["body"]:[]])].sort((t,e)=>t.localeCompare(e))}function ce(o,i){let r=`copied_from=${o}`;if(!i)return r;let t=i.trim();return t.length>0?`${t} | ${r}`:r}async function ue(o,i,r){let t=N(process.cwd(),r.path);if(!await T(M(t)))throw new p(`Tracker is not initialized at ${t}. Run pm init first.`,u.NOT_FOUND);let e=await V(t),c=S(e,v()),d=await D(t,o,e.id_prefix,e.item_format,c.type_to_folder);if(!d)throw await ae(t,o,e.id_prefix,c.type_to_folder);let E=await te(d,{schema:e.schema}),A=E.document.metadata,f=L(),_=X(i.author,e.author_default),n=await Q(t,e.id_prefix,{tokenLength:e.ids.token_length,typeToFolder:c.type_to_folder,probeExisting:!1}),oe=G(e.schema),y=i.title?.trim();if(y!==void 0&&y.length===0)throw new p("Copy --title must not be empty",u.USAGE);let s={...A,id:n,title:y??A.title,status:oe.open_status,created_at:f,updated_at:f};delete s.closed_at,delete s.completed_at,delete s.close_reason,delete s.test_runs;let k=z(v()),a=K({metadata:s,body:E.document.body},{schema:e.schema,extensionFieldNames:k}),h=await x({title:a.metadata.title,description:a.metadata.description,body:a.body,excludeIds:[d.id]},{pmRoot:t,mode:e.governance.duplicate_detection_mode==="strict"&&i.allowDuplicate!==!0?"off":e.governance.duplicate_detection_mode,threshold:e.governance.duplicate_detection_threshold,limit:e.governance.duplicate_detection_limit,allowDuplicate:i.allowDuplicate}),l=ne(a.metadata,a.body),m=j(t,a.metadata.type,n,e.item_format,c.type_to_folder),R=q(t,n),re=await J(t,n,e.locks.ttl_seconds,_,!1,e.governance.force_required_for_stale_lock,e.locks.wait_ms),g={metadata:{},body:""},C,F;try{let de=await Z(t,_,{required:e.governance.duplicate_detection_mode==="strict"&&i.allowDuplicate!==!0});try{e.governance.duplicate_detection_mode==="strict"&&i.allowDuplicate!==!0&&await x({title:a.metadata.title,description:a.metadata.description,body:a.body,excludeIds:[d.id]},{pmRoot:t,mode:"strict",threshold:e.governance.duplicate_detection_threshold,limit:e.governance.duplicate_detection_limit,allowDuplicate:!1});let w=await D(t,n,e.id_prefix,e.item_format,c.type_to_folder);if(w)throw new p(`Cannot copy to ${n}: an item with that id already exists at ${w.itemPath}. Retry the copy to allocate a new id.`,u.CONFLICT,{code:"item_id_collision",why:`Allocated id ${n} already exists at ${w.itemPath}.`,recovery:{suggested_retry:`pm copy ${d.id}`}});await P(m,U(a,{format:e.item_format,schema:e.schema,extensionFieldNames:k}));try{let b=Y({nowIso:f,author:_,op:"create",before:g,after:a,message:ce(d.id,i.message)});await B(R,b)}catch(b){throw await $(m),b}F=await ee({pmRoot:t,preferredFormat:e.item_format,typeToFolder:c.type_to_folder,schema:e.schema,itemPath:m,document:a})}finally{await de()}C=[...await I({path:m,scope:"project",op:"create",item_id:a.metadata.id,item_type:a.metadata.type,before:g,after:a,changed_fields:l}),...await I({path:R,scope:"project",op:"create:history",item_id:a.metadata.id,item_type:a.metadata.type,before:g,after:a,changed_fields:l})],H({id:a.metadata.id,op:"create",item_type:a.metadata.type,status:a.metadata.status,current:W(a.metadata,l),changed_fields:l})}finally{await re()}return{source_id:d.id,item:structuredClone(a.metadata),changed_fields:l,warnings:[...ie(h),...F,...C],...h===void 0?{}:{similarity_advisory:h}}}export{ue as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OTHLDSFP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as G}from"./chunk-JC6FKIFM.js";import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as G}from"./chunk-JC6FKIFM.js";import{a as A}from"./chunk-BXQLRKWF.js";import{c as M,e as j}from"./chunk-NY4T3JWN.js";import{Ca as P}from"./chunk-A62CYISG.js";import{A as u,Af as T,C as f,Da as b,La as D,Lf as v,Mf as U,Nc as S,Oa as F,Of as x,Rf as O,Sf as $,V as I,b as R,cd as _,lc as C,zd as E}from"./chunk-GE4KCSZP.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]="7d90aefe-43ba-5b24-8982-07e37e8d46a9")}catch{}})();var q=[{key:"resolution",label:"resolution (--resolution)"},{key:"expected_result",label:"expected_result (--expected-result)"},{key:"actual_result",label:"actual_result (--actual-result)"}];function B(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t.length===0||t==="warn")return"warn";if(t==="off"||t==="none"||t==="disabled")return"off";if(t==="strict")return"strict";throw new f(`Invalid --validate-close mode "${e}" (expected "off", "warn", or "strict")`,u.USAGE)}function N(e){let t=[];for(let o of q){let s=e[o.key];(typeof s!="string"||s.trim().length===0)&&t.push(o.label)}return t}async function W(e,t,o){let s=new Set,i=t;for(;typeof i=="string"&&i.trim().length>0;){let n=i.trim();if(n===o)return!0;if(s.has(n))return!1;s.add(n),i=(await e(n))?.duplicate_of}return!1}function z(e){return typeof e!="string"||e.trim().length===0}async function X(e,t,o,s){let i=o?.trim();if(!i)return;if(i===s)throw new f("An item cannot be closed as a duplicate of itself.",u.USAGE,{code:"duplicate_target_self",why:"--duplicate-of must identify the canonical item that should remain open or already represent the work."});let n=b(t,C()),l=new Map,r=async c=>{if(l.has(c))return l.get(c)??null;let d=await v(e,c,t.id_prefix,t.item_format,n.type_to_folder);if(!d)return l.set(c,null),null;let{document:p}=await U(d,{schema:t.schema});return l.set(c,p.metadata),p.metadata},a=await r(i);if(!a)throw new f(`Duplicate target "${i}" was not found. Create or locate the canonical item first.`,u.USAGE,{code:"duplicate_target_missing",why:"Duplicate closure should point at a real canonical pm item so future dedupe and changelog tooling can trace the relationship.",examples:[`pm close ${s} "Duplicate of ${i}" --duplicate-of ${i}`],nextSteps:["Run pm search/list to find the canonical item, then retry with --duplicate-of <id>."]});if(await W(r,a.duplicate_of,s))throw new f(`Circular duplicate reference detected. Target "${i}" points back to "${s}".`,u.USAGE,{code:"duplicate_target_circular",why:"Circular duplicate relationships create loops for dedupe and status propagation tooling.",nextSteps:["Choose the existing canonical item, or clear the target duplicate_of metadata before closing this item as a duplicate."]});if(typeof a.duplicate_of=="string"&&a.duplicate_of.trim().length>0)throw new f(`Duplicate target "${i}" is already marked as a duplicate of "${a.duplicate_of.trim()}".`,u.USAGE,{code:"duplicate_target_is_duplicate",why:"Duplicate closure should point directly at the canonical item, not another duplicate.",examples:[`pm close ${s} "Duplicate of ${a.duplicate_of.trim()}" --duplicate-of ${a.duplicate_of.trim()}`],nextSteps:["Use the canonical item referenced by duplicate_of as the --duplicate-of target."]});return a.id}function H(e,t,o){return e.filter(s=>s.parent===t&&!_(s.status,o)).map(s=>s.id).sort((s,i)=>s.localeCompare(i))}function J(e,t,o){let s=new Map(e.map(n=>[n.id,n])),i=o.blocked_statuses;return e.filter(n=>i.has(n.status)).map(n=>({item:n,blockerIds:A(n)})).filter(({blockerIds:n})=>n.includes(t)).filter(({blockerIds:n})=>n.every(l=>{if(l===t)return!0;let r=s.get(l);return r!==void 0&&_(r.status,o)})).map(({item:n,blockerIds:l})=>({id:n.id,blocker_ids:l})).sort((n,l)=>n.id.localeCompare(l.id))}async function K(e,t,o,s,i,n){let l=J(o,s,n),r=[];for(let a of l)try{let c=await $({pmRoot:e,settings:t,id:a.id,op:"update",author:i,message:`Auto-unblocked after blocker ${s} closed`,mutate(d){let p=d.metadata.dependencies??[],m=p.filter(h=>{let y=h.id.trim();return h.kind!=="blocked_by"||!a.blocker_ids.includes(y)});d.metadata.status=n.open_status,delete d.metadata.blocked_by,delete d.metadata.blocked_reason,d.metadata.unblock_note=`Auto-unblocked after blocker ${s} closed; all blockers resolved (${a.blocker_ids.join(", ")}).`,m.length>0?d.metadata.dependencies=m:delete d.metadata.dependencies;let g=["status","blocked_by","blocked_reason","unblock_note"];return m.length!==p.length&&g.push("dependencies"),{changedFields:g}}});r.push(`auto_unblocked:${c.item.id}:resolved_blockers=${a.blocker_ids.join(",")}`)}catch(c){let d=c instanceof Error?c.message.replace(/\s+/g," ").trim():"unknown";r.push(`auto_unblock_failed:${a.id}:${d}`)}return r}function Q(e,t){let o=[],s=[{option:t.resolution,key:"resolution"},{option:t.expectedResult,key:"expected_result"},{option:t.actualResult,key:"actual_result"}];for(let{option:i,key:n}of s){if(typeof i!="string")continue;let l=i.trim();l.length!==0&&(e[n]=l,o.push(n))}return o}function Y(e,t){if(t===void 0)return[];e.duplicate_of=t;let o=[],s=[{key:"resolution",value:`Duplicate of ${t}`},{key:"expected_result",value:`Canonical item ${t} tracks the work.`},{key:"actual_result",value:`Closed as duplicate of ${t}.`}];for(let{key:i,value:n}of s)z(e[i])&&(e[i]=n,o.push(i));return o}function Z(e,t,o,s){let i=[];if(t!=="off"){let n=N(e);if(n.length>0){if(t==="strict"){let l=n.map(a=>`--${a.replaceAll("_","-")}`),r=["close",e.id,s??"<reason>",...l.flatMap(a=>[a,"<value>"])];throw new f(`Cannot close item ${e.id}: missing ${n.join(", ")}. Populate fields or use --validate-close warn.`,u.USAGE,{code:"close_validation_missing_fields",recovery:{missing:l,suggested_retry:G(r)},nextSteps:["Use pm close with the missing closure fields populated.","Use --validate-close warn only when governance permits an evidenced exception."]})}i.push(`close_validation_missing_fields:${e.id}:${n.join(",")}`)}if(o.length>0){if(t==="strict")throw new f(`Cannot close item ${e.id}: active child items remain open (${o.join(", ")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,u.USAGE);i.push(`close_validation_active_children:${e.id}:${o.join(",")}`)}return i}return o.length>0&&i.push(`closed_with_active_children:${e.id}:${o.join(",")}`),i}function ee(e,t){return t!==void 0?(e.close_reason=t,["close_reason"]):[]}function te(e){return e.assignee===void 0?[]:(delete e.assignee,["assignee"])}function ne(e,t){if(_(e.status,t.statusRegistry)&&!t.force)throw new f(`Item ${e.id} is already terminal; use --force to close again.`,u.CONFLICT);let o=Q(e,t.options),s=Y(e,t.duplicateOf),i=Z(e,t.validateCloseMode,t.activeChildIds,t.closeReason);e.status=t.statusRegistry.close_status,e.closed_at=t.closedAt;let n=t.options.completedAt!==void 0||e.completed_at===void 0;n&&(e.completed_at=t.completedAt);let l=["status","closed_at",...n?["completed_at"]:[],...ee(e,t.closeReason),...o];if(P(e)&&(e.plan_mode="completed",l.push("plan_mode")),t.duplicateOf!==void 0){l.push("duplicate_of");for(let a of s)l.includes(a)||l.push(a)}l.push(...te(e));let r=j(e,t.lifecyclePolicy);return l.push(...r.changedFields),i.push(...r.warnings),{changedFields:l,...i.length>0?{warnings:i}:{}}}var ce={blockedByIds:A};async function ie(e,t,o,s){let i=D(process.cwd(),s.path);if(!await R(F(i)))throw new f(`Tracker is not initialized at ${i}. Run pm init first.`,u.NOT_FOUND);let n=await T(i),l=S(n.schema),r=E(o.author,n.author_default),a=b(n,C()).type_to_folder,c=await v(i,e,n.id_prefix,n.item_format,a);if(!c)throw await O(i,e,n.id_prefix,a);let d=await X(i,n,o.duplicateOf,c.id),p={requireCloseReason:o.lifecyclePolicy?.requireCloseReason??n.governance.require_close_reason,orderingEdges:o.lifecyclePolicy?.orderingEdges??"preserve"},m=M({explicit:t,duplicateOf:d,resolution:o.resolution,message:o.message},p.requireCloseReason).closeReason,g=B(o.validateClose)??n.governance.close_validation_default,h=await x(i,n.item_format,a,void 0,n.schema),y=H(h,c.id,l),w=new Date().toISOString(),L=o.completedAt===void 0?w:I(o.completedAt,new Date(w),"completed-at"),k=await $({pmRoot:i,settings:n,id:c.id,op:"close",author:r,message:o.message,force:o.force,mutate(V){return ne(V.metadata,{statusRegistry:l,force:o.force,options:o,duplicateOf:d,validateCloseMode:g,activeChildIds:y,closeReason:m,closedAt:w,completedAt:L,lifecyclePolicy:p})}});return{item:k.item,changed_fields:k.changedFields,warnings:[...k.warnings,...await K(i,n,h,c.id,r,l)]}}function de(e,t,o,s){return ie(e,t,o,s)}export{ce as a,ie as b,de as c};
|
|
2
|
+
//# sourceMappingURL=chunk-PMXJEU3F.js.map
|