@unbrained/pm-cli 2026.8.18 → 2026.8.20
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 +35 -2
- package/dist/cli/error-guidance.js +3 -2
- package/dist/cli/help-content.js +32 -13
- package/dist/cli/help-json-payload.d.ts +15 -0
- package/dist/cli/help-json-payload.js +101 -23
- package/dist/cli/main.js +6 -2
- package/dist/cli/register-list-query.js +18 -13
- package/dist/cli/register-mutation.js +8 -8
- package/dist/cli/register-operations.js +6 -6
- package/dist/cli/register-structured-mutation.d.ts +2 -0
- package/dist/cli/register-structured-mutation.js +29 -6
- package/dist/cli-bundle/bundle-manifest.json +151 -143
- package/dist/cli-bundle/chunks/{chunk-UYCLQVL2.js → chunk-2RDVGYWE.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-BSK2IN3C.js → chunk-4GB2LTOQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RZQTVMRQ.js → chunk-7BRF2BX2.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-BLVQHFSY.js +35 -0
- package/dist/cli-bundle/chunks/chunk-CU25EQVV.js +5 -0
- package/dist/cli-bundle/chunks/chunk-K3EN3LK2.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-YRGOLZA7.js → chunk-L4LGPBJU.js} +49 -49
- package/dist/cli-bundle/chunks/chunk-RS3IV2R6.js +197 -0
- package/dist/cli-bundle/chunks/chunk-TSMWLCHS.js +3 -0
- package/dist/cli-bundle/chunks/chunk-US2ZQW2M.js +77 -0
- package/dist/cli-bundle/chunks/{chunk-5UZZAJKR.js → chunk-XYDDWBZN.js} +2 -2
- package/dist/cli-bundle/chunks/register-list-query-JSAQCVOC.js +11 -0
- package/dist/cli-bundle/chunks/register-mutation-XJPAW63D.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-DSOSB2XQ.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-PPPEF3SN.js → register-setup-QUR6QL2C.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-325UXIO7.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-5L7M4AI7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ODOVCP45.js → chunk-6AHG2YW7.js} +44 -44
- package/dist/cli-bundle/focused-chunks/chunk-AZBACT5T.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TN4AE665.js → chunk-BLJCGGID.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-FUREQLQN.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-M62NO7EI.js → chunk-G3C5ERXG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-K43KKAFS.js → chunk-GXWQBE3T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UI6AJ5TD.js → chunk-JWKEDZJI.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-KYZ6JGPL.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EX6MKP2X.js → chunk-M32HFIQB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EUEGXZ2A.js → chunk-OM65KHGF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q47EX4DI.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-V5XTGLK7.js → chunk-RIHDMCUM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-T4ZFY7ZJ.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-TDR5OGG3.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-UGSS4F5X.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z3PLWSGM.js +2 -0
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -1
- package/dist/cli-bundle/sdk-core.js +41 -41
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +32 -32
- 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 +5 -4
- package/dist/core/output/mutation-projection.js +26 -2
- package/dist/core/shared/constants.d.ts +1 -5
- package/dist/core/shared/constants.js +3 -81
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/item-metadata-contract.d.ts +14 -0
- package/dist/core/shared/item-metadata-contract.js +90 -0
- package/dist/core/store/item-store.d.ts +60 -0
- package/dist/core/store/item-store.js +22 -5
- package/dist/sdk/agent/closed-domain-contracts.d.ts +25 -0
- package/dist/sdk/agent/closed-domain-contracts.js +140 -0
- package/dist/sdk/agent/refusal-closure.d.ts +53 -0
- package/dist/sdk/agent/refusal-closure.js +134 -0
- package/dist/sdk/agent/refusal-reachability.d.ts +27 -1
- package/dist/sdk/agent/refusal-reachability.js +26 -2
- package/dist/sdk/agent-capability-contracts.d.ts +13 -0
- package/dist/sdk/agent-capability-contracts.js +101 -9
- package/dist/sdk/cli-contracts/command-aliases.js +18 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
- package/dist/sdk/cli-contracts/commander-types.js +5 -4
- package/dist/sdk/cli-contracts/completeness.js +8 -2
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +16 -6
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +7 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +84 -8
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +72 -0
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +340 -0
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +83 -2
- package/dist/sdk/cli-contracts/grammar-contracts.js +618 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +15 -4
- package/dist/sdk/cli-contracts/runtime-contracts.js +47 -13
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
- package/dist/sdk/cli-contracts/tool-schema.js +7 -2
- package/dist/sdk/cli-contracts.d.ts +4 -3
- package/dist/sdk/cli-contracts.js +6 -5
- package/dist/sdk/context-intent-contracts.d.ts +2 -2
- package/dist/sdk/context-intent-contracts.js +22 -7
- package/dist/sdk/contracts.d.ts +3 -0
- package/dist/sdk/contracts.js +5 -2
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
- package/dist/sdk/flag-invocation-contracts.js +218 -9
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +206 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +244 -40
- package/dist/sdk/index.d.ts +11 -7
- package/dist/sdk/index.js +10 -6
- package/dist/sdk/init-agent-guidance.d.ts +5 -3
- package/dist/sdk/init-agent-guidance.js +69 -9
- package/dist/sdk/lifecycle/mcp-actions.d.ts +18 -0
- package/dist/sdk/lifecycle/mcp-actions.js +52 -0
- package/dist/sdk/lifecycle/reopen.d.ts +44 -0
- package/dist/sdk/lifecycle/reopen.js +69 -0
- package/dist/sdk/lifecycle/update.d.ts +31 -0
- package/dist/sdk/lifecycle/update.js +95 -13
- package/dist/sdk/output-projection.d.ts +2 -0
- package/dist/sdk/output-projection.js +11 -5
- package/dist/sdk/query/get.d.ts +1 -1
- package/dist/sdk/query/get.js +34 -49
- package/dist/sdk/query/list.d.ts +7 -21
- package/dist/sdk/query/list.js +44 -44
- package/dist/sdk/query/projection-contracts.d.ts +33 -0
- package/dist/sdk/query/projection-contracts.js +185 -0
- package/dist/sdk/query/search-contracts.d.ts +3 -2
- package/dist/sdk/query/search-contracts.js +30 -85
- package/dist/sdk/query/search.d.ts +15 -0
- package/dist/sdk/query/search.js +32 -6
- package/dist/sdk/read-output/continuation.d.ts +1 -1
- package/dist/sdk/read-output/continuation.js +7 -24
- package/dist/sdk/read-output-contracts.js +55 -6
- package/dist/sdk/read-output-rows.d.ts +4 -0
- package/dist/sdk/read-output-rows.js +47 -18
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.d.ts +6 -0
- package/dist/sdk/runtime.js +25 -17
- package/dist/sdk/similarity.d.ts +13 -0
- package/dist/sdk/similarity.js +32 -6
- package/dist/sdk/workspace-snapshot.d.ts +2 -0
- package/dist/sdk/workspace-snapshot.js +10 -2
- package/docs/COMMANDS.md +29 -5
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
- package/docs/README.md +1 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
- package/docs/RECURRENCE_RECOVERY_CONTRACTS.md +114 -0
- package/docs/SDK.md +16 -2
- package/docs/SDK_CONTEXT_INTEGRITY.md +45 -0
- package/docs/TESTING.md +14 -1
- package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
- package/docs/performance/sdk-entrypoint-import-costs.md +14 -21
- package/marketplace.json +2 -2
- package/package.json +9 -7
- 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/scripts/generate-agent-capability-surfaces.mjs +20 -14
- package/sdk/public-surface.json +950 -24
- package/dist/cli-bundle/chunks/chunk-ALDJGKAK.js +0 -2
- package/dist/cli-bundle/chunks/chunk-DY4DMUMC.js +0 -197
- package/dist/cli-bundle/chunks/chunk-GNFAFIJI.js +0 -77
- package/dist/cli-bundle/chunks/chunk-L5Q2CLPE.js +0 -35
- package/dist/cli-bundle/chunks/chunk-PVRUN5ZS.js +0 -5
- package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +0 -3
- package/dist/cli-bundle/chunks/register-list-query-I23LALEE.js +0 -11
- package/dist/cli-bundle/chunks/register-mutation-6YGU3GPH.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-4HTFC6J7.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2PN4TJXH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3TKWMNKF.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-5AF3ZBNB.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-C5IW2NDA.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RNDNMARJ.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-TVV2DONO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-WGHQVU6P.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-XYNBXTDQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z56ECT7I.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as G}from"./chunk-Q47EX4DI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="21495fd2-6abb-5a4f-965c-e7b9c8f87dff")}catch{}})();var $=["item","list","context","search","graph","history","workspace","package","ops","plan","contracts","help"],oe=["activate","add","adopt","adopt-all","catalog","compact","complete","create","deactivate","delete","describe","doctor","edit","explore","import","init","inspect","install","list","manage","migrate","mutate","read","redact","reload","remove","reopen","repair","restore","run","show","uninstall","verify"];function s(e,a,t,l={}){return{name:e,required:t,variadic:l.variadic===!0,value_kind:a,polymorphic:l.polymorphic===!0}}function I(e){let a=e.replaceAll("-"," ");return`${a.charAt(0).toUpperCase()}${a.slice(1)}`}var g=s("id","item_id",!0),T=s("id","item_id",!1),A=s("text","string",!1),C=s("plan-id","item_id",!0),P=s("step","string",!0),ie=["--acceptance-criteria","--actual-result","--affected-version","--assignee","--blocked-by","--blocked-reason","--blocks","--body","--claim","--comment","--component","--confidence","--create-mode","--customer-impact","--deadline","--definition-of-ready","--description","--doc","--environment","--estimate","--event","--expected-result","--fixed-version","--file","--from-search","--goal","--harness","--impact","--learning","--message","--mode","--note","--objective","--order","--outcome","--parent","--priority","--rank","--related","--release","--reminder","--reporter","--repro-steps","--resolution","--resume-context","--reviewer","--risk","--scope","--severity","--sprint","--status","--step","--step-blocked-reason","--step-body","--step-evidence","--step-owner","--step-replacement","--step-status","--step-title","--tags","--template","--test","--title","--type-option","--unblock-note","--value","--why-now"],N=["--allow-multiple-active","--depends-on","--file","--force","--message","--step-blocked-reason","--step-body","--step-evidence","--step-owner","--step-status","--step-title","--test"],ge={"update-step":"Update one declared Plan step.","complete-step":"Complete one declared Plan step.","block-step":"Block one declared Plan step.","remove-step":"Remove one declared Plan step.",link:"Link one dependency to a declared Plan step.",unlink:"Unlink one dependency from a declared Plan step."},v=[{command:"plan create",parent:"plan",action:"create",slots:[s("title","string",!1,{polymorphic:!0})],accepted_flags:ie,description:"Create a Plan item and optionally seed its ordered steps.",example:'pm plan create --title "Refactor lock retry"'},{command:"plan show",parent:"plan",action:"show",slots:[C],accepted_flags:["--depth","--fields"],description:"Read one Plan item with a bounded plan projection.",example:"pm plan show pm-a1b2 --depth standard"},{command:"plan add-step",parent:"plan",action:"add-step",slots:[C],accepted_flags:N,description:"Append one ordered step to a Plan item.",example:'pm plan add-step pm-a1b2 --step-title "Run tests"'},...Object.entries(ge).map(([e,a])=>({command:`plan ${e}`,parent:"plan",action:e,slots:[C,P],accepted_flags:N,description:a,example:`pm plan ${e} pm-a1b2 plan-step-001`})),{command:"plan reorder-step",parent:"plan",action:"reorder-step",slots:[C,P,s("new-order","integer",!0)],accepted_flags:["--force","--message"],description:"Move one Plan step to a declared integer order.",example:"pm plan reorder-step pm-a1b2 plan-step-001 2"},...["decision","discovery","validation","resume","approve","materialize"].map(e=>({command:`plan ${e}`,parent:"plan",action:e,slots:[C],accepted_flags:N,description:`${I(e)} for one Plan item.`,example:`pm plan ${e} pm-a1b2`})),...["list","show","put","remove"].map(e=>({command:`assurance ${e}`,parent:"assurance",action:e,slots:[s("kind","string",!0),...e==="list"?[]:[s("id","string",!0)]],accepted_flags:e==="put"?["--author","--definition","--message"]:e==="remove"?["--author","--message"]:[],description:`${I(e)} assurance declarations by kind.`,example:e==="list"?"pm assurance list measurement":`pm assurance ${e} measurement example-id`})),{command:"assurance run",parent:"assurance",action:"run",slots:[s("gate-id","string",!0)],accepted_flags:["--dry-run","--trigger","--tree"],description:"Evaluate one assurance gate for a lifecycle trigger.",example:"pm assurance run tracker-context-quality --trigger ci --dry-run"},{command:"assurance verdicts",parent:"assurance",action:"verdicts",slots:[s("gate-id","string",!1)],accepted_flags:["--gate","--limit"],description:"List bounded assurance verdict history.",example:"pm assurance verdicts --limit 20"},...["presets","apply"].map(e=>({command:`assurance ${e}`,parent:"assurance",action:e,slots:[s("preset","string",e==="apply")],accepted_flags:["--author","--message","--owner"],description:e==="apply"?"Apply one assurance adoption preset.":"List available assurance adoption presets.",example:e==="apply"?"pm assurance apply software-delivery --owner <pm-item-id>":"pm assurance presets"})),{command:"assurance derive",parent:"assurance",action:"derive",slots:[],accepted_flags:["--apply","--author","--message","--owner"],description:"Derive assurance proposals from current project context.",example:"pm assurance derive --owner pm-a1b2"},{command:"assurance promote",parent:"assurance",action:"promote",slots:[s("assertion-id","string",!0)],accepted_flags:["--author","--enforcement","--message"],description:"Promote one assertion into a warning or blocking gate.",example:"pm assurance promote assertion-id --enforcement warn"},{command:"assurance risk",parent:"assurance",action:"risk",slots:[],accepted_flags:["--definition"],description:"Analyze bounded defect-recurrence risk for a proposed change.",example:`pm assurance risk --definition '{"change":{"files":[]}}'`},{command:"workspace snapshot create",parent:"workspace snapshot",action:"create",slots:[s("name","string",!1)],accepted_flags:[],description:"Capture authoritative tracker state as an immutable snapshot.",example:"pm workspace snapshot create before-migration"},{command:"workspace snapshot list",parent:"workspace snapshot",action:"list",slots:[],accepted_flags:[],description:"List immutable workspace snapshots and named references.",example:"pm workspace snapshot list"},{command:"workspace snapshot inspect",parent:"workspace snapshot",action:"inspect",slots:[s("target","string",!0)],accepted_flags:[],description:"Inspect one workspace snapshot target.",example:"pm workspace snapshot inspect before-migration"},{command:"workspace snapshot restore",parent:"workspace snapshot",action:"restore",slots:[s("target","string",!0)],accepted_flags:["--author","--dry-run","--force","--message"],description:"Restore an immutable workspace snapshot with explicit recovery controls.",example:"pm workspace snapshot restore before-migration --dry-run"},{command:"workspace snapshot delete",parent:"workspace snapshot",action:"delete",slots:[s("target","string",!0)],accepted_flags:[],description:"Delete one workspace snapshot target.",example:"pm workspace snapshot delete before-migration"}],fe=[...v].sort((e,a)=>a.command.length-e.command.length),U=new Map([["append",[g,A]],["assurance",[s("action","action",!0),s("kind","string",!1),s("id","string",!1)]],["beads import",[s("file","string",!1)]],["changelog export",[s("file","string",!1)]],["claim",[T]],["close",[g,A]],["close-task",[g,s("reason","string",!1)]],["comments",[g,A]],["completion",[s("shell","string",!1)]],["config",[s("scope","string",!1,{polymorphic:!0}),s("action","action",!1),s("key","string",!1),s("value","string",!1,{polymorphic:!0})]],["copy",[g]],["create",[s("type-or-title","string",!1,{polymorphic:!0}),s("title","string",!1)]],["delete",[g]],["deps",[g]],["docs",[g]],["event",[s("title","string",!0)]],["extension",[s("target","string",!1,{polymorphic:!0})]],["extension list",[]],["extension scaffold",[s("target","string",!0)]],["files",[g]],["files discover",[g]],["files lookup",[s("paths","string",!0,{variadic:!0})]],["focus",[T]],["get",[g]],["graph",[s("subcommand","action",!0),T,s("target","item_id",!1)]],["guide",[s("topic","string",!1)]],["history",[g]],["history-compact",[T]],["history-redact",[g]],["history-repair",[T]],["init",[s("prefix-or-path","string",!1,{polymorphic:!0})]],["install",[s("targets","string",!1,{variadic:!0})]],["item complete",[g,s("reason","string",!1)]],["item reopen",[g,s("reason","string",!0)]],["learnings",[g,A]],["meet",[s("title","string",!0)]],["merge",[s("subcommand","action",!0),s("artifact","string",!1),s("base","string",!1),s("ours","string",!1),s("theirs","string",!1)]],["notes",[g,A]],["package",[s("target","string",!1,{polymorphic:!0})]],["package list",[]],["package scaffold",[s("target","string",!0)]],["packages",[s("target","string",!1,{polymorphic:!0})]],["packages list",[]],["packages scaffold",[s("target","string",!0)]],["pause-task",[g]],["plan",[s("subcommand","action",!0),s("id","item_id",!1,{polymorphic:!0}),s("step","string",!1),s("new-order","integer",!1)]],["profile",[s("subcommand","action",!0),s("name","string",!1)]],["release",[g]],["remind",[s("title","string",!0)]],["restore",[g,s("target","string",!0)]],["schema",[s("subcommand","action",!0),s("name","string",!1)]],["search-advanced",[s("keywords","string",!0,{variadic:!0})]],["search",[s("keywords","string",!0,{variadic:!0})]],["start-task",[g]],["telemetry",[s("namespace-or-subcommand","action",!1,{polymorphic:!0}),s("subcommand","action",!1)]],["test",[g]],["update",[g]],["upgrade",[s("target","string",!1)]],["workspace snapshot",[s("action","action",!0),s("target","string",!1)]],...["activate","adopt","deactivate","init","uninstall"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("target","string",!0)]])),...["describe"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("target","string",!1)]])),...["install"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("targets","string",!1,{variadic:!0})]])),["vcs abandon",[g]],["vcs create",[s("title","string",!0)]],["vcs merge",[g]],["vcs propose",[g]],["vcs ref-create",[s("name","string",!0)]],["vcs show",[g]]]);function _(e){return e.trim().toLowerCase().replace(/\s+/gu," ")}function Xa(e){let a=_(e);return X.find(t=>t.command===a)}function ce(e){let a=_(e);return fe.find(t=>t.command===a||a.startsWith(`${t.command} `))}function za(e){return`Applicable flags: ${e.length>0?e.join(", "):"none"}.`}function i(e,a,t,l,r){return r.map(n=>({command:n,noun:e,target:a,disposition:t,owner:l}))}var x=[...i("item","item","target_noun","pm-pbyu",["item","item complete","item mutate","item reopen"]),...i("item","item","consolidation","pm-yql1",["append","claim","close","close-many","close-task","comments","copy","create","delete","docs","files","get","learnings","notes","pause-task","release","start-task","test","update","update-many"]),...i("item","item files","consolidation","pm-ya7x55",["files discover","files lookup"]),...i("list","list","target_noun","pm-pfqi",["list"]),...i("list","list --group-by","consolidation","pm-xkgq",["aggregate"]),...i("context","context","target_noun","pm-pbyu",["context"]),...i("context","context","consolidation","pm-kcs4",["ctx","focus","next"]),...i("search","search","target_noun","pm-pbyu",["search"]),...i("search","search","package_owned","package:search-advanced",["reindex","search-advanced"]),...i("search","search duplicates","consolidation","pm-3i9q8g",["duplicates"]),...i("graph","graph","target_noun","pm-pbyu",["graph"]),...i("graph","graph show","consolidation","pm-yql1",["deps"]),...i("history","history","target_noun","pm-pbyu",["history"]),...i("history","history","consolidation","pm-tqel",["activity","events","history-author-acknowledge","history-compact","history-redact","history-repair","merge","restore"]),...i("history","history","package_owned","package:builtin-vcs-exemplar",["vcs abandon","vcs create","vcs log","vcs merge","vcs propose","vcs ref-create","vcs show"]),...i("workspace","workspace","target_noun","pm-pbyu",["workspace","workspace snapshot","workspace snapshot create","workspace snapshot delete","workspace snapshot inspect","workspace snapshot list","workspace snapshot restore"]),...i("workspace","workspace init","consolidation","pm-n7rr",["init"]),...i("package","package","target_noun","pm-pbyu",["package","package activate","package adopt","package adopt-all","package catalog","package deactivate","package describe","package doctor","package explore","package init","package install","package list","package manage","package migrate","package reload","package scaffold","package uninstall"]),...i("package","package","consolidation","pm-tnud",["extension","extension activate","extension adopt","extension adopt-all","extension catalog","extension deactivate","extension describe","extension doctor","extension explore","extension init","extension install","extension list","extension manage","extension migrate","extension reload","extension scaffold","extension uninstall","install","packages","packages activate","packages adopt","packages adopt-all","packages catalog","packages deactivate","packages describe","packages doctor","packages explore","packages init","packages install","packages list","packages manage","packages migrate","packages reload","packages scaffold","packages uninstall","upgrade"]),...i("package","package","package_owned","package:beads",["beads import"]),...i("package","package","package_owned","package:pm-changelog",["changelog export","changelog generate"]),...i("package","package calendar","package_owned","pm-o3fh",["event","meet","remind"]),...i("ops","ops","consolidation","pm-6apl",["assurance","config","eval","gc","health","profile","schema","stats","telemetry","test-all","validate"]),...i("ops","ops assurance","consolidation","pm-2tan",v.filter(({parent:e})=>e==="assurance").map(({command:e})=>e)),...i("plan","plan","target_noun","pm-pbyu",["plan"]),...i("plan","plan","target_noun","pm-2tan",v.filter(({parent:e})=>e==="plan").map(({command:e})=>e)),...i("contracts","contracts","target_noun","pm-pbyu",["contracts"]),...i("help","help","target_noun","pm-pbyu",["help"]),...i("help","help","package_owned","package:builtin-guide-shell",["completion","completion-statuses","completion-tags","completion-types","guide"])],X=[...new Set(x.map(({command:e})=>e))].map(e=>({command:e,slots:ce(e)?.slots??U.get(e)??[]})),k={nouns:$,shared_verbs:oe,scope_before_verb:!0,visible_top_level_ceiling:69,ceiling_raise_requires_pm_item:!0,positional_shape_budget:21};function M(e,a){let t=new Set(a);return[...new Set(e)].filter(l=>!t.has(l)).map(l=>({code:"positional_signature_mismatch",command:l,detail:`Positional signature ${l} has no destination declaration.`}))}function pe(e){return e.map(({required:a,variadic:t,value_kind:l,polymorphic:r})=>`${a?"r":"o"}:${t?"v":"s"}:${l}:${r?"p":"m"}`).join("|")}function b(e){return e.map(({name:a,required:t,variadic:l,value_kind:r,polymorphic:n})=>`${a}:${t?"r":"o"}:${l?"v":"s"}:${r}:${n?"p":"m"}`).join("|")}function D(e,a){let t=new Map;for(let{command:l}of e){let r=_(l);t.set(r,(t.get(r)??0)+1)}return[...t.entries()].filter(([,l])=>l>1).map(([l,r])=>({code:"positional_signature_mismatch",command:l,detail:`${r} ${a} positional signatures exist for ${l}; exactly one is required.`}))}function ja(e,a={}){let t=a.declared??X,l=a.positionalShapeBudget??k.positional_shape_budget,r=new Map(t.map(o=>[_(o.command),o])),n=new Map(e.map(o=>[_(o.command),o])),c=[...D(t,"declared"),...D(e,"observed"),...a.declared===void 0?[...M(U.keys(),x.map(({command:o})=>o)),...M(v.map(({command:o})=>o),x.map(({command:o})=>o))]:[]];for(let o of r.values()){let d=_(o.command),f=n.get(d);f?b(f.slots)!==b(o.slots)&&c.push({code:"positional_signature_mismatch",command:o.command,detail:`Observed positional signature for ${o.command} differs from its declared SDK contract: observed=${b(f.slots)||"<none>"}; declared=${b(o.slots)||"<none>"}.`}):c.push({code:"missing_observed_signature",command:o.command,detail:`No observed positional signature exists for ${o.command}.`})}for(let o of n.values())r.has(_(o.command))||c.push({code:"stale_observed_signature",command:o.command,detail:`Observed positional signature ${o.command} has no declaration.`});let p=new Set(t.map(({slots:o})=>pe(o))).size;return p>l&&c.push({code:"positional_shape_budget_exceeded",command:"*",detail:`Distinct positional shape count ${p} exceeds budget ${l}.`}),c.sort((o,d)=>o.command!==d.command?o.command.localeCompare(d.command):o.code.localeCompare(d.code)),{ok:c.length===0,declared_command_count:t.length,observed_command_count:e.length,positional_shape_count:p,positional_shape_budget:l,findings:c}}function de(e,a,t){return e.flatMap(l=>{let r=a.get(l)??[];if(r.length===0){let c=l.indexOf(" "),p=c===-1?l:l.slice(0,c);return[{code:"missing_destination",spelling:l,message:`Command \`${l}\` has no destination census row.`,nearest_target:t.has(p)?p:`ops ${l}`}]}let n=r.length>1?[{code:"duplicate_destination",spelling:l,message:`Command \`${l}\` has ${r.length} destination rows.`,nearest_target:r[0].target}]:[];return r.reduce((c,p)=>(p.disposition==="keep_as_is"&&(p.reason?.trim().length??0)===0&&c.push({code:"missing_destination",spelling:l,message:`Command \`${l}\` is kept as-is without a documented reason.`,nearest_target:p.target}),t.has(p.noun)||c.push({code:"unknown_noun",spelling:l,message:`Command \`${l}\` names undeclared noun \`${p.noun}\`.`,nearest_target:p.target}),c),n)})}function me(e,a){return a.filter(t=>t.disposition!=="package_owned"&&!e.has(t.command)).map(t=>({code:"stale_destination",spelling:t.command,message:`Destination row \`${t.command}\` is absent from live contracts.`,nearest_target:t.target}))}function ue(e,a){return e.filter(t=>!a.has(t.canonical)).map(t=>({code:"alias_target_missing",spelling:t.alias,message:`Alias \`${t.alias}\` targets missing canonical command \`${t.canonical}\`.`,nearest_target:t.canonical_argv.join(" ")}))}function qa(e,a=[],t=x){let l=[...new Set(e.map(f=>f.trim()))].filter(f=>f.length>0).sort((f,h)=>f.localeCompare(h)),r=new Set(l),n=new Set($),c=new Map;for(let f of t){let h=c.get(f.command)??[];h.push(f),c.set(f.command,h)}let p=[...de(l,c,n),...me(r,t),...ue(a,r)],o=new Set(a.filter(f=>f.hidden).map(f=>f.alias)),d=new Set(l.filter(f=>!f.includes(" ")&&!o.has(f)&&!(c.get(f)??[]).some(h=>h.disposition==="package_owned"))).size;return d>k.visible_top_level_ceiling&&p.push({code:"visible_surface_ceiling_exceeded",spelling:String(d),message:`Visible non-package top-level command count ${d} exceeds ceiling ${k.visible_top_level_ceiling}.`,nearest_target:"Declare the noun placement and tracked waiver before raising the ceiling."}),{ok:p.length===0,command_count:l.length,destination_count:t.length,hidden_alias_count:a.filter(f=>f.hidden).length,visible_top_level_count:d,visible_top_level_ceiling:k.visible_top_level_ceiling,findings:p}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="f73e79d8-2a65-5a25-8c6f-ec9b06651634")}catch{}})();function y(e){return[...new Set(Array.from(e,a=>a.trim()).filter(a=>a.length>0))]}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="e302f519-aa51-503b-bd1a-f3155338f133")}catch{}})();function S(e){return e.startsWith("--")?`--${e.slice(2).replaceAll("_","-")}`:e}function w(e){let a=new Map;for(let t of e){let l=S(t.flag),r=a.get(l)??new Set;t.flag!==l&&r.add(t.flag);for(let n of t.aliases??[])n!==l&&r.add(n);a.set(l,r)}return e.map(t=>{let l=S(t.flag);if(t.flag!==l)return t;let r=y([...t.aliases??[],...a.get(l)]).filter(n=>n!==l);return r.length===0?t:{...t,aliases:r}})}function Wa(e){let a=w(e),t=new Set(a.map(l=>l.flag));return a.filter(l=>{let r=S(l.flag);return l.flag===r||!t.has(r)})}var L=G.map(e=>({flag:e.flag,...e.aliases?{aliases:[...e.aliases]}:{},...e.value_name?{value_name:e.value_name}:{}})),Ja=[...L,{flag:"--version"}],H=[{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"}],V=[{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"}],E=R([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--status",list:!0},{flag:"--all",value_type:"boolean"},{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"},...H,{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"])),_e=[{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}],he=[{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 R(e,a){return e.map(t=>a.has(t.flag)?{...t,cursor_semantics:"presentation"}:t)}var ve=[{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"}],Te=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--learning"]},{flag:"--limit"},{flag:"--full-history"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ae=[{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"}],Ce=[{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"}],ye=[{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"}],be=[{flag:"--dry-run"},{flag:"--output"},{flag:"--item-path"},{flag:"--prefer"}],ke=[{flag:"--id",value_name:"item-id"},{flag:"--literal"},{flag:"--regex"},{flag:"--replacement"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],xe=[{flag:"--id",value_name:"item-id"},{flag:"--all"},{flag:"--dry-run"},{flag:"--normalize-provenance"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Se=[{flag:"--event",repeatable:!0},{flag:"--all-actionable"},{flag:"--dry-run"},{flag:"--plan-fingerprint"},{flag:"--limit",value_type:"number"},{flag:"--attributed-author",aliases:["--attributed_author"]},{flag:"--reviewer"},{flag:"--reason"}],Ne=[{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"}],Oe=[{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"}],we=[{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],K=[{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"}],Le=[{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"}],Ee=[{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"}],W=[{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"}],m=[{flag:"--project"},{flag:"--local"},{flag:"--global"}],J=[...m,{flag:"--capability"}],z=[...W,{flag:"--declarative"}],Re=[...J,{flag:"--declarative"}],Fe=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],Ge=m,Ie=m,Pe=[...m,{flag:"--markdown"},{flag:"--output"}],Me=m,De=m,$e=m,Ue=[...m,{flag:"--dry-run"}],Xe=[...m,{flag:"--runtime-probe"},{flag:"--fix-managed-state"}],ze=[...m,{flag:"--watch"}],je=[...m,{flag:"--detail"},{flag:"--trace"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],j=[...m,{flag:"--fields",list:!0}],qe=[...m,{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],Be=[{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],Ye=[{flag:"--dry-run"},{flag:"--cli-only"},{flag:"--packages-only"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--repair"},{flag:"--tag"},{flag:"--package-name"}],Qa=[{flag:"--mode"},{flag:"--progress"}],He=[{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"}],Ve=[{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"},...V,{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"}],Ke=[{flag:"--id",value_name:"item-id"},{flag:"--body",short:"-b"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],We=[{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"]}],Je=[{flag:"--id",value_name:"item-id"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Qe=[{flag:"--id",value_name:"item-id"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ze=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],ea=[{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"}],ta=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--force"}],Q=[{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--tags"},{flag:"--priority"},{flag:"--body"},{flag:"--description"},{flag:"--author"},{flag:"--message"}],Z=[{flag:"--start"},{flag:"--duration"},{flag:"--end"},{flag:"--location"},{flag:"--timezone"},{flag:"--all-day"},...Q],la=Z,sa=[{flag:"--at"},{flag:"--text"},...Q],ra=[{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"}],na=[{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"}],oa=[{flag:"--limit"}],ia=[{flag:"--status"},{flag:"--limit"},{flag:"--stream"},{flag:"--tail"},{flag:"--force"},{flag:"--author"}],ga=[{flag:"--dry-run"},{flag:"--scope"}],fa=[{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"}],ca=[{flag:"--status",repeatable:!0,list:!0},{flag:"--since"},{flag:"--threshold"},{flag:"--limit"}],pa=[{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"}],da=[{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"}],ee=[{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"}],ae=[{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"}],te=[{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"}],le=[{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"]}],q=[{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"},...ae,...te,{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",aliases:["--linked-file"]},{flag:"--test",aliases:["--linked-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"}],ma=[{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"}],ua=[{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"}],_a=[{flag:"--id",value_name:"item-id"},{flag:"--status",value_name:"open|in_progress"},{flag:"--message",value_name:"value"},{flag:"--force"},{flag:"--author",value_name:"value"}],ha=[{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"}],va=[{flag:"--id",value_name:"item-id"},{flag:"--clear"}],Ta=[{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"},...le,...ae,{flag:"--fixed_version"},...te,{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",aliases:["--linked-file"]},{flag:"--test",aliases:["--linked-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"}],Aa=[{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"},...V,{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},...le,{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"}],B=[{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"}],Ca=[{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"}],ya=[{flag:"--since"},{flag:"--type",repeatable:!0},{flag:"--author",repeatable:!0},{flag:"--item",repeatable:!0},{flag:"--limit",value_type:"number"},{flag:"--cursor-mode",value_name:"batch|row"},{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"}],Y=R([{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"])),ba=[{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"}],ka=[{flag:"--list"},{flag:"--format"},{flag:"--depth"}],xa=[{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}],Sa=[{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"}],Na=[{flag:"--mode"},{flag:"--k"},{flag:"--fail-under"},{flag:"--queries"},{flag:"--format"}],u=[{flag:"--dry-run"},{flag:"--force"},{flag:"--author"},{flag:"--message"}],Oa=[{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"]}],wa=R([{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"},...H],new Set(["--highlight","--compact","--full","--fields","--format","--limit","--token-budget","--after"])),La=[{flag:"--action"},{flag:"--command"},{flag:"--summary"},{flag:"--schema-only"},{flag:"--flags-only"},{flag:"--availability-only"},{flag:"--runtime-only"},{flag:"--active-only"},{flag:"--full"}],Ea=[{flag:"--eager-tags"}];function Za(e){let a=new Set,t=[];for(let l of e){let r=(l.aliases??[]).join(","),n=`${l.flag}|${l.short??""}|${r}`;a.has(n)||(a.add(n),t.push(l))}return t}function O(e){let a=new Map;for(let t of[...L,...e]){let l=S(t.flag),r=a.get(l),{aliases:n,...c}=t,p=y([...n??[],...t.flag===l?[]:[t.flag]]).filter(f=>f!==l),o={...c,flag:l,...p.length>0?{aliases:p}:{}},d=y([...r?.aliases??[],...o.aliases??[]]);a.set(l,r===void 0?o:{...r,...o,...d.length>0?{aliases:d}:{}})}return w([...a.values()])}var Ra=["list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled"],Fa=E.filter(e=>e.flag!=="--status"&&e.flag!=="--all"),Ga=E.filter(e=>e.flag!=="--status");function F(e){let a=new Map;for(let t of e)for(let l of[t.flag,...t.aliases??[]]){let r=a.get(l)??[];r.push(t),a.set(l,r)}return a}var Ia=F(K),Pa=F(ee),Ma=new Map([["assurance",Pa],["plan",Ia],["workspace snapshot",F(u)]]);function Da(e=v){return e.map(({command:a,parent:t,accepted_flags:l})=>{let r=Ma.get(t);if(!r)throw new Error(`Positional action ${a} has no flag-contract index for ${t}.`);let n=l.map(c=>{let p=r.get(c)??[];if(p.length!==1)throw new Error(`Positional action ${a} accepted flag ${c} does not resolve to exactly one ${t} flag contract.`);return p[0]});return[a,n]})}var $a=Da(),se=new Map([["list",E],["list-all",Ga],...Ra.map(e=>[e,Fa]),["templates",q],["cal",B],["ctx",Y],["test-runs-worker",ia],["init",Le],["config",Ee],["extension",W],["package",z],["packages",z],["install",Be],["upgrade",Ye],["create",q],["item mutate",ma],["item complete",ua],["item reopen",_a],["copy",ha],["focus",va],["aggregate",_e],["calendar",B],["context",Y],["get",ba],["guide",ka],["search",wa],["next",Oa],["eval",Na],["workspace",u],["workspace snapshot",u],["workspace snapshot create",u],["workspace snapshot list",u],["workspace snapshot inspect",u],["workspace snapshot restore",u],["workspace snapshot delete",u],["history",ye],["history-redact",ke],["history-repair",xe],["history-author-acknowledge",Se],["history-compact",Ne],["merge",be],["schema",Oe],["profile",we],["plan",K],["activity",Ca],["events",ya],["restore",Je],["update",Ta],["update-many",Aa],["close",He],["close-many",Ve],["delete",Qe],["append",Ke],["comments",he],["notes",ve],["learnings",Te],["files",Ae],["docs",Ce],["deps",xa],["graph",Sa],["test",ra],["test-all",na],["telemetry",oa],["health",pa],["assurance",ee],...$a,["validate",da],["gc",ga],["stats",fa],["duplicates",ca],["contracts",La],["completion",Ea],["claim",We],["release",Ze],["start-task",ea],["pause-task",aa],["close-task",ta],["meet",Z],["event",la],["remind",sa]]),re=new Map([["install",Fe],["uninstall",Ge],["explore",Ie],["manage",Xe],["describe",Pe],["reload",ze],["doctor",je],["catalog",j],["list",j],["adopt",qe],["adopt-all",Me],["activate",De],["deactivate",$e],["migrate",Ue]]);function ne(e){return typeof e!="string"?"":e.trim().toLowerCase()}function et(e){let a=ne(e);if(se.has(a))return!0;let[t,l,...r]=a.split(/\s+/);return(t==="extension"||t==="package"||t==="packages")&&l!==void 0&&r.length===0&&(l==="init"||l==="scaffold"||re.has(l))}function Ua(e,a){return a==="init"||a==="scaffold"?e==="extension"?J:Re:re.get(a)??[]}function at(e){let a=ne(e);if(a.length===0)return O([]);let[t,l,...r]=a.split(/\s+/);if((t==="extension"||t==="package"||t==="packages")&&l!==void 0&&r.length===0)return O(Ua(t,l));let n=se.get(a)??[];return O(n)}function tt(e,a=!0){let l=w(e).flatMap(n=>[n.short,n.flag,...n.aliases??[]]).filter(n=>!!n),r=a?[...l,...L.flatMap(n=>[n.short,n.flag,...n.aliases??[]]).filter(n=>!!n)]:l;return y(r).join(" ")}export{y as a,$ as b,oe as c,v as d,Xa as e,ce as f,za as g,x as h,X as i,k as j,M as k,pe as l,b as m,ja as n,qa as o,w as p,Wa as q,L as r,Ja as s,E as t,_e as u,he as v,ve as w,Te as x,Ae as y,Ce as z,ye as A,be as B,ke as C,xe as D,Se as E,Ne as F,Oe as G,we as H,K as I,Le as J,Ee as K,W as L,m as M,J as N,z as O,Re as P,Fe as Q,Ge as R,Ie as S,Pe as T,Me as U,De as V,$e as W,Ue as X,Xe as Y,ze as Z,je as _,j as $,qe as aa,Be as ba,Ye as ca,Qa as da,He as ea,Ve as fa,Ke as ga,We as ha,Je as ia,Qe as ja,Ze as ka,ea as la,aa as ma,ta as na,Z as oa,la as pa,sa as qa,ra,na as sa,oa as ta,ia as ua,ga as va,fa as wa,ca as xa,pa as ya,da as za,ee as Aa,q as Ba,ma as Ca,ua as Da,_a as Ea,ha as Fa,va as Ga,Ta as Ha,Aa as Ia,B as Ja,Ca as Ka,ya as La,Y as Ma,ba as Na,ka as Oa,xa as Pa,Sa as Qa,Na as Ra,u as Sa,Oa as Ta,wa as Ua,La as Va,Ea as Wa,Za as Xa,Da as Ya,$a as Za,et as _a,at as $a,tt as ab};
|
|
2
|
+
//# sourceMappingURL=chunk-TDR5OGG3.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Oa as E,Ta as $,Y as w,Z as b,jb as D,kb as B}from"./chunk-Q47EX4DI.js";import{AsyncLocalStorage as me}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]="288a7da9-888b-527d-88fb-4711917cec5b")}catch{}})();var H=e=>{let t='"',n=0;for(let o of e){if(o==="\\"){n+=1;continue}t+="\\".repeat(o==='"'?n*2+1:n),t+=o,n=0}return`${t}${"\\".repeat(n*2)}"`},Z=(e,t=process.platform)=>(t==="win32"?/^[A-Za-z0-9._:/\\@=-]+$/:/^[A-Za-z0-9._:/@=-]+$/).test(e)?e:t==="win32"?H(e):`"${e.replace(/(["\\$`])/g,"\\$1")}"`,A=(e,t=process.platform)=>{let n=e.map(o=>Z(o,t)).join(" ");return n.length>0?`pm ${n}`:"pm"};(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]="8ffd2cd5-8b7e-5ae1-a0c6-aab488edb73c")}catch{}})();var q=new WeakMap;function Le(e,t){q.set(e,new Set(t))}var M='.row_contract.row_keys[] as $key | getpath($key | split(".")) | if type == "array" then .[] else if type == "object" then to_entries[] else empty end end',Q={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"}},V=[{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 Pe(e,t,n){if(e&&t)throw new b(`${n} cannot be combined with --full`,w.USAGE)}function m(e,t=new Set){let n=e.filter(o=>!t.has(o.name)).map(o=>({...o}));return{has_omissions:n.length>0,omitted_field_group_count:n.length,omitted_field_groups:n}}function qe(e,t){let n=V.find(i=>i.command===e);if(n===void 0)throw new TypeError(`Unknown mode-paired output command: ${e}`);if(t===n.complete_mode)return m([]);let o=n.omissions_by_mode[t];if(o===void 0)throw new TypeError(`Unknown ${e} output mode: ${t}`);return m(o)}var ee=[{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 te=new Set([void 0,"tabular_when_uniform"]),ne=new Set(["collection","none"]),oe=new Set(["supported","unsupported"]);function L(e,t){return Array.isArray(e)&&(t||e.length>0)&&e.every(n=>typeof n=="string"&&n.length>0)&&new Set(e).size===e.length}function ie(e){return _(e)&&typeof e.command=="string"&&e.command.trim().length>0&&ne.has(e.row_kind)&&L(e.row_keys,!0)&&(e.continuation_row_keys===void 0||L(e.continuation_row_keys,!1))&&oe.has(e.fields)&&te.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 re={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"]},se={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 de(e,t){let n=e.trim().toLowerCase().split(/\s+/u,1)[0],o=n?.startsWith("list-")?"list":n;if(o==="graph"){let s=typeof t.subcommand=="string"?t.subcommand:"";if(s.length===0)return;let d=re[s];if(d===void 0)return;let c=d.filter(u=>Array.isArray(t[u])||_(t[u]));return{command:"graph",row_kind:c.length>0?"collection":"none",row_keys:c,fields:"unsupported",...c.length>0?{jq_selector:M}:{},toon_encoding:"tabular_when_uniform"}}let i=Q[o],r=se[o];return i===void 0||r===void 0||!r.some(s=>Object.hasOwn(t,s))?void 0:(()=>{let s=i.row_keys.filter(d=>{let c=d.split(".").reduce((u,f)=>_(u)?u[f]:void 0,t);return Array.isArray(c)||_(c)});return{command:o,row_kind:s.length>0?"collection":"none",row_keys:s,fields:i.fields,...s.length>0?{jq_selector:M}:{},toon_encoding:"tabular_when_uniform"}})()}function ce(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 o=t.filter(s=>_(s)&&typeof s.name=="string"&&s.name.trim().length>0&&typeof s.restore_with=="string"&&s.restore_with.trim().length>0),i=n.filter(s=>typeof s=="string");if(o.length!==t.length||i.length!==n.length)return;let r=new Set(o.map(s=>s.name));if(!(r.size!==o.length||new Set(i).size!==i.length||i.some(s=>!r.has(s))))return m(o,new Set(i))}function ae(e){if(Array.isArray(e.sections_included))return m(ee,new Set(e.sections_included.filter(t=>typeof t=="string")))}function ue(e){if(!_(e.item))return;let t=e.item,n=["comments","notes","learnings","files","tests","docs","reminders","events"],o=["body","children","claim_state","linked","schedule"],i=q.get(e),r=d=>n.includes(d)||d==="body"?t:e,s=["body",...n,...o.slice(1)].filter(d=>i===void 0||i.has(d)||Object.hasOwn(r(d),d)).map(d=>({name:d,restore_with:`--fields ${d}`}));return m(s,new Set(s.flatMap(({name:d})=>Object.hasOwn(r(d),d)?[d]:[])))}function P(e){if(_(e.projection))return m([{name:"full_item_fields",restore_with:"--full"}],new Set(e.projection.mode==="full"?["full_item_fields"]:[]))}function fe(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 le(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 _e(e,t){let n=ce(t);if(n!==void 0)return n;let[o]=e.split(/\s+/u,1);if(o==="context")return ae(t);if(o==="get")return ue(t);if(o==="list"||o.startsWith("list-"))return P(t);if(o==="search")return P(t)??m([{name:"projection_metadata",restore_with:"--full"}]);if(o==="health")return fe(t);if(o==="contracts")return le(t)}function G(e,t){if(e===void 0||!_(t))return t;let n=_e(e,t),o=t.row_contract,i=ie(o)?o:de(e,t),r=i!==void 0?{...t,row_contract:i}:Object.hasOwn(t,"row_contract")?Object.fromEntries(Object.entries(t).filter(([s])=>s!=="row_contract")):t;return _(r.omission_receipt)||n===void 0?r:{...r,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]="86db3dad-99b9-5c48-be52-990f110ac81f")}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:3e3,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"}]),W=new me;function pe(){return W.getStore()??z}function Je(e,t){return W.run(he(e.workspaceContracts,e.packageContracts),t)}function ge(e,t){let n=e.command.trim().toLowerCase(),o=e.intent.trim().toLowerCase(),i=`${n}:${o}`;if(!/^[a-z0-9][a-z0-9-]*$/.test(n)||!/^[a-z0-9][a-z0-9-]*$/.test(o))throw new TypeError(`Invalid context intent command or name: ${i}`);if(e.description.trim().length===0)throw new TypeError(`Context intent ${i} requires a non-empty description`);if(!Number.isSafeInteger(e.token_budget)||e.token_budget<=0)throw new TypeError(`Context intent ${i} requires a positive integer token_budget`);let r=[...new Set(e.included_field_groups.map(s=>s.trim()).filter(Boolean))];if(r.length===0)throw new TypeError(`Context intent ${i} requires included_field_groups`);return{command:n,intent:o,description:e.description.trim(),included_field_groups:r,token_budget:e.token_budget,source:t}}function he(e=[],t=[]){let n=[{source:"core",contracts:z,allowOverride:!1},{source:"package",contracts:t,allowOverride:!1},{source:"workspace",contracts:e,allowOverride:!0}],o=new Map,i=new Set;for(let r of n){i.clear();for(let s of r.contracts){let d=ge(s,r.source),c=`${d.command}:${d.intent}`;if(i.has(c))throw new TypeError(`Duplicate context intent declaration: ${c}`);if(i.add(c),!r.allowOverride&&o.has(c))throw new TypeError(`Duplicate context intent declaration: ${c}`);o.set(c,d)}}return[...o.values()].sort((r,s)=>r.command.localeCompare(s.command)||r.intent.localeCompare(s.intent))}function j(e,t,n=pe(),o=[]){let i=e.trim().toLowerCase(),r=t.trim().toLowerCase(),s=n.find(a=>a.command===i&&a.intent===r);if(s)return{...s,source:s.source??"core"};let d=n.filter(a=>a.command===i).map(a=>a.intent);if(d.length===0)return;let c=d.map(a=>{let l=Array.from({length:r.length+1},(v,O)=>O);for(let v=1;v<=a.length;v+=1){let O=l[0];l[0]=v;for(let h=1;h<=r.length;h+=1){let Y=l[h];l[h]=Math.min(l[h]+1,l[h-1]+1,O+(a[v-1]===r[h-1]?0:1)),O=Y}}return{candidate:a,distance:l[r.length]}}).sort((a,l)=>a.distance-l.distance||a.candidate.localeCompare(l.candidate))[0].candidate,u=[i,...o,"--for",r],f=[i,...o,"--for",c],p=A(f);throw new b(`Unknown context intent "${r}" for ${i}. Did you mean "${c}"?`,w.USAGE,{code:"unknown_context_intent",reason:"unknown_intent",field:"for",required:`Use a declared ${i} intent.`,why:"Intent names are command-local contracts and cannot be inferred from output section names.",nextSteps:[p],recovery:{recovery_mode:"compact",attempted_command:A(u),allowed_values:[...d].sort(),suggested_retry:p,suggested_retry_args:f}})}var K={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 o=T(e.tokenBudget,t.token_budget),i=R("context",t.intent,o,n),r=y(e.limit),s=String(r===void 0?i:Math.min(r,i));(e.limit===void 0||r!==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)=>{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");let o=T(e.tokenBudget,t.token_budget),i=R("list",t.intent,o,n),r=y(e.limit);(e.limit===void 0||r!==void 0)&&(e.limit=String(r===void 0?i:Math.min(r,i)))},next:e=>{e.readyOnly===void 0&&(e.readyOnly=!0)},search:(e,t,n)=>{e.compact===void 0&&e.full===void 0&&e.fields===void 0&&(e.compact=!0);let o=T(e.tokenBudget,t.token_budget),i=R("search",t.intent,o,n),r=y(e.limit);(e.limit===void 0||r!==void 0)&&(e.limit=String(r===void 0?i:Math.min(r,i)))}};function Ye(e,t,n=[]){let o=t.tokenBudget??t.token_budget;if(typeof t.for!="string"){if(o!==void 0&&(e==="get"||e==="list"||e==="search"))throw new b("--token-budget requires a declared context intent selected with --for",w.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 d={...t,tokenBudget:o};return delete d.token_budget,d}let i=j(e,t.for,void 0,n),r=y(o)!==void 0,s={...t};return s.tokenBudget===void 0&&o!==void 0&&(s.tokenBudget=o),delete s.token_budget,s.tokenBudget===void 0&&(s.tokenBudget=String(i.token_budget)),K[e](s,i,r),s}var ye={context:"bounded_sections",get:"standard_item",list:"bounded_fields_and_rows",next:"bounded_ranked_rows",search:"bounded_ranked_rows"},C=256;function S(e){return Array.isArray(e)?e.map(S):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,S(n)])):typeof e=="string"&&e.length>240?`${e.slice(0,240)}\u2026`:e}function y(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 T(e,t){let n=y(e);if(n===void 0)return t;if(n<C)throw new b(`Context intent token budget must be at least ${C}`,w.USAGE,{code:"invalid_argument_value",reason:"below_minimum",field:"tokenBudget",required:`Use an integer token budget of at least ${C}.`,why:"Smaller ceilings cannot contain the minimum machine-readable intent receipt.",nextSteps:[`Retry with --token-budget ${C} or omit the override.`]});return n}function R(e,t,n,o){if(e==="get"||e==="next")return;let i=e==="context"&&t==="orient",r=e==="context"?i?1200:800:e==="list"?520:480,s=e==="context"?i?600:500:16,d=Math.max(e==="context"?1:2,Math.floor((n-r)/s));return o?d:Math.min(e==="context"?20:100,d)}function g(e,t){let n=t.estimated_tokens;for(;;){t.estimated_tokens=n;let o=Math.ceil(Buffer.byteLength(JSON.stringify(e),"utf8")/4);if(o===n)return;n=o}}var U={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 F(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 we(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 be(e,t,n){let o=!1;for(;;){if(g(e,t),t.estimated_tokens<=t.token_budget||n.length<=1)return o;let i=Buffer.byteLength(JSON.stringify(n),"utf8"),r=(t.estimated_tokens-t.token_budget)*4;n.splice(-Math.min(n.length-1,Math.max(1,Math.ceil(r/Math.max(1,Math.ceil(i/n.length)))))),o=!0}}function ke(e,t,n){let o=e.items,i=typeof e.next_cursor=="string",r=i?e.next_cursor:n.after;if(!Array.isArray(o)||typeof r!="string")return!1;let s=F(r);if(s===void 0)return!1;let d=o.length,c=[...o],u=!1;for(;;){if(u=be(e,t,o)||u,!u)return!1;let f=we(o.at(-1));if(f===void 0)return o.splice(0,o.length,...c),g(e,t),!1;if(e.next_cursor=$(s.fingerprint,f,i?s.after_index-(d-o.length):s.after_index+o.length,s.snapshot),g(e,t),t.estimated_tokens<=t.token_budget||o.length<=1)break}return typeof e.count=="number"&&(e.count=o.length),typeof e.applied_limit=="number"&&(e.applied_limit=o.length),!0}function xe(e,t,n,o){if(e==="list"||e==="search")return ke(t,n,o);if(e!=="next"||typeof t.next_cursor=="string")return!1;let i=!1;for(;;){if(g(t,n),n.estimated_tokens<=n.token_budget)return i;let r=U[e].map(a=>({key:a,rows:Array.isArray(t[a])?t[a]:[]})).filter(({rows:a})=>a.length>0).sort((a,l)=>l.rows.length-a.rows.length||a.key.localeCompare(l.key))[0];if(r===void 0)return i;let s=U[e].reduce((a,l)=>a+(Array.isArray(t[l])?t[l].length:0),0);if(s<=1)return i;let d=Math.min(r.rows.length,s-1),c=Buffer.byteLength(JSON.stringify(r.rows),"utf8"),u=Math.max(1,Math.ceil(c/r.rows.length)),f=(n.estimated_tokens-n.token_budget)*4,p=Math.min(d,Math.max(1,Math.ceil(f/u)));r.rows.splice(-p,p),i=!0}}function ve(e,t,n){if(typeof t.for!="string")return n;let o=e.startsWith("list-")?"list":e;if(!(o in K))return n;let i=o,r=j(i,t.for),s=T(t.tokenBudget??t.token_budget,r.token_budget),d={command:i,intent:r.intent,source:r.source,included_field_groups:[...r.included_field_groups],token_budget:s,declared_token_budget:r.token_budget,token_budget_override:s-r.token_budget,estimated_tokens:0,within_budget:!0,degradation:ye[i],declaration_feasible:!0,result_omitted:!1},c={...n},u=R(i,r.intent,d.token_budget,y(t.tokenBudget??t.token_budget)!==void 0);if(u!==void 0){let p=y(t.limit),a=p!==void 0&&p<u;d.budget_derived_limit=u,d.binding_constraint=a?"explicit_limit":"token_budget",d.limit_reason=a?"The caller supplied a smaller row limit than the budget-derived ceiling.":"The selected intent token budget constrains the effective row ceiling.",c.budget_derived_limit=u}let f={...c,context_intent:d};return g(f,d),d.estimated_tokens>d.token_budget&&(d.degradation="recursive_budget_compaction",f={...S(c),context_intent:d},g(f,d)),d.estimated_tokens>d.token_budget&&xe(i,f,d,t)&&(d.degradation="budget_row_compaction",g(f,d)),d.declaration_feasible=d.estimated_tokens<=d.declared_token_budget,d.estimated_tokens>d.token_budget&&(d.degradation="budget_receipt_only",d.result_omitted=!0,d.within_budget=!1,f={budget_exceeded:{omitted_result:!0,reason:d.token_budget_override===0?"declared_budget_infeasible":"effective_budget_infeasible",restore_with:Ee(e,i,r.intent,d,c)},context_intent:d}),f}function Oe(e,t){if(typeof e.after!="string"||e.after.length===0)return t;let n=F(e.after)?.fingerprint??"opaque_cursor",o={...t};for(let i of["applied_limit","completeness","context_intent","count","filters","has_more","now","omission_receipt","projection","row_contract","sorting","total","truncated"])delete o[i];return o.continuation_contract={fingerprint:n,metadata:"reference",restore_with:"omit --after"},o}function I(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ee(e,t,n,o,i){let r=t==="get"&&I(i.item)&&typeof i.item.id=="string"?i.item.id:t==="search"&&typeof i.query=="string"?i.query:void 0,s=r===void 0?"":` '${r.replaceAll("'",`'"'"'`)}'`,d=t==="get"?"":` --limit ${o.budget_derived_limit??1}`;return`pm ${e}${s} --for ${n} --token-budget ${Math.ceil(o.estimated_tokens/100)*100}${d}`}function k(e,t){if(I(e))return typeof e[t]=="number"?e[t]:void 0}function Ce(e,t){let n=e;for(let o=0;o<8;o+=1){let i=k(n.context_intent,"estimated_tokens"),r=k(n.read_output,"estimated_tokens"),s=k(n.read_session,"spent_this_call_tokens");if(I(n.context_intent)&&g(n,n.context_intent),n=D(n,t),k(n.context_intent,"estimated_tokens")===i&&k(n.read_output,"estimated_tokens")===r&&k(n.read_session,"spent_this_call_tokens")===s)break}return n}function He(e,t,n){let o=G(e,n),i=typeof o=="object"&&o!==null&&!Array.isArray(o)?B(e??"",t,Oe(t,ve(e??"",t,o))):o;return t.outputRowContract===!0||t.output_row_contract===!0||typeof i!="object"||i===null||Array.isArray(i)||!Object.hasOwn(i,"row_contract")?i:Ce(Object.fromEntries(Object.entries(i).filter(([r])=>r!=="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 x=["result_rows","envelope","diagnostics","hints"],Te=/^(?:items|results|rows|ready|blocked|recommended|decision_needed|children|dependencies|events|matches|commands|tools)$/u,Re=/^(?:diagnostics|errors?|warnings?|findings|violations|failures?)$/u,Ae=/^(?:hints?|suggestions?|next_steps?|recovery|remediation|examples?)$/u,Se=8;function N(e){return Buffer.byteLength(e,"utf8")}function X(e){return N(JSON.stringify(e)??"null")}function Ie(e,t){return Re.test(e)?"diagnostics":Ae.test(e)?"hints":Te.test(e)||Array.isArray(t)?"result_rows":"envelope"}function Ne(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"]=X(e),t;for(let[n,o]of Object.entries(e))t[Ie(n,o)]+=X({[n]:o});return Object.values(t).every(n=>n===0)&&(t.envelope=1),t}function $e(e,t){let n=x.reduce((s,d)=>s+t[d],0),o=x.map(s=>({section:s,value:e*t[s]/n})),i={result_rows:0,envelope:0,diagnostics:0,hints:0};for(let s of o)i[s.section]=Math.floor(s.value);let r=e-x.reduce((s,d)=>s+i[d],0);for(let s of[...o].sort((d,c)=>c.value-Math.floor(c.value)-(d.value-Math.floor(d.value))||x.indexOf(d.section)-x.indexOf(c.section))){if(r===0)break;i[s.section]+=1,r-=1}return i}function J(e,t){return typeof e=="object"&&e!==null&&!Array.isArray(e)?{...e,token_accounting:t}:{result:e,token_accounting:t}}function Ve(e,t){let n=N(t(e)),o=$e(n,Ne(e)),i=Object.fromEntries(x.map(d=>[d,{bytes:o[d],estimated_tokens:E(o[d])}])),r={version:1,measurement_scope:"output_before_token_accounting",estimator:"ceil(utf8_bytes / 4)",total_bytes:n,total_estimated_tokens:E(n),sections:i,accounting_receipt_bytes:0,accounting_receipt_estimated_tokens:0,excluded_fields:["token_accounting"],section_allocation:"proportional_canonical_json"},s=J(e,r);for(let d=0;d<Se;d+=1){let c=N(t(s))-n;if(c===r.accounting_receipt_bytes)return s;r={...r,accounting_receipt_bytes:c,accounting_receipt_estimated_tokens:E(c)},s=J(e,r)}return s}export{Z as a,A as b,Le as c,Pe as d,qe as e,G as f,z as g,pe as h,Je as i,he as j,j as k,Ye as l,F as m,we as n,ve as o,He as p,Ve as q};
|
|
2
|
+
//# sourceMappingURL=chunk-UGSS4F5X.js.map
|