@unbrained/pm-cli 2026.8.14 → 2026.8.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +51 -11
  3. package/dist/cli/commander-usage.js +17 -4
  4. package/dist/cli/error-guidance.d.ts +7 -0
  5. package/dist/cli/error-guidance.js +65 -25
  6. package/dist/cli/main.js +3 -2
  7. package/dist/cli/register-history-author.js +16 -11
  8. package/dist/cli/register-mutation.js +4 -2
  9. package/dist/cli/register-operations.js +5 -5
  10. package/dist/cli-bundle/bundle-manifest.json +148 -148
  11. package/dist/cli-bundle/chunks/chunk-47OQEOQB.js +2 -0
  12. package/dist/cli-bundle/chunks/{chunk-XAVMOK6B.js → chunk-73UGEBRS.js} +2 -2
  13. package/dist/cli-bundle/chunks/chunk-HCIYWD6M.js +35 -0
  14. package/dist/cli-bundle/chunks/{chunk-FIW4P64F.js → chunk-I2LUWWR5.js} +2 -2
  15. package/dist/cli-bundle/chunks/{chunk-SBRKH6OR.js → chunk-IC5W2T34.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-TMJ7URWS.js → chunk-PANOOBIS.js} +9 -9
  17. package/dist/cli-bundle/chunks/{chunk-BFALV3YP.js → chunk-RIS565OA.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-TXMEUUUY.js → chunk-TK6N7HGM.js} +2 -2
  19. package/dist/cli-bundle/chunks/chunk-TOFG2URD.js +197 -0
  20. package/dist/cli-bundle/chunks/{chunk-G5JUB66K.js → chunk-URW4QRMI.js} +65 -59
  21. package/dist/cli-bundle/chunks/{register-list-query-T3EHHNNV.js → register-list-query-EYCXHZAG.js} +2 -2
  22. package/dist/cli-bundle/chunks/register-mutation-7YVIG54J.js +20 -0
  23. package/dist/cli-bundle/chunks/register-operations-KGDNRMCL.js +2 -0
  24. package/dist/cli-bundle/chunks/{register-setup-3YXZ444E.js → register-setup-NVXBOD5I.js} +2 -2
  25. package/dist/cli-bundle/focused-chunks/{chunk-PPFGQDSI.js → chunk-4JPEBFFC.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/chunk-5NMFSX26.js +155 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-YOOI3UZX.js → chunk-6ROKKT4X.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-725JSCMP.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-XDNAW5OI.js → chunk-C7JUBRFP.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-4DQ2YERC.js → chunk-CODV5LUT.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-DQ6SMTBF.js +2 -0
  32. package/dist/cli-bundle/focused-chunks/chunk-HAACPSUW.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-WCVE2NIG.js → chunk-J4UFYHOD.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/chunk-JX5Z344Q.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-L4RDYBIQ.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-KSEDUWVZ.js → chunk-NJ5RLEFD.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-K7RWWOAG.js → chunk-QYZERYR5.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/chunk-SSNDYZTM.js +8 -0
  39. package/dist/cli-bundle/focused-chunks/chunk-T46KLOIB.js +50 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-KFSZ3BP6.js → chunk-TZATVC4G.js} +6 -6
  41. package/dist/cli-bundle/focused-chunks/chunk-WY3WRPVN.js +2 -0
  42. package/dist/cli-bundle/main.js +13 -13
  43. package/dist/cli-bundle/sdk-authoring.js +1 -1
  44. package/dist/cli-bundle/sdk-contracts.js +1 -1
  45. package/dist/cli-bundle/sdk-core.js +32 -35
  46. package/dist/cli-bundle/sdk-governance.js +1 -1
  47. package/dist/cli-bundle/sdk-graph.js +1 -1
  48. package/dist/cli-bundle/sdk-merge.js +32 -31
  49. package/dist/cli-bundle/sdk-query.js +1 -1
  50. package/dist/cli-bundle/sdk-runtime.js +1 -1
  51. package/dist/cli-bundle/sdk-testing.js +1 -1
  52. package/dist/cli-bundle/sdk.js +2 -2
  53. package/dist/core/diagnostics/remediation.js +7 -2
  54. package/dist/core/extensions/reserved-host-flags.js +3 -2
  55. package/dist/core/history/replay.d.ts +14 -1
  56. package/dist/core/history/replay.js +45 -8
  57. package/dist/core/history/workspace-history.js +32 -10
  58. package/dist/core/output/output.d.ts +2 -0
  59. package/dist/core/output/output.js +7 -3
  60. package/dist/core/shared/command-types.d.ts +2 -0
  61. package/dist/core/shared/command-types.js +2 -2
  62. package/dist/core/shared/errors.d.ts +14 -0
  63. package/dist/core/shared/errors.js +2 -2
  64. package/dist/core/store/item-store.js +28 -2
  65. package/dist/mcp/tool-definitions.js +9 -5
  66. package/dist/sdk/agent/refusal-reachability.d.ts +69 -0
  67. package/dist/sdk/agent/refusal-reachability.js +159 -3
  68. package/dist/sdk/author-attribution.d.ts +56 -11
  69. package/dist/sdk/author-attribution.js +174 -50
  70. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  71. package/dist/sdk/cli-bootstrap.js +7 -2
  72. package/dist/sdk/cli-contracts/completeness.js +3 -2
  73. package/dist/sdk/cli-contracts/flag-contracts.js +6 -2
  74. package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
  75. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +5 -0
  76. package/dist/sdk/cli-contracts/runtime-contracts.js +23 -7
  77. package/dist/sdk/cli-contracts/tool-parameter-tables.js +22 -5
  78. package/dist/sdk/cli-contracts/tool-schema.js +20 -5
  79. package/dist/sdk/cli-program.js +3 -2
  80. package/dist/sdk/completion.js +11 -4
  81. package/dist/sdk/core.d.ts +2 -2
  82. package/dist/sdk/core.js +3 -3
  83. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +50 -2
  84. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +74 -14
  85. package/dist/sdk/governance/assurance-action.d.ts +7 -1
  86. package/dist/sdk/governance/assurance-action.js +7 -6
  87. package/dist/sdk/governance/assurance-mutation-error.d.ts +42 -1
  88. package/dist/sdk/governance/assurance-mutation-error.js +27 -3
  89. package/dist/sdk/governance/assurance-runtime.js +12 -11
  90. package/dist/sdk/governance/assurance.d.ts +9 -0
  91. package/dist/sdk/governance/assurance.js +80 -14
  92. package/dist/sdk/governance/coverage-assurance.d.ts +24 -0
  93. package/dist/sdk/governance/coverage-assurance.js +61 -0
  94. package/dist/sdk/governance/extension-host-version.d.ts +25 -0
  95. package/dist/sdk/governance/extension-host-version.js +116 -0
  96. package/dist/sdk/governance/health.d.ts +32 -1
  97. package/dist/sdk/governance/health.js +119 -27
  98. package/dist/sdk/governance/provenance-health.d.ts +27 -0
  99. package/dist/sdk/governance/provenance-health.js +95 -3
  100. package/dist/sdk/governance/validate.js +7 -8
  101. package/dist/sdk/governance.d.ts +6 -0
  102. package/dist/sdk/governance.js +8 -2
  103. package/dist/sdk/history-repair.d.ts +13 -1
  104. package/dist/sdk/history-repair.js +62 -18
  105. package/dist/sdk/index.d.ts +2 -1
  106. package/dist/sdk/index.js +4 -3
  107. package/dist/sdk/linked-artifacts.js +16 -5
  108. package/dist/sdk/pagination.d.ts +15 -0
  109. package/dist/sdk/pagination.js +9 -5
  110. package/dist/sdk/query/context.d.ts +5 -1
  111. package/dist/sdk/query/context.js +14 -5
  112. package/dist/sdk/read-output/continuation.d.ts +11 -0
  113. package/dist/sdk/read-output/continuation.js +132 -0
  114. package/dist/sdk/read-output-budget.d.ts +1 -1
  115. package/dist/sdk/read-output-budget.js +14 -10
  116. package/dist/sdk/read-output-contracts.d.ts +66 -2
  117. package/dist/sdk/read-output-contracts.js +185 -19
  118. package/dist/sdk/read-output-rows.d.ts +2 -0
  119. package/dist/sdk/read-output-rows.js +15 -2
  120. package/dist/sdk/runtime-input.js +4 -2
  121. package/dist/sdk/runtime.d.ts +2 -5
  122. package/dist/sdk/runtime.js +3 -2
  123. package/docs/ASSURANCE.md +59 -2
  124. package/docs/COMMANDS.md +8 -2
  125. package/docs/READ_OUTPUT_CONTRACTS.md +55 -8
  126. package/docs/RELEASING.md +54 -11
  127. package/docs/SDK_CONTEXT_INTEGRITY.md +94 -4
  128. package/docs/SDK_CONTEXT_TRUTH_CONTRACTS.md +13 -5
  129. package/marketplace.json +2 -2
  130. package/package.json +3 -3
  131. package/packages/pm-beads/package.json +1 -1
  132. package/packages/pm-calendar/package.json +1 -1
  133. package/packages/pm-command-kit/package.json +1 -1
  134. package/packages/pm-digital-twin/package.json +1 -1
  135. package/packages/pm-governance-audit/package.json +1 -1
  136. package/packages/pm-guide-shell/package.json +1 -1
  137. package/packages/pm-kanban/package.json +1 -1
  138. package/packages/pm-lifecycle-hooks/package.json +1 -1
  139. package/packages/pm-linked-test-adapters/package.json +1 -1
  140. package/packages/pm-search-advanced/package.json +1 -1
  141. package/packages/pm-templates/package.json +1 -1
  142. package/packages/pm-todos/package.json +1 -1
  143. package/packages/pm-vcs/package.json +1 -1
  144. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  145. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  146. package/sdk/public-surface.json +1241 -180
  147. package/dist/cli-bundle/chunks/chunk-BBOFSVAK.js +0 -197
  148. package/dist/cli-bundle/chunks/chunk-YAMTJL6Y.js +0 -34
  149. package/dist/cli-bundle/chunks/chunk-YSVSMJ2B.js +0 -2
  150. package/dist/cli-bundle/chunks/register-mutation-E27WCLSZ.js +0 -20
  151. package/dist/cli-bundle/chunks/register-operations-4R6I7CPY.js +0 -2
  152. package/dist/cli-bundle/focused-chunks/chunk-F43TT2QQ.js +0 -8
  153. package/dist/cli-bundle/focused-chunks/chunk-KYUQGTSB.js +0 -2
  154. package/dist/cli-bundle/focused-chunks/chunk-LZ4MV3RH.js +0 -2
  155. package/dist/cli-bundle/focused-chunks/chunk-PGXJQLCT.js +0 -155
  156. package/dist/cli-bundle/focused-chunks/chunk-Q4YY3XNF.js +0 -2
  157. package/dist/cli-bundle/focused-chunks/chunk-QK753U3U.js +0 -46
  158. package/dist/cli-bundle/focused-chunks/chunk-QUMB2J27.js +0 -2
  159. package/dist/cli-bundle/focused-chunks/chunk-SM7MTG27.js +0 -2
  160. package/dist/cli-bundle/focused-chunks/chunk-ZM6TZVHC.js +0 -2
@@ -1,2 +0,0 @@
1
- import{_ as p}from"./chunk-Q4YY3XNF.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="f73e79d8-2a65-5a25-8c6f-ec9b06651634")}catch{}})();function i(a){return[...new Set(Array.from(a,e=>e.trim()).filter(e=>e.length>0))]}(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a5a2c81f-8870-5111-b13c-74c362098d54")}catch{}})();function n(a){return a.startsWith("--")?`--${a.slice(2).replaceAll("_","-")}`:a}function c(a){let e=new Map;for(let l of a){let t=n(l.flag),g=e.get(t)??new Set;l.flag!==t&&g.add(l.flag);for(let f of l.aliases??[])f!==t&&g.add(f);e.set(t,g)}return a.map(l=>{let t=n(l.flag);if(l.flag!==t)return l;let g=i([...l.aliases??[],...e.get(t)]).filter(f=>f!==t);return g.length===0?l:{...l,aliases:g}})}function le(a){let e=c(a),l=new Set(e.map(t=>t.flag));return e.filter(t=>{let g=n(t.flag);return t.flag===g||!l.has(g)})}var d=p.map(a=>({flag:a.flag,...a.aliases?{aliases:[...a.aliases]}:{},...a.value_name?{value_name:a.value_name}:{}})),te=[...d,{flag:"--version"}],v=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--has-notes"},{flag:"--no-notes"},{flag:"--has-learnings"},{flag:"--no-learnings"},{flag:"--has-files"},{flag:"--no-files"},{flag:"--filter-files-missing"},{flag:"--has-docs"},{flag:"--no-docs"},{flag:"--filter-docs-missing"},{flag:"--has-tests"},{flag:"--no-tests"},{flag:"--has-comments"},{flag:"--no-comments"},{flag:"--has-deps"},{flag:"--no-deps"},{flag:"--has-body"},{flag:"--empty-body"},{flag:"--has-linked-command"},{flag:"--no-linked-command"}],C=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--filter-has-notes"},{flag:"--filter-no-notes"},{flag:"--filter-has-learnings"},{flag:"--filter-no-learnings"},{flag:"--filter-has-files"},{flag:"--filter-no-files"},{flag:"--filter-has-docs"},{flag:"--filter-no-docs"},{flag:"--filter-has-tests"},{flag:"--filter-no-tests"},{flag:"--filter-has-comments"},{flag:"--filter-no-comments"},{flag:"--filter-has-deps"},{flag:"--filter-no-deps"},{flag:"--filter-has-body"},{flag:"--filter-empty-body"},{flag:"--filter-has-linked-command"},{flag:"--filter-no-linked-command"},{flag:"--ids",list:!0},{flag:"--limit"},{flag:"--offset"}],k=u([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--today"},{flag:"--recent"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--ids",list:!0},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...v,{flag:"--limit"},{flag:"--offset"},{flag:"--after"},{flag:"--no-truncate"},{flag:"--compact"},{flag:"--brief"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--sort"},{flag:"--order"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--include-body"},{flag:"--strict-read"},{flag:"--format"},{flag:"--stream"}],new Set(["--limit","--token-budget","--offset","--after","--no-truncate","--compact","--brief","--full","--fields","--include-body","--strict-read"])),G=[{flag:"--group-by",list:!0},{flag:"--count"},{flag:"--completion"},{flag:"--sum"},{flag:"--avg"},{flag:"--include-unparented"},{flag:"--include_unparented"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0}],F=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--comment","--body"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--full-history"},{flag:"--author"},{flag:"--message"},{flag:"--force"}];function u(a,e){return a.map(l=>e.has(l.flag)?{...l,cursor_semantics:"presentation"}:l)}var w=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--note"]},{flag:"--add-json"},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--limit"},{flag:"--since"},{flag:"--event-type"},{flag:"--include-meta"},{flag:"--full-history"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],I=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--learning"]},{flag:"--limit"},{flag:"--full-history"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],M=[{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--append-stable"},{flag:"--validate-paths"},{flag:"--scope"},{flag:"--limit"},{flag:"--offset"},{flag:"--no-truncate"},{flag:"--strict-read"},{flag:"--explain"},{flag:"--lines",value_name:"start:end"},{flag:"--decision-depth",value_name:"n",value_type:"number"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],D=[{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--list"},{flag:"--validate-paths"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],P=[{flag:"--id",value_name:"item-id"},{flag:"--limit"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--diff"},{flag:"--field"},{flag:"--verify"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--format"}],X=[{flag:"--dry-run"},{flag:"--output"},{flag:"--item-path"},{flag:"--prefer"}],U=[{flag:"--id",value_name:"item-id"},{flag:"--literal"},{flag:"--regex"},{flag:"--replacement"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],j=[{flag:"--id",value_name:"item-id"},{flag:"--all"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],H=[{flag:"--event",repeatable:!0},{flag:"--all-actionable"},{flag:"--attributed-author",aliases:["--attributed_author"]},{flag:"--reviewer"},{flag:"--reason"}],z=[{flag:"--id",value_name:"item-id"},{flag:"--before"},{flag:"--ids",list:!0},{flag:"--all-over",value_type:"number"},{flag:"--closed"},{flag:"--all-streams"},{flag:"--min-entries",value_type:"number"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Y=[{flag:"--description"},{flag:"--default-status",aliases:["--default_status"]},{flag:"--folder"},{flag:"--alias"},{flag:"--role"},{flag:"--order"},{flag:"--type"},{flag:"--commands"},{flag:"--cli-flag"},{flag:"--required"},{flag:"--required-on-create"},{flag:"--no-allow-unset"},{flag:"--required-types"},{flag:"--infer"},{flag:"--min-count"},{flag:"--apply",value_type:"boolean"},{flag:"--to"},{flag:"--migration-id",aliases:["--migration_id"]},{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],q=[{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],B=[{flag:"--title"},{flag:"--description"},{flag:"--scope"},{flag:"--parent"},{flag:"--related"},{flag:"--blocks"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--harness"},{flag:"--mode"},{flag:"--resume-context",aliases:["--resume_context"]},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--priority"},{flag:"--status",short:"-s"},{flag:"--create-mode",aliases:["--create_mode"]},{flag:"--deadline"},{flag:"--estimate",aliases:["--estimated-minutes","--estimated_minutes"]},{flag:"--acceptance-criteria",aliases:["--acceptance_criteria","--ac"],repeatable:!0},{flag:"--definition-of-ready",aliases:["--definition_of_ready"]},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now",aliases:["--why_now"]},{flag:"--assignee"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps",aliases:["--repro_steps"]},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--affected-version",aliases:["--affected_version"]},{flag:"--fixed-version",aliases:["--fixed_version"]},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact",aliases:["--customer_impact"]},{flag:"--comment",repeatable:!0},{flag:"--note",repeatable:!0},{flag:"--learning",repeatable:!0},{flag:"--reminder",repeatable:!0},{flag:"--event",repeatable:!0},{flag:"--type-option",aliases:["--type_option"],repeatable:!0},{flag:"--body"},{flag:"--claim"},{flag:"--from-search",aliases:["--from_search"]},{flag:"--template"},{flag:"--step-title",aliases:["--step_title"]},{flag:"--step"},{flag:"--step-body",aliases:["--step_body"]},{flag:"--step-owner",aliases:["--step_owner"]},{flag:"--step-status",aliases:["--step_status"]},{flag:"--step-evidence",aliases:["--step_evidence"]},{flag:"--step-blocked-reason",aliases:["--step_blocked_reason"]},{flag:"--step-replacement",aliases:["--step_replacement"]},{flag:"--depends-on",aliases:["--depends_on"]},{flag:"--link"},{flag:"--link-kind",aliases:["--link_kind"]},{flag:"--link-note",aliases:["--link_note"]},{flag:"--promote-to-item-dep",aliases:["--promote_to_item_dep"]},{flag:"--allow-multiple-active",aliases:["--allow_multiple_active"]},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--decision-text",aliases:["--decision_text","--decision"]},{flag:"--decision-rationale",aliases:["--decision_rationale"]},{flag:"--decision-evidence",aliases:["--decision_evidence"]},{flag:"--discovery-text",aliases:["--discovery_text","--discovery"]},{flag:"--validation-text",aliases:["--validation_text","--validation"]},{flag:"--validation-command",aliases:["--validation_command"]},{flag:"--validation-expected",aliases:["--validation_expected"]},{flag:"--depth"},{flag:"--field"},{flag:"--fields",list:!0},{flag:"--steps"},{flag:"--materialize-type",aliases:["--materialize_type"]},{flag:"--materialize-parent",aliases:["--materialize_parent"]},{flag:"--materialize-tags",aliases:["--materialize_tags"]},{flag:"--author"},{flag:"--message"},{flag:"--force"}],V=[{flag:"--id-prefix",aliases:["--prefix"]},{flag:"--preset"},{flag:"--type-preset"},{flag:"--defaults",short:"-y",aliases:["--yes"]},{flag:"--author"},{flag:"--agent-guidance"},{flag:"--with-packages"},{flag:"--no-merge-fence"},{flag:"--workspace"},{flag:"--force"},{flag:"--verbose"}],K=[{flag:"--criterion"},{flag:"--clear-criteria"},{flag:"--format"},{flag:"--policy"},{flag:"--default-depth"},{flag:"--activity-limit"},{flag:"--stale-threshold-days"},{flag:"--section-hierarchy"},{flag:"--section-activity"},{flag:"--section-progress"},{flag:"--section-blockers"},{flag:"--section-files"},{flag:"--section-workload"},{flag:"--section-staleness"},{flag:"--section-tests"}],h=[{flag:"--init"},{flag:"--scaffold"},{flag:"--capability"},{flag:"--install"},{flag:"--uninstall"},{flag:"--explore"},{flag:"--list"},{flag:"--manage"},{flag:"--describe"},{flag:"--markdown"},{flag:"--output"},{flag:"--reload"},{flag:"--watch"},{flag:"--doctor"},{flag:"--catalog"},{flag:"--adopt"},{flag:"--adopt-all"},{flag:"--activate"},{flag:"--deactivate"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"},{flag:"--detail"},{flag:"--trace"},{flag:"--runtime-probe"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],s=[{flag:"--project"},{flag:"--local"},{flag:"--global"}],y=[...s,{flag:"--capability"}],m=[...h,{flag:"--declarative"}],W=[...y,{flag:"--declarative"}],$=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],J=s,Q=s,Z=[...s,{flag:"--markdown"},{flag:"--output"}],aa=s,ea=s,la=s,ta=[...s,{flag:"--dry-run"}],fa=[...s,{flag:"--runtime-probe"},{flag:"--fix-managed-state"}],ga=[...s,{flag:"--watch"}],sa=[...s,{flag:"--detail"},{flag:"--trace"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],ra=[...s,{flag:"--fields",list:!0}],ia=[...s,{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],oa=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],na=[{flag:"--dry-run"},{flag:"--cli-only"},{flag:"--packages-only"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--repair"},{flag:"--tag"},{flag:"--package-name"}],fe=[{flag:"--mode"},{flag:"--progress"}],ca=[{flag:"--id",value_name:"item-id"},{flag:"--reason",value_name:"value"},{flag:"--close-reason",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--duplicate-of",value_name:"value"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",aliases:["--expected_result","--expected"],value_name:"value"},{flag:"--actual-result",aliases:["--actual_result","--actual"],value_name:"value"},{flag:"--force",value_type:"boolean"}],da=[{flag:"--filter-status",list:!0},{flag:"--filter-type"},{flag:"--filter-tag"},{flag:"--filter-priority"},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee"},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint"},{flag:"--filter-release"},...C,{flag:"--reason"},{flag:"--completed-at"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--validate-close"},{flag:"--author"},{flag:"--message"},{flag:"--force"},{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"}],ua=[{flag:"--id",value_name:"item-id"},{flag:"--body",short:"-b"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],pa=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"},{flag:"--if-available"},{flag:"--next"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee-filter"},{flag:"--parent"},{flag:"--sprint"},{flag:"--release"},{flag:"--max-attempts"},{flag:"--include-decisions"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--explain-ranking",aliases:["--explain_ranking"]}],ma=[{flag:"--id",value_name:"item-id"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],_a=[{flag:"--id",value_name:"item-id"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ta=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Aa=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],va=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Ca=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--force"}],b=[{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--tags"},{flag:"--priority"},{flag:"--body"},{flag:"--description"},{flag:"--author"},{flag:"--message"}],x=[{flag:"--start"},{flag:"--duration"},{flag:"--end"},{flag:"--location"},{flag:"--timezone"},{flag:"--all-day"},...b],ha=x,ya=[{flag:"--at"},{flag:"--text"},...b],ba=[{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-json"},{flag:"--remove"},{flag:"--remove-index",repeatable:!0},{flag:"--run"},{flag:"--match"},{flag:"--only-index"},{flag:"--only-last"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"},{flag:"--measure",list:!0},{flag:"--metric-below"},{flag:"--metric-diff"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],xa=[{flag:"--status"},{flag:"--limit"},{flag:"--offset"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--auto-pm-context"}],Sa=[{flag:"--limit"}],Na=[{flag:"--status"},{flag:"--limit"},{flag:"--stream"},{flag:"--tail"},{flag:"--force"},{flag:"--author"}],Oa=[{flag:"--dry-run"},{flag:"--scope"}],La=[{flag:"--include-empty"},{flag:"--storage"},{flag:"--metadata-coverage"},{flag:"--field-utilization"},{flag:"--by-assignee"},{flag:"--by-tag"},{flag:"--by-priority"},{flag:"--tag-prefix"},{flag:"--analytics"}],Ea=[{flag:"--status",repeatable:!0,list:!0},{flag:"--since"},{flag:"--threshold"},{flag:"--limit"}],Ra=[{flag:"--strict-directories"},{flag:"--require-merge-drivers"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--check-only"},{flag:"--check-telemetry"},{flag:"--no-refresh"},{flag:"--refresh-vectors"},{flag:"--verbose-stale-items"},{flag:"--verbose-author-events"},{flag:"--brief"},{flag:"--summary"},{flag:"--skip-vectors"},{flag:"--skip-integrity"},{flag:"--skip-drift"},{flag:"--full"}],ka=[{flag:"--check-metadata"},{flag:"--metadata-profile"},{flag:"--check-resolution"},{flag:"--check-lifecycle"},{flag:"--check-stale-blockers"},{flag:"--dependency-cycle-severity"},{flag:"--parent-cycle-severity"},{flag:"--check-files"},{flag:"--scan-mode"},{flag:"--include-pm-internals"},{flag:"--verbose-file-lists"},{flag:"--verbose-diagnostics"},{flag:"--all-affected-ids"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--fix-hints"},{flag:"--auto-fix"},{flag:"--dry-run"},{flag:"--fix-scope"},{flag:"--prune-missing"},{flag:"--check-history-drift"},{flag:"--check-command-references"},{flag:"--check-storage-integrity"},{flag:"--counts"},{flag:"--full"}],Ga=[{flag:"--definition",value_name:"json"},{flag:"--trigger",value_name:"value"},{flag:"--tree",value_name:"value"},{flag:"--gate",value_name:"id"},{flag:"--limit",value_name:"number"},{flag:"--dry-run"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--owner",value_name:"item-id"},{flag:"--apply",value_type:"boolean"},{flag:"--enforcement",value_name:"level"}],S=[{flag:"--assignee"},{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--allow-unresolved-deps"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-by"},{flag:"--blocked-reason"},{flag:"--unblock-note"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--actual-result"},{flag:"--affected-version"},{flag:"--fixed-version"}],N=[{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"}],O=[{short:"-p",flag:"--priority"},{flag:"--type"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{flag:"--remove-tags",aliases:["--remove_tags"]},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--add-ac",aliases:["--add_ac"]},{flag:"--remove-ac",aliases:["--remove_ac"]}],_=[{flag:"--stdin-json"},{short:"-t",flag:"--title"},{flag:"--id"},{short:"-d",flag:"--description"},{flag:"--type"},{flag:"--template"},{flag:"--create-mode"},{flag:"--create_mode"},{flag:"--schedule-preset"},{flag:"--schedule_preset"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},{flag:"--completed_at"},{short:"-p",flag:"--priority"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{short:"-b",flag:"--body"},{flag:"--body-file"},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--author"},{flag:"--message"},...S,...N,{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--fixed_version"},{flag:"--dep"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--reminder"},{flag:"--event"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--allow-duplicate",value_type:"boolean"}],Fa=[{flag:"--transaction-id",value_name:"value"},{flag:"--stdin-json"},{flag:"--dry-run"},{flag:"--create-compensation",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--author",value_name:"value"}],wa=[{flag:"--id",value_name:"item-id"},{flag:"--transaction-id",value_name:"value",required:!0},{flag:"--reason",value_name:"value"},{flag:"--file",value_name:"value",repeatable:!0},{flag:"--doc",value_name:"value",repeatable:!0},{flag:"--test",value_name:"value",repeatable:!0},{flag:"--comment",value_name:"value",repeatable:!0},{flag:"--note",value_name:"value",repeatable:!0},{flag:"--learning",value_name:"value",repeatable:!0},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",value_name:"value"},{flag:"--actual-result",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--dry-run"},{flag:"--force"},{flag:"--author",value_name:"value"}],Ia=[{flag:"--id",value_name:"item-id"},{flag:"--title",value_name:"value"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--allow-duplicate",value_type:"boolean"}],Ma=[{flag:"--id",value_name:"item-id"},{flag:"--clear"}],Da=[{flag:"--id",value_name:"item-id"},{flag:"--stdin-json"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},{flag:"--body-file"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},...O,...S,{flag:"--fixed_version"},...N,{flag:"--author"},{flag:"--message"},{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--force"}],Pa=[{flag:"--filter-status",list:!0},{flag:"--filter-type",list:!0},{flag:"--filter-tag",list:!0},{flag:"--filter-priority",list:!0},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee",list:!0},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint",list:!0},{flag:"--filter-release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...C,{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},...O,{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--repro_steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--expected_result"},{flag:"--expected"},{flag:"--actual-result"},{flag:"--actual_result"},{flag:"--actual"},{flag:"--affected-version"},{flag:"--affected_version"},{flag:"--fixed-version"},{flag:"--fixed_version"},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--allow-unresolved-deps"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--unset"},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],T=[{flag:"--view"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--full-period"},{flag:"--full_period"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--status"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--include"},{flag:"--recurrence-lookahead-days"},{flag:"--recurrence-lookback-days"},{flag:"--occurrence-limit"},{flag:"--limit"},{flag:"--format"}],Xa=[{flag:"--id"},{flag:"--op"},{flag:"--author"},{flag:"--from"},{flag:"--to"},{flag:"--limit"},{flag:"--unbounded"},{flag:"--compact"},{flag:"--raw"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--stream"}],Ua=[{flag:"--since"},{flag:"--type",repeatable:!0},{flag:"--author",repeatable:!0},{flag:"--item",repeatable:!0},{flag:"--limit",value_type:"number"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--follow"},{flag:"--interval-ms",value_type:"number"}],A=u([{flag:"--for",value_name:"intent"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit",aliases:["--max-items"]},{flag:"--after"},{flag:"--format"},{flag:"--depth"},{flag:"--fields",list:!0},{flag:"--section"},{flag:"--activity-limit"},{flag:"--stale-threshold"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--no-extension-health"},{flag:"--no-tags"}],new Set(["--limit","--after","--format","--fields","--section","--activity-limit","--stale-threshold","--explain-ranking","--explain_ranking","--no-extension-health","--no-tags"])),ja=[{flag:"--id",value_name:"item-id"},{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--depth"},{flag:"--full",value_type:"boolean"},{flag:"--fields",list:!0},{flag:"--at"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--format"}],Ha=[{flag:"--list"},{flag:"--format"},{flag:"--depth"}],za=[{flag:"--id",value_name:"item-id"},{flag:"--format"},{flag:"--max-depth"},{flag:"--collapse"},{flag:"--summary"},{flag:"--full"},{flag:"--node-limit"},{flag:"--edge-limit"},{flag:"--token-budget"},{flag:"--cursor"},{flag:"--direction"},{flag:"--kind",list:!0}],Ya=[{flag:"--kind",list:!0},{flag:"--max-depth"},{flag:"--limit"},{flag:"--after"},{flag:"--direction"},{flag:"--max-paths"},{flag:"--sample"},{flag:"--exempt-isolate",list:!0},{flag:"--exempt-isolate-type",list:!0},{flag:"--save-baseline"},{flag:"--rebuild"},{flag:"--clear"},{flag:"--summary"},{flag:"--full"}],qa=[{flag:"--mode"},{flag:"--k"},{flag:"--fail-under"},{flag:"--queries"},{flag:"--format"}],r=[{flag:"--dry-run"},{flag:"--force"},{flag:"--author"},{flag:"--message"}],Ba=[{flag:"--for",value_name:"intent"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit"},{flag:"--blocked-limit"},{flag:"--blocked_limit"},{flag:"--ready-only"},{flag:"--ready_only"},{flag:"--format"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]}],Va=u([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--mode"},{flag:"--semantic"},{flag:"--hybrid"},{flag:"--match-mode"},{flag:"--min-score"},{flag:"--count"},{flag:"--semantic-weight"},{flag:"--include-linked"},{flag:"--title-exact"},{flag:"--phrase-exact"},{flag:"--highlight"},{flag:"--compact"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--format"},{flag:"--limit"},{flag:"--after"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--assignee",list:!0},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--parent"},...v],new Set(["--highlight","--compact","--full","--fields","--format","--limit","--token-budget","--after"])),Ka=[{flag:"--action"},{flag:"--command"},{flag:"--summary"},{flag:"--schema-only"},{flag:"--flags-only"},{flag:"--availability-only"},{flag:"--runtime-only"},{flag:"--active-only"},{flag:"--full"}],Wa=[{flag:"--eager-tags"}];function $a(a){let e=new Set,l=[];for(let t of a){let g=(t.aliases??[]).join(","),f=`${t.flag}|${t.short??""}|${g}`;e.has(f)||(e.add(f),l.push(t))}return l}function o(a){return c($a([...d,...a]))}var Ja=["list","list-all","list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled"],L=new Map([...Ja.map(a=>[a,k]),["templates",_],["cal",T],["ctx",A],["test-runs-worker",Na],["init",V],["config",K],["extension",h],["package",m],["packages",m],["install",oa],["upgrade",na],["create",_],["item mutate",Fa],["item complete",wa],["copy",Ia],["focus",Ma],["aggregate",G],["calendar",T],["context",A],["get",ja],["guide",Ha],["search",Va],["next",Ba],["eval",qa],["workspace",r],["workspace snapshot",r],["workspace snapshot create",r],["workspace snapshot list",r],["workspace snapshot inspect",r],["workspace snapshot restore",r],["workspace snapshot delete",r],["history",P],["history-redact",U],["history-repair",j],["history-author-acknowledge",H],["history-compact",z],["merge",X],["schema",Y],["profile",q],["plan",B],["activity",Xa],["events",Ua],["restore",ma],["update",Da],["update-many",Pa],["close",ca],["close-many",da],["delete",_a],["append",ua],["comments",F],["notes",w],["learnings",I],["files",M],["docs",D],["deps",za],["graph",Ya],["test",ba],["test-all",xa],["telemetry",Sa],["health",Ra],["assurance",Ga],["validate",ka],["gc",Oa],["stats",La],["duplicates",Ea],["contracts",Ka],["completion",Wa],["claim",pa],["release",Ta],["start-task",Aa],["pause-task",va],["close-task",Ca],["meet",x],["event",ha],["remind",ya]]),E=new Map([["install",$],["uninstall",J],["explore",Q],["manage",fa],["describe",Z],["reload",ga],["doctor",sa],["catalog",ra],["adopt",ia],["adopt-all",aa],["activate",ea],["deactivate",la],["migrate",ta]]);function R(a){return typeof a!="string"?"":a.trim().toLowerCase()}function ge(a){let e=R(a);if(L.has(e))return!0;let[l,t,...g]=e.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0&&(t==="init"||E.has(t))}function Qa(a,e){return e==="init"?a==="extension"?y:W:E.get(e)??[]}function se(a){let e=R(a);if(e.length===0)return o([]);let[l,t,...g]=e.split(/\s+/);if((l==="extension"||l==="package"||l==="packages")&&t!==void 0&&g.length===0)return o(Qa(l,t));let f=L.get(e)??[];return o(f)}function re(a,e=!0){let t=c(a).flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f),g=e?[...t,...d.flatMap(f=>[f.short,f.flag,...f.aliases??[]]).filter(f=>!!f)]:t;return i(g).join(" ")}export{i as a,c as b,le as c,d,te as e,k as f,G as g,F as h,w as i,I as j,M as k,D as l,P as m,X as n,U as o,j as p,H as q,z as r,Y as s,q as t,B as u,V as v,K as w,h as x,s as y,y as z,m as A,W as B,$ as C,J as D,Q as E,Z as F,aa as G,ea as H,la as I,ta as J,fa as K,ga as L,sa as M,ra as N,ia as O,oa as P,na as Q,fe as R,ca as S,da as T,ua as U,pa as V,ma as W,_a as X,Ta as Y,Aa as Z,va as _,Ca as $,x as aa,ha as ba,ya as ca,ba as da,xa as ea,Sa as fa,Na as ga,Oa as ha,La as ia,Ea as ja,Ra as ka,ka as la,Ga as ma,_ as na,Fa as oa,wa as pa,Ia as qa,Ma as ra,Da as sa,Pa as ta,T as ua,Xa as va,Ua as wa,A as xa,ja as ya,Ha as za,za as Aa,Ya as Ba,qa as Ca,r as Da,Ba as Ea,Va as Fa,Ka as Ga,Wa as Ha,$a as Ia,ge as Ja,se as Ka,re as La};
2
- //# sourceMappingURL=chunk-QUMB2J27.js.map
@@ -1,2 +0,0 @@
1
- import{db as D,l as x}from"./chunk-PGXJQLCT.js";import{da as L,ia as I}from"./chunk-K7RWWOAG.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="1b2f1ac3-82b3-58a2-9f40-2dd95ab1b2bc")}catch{}})();var v="global",R="external";function p(o){let e=o?.trim().toLowerCase();return e===v||e===R}function G(o){let e=o?.trim();if(e)return p(e)?v:e}function P(o,e,r){let t=o.trim();return p(r)?t:D(t,e)}(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="a6fc5da1-b7d1-5b3c-8033-cecccc7861c3")}catch{}})();function y(o){if(typeof o!="string")return;let e=o.trim();if(!(!e||["none","null","n/a","na"].includes(e.toLowerCase())))return e}function k(o){let e=y(o);return e?.toLowerCase()==="no-active-blocker"?void 0:e}function C(){let o=L();for(let e of x()?.relationship_kinds??[])for(let r of e.definitions)o.register(r);return o}function g(o,e){let r=o.toLowerCase(),t=e.toLowerCase();return r!==t?r<t?-1:1:o!==e?o<e?-1:1:0}function S(o){let e=new Map;for(let r of o.dependencies??[]){if(typeof r!="object"||r===null)continue;let t=r,n=y(t.id);if(!n)continue;let s=typeof t.kind=="string"?t.kind:"related",d=`${s}\0${n.toLowerCase()}`,a=e.get(d);a?a.count+=1:e.set(d,{target_id:n,kind:s,count:1})}return e}function z(o,e=r=>r==="closed"||r==="canceled"){let r=[];for(let t of o)if(!(typeof t?.id!="string"||t.id.trim().length===0))for(let n of S(t).values())n.count<2||r.push({holder_id:t.id.trim(),target_id:n.target_id,kind:n.kind,occurrences:n.count,holder_status:t.status,legacy_terminal:e(t.status)});return r.sort((t,n)=>{let s=g(t.holder_id,n.holder_id);if(s!==0)return s;let d=g(t.target_id,n.target_id);return d!==0?d:g(t.kind,n.kind)})}function $(o,e,r,t,n){if(typeof r!="object"||r===null)return;let s=y(r.id);if(!s||s.toLowerCase()!==e.toLowerCase())return;let d=n.resolve(typeof r.kind=="string"?r.kind:"related");if(!(d?.ordering!==!0||(d.precedence??"source_before_target")!=="source_before_target"))return{holder_id:o.id.trim(),target_id:s,dependency_kind:d.kind,holder_status:o.status,legacy_terminal:t(o.status)}}function T(o,e=t=>t==="closed"||t==="canceled",r=C()){let t=new Map;for(let n of o){if(typeof n?.id!="string"||n.id.trim().length===0)continue;let s=y(n.blocked_by);if(s)for(let d of n.dependencies??[]){let a=$(n,s,d,e,r);a&&t.set(`${a.holder_id.toLowerCase()}\0${a.target_id.toLowerCase()}\0${a.dependency_kind}`,a)}}return[...t.values()].sort((n,s)=>{let d=g(n.holder_id,s.holder_id);if(d!==0)return d;let a=g(n.target_id,s.target_id);return a!==0?a:g(n.dependency_kind,s.dependency_kind)})}function M(o,e=r=>r==="closed"||r==="canceled"){let r=o.filter(c=>typeof c?.id=="string"&&c.id.trim().length>0),t=new Set(r.map(c=>c.id.trim().toLowerCase())),n=new Map,s=(c,f,u,m)=>{let i=y(f);if(!i||t.has(i.toLowerCase()))return;let l={holder_id:c.id.trim(),target_id:i,kind:u,source:m,holder_status:c.status,legacy_terminal:e(c.status),no_active_blocker_sentinel:i.toLowerCase()==="no-active-blocker"};n.set(`${l.holder_id}::${l.target_id}::${l.kind}::${l.source}`,l)};for(let c of r){s(c,c.parent,"parent","parent"),s(c,c.blocked_by,"blocked_by","blocked_by");for(let f of c.dependencies??[]){if(typeof f!="object"||f===null)continue;let u=f;p(u.source_kind)||s(c,u.id,typeof u.kind=="string"?u.kind:"related","dependency")}}let d=[...n.values()].sort((c,f)=>c.holder_id.localeCompare(f.holder_id)||c.target_id.localeCompare(f.target_id)||c.kind.localeCompare(f.kind)||c.source.localeCompare(f.source)),a=d.filter(c=>c.legacy_terminal);return{active:d.filter(c=>!c.legacy_terminal),legacy_terminal:a,no_active_blocker_sentinels:d.filter(c=>c.no_active_blocker_sentinel)}}function j(o){let e=new Map;for(let r of[...o.active,...o.legacy_terminal]){if(r.no_active_blocker_sentinel)continue;let t=r.target_id.trim(),n=t.toLowerCase();e.has(n)||e.set(n,t)}return[...e.values()].sort((r,t)=>r.localeCompare(t))}function A(o){let e=new Map;for(let r of o)for(let t of r.dependencies??[]){if(typeof t!="object"||t===null||!p(t.source_kind))continue;let n=y(t.id);n&&!e.has(n.toLowerCase())&&e.set(n.toLowerCase(),n)}return[...e.values()].sort((r,t)=>r.localeCompare(t))}function K(o,e=C()){let r={};for(let t of o)for(let n of t.dependencies??[]){if(typeof n!="object"||n===null)continue;let s=n.kind;if(typeof s!="string")continue;let d=s.trim().toLowerCase().replaceAll("-","_"),a=e.resolve(s);a&&d!==a.kind&&(r[d]=(r[d]??0)+1)}return Object.fromEntries(Object.entries(r).sort(([t],[n])=>t.localeCompare(n)))}function F(o,e,r){let t=r??C(),n=o.filter(i=>typeof i?.id=="string"&&i.id.trim().length>0),s=new Map(n.map(i=>[i.id.trim().toLowerCase(),i.id.trim()])),d=M(n,e),a=j(d);for(let i of a)s.set(i.toLowerCase(),i);let c=A(n),f=new Set(s.keys()),u=new Map;for(let i of c){let l=i;for(;f.has(l.toLowerCase());)l=`external:${l}`;u.set(i.toLowerCase(),l),f.add(l.toLowerCase())}let m=n.map(i=>{let l=k(i.parent),h=k(i.blocked_by),E=(i.dependencies??[]).flatMap(w=>{if(typeof w!="object"||w===null)return[];let _=w,b=k(_.id);return b?[{id:p(_.source_kind)?u.get(b.toLowerCase()):s.get(b.toLowerCase()),kind:typeof _.kind=="string"?_.kind:"related"}]:[]});return{id:i.id.trim(),...l?{parent:s.get(l.toLowerCase())}:{},...h?{blocked_by:s.get(h.toLowerCase())}:{},dependencies:E}});return{graph:I.fromItems([...m,...a.map(i=>({id:i})),...c.map(i=>({id:u.get(i.toLowerCase())}))],t),details:[...n.map(i=>({id:i.id.trim(),title:i.title,status:i.status,...typeof i.type=="string"&&i.type.trim().length>0?{type:i.type.trim()}:{}})),...a.map(i=>({id:i,title:`[missing] ${i}`,status:"missing"})),...c.map(i=>({id:u.get(i.toLowerCase()),title:`[external] ${i}`,status:"external"}))],missingIdSet:new Set(a.map(i=>i.toLowerCase())),dangling:d,duplicateRows:z(n,e),orderingContradictions:T(n,e,t),legacyAliasCounts:K(n,t)}}export{p as a,G as b,P as c,k as d,C as e,z as f,T as g,M as h,j as i,F as j};
2
- //# sourceMappingURL=chunk-SM7MTG27.js.map
@@ -1,2 +0,0 @@
1
- import{Ha as x,Ta as N,Ua as M,Y as h,Z as y,aa as I}from"./chunk-Q4YY3XNF.js";import{createHash as Y}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="83fe180b-9d95-5d19-9d3b-ba3821700e61")}catch{}})();var C=1,D=4096,H=/^[A-Za-z0-9_-]+$/;function B(e){return e.replace(/^--/u,"").replace(/[-_]([a-z0-9])/gu,(t,n)=>n.toUpperCase())}function Ue(e,t){let n=new Set;for(let r of t)if(r.cursor_semantics==="presentation"){n.add(B(r.flag));for(let o of r.aliases??[])n.add(B(o))}return Object.fromEntries(Object.entries(e).filter(([r])=>!n.has(r)))}function Ge(e,t){return Y("sha256").update(e).update("\0").update(I(t)).digest("hex").slice(0,24)}function R(e,t,n,r){return Buffer.from(JSON.stringify({version:C,fingerprint:e,after_id:t,...n===void 0?{}:{after_index:n},...r===void 0?{}:{snapshot:r}})).toString("base64url")}function w(e){return new y(e,h.USAGE,{code:"invalid_query_cursor",nextSteps:["Repeat the original query without --after to obtain a fresh cursor."]})}function V(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e;return t.version===C&&typeof t.fingerprint=="string"&&typeof t.after_id=="string"&&t.after_id.length>0&&(t.after_index===void 0||Number.isSafeInteger(t.after_index)&&t.after_index>=0)&&(t.snapshot===void 0||typeof t.snapshot=="string"&&t.snapshot.length>0)}function S(e,t){if(typeof e!="string")throw w("Query cursor is malformed.");let n=e.trim();if(n.length===0||n.length>D||!H.test(n))throw w("Query cursor is malformed.");let r;try{r=JSON.parse(Buffer.from(n,"base64url").toString("utf8"))}catch{throw w("Query cursor is malformed.")}if(!V(r))throw w("Query cursor version or payload is unsupported.");let o=r;if(o.fingerprint!==t)throw w(`Query cursor does not match the current filters, sort, or query (${o.fingerprint} != ${t}).`);return{after_id:o.after_id,...o.after_index===void 0?{}:{after_index:o.after_index},...o.snapshot===void 0?{}:{snapshot:o.snapshot}}}function ze(e,t){return S(e,t).after_id}function Z(e,t,n,r){if(t===void 0)return 0;let o=S(t,n),s=e.findIndex(i=>r(i)===o.after_id);if(s<0){if(o.after_index!==void 0)return Math.min(o.after_index,e.length);throw w(`Query cursor item ${o.after_id} is no longer present in this result set.`)}return s+1}function je(e,t){if(t.cursor!==void 0&&S(t.cursor,t.fingerprint).snapshot!==t.snapshot)throw w("Query cursor does not match the requested snapshot.");let n=Z(e,t.cursor,t.fingerprint,t.readId),r=e.slice(n,n+t.limit),o=r.length>0&&n+r.length<e.length,s=r.at(-1);return{rows:r,has_more:o,...o&&s!==void 0?{next_cursor:R(t.fingerprint,t.readId(s),n+r.length-1,t.snapshot)}:{}}}var qe=Object.freeze({version:C,max_length:D});import{AsyncLocalStorage as ge}from"node:async_hooks";(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]="d059aa19-3822-5ff4-b4be-e2be8f537d1e")}catch{}})();var P=new WeakMap;function Fe(e,t){P.set(e,new Set(t))}var $='.row_contract.row_keys[] as $key | getpath($key | split(".")) | if type == "array" then .[] else if type == "object" then to_entries[] else empty end end',ee={context:{row_keys:["high_level","low_level"],fields:"supported"},get:{row_keys:["children"],fields:"supported"},list:{row_keys:["items"],fields:"supported"},next:{row_keys:["recommended","ready","decision_needed","blocked","held_by_others"],fields:"unsupported"},search:{row_keys:["items"],fields:"supported"},activity:{row_keys:["activity_digest","compact_activity","provenance_activity","activity"],fields:"unsupported"},history:{row_keys:["compact_history","provenance_history","history"],fields:"unsupported"},deps:{row_keys:["graph.nodes","graph.edges","context.nodes","context.edges"],fields:"unsupported"},health:{row_keys:["checks"],fields:"unsupported"},aggregate:{row_keys:["groups"],fields:"unsupported"},duplicates:{row_keys:["clusters"],fields:"unsupported"},stats:{row_keys:["by_type","by_status"],fields:"unsupported"},comments:{row_keys:["comments"],fields:"unsupported"},notes:{row_keys:["notes"],fields:"unsupported"},learnings:{row_keys:["learnings"],fields:"unsupported"},files:{row_keys:["files"],fields:"unsupported"},docs:{row_keys:["docs"],fields:"unsupported"},validate:{row_keys:["checks","warnings"],fields:"unsupported"},contracts:{row_keys:["command_summaries","commands"],fields:"unsupported"}},te=[{command:"activity",complete_mode:"full",omissions_by_mode:{digest:[{name:"event_rows",restore_with:"--raw"}],compact:[{name:"provenance",restore_with:"--full"}],provenance:[{name:"patch_and_hashes",restore_with:"--full"}]}},{command:"history",complete_mode:"full",omissions_by_mode:{compact:[{name:"raw_history",restore_with:"--full"}],provenance:[{name:"patch_and_hashes",restore_with:"--full"}]}}];function Xe(e,t,n){if(e&&t)throw new y(`${n} cannot be combined with --full`,h.USAGE)}function m(e,t=new Set){let n=e.filter(r=>!t.has(r.name)).map(r=>({...r}));return{has_omissions:n.length>0,omitted_field_group_count:n.length,omitted_field_groups:n}}function Je(e,t){let n=te.find(o=>o.command===e);if(n===void 0)throw new TypeError(`Unknown mode-paired output command: ${e}`);if(t===n.complete_mode)return m([]);let r=n.omissions_by_mode[t];if(r===void 0)throw new TypeError(`Unknown ${e} output mode: ${t}`);return m(r)}var ne=[{name:"hierarchy",restore_with:"--depth standard"},{name:"activity",restore_with:"--depth standard"},{name:"progress",restore_with:"--depth standard"},{name:"blockers",restore_with:"--depth standard"},{name:"recently_created",restore_with:"--depth standard"},{name:"unparented",restore_with:"--depth standard"},{name:"files",restore_with:"--depth deep"},{name:"workload",restore_with:"--depth standard"},{name:"staleness",restore_with:"--depth deep"},{name:"tests",restore_with:"--depth deep"},{name:"workspace_memory",restore_with:"--depth deep"}];function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var re=new Set([void 0,"tabular_when_uniform"]),oe=new Set(["collection","none"]),ie=new Set(["supported","unsupported"]);function se(e){return _(e)&&typeof e.command=="string"&&e.command.trim().length>0&&oe.has(e.row_kind)&&Array.isArray(e.row_keys)&&e.row_keys.every(t=>typeof t=="string"&&t.length>0)&&new Set(e.row_keys).size===e.row_keys.length&&ie.has(e.fields)&&re.has(e.toon_encoding)&&(e.row_kind==="collection"?e.row_keys.length>0&&typeof e.jq_selector=="string"&&e.jq_selector.trim().length>0:e.row_keys.length===0&&e.jq_selector===void 0)}var de={ancestors:["ids"],descendants:["ids"],predecessors:["ids"],successors:["ids"],paths:["paths"],impact:["affected"],audit:["findings"],communities:["communities"],redundancy:["redundant"],dominators:["bottlenecks"],slack:["rows"],centrality:["rows"],articulation:["articulation_points","bridges"],plan:["steps"]},ae={context:["sections_included","high_level","low_level"],get:["item"],list:["items","projection"],next:["recommended","ready","decision_needed","blocked","held_by_others"],search:["items","projection"],activity:["activity_digest","compact_activity","provenance_activity","activity"],history:["compact_history","provenance_history","history"],deps:["tree","graph","projection"],health:["checks"],aggregate:["groups"],duplicates:["clusters"],stats:["totals","by_type","by_status"],comments:["comments"],notes:["notes"],learnings:["learnings"],files:["files"],docs:["docs"],validate:["checks","warnings"],contracts:["command_summaries","commands","selected"]};function ce(e,t){let n=e.trim().toLowerCase().split(/\s+/u,1)[0],r=n?.startsWith("list-")?"list":n;if(r==="graph"){let i=typeof t.subcommand=="string"?t.subcommand:"";if(i.length===0)return;let d=de[i];if(d===void 0)return;let a=d.filter(c=>Array.isArray(t[c])||_(t[c]));return{command:"graph",row_kind:a.length>0?"collection":"none",row_keys:a,fields:"unsupported",...a.length>0?{jq_selector:$}:{},toon_encoding:"tabular_when_uniform"}}let o=ee[r],s=ae[r];return o===void 0||s===void 0||!s.some(i=>Object.hasOwn(t,i))?void 0:(()=>{let i=o.row_keys.filter(d=>{let a=d.split(".").reduce((c,u)=>_(c)?c[u]:void 0,t);return Array.isArray(a)||_(a)});return{command:r,row_kind:i.length>0?"collection":"none",row_keys:i,fields:o.fields,...i.length>0?{jq_selector:$}:{},toon_encoding:"tabular_when_uniform"}})()}function ue(e){if(!_(e.projection)||typeof e.projection.mode!="string"||e.projection.mode.trim().length===0)return;let t=e.projection.declared_field_groups,n=e.projection.included_field_groups;if(!Array.isArray(t)||!Array.isArray(n))return;let r=t.filter(i=>_(i)&&typeof i.name=="string"&&i.name.trim().length>0&&typeof i.restore_with=="string"&&i.restore_with.trim().length>0),o=n.filter(i=>typeof i=="string");if(r.length!==t.length||o.length!==n.length)return;let s=new Set(r.map(i=>i.name));if(!(s.size!==r.length||new Set(o).size!==o.length||o.some(i=>!s.has(i))))return m(r,new Set(o))}function fe(e){if(Array.isArray(e.sections_included))return m(ne,new Set(e.sections_included.filter(t=>typeof t=="string")))}function le(e){if(!_(e.item))return;let t=e.item,n=["comments","notes","learnings","files","tests","docs","reminders","events"],r=["body","children","claim_state","linked","schedule"],o=P.get(e),s=d=>n.includes(d)||d==="body"?t:e,i=["body",...n,...r.slice(1)].filter(d=>o===void 0||o.has(d)||Object.hasOwn(s(d),d)).map(d=>({name:d,restore_with:`--fields ${d}`}));return m(i,new Set(i.flatMap(({name:d})=>Object.hasOwn(s(d),d)?[d]:[])))}function L(e){if(_(e.projection))return m([{name:"full_item_fields",restore_with:"--full"}],new Set(e.projection.mode==="full"?["full_item_fields"]:[]))}function _e(e){if(!_(e.projection))return m([]);if(typeof e.projection.mode=="string")return m([{name:"full_check_details",restore_with:"--full"}],new Set(e.projection.mode==="full"?["full_check_details"]:[]))}function me(e){if(!(!_(e.selected)||typeof e.selected.summary!="boolean"))return m([{name:"full_contract_catalog",restore_with:"--full"}],new Set(e.selected.summary?[]:["full_contract_catalog"]))}function pe(e,t){let n=ue(t);if(n!==void 0)return n;let[r]=e.split(/\s+/u,1);if(r==="context")return fe(t);if(r==="get")return le(t);if(r==="list"||r.startsWith("list-"))return L(t);if(r==="search")return L(t)??m([{name:"projection_metadata",restore_with:"--full"}]);if(r==="health")return _e(t);if(r==="contracts")return me(t)}function U(e,t){if(e===void 0||!_(t))return t;let n=pe(e,t),r=t.row_contract,o=se(r)?r:ce(e,t),s=o!==void 0?{...t,row_contract:o}:Object.hasOwn(t,"row_contract")?Object.fromEntries(Object.entries(t).filter(([i])=>i!=="row_contract")):t;return _(s.omission_receipt)||n===void 0?s:{...s,omission_receipt:n}}(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]="fa03d543-ff0d-5556-8558-9bed82838a58")}catch{}})();var z=Object.freeze([{command:"context",intent:"orient",description:"Bounded active hierarchy, ownership, blockers, and recent progress.",included_field_groups:["summary","focus","hierarchy","blockers","activity"],token_budget:2400,source:"core"},{command:"context",intent:"handoff",description:"Active ownership, evidence, decisions, and immediate continuation context.",included_field_groups:["summary","focus","in_progress","decisions","activity"],token_budget:2200,source:"core"},{command:"get",intent:"inspect",description:"Standard-depth item metadata, relationships, evidence, and lifecycle state.",included_field_groups:["item","children","claim_state","linked"],token_budget:3200,source:"core"},{command:"list",intent:"triage",description:"A budget-derived page of compact governance, ownership, priority, and blocker rows for triage.",included_field_groups:["identity","governance","ownership","dependencies"],token_budget:3200,source:"core"},{command:"next",intent:"execute",description:"The highest-ranked actionable work with concise ranking evidence.",included_field_groups:["recommended"],token_budget:1200,source:"core"},{command:"search",intent:"discover",description:"A budget-derived page of ranked canonical lineage candidates with compact match evidence.",included_field_groups:["identity","status","lineage","match"],token_budget:1800,source:"core"}]),j=new ge;function he(){return j.getStore()??z}function rt(e,t){return j.run(we(e.workspaceContracts,e.packageContracts),t)}function ye(e,t){let n=e.command.trim().toLowerCase(),r=e.intent.trim().toLowerCase(),o=`${n}:${r}`;if(!/^[a-z0-9][a-z0-9-]*$/.test(n)||!/^[a-z0-9][a-z0-9-]*$/.test(r))throw new TypeError(`Invalid context intent command or name: ${o}`);if(e.description.trim().length===0)throw new TypeError(`Context intent ${o} requires a non-empty description`);if(!Number.isSafeInteger(e.token_budget)||e.token_budget<=0)throw new TypeError(`Context intent ${o} requires a positive integer token_budget`);let s=[...new Set(e.included_field_groups.map(i=>i.trim()).filter(Boolean))];if(s.length===0)throw new TypeError(`Context intent ${o} requires included_field_groups`);return{command:n,intent:r,description:e.description.trim(),included_field_groups:s,token_budget:e.token_budget,source:t}}function we(e=[],t=[]){let n=[{source:"core",contracts:z,allowOverride:!1},{source:"package",contracts:t,allowOverride:!1},{source:"workspace",contracts:e,allowOverride:!0}],r=new Map,o=new Set;for(let s of n){o.clear();for(let i of s.contracts){let d=ye(i,s.source),a=`${d.command}:${d.intent}`;if(o.has(a))throw new TypeError(`Duplicate context intent declaration: ${a}`);if(o.add(a),!s.allowOverride&&r.has(a))throw new TypeError(`Duplicate context intent declaration: ${a}`);r.set(a,d)}}return[...r.values()].sort((s,i)=>s.command.localeCompare(i.command)||s.intent.localeCompare(i.intent))}function q(e,t,n=he()){let r=e.trim().toLowerCase(),o=t.trim().toLowerCase(),s=n.find(c=>c.command===r&&c.intent===o);if(s)return{...s,source:s.source??"core"};let i=n.filter(c=>c.command===r).map(c=>c.intent);if(i.length===0)return;let d=i.map(c=>{let u=Array.from({length:o.length+1},(p,f)=>f);for(let p=1;p<=c.length;p+=1){let f=u[0];u[0]=p;for(let l=1;l<=o.length;l+=1){let J=u[l];u[l]=Math.min(u[l]+1,u[l-1]+1,f+(c[p-1]===o[l-1]?0:1)),f=J}}return{candidate:c,distance:u[o.length]}}).sort((c,u)=>c.distance-u.distance||c.candidate.localeCompare(u.candidate))[0].candidate,a=`pm ${r} --for ${d}`;throw new y(`Unknown context intent "${o}" for ${r}. Did you mean "${d}"?`,h.USAGE,{code:"unknown_context_intent",reason:"unknown_intent",field:"for",required:`Use a declared ${r} intent.`,why:"Intent names are command-local contracts and cannot be inferred from output section names.",nextSteps:[a],recovery:{recovery_mode:"compact",attempted_command:`pm ${r} --for ${o}`,suggested_retry:a}})}var Q={context:(e,t,n)=>{e.depth===void 0&&(e.depth=t.intent==="handoff"?"deep":"standard"),e.section===void 0&&(e.section=t.intent==="handoff"?["activity","progress","blockers"]:["hierarchy","blockers","activity"]);let r=E(e.tokenBudget,t.token_budget),o=Math.max(1,Math.floor((r-800)/500)),s=String(n?o:Math.min(20,o));e.limit===void 0&&(e.limit=s),e.activityLimit===void 0&&(e.activityLimit=s)},get:e=>{e.depth===void 0&&e.fields===void 0&&(e.depth="standard")},list:(e,t,n)=>{if(e.brief===void 0&&e.compact===void 0&&e.full===void 0&&e.fields===void 0&&(e.fields="id,title,status,type,priority,parent,assignee,risk,blocked_by"),e.limit===void 0){let r=E(e.tokenBudget,t.token_budget),o=Math.max(2,Math.floor((r-520)/16));e.limit=String(n?o:Math.min(100,o))}},next:e=>{e.readyOnly===void 0&&(e.readyOnly=!0)},search:(e,t,n)=>{if(e.compact===void 0&&e.full===void 0&&e.fields===void 0&&(e.compact=!0),e.limit===void 0){let r=E(e.tokenBudget,t.token_budget),o=Math.max(2,Math.floor((r-480)/16));e.limit=String(n?o:Math.min(100,o))}}};function ot(e,t){let n=t.tokenBudget??t.token_budget;if(typeof t.for!="string"){if(n!==void 0&&(e==="get"||e==="list"||e==="search"))throw new y("--token-budget requires a declared context intent selected with --for",h.USAGE,{code:"missing_required_option",field:"for",required:"Select a context intent with --for when setting --token-budget.",why:"A token-budget override has no projection contract to constrain without a selected intent.",nextSteps:["Retry with --for <intent> --token-budget <n>, or omit --token-budget."]});if(t.tokenBudget!==void 0||t.token_budget===void 0)return t;let i={...t,tokenBudget:n};return delete i.token_budget,i}let r=q(e,t.for),o=T(n)!==void 0,s={...t};return s.tokenBudget===void 0&&n!==void 0&&(s.tokenBudget=n),delete s.token_budget,s.tokenBudget===void 0&&(s.tokenBudget=String(r.token_budget)),Q[e](s,r,o),s}var be={context:"bounded_sections",get:"standard_item",list:"bounded_fields_and_rows",next:"bounded_ranked_rows",search:"bounded_ranked_rows"},O=256;function v(e){return Array.isArray(e)?e.map(v):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,v(n)])):typeof e=="string"&&e.length>240?`${e.slice(0,240)}\u2026`:e}function T(e){let t=typeof e=="number"?e:typeof e=="string"&&/^\d+$/u.test(e.trim())?Number(e):Number.NaN;return Number.isSafeInteger(t)&&t>0?t:void 0}function E(e,t){let n=T(e);if(n===void 0)return t;if(n<O)throw new y(`Context intent token budget must be at least ${O}`,h.USAGE,{code:"invalid_argument_value",reason:"below_minimum",field:"tokenBudget",required:`Use an integer token budget of at least ${O}.`,why:"Smaller ceilings cannot contain the minimum machine-readable intent receipt.",nextSteps:[`Retry with --token-budget ${O} or omit the override.`]});return n}function g(e,t){let n=t.estimated_tokens;for(;;){t.estimated_tokens=n;let r=Math.ceil(Buffer.byteLength(JSON.stringify(e),"utf8")/4);if(r===n)return;n=r}}var G={context:["high_level","low_level","blocked_fallback","recently_created","unparented","hierarchy","activity","blockers"],get:["children"],list:["items"],next:["ready","decision_needed","blocked","held_by_others"],search:["items"]};function W(e){try{let t=JSON.parse(Buffer.from(e,"base64url").toString("utf8"));return typeof t.fingerprint!="string"||!Number.isSafeInteger(t.after_index)?void 0:{fingerprint:t.fingerprint,after_index:t.after_index,...typeof t.snapshot=="string"?{snapshot:t.snapshot}:{}}}catch{return}}function ke(e){if(e===null||typeof e!="object")return;if(typeof e.id=="string")return e.id;let t=e.item?.id;return typeof t=="string"?t:void 0}function xe(e,t,n){let r=!1;for(;;){if(g(e,t),t.estimated_tokens<=t.token_budget||n.length<=1)return r;let o=Buffer.byteLength(JSON.stringify(n),"utf8"),s=(t.estimated_tokens-t.token_budget)*4;n.splice(-Math.min(n.length-1,Math.max(1,Math.ceil(s/Math.max(1,Math.ceil(o/n.length)))))),r=!0}}function Oe(e,t,n){let r=e.items,o=typeof e.next_cursor=="string",s=o?e.next_cursor:n.after;if(!Array.isArray(r)||typeof s!="string")return!1;let i=W(s);if(i===void 0)return!1;let d=r.length,a=[...r],c=!1;for(;;){if(c=xe(e,t,r)||c,!c)return!1;let u=ke(r.at(-1));if(u===void 0)return r.splice(0,r.length,...a),g(e,t),!1;if(e.next_cursor=R(i.fingerprint,u,o?i.after_index-(d-r.length):i.after_index+r.length,i.snapshot),g(e,t),t.estimated_tokens<=t.token_budget||r.length<=1)break}return typeof e.count=="number"&&(e.count=r.length),typeof e.applied_limit=="number"&&(e.applied_limit=r.length),!0}function Ee(e,t,n,r){if(e==="list"||e==="search")return Oe(t,n,r);if(e!=="next"||typeof t.next_cursor=="string")return!1;let o=!1;for(;;){if(g(t,n),n.estimated_tokens<=n.token_budget)return o;let s=G[e].map(f=>({key:f,rows:Array.isArray(t[f])?t[f]:[]})).filter(({rows:f})=>f.length>0).sort((f,l)=>l.rows.length-f.rows.length||f.key.localeCompare(l.key))[0];if(s===void 0)return o;let i=G[e].reduce((f,l)=>f+(Array.isArray(t[l])?t[l].length:0),0);if(i<=1)return o;let d=Math.min(s.rows.length,i-1),a=Buffer.byteLength(JSON.stringify(s.rows),"utf8"),c=Math.max(1,Math.ceil(a/s.rows.length)),u=(n.estimated_tokens-n.token_budget)*4,p=Math.min(d,Math.max(1,Math.ceil(u/c)));s.rows.splice(-p,p),o=!0}}function Ce(e,t,n){if(typeof t.for!="string")return n;let r=e.startsWith("list-")?"list":e;if(!(r in Q))return n;let o=r,s=q(o,t.for),i={command:o,intent:s.intent,source:s.source,included_field_groups:[...s.included_field_groups],token_budget:E(t.tokenBudget??t.token_budget,s.token_budget),estimated_tokens:0,within_budget:!0,degradation:be[o],declaration_feasible:!0,result_omitted:!1},d={...n};if(o==="list"||o==="search"){let c=o==="list"?520:480,u=Math.max(2,Math.floor((i.token_budget-c)/16)),f=T(t.tokenBudget??t.token_budget)!==void 0?u:Math.min(100,u),l=t.limit!==void 0;i.budget_derived_limit=f,i.binding_constraint=l?"explicit_limit":"token_budget",i.limit_reason=l?"The caller supplied an explicit row limit; the budget-derived limit remains diagnostic.":"The selected intent token budget determines the row ceiling.",d.budget_derived_limit=f}let a={...d,context_intent:i};return g(a,i),i.estimated_tokens>i.token_budget&&(i.degradation="recursive_budget_compaction",a={...v(d),context_intent:i},g(a,i)),i.estimated_tokens>i.token_budget&&Ee(o,a,i,t)&&(i.degradation="budget_row_compaction",g(a,i)),i.estimated_tokens>i.token_budget&&(i.degradation="budget_receipt_only",i.declaration_feasible=!1,i.result_omitted=!0,i.within_budget=!1,a={budget_exceeded:{omitted_result:!0,reason:"declared_budget_infeasible",restore_with:"Increase --token-budget or narrow the request; the unprojected command may be larger."},context_intent:i},g(a,i)),a}function Re(e,t){if(typeof e.after!="string"||e.after.length===0)return t;let n=W(e.after)?.fingerprint??"opaque_cursor",r={...t};for(let o of["applied_limit","completeness","context_intent","count","filters","has_more","now","omission_receipt","projection","row_contract","sorting","total","truncated"])delete r[o];return r.continuation_contract={fingerprint:n,metadata:"reference",restore_with:"omit --after"},r}function K(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function b(e,t){if(K(e))return typeof e[t]=="number"?e[t]:void 0}function Se(e,t){let n=e;for(let r=0;r<8;r+=1){let o=b(n.context_intent,"estimated_tokens"),s=b(n.read_output,"estimated_tokens"),i=b(n.read_session,"spent_this_call_tokens");if(K(n.context_intent)&&g(n,n.context_intent),n=N(n,t),b(n.context_intent,"estimated_tokens")===o&&b(n.read_output,"estimated_tokens")===s&&b(n.read_session,"spent_this_call_tokens")===i)break}return n}function it(e,t,n){let r=U(e,n),o=typeof r=="object"&&r!==null&&!Array.isArray(r)?M(e??"",t,Re(t,Ce(e??"",t,r))):r;return t.outputRowContract===!0||t.output_row_contract===!0||typeof o!="object"||o===null||Array.isArray(o)||!Object.hasOwn(o,"row_contract")?o:Se(Object.fromEntries(Object.entries(o).filter(([s])=>s!=="row_contract")),t)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="02baf966-46eb-5e19-b7eb-2f9fe05bb263")}catch{}})();var k=["result_rows","envelope","diagnostics","hints"],ve=/^(?:items|results|rows|ready|blocked|recommended|decision_needed|children|dependencies|events|matches|commands|tools)$/u,Te=/^(?:diagnostics|errors?|warnings?|findings|violations|failures?)$/u,Ae=/^(?:hints?|suggestions?|next_steps?|recovery|remediation|examples?)$/u,Ie=8;function A(e){return Buffer.byteLength(e,"utf8")}function F(e){return A(JSON.stringify(e)??"null")}function Ne(e,t){return Te.test(e)?"diagnostics":Ae.test(e)?"hints":ve.test(e)||Array.isArray(t)?"result_rows":"envelope"}function Me(e){let t={result_rows:0,envelope:0,diagnostics:0,hints:0};if(typeof e!="object"||e===null||Array.isArray(e))return t[Array.isArray(e)?"result_rows":"envelope"]=F(e),t;for(let[n,r]of Object.entries(e))t[Ne(n,r)]+=F({[n]:r});return Object.values(t).every(n=>n===0)&&(t.envelope=1),t}function Be(e,t){let n=k.reduce((i,d)=>i+t[d],0),r=k.map(i=>({section:i,value:e*t[i]/n})),o={result_rows:0,envelope:0,diagnostics:0,hints:0};for(let i of r)o[i.section]=Math.floor(i.value);let s=e-k.reduce((i,d)=>i+o[d],0);for(let i of[...r].sort((d,a)=>a.value-Math.floor(a.value)-(d.value-Math.floor(d.value))||k.indexOf(d.section)-k.indexOf(a.section))){if(s===0)break;o[i.section]+=1,s-=1}return o}function X(e,t){return typeof e=="object"&&e!==null&&!Array.isArray(e)?{...e,token_accounting:t}:{result:e,token_accounting:t}}function at(e,t){let n=A(t(e)),r=Be(n,Me(e)),o=Object.fromEntries(k.map(d=>[d,{bytes:r[d],estimated_tokens:x(r[d])}])),s={version:1,measurement_scope:"output_before_token_accounting",estimator:"ceil(utf8_bytes / 4)",total_bytes:n,total_estimated_tokens:x(n),sections:o,accounting_receipt_bytes:0,accounting_receipt_estimated_tokens:0,excluded_fields:["token_accounting"],section_allocation:"proportional_canonical_json"},i=X(e,s);for(let d=0;d<Ie;d+=1){let a=A(t(i))-n;if(a===s.accounting_receipt_bytes)return i;s={...s,accounting_receipt_bytes:a,accounting_receipt_estimated_tokens:x(a)},i=X(e,s)}return i}export{Fe as a,Xe as b,Je as c,U as d,Ue as e,Ge as f,R as g,S as h,ze as i,Z as j,je as k,qe as l,z as m,he as n,rt as o,we as p,q,ot as r,W as s,ke as t,Ce as u,it as v,at as w};
2
- //# sourceMappingURL=chunk-ZM6TZVHC.js.map