@unbrained/pm-cli 2026.10.27 → 2026.10.28
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 +1 -1
- package/CHANGELOG.md +23 -0
- package/dist/cli/commander-usage.js +2 -2
- package/dist/cli/error-guidance.js +2 -2
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-2J7I54MQ.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-25MTQAHX.js → chunk-3KMYHYJV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UHKN6TJM.js → chunk-7V37RC2L.js} +44 -44
- package/dist/cli-bundle/chunks/{chunk-5PTMQBKJ.js → chunk-AHVN4GHF.js} +30 -29
- package/dist/cli-bundle/chunks/{chunk-QQYLNHZK.js → chunk-CS7QDSUX.js} +28 -28
- package/dist/cli-bundle/chunks/{chunk-34OQP43K.js → chunk-CXUQEZDX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-X5TMR7KC.js → chunk-D3AIQZXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NNIYQHYT.js → chunk-D6P6IBPN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HIX2OMEZ.js → chunk-DKLEDWVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2XUDAQK5.js → chunk-DM3PICGU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-32QK43XG.js → chunk-E5QBZ4HI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H434DKYU.js → chunk-JESLOJD7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-57YPOOED.js → chunk-LWW4F4G2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O3LPT34G.js → chunk-PQLRKFPZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ONC4BBQP.js → chunk-RZQNFHXO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ER7RLJW5.js → chunk-TH5KPAN4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-F26MRQZY.js → chunk-XHONSCLJ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-EKV5GP6P.js → chunk-YUBUNECD.js} +42 -42
- package/dist/cli-bundle/chunks/{chunk-OQOEBWHU.js → chunk-YYD5MNAV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q55KZDNF.js → chunk-ZX3XMTZG.js} +2 -2
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-63WYG2PY.js → indexed-receipt-blobs-LHLE7PSG.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-admission-L3A6FSZ7.js → mutation-admission-GKDKHRTZ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-YSQ7UTFI.js → register-list-query-MHJJUM6M.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-6HRXYASW.js → register-mutation-SN425O3R.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-4O3YOYXF.js → register-operations-EYUIUGPW.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-3WAXNDMY.js → register-setup-WUZ2ZSMY.js} +2 -2
- package/dist/cli-bundle/chunks/{settlement-hook-CRW6PVQK.js → settlement-hook-MN3Y7LVX.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-I46WD4EN.js → stage-2FYJGGG3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3EHVI673.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZA6AEYIM.js → chunk-46WLWK73.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-E5C24MCV.js → chunk-4GN2ZPT5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NLZUI234.js → chunk-6L4KKRK7.js} +18 -18
- package/dist/cli-bundle/focused-chunks/{chunk-WDKZB3V6.js → chunk-6VDRAJYX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KTXU5WU6.js → chunk-7SZPZOIC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YQKLKRMW.js → chunk-B4ZQJEMT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-J67PFM3O.js → chunk-BZSACRVX.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-Y57A4ZDI.js → chunk-C2GLO7HU.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-R2MTHS2H.js → chunk-DRN4W3YJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TAFMNTA5.js → chunk-F6UQJJYB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TGUOEOKP.js → chunk-I4X6AKOO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SM2KGD4J.js → chunk-IQKLJFJE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-XK3XMZM4.js → chunk-JTCGDODH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-HWD63G54.js → chunk-L5GX2FGZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MVY6JDIH.js → chunk-LPWZERVD.js} +11 -11
- package/dist/cli-bundle/focused-chunks/{chunk-YW5GHQN2.js → chunk-ML5JIUM6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YC6NCPLK.js → chunk-OASYSUOH.js} +16 -16
- package/dist/cli-bundle/focused-chunks/{chunk-BH7RE2ZY.js → chunk-ON5WFDCG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4TXZBGOR.js → chunk-QUPGBO2L.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SYL73MEI.js → chunk-R3EA3SDW.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-B266DDBJ.js → chunk-TUN4M757.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZH7GTEWL.js → chunk-Z26ZPQH6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-GAFC52LQ.js → indexed-receipt-blobs-5H6RMRTK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-ENBFMV2X.js → mutation-admission-TM3SVU2O.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{settlement-hook-PUYJJDFL.js → settlement-hook-LBVWWSCF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-MAWZTM2H.js → stage-7ZBRX2Q2.js} +2 -2
- package/dist/cli-bundle/main.js +21 -21
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +25 -24
- 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 +46 -46
- 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 +11 -11
- package/dist/core/item/priority.js +1 -1
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/sdk/agent/command-recovery.d.ts +5 -0
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/command-line.d.ts +6 -0
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/update-many.js +1 -1
- package/dist/sdk/lifecycle/update.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/history.d.ts +4 -0
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/test/command-resolution.d.ts +5 -0
- package/dist/sdk/test/command-resolution.js +3 -0
- package/dist/sdk/test/execution.js +2 -2
- package/docs/COMMANDS.md +28 -1
- package/docs/SDK.md +40 -0
- package/docs/TESTING.md +28 -2
- package/marketplace.json +1 -1
- package/package.json +1 -1
- 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-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-XERBUA6A.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-U4UBQBS7.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ub as g}from"./chunk-CS7QDSUX.js";import{Cd as R,Db as C,Mf as z,Qe as V,Re as $,We as B,f as N,g as m,i as E,j as L,k,lh as G,mh as T,ud as I,vd as v,wd as D,xb as M,xd as A,yb as F,yd as _,zd as w}from"./chunk-7V37RC2L.js";import{A as b,C as y}from"./chunk-RZQNFHXO.js";import{Command as se}from"commander";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="df7f766c-1121-5712-b562-423d2cda95ce")}catch{}})();function Xe(e){return new se().name("pm").description("Universal, flexible, extensible, agent-optimized project management CLI for any project or programming language.").version(e).showHelpAfterError(!1).allowExcessArguments(!1).allowUnknownOption(!1).configureOutput({writeOut:t=>{z(t)},writeErr:()=>{}}).option("--json","Output JSON instead of TOON; mutations emit a flat receipt with top-level id/status/changed_field_count while reads use documented entity or collection envelopes").option("--lean","Omit null and empty containers from JSON output").option("--token-accounting","Attach a bounded per-section token-cost receipt to command output").option("--output-include <fields>","Retain comma-separated fields or sections in read output").option("--output-limit <count>","Bound rows in read output").option("--output-budget <tokens|unbounded>","Bound estimated tokens in read output or explicitly disable the default ceiling").option("--output-format <toon|json>","Select the result encoding for reads and mutations").option("--output-session <state>","Carry a JSON session budget and served-item ledger across read calls").option("--output-cursor <cursor>","Resume continuation_kind=output_cursor").option("--output-row-contract","Include row selectors, encoding metadata, and read-output receipts").option("--quiet","Suppress stdout output").option("--no-changed-fields","Omit the changed_fields array from mutation output (keeps changed_field_count)").option("--full-changed-fields","Restore the legacy full mutation envelope and changed_fields array").option("--id-only","Print only id and status for single-item mutation output").option("--pm-path <dir>","Explicit tracker storage path for this command (preferred over --path)").option("--path <dir>","Backward-compatible alias for --pm-path; this is the tracker storage path, not a workspace cwd").option("--no-extensions","Disable extension loading").option("--no-pager","Disable pager integration for help and long output").option("--explain","Render extended rationale and examples in help output").option("--all","Reveal every public command and compatibility alias").option("--profile","Print deterministic timing diagnostics").option("--author <id>","Override mutation author for this invocation").exitOverride()}(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]="8efedca0-725e-520f-ad06-825a0cccddaa")}catch{}})();var W=new Set(["append","claim","close","close-task","comments","copy","delete","deps","docs","files","focus","get","history","history-compact","history-redact","history-repair","learnings","notes","pause-task","release","restore","start-task","test","update"]),U=new Map([["files","discover"],["item","complete"]]),re=new Map([["append",1],["close",1],["close-task",1],["comments",1],["item complete",1],["learnings",1],["notes",1],["restore",1]]);function j(e){let t=m(e?.trim().toLowerCase()??"");return W.has(t)||U.has(t)}function ae(e,t,n){let o=W.has(n)?t+1:void 0,i=_(e.slice(t+1));if(i===void 0)return o;let r=t+1+i,a=`${n} ${e[r]}`,s=m(a);return s===a?n==="item"&&e[r]==="complete"?r+1:o:j(s)?P(e,r,s):void 0}function P(e,t,n){if(["history","context","ctx","update","close","item"].includes(n))return ae(e,t,n);let o=U.get(n);if(o===void 0)return t+1;let i=e[t+1]?.toLowerCase()===o;return t+(i?2:1)}function le(e){let t=new Map;for(let n of g(e))for(let o of[n.flag,n.short,...n.aliases??[]])o&&t.set(o,n);return t}function ce(e){let t=[];for(let n=0;n<e.length;n+=1){let o=e[n];if(o==="--")break;o==="--id"?(t.push({index:n,consumed:2,value:e[n+1]}),n+=1):o.startsWith("--id=")&&t.push({index:n,consumed:1,value:o.slice(5)})}return t}function ue(e,t,n){if(e.indexOf("=")>=0||t===void 0||t.startsWith("-"))return!1;let o=n.get(e);return o!==void 0&&o.value_type!=="boolean"}function de(e,t,n,o,i){let r=0;for(let a=t;a<e.length;a+=1){let s=e[a];if(s==="--")break;if(s==="--id"){a+=1;continue}if(!s.startsWith("--id=")){if(!s.startsWith("-")){if(a<o)return!0;r+=1;continue}ue(s,e[a+1],i)&&(a+=1)}}return r>(re.get(m(n))??0)}function q(e){let t=_(e),n=t===void 0?void 0:e[t]?.toLowerCase();if(n!=="context"&&n!=="ctx"&&!j(n))return{argv:[...e],changed:!1,conflict:!1};let o=P(e,t,n);if(o===void 0)return{argv:[...e],changed:!1,conflict:!1};let i=o>t+1?`${m(e.slice(t,o-1).join(" "))} ${e[o-1]}`:n,r=le(i),a=ce(e),s=a[0];if(!s||!s.value?.trim())return{argv:[...e],changed:!1,conflict:!1};if(a.length>1||de(e,o,i,s.index,r))return{argv:[...e],changed:!1,conflict:!0,itemId:s.value};let l=[...e.slice(0,s.index),...e.slice(s.index+s.consumed)],c=_(l),u=P(l,c,n);return l.splice(u,0,s.value),{argv:l,changed:!0,conflict:!1,itemId:s.value}}(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]="f05cec18-5e48-5151-8ada-577c9df5885d")}catch{}})();var fe=new Set(["--output-include","--output-limit","--output-budget","--output-format","--output-session","--output-cursor"]),pe=new Set(["toon","json"]);function me(e,t,n){let o=e[t];if(v.has(o))return n.booleanFlags.add(o),1;let i=o.indexOf("="),r=i>0?o.slice(0,i):o;if(!I.has(r))return 1;let a=i>0?o.slice(i+1):void 0,s=a===void 0&&A(r,e[t+1]),l=a??(s?e[t+1]:void 0);return r==="--author"?n.author=l??"":typeof l=="string"&&l.length>0&&(fe.has(r)?n.outputValues:n.pathValues).set(r,l),s?2:1}function he(e){let t={booleanFlags:new Set,outputValues:new Map,pathValues:new Map},n=0;for(;n<e.length&&e[n]!=="--";)n+=me(e,n,t);return{path:t.pathValues.get("--pm-path")??t.pathValues.get("--path"),noExtensions:t.booleanFlags.has("--no-extensions")||["history attest","history-attest"].includes(J(e)??""),noPager:t.booleanFlags.has("--no-pager"),json:t.booleanFlags.has("--json")?t.outputValues.get("--output-format")!=="toon":t.outputValues.get("--output-format")==="json",quiet:t.booleanFlags.has("--quiet"),lean:t.booleanFlags.has("--lean"),tokenAccounting:t.booleanFlags.has("--token-accounting"),...t.booleanFlags.has("--output-row-contract")?{outputRowContract:!0}:{},...t.outputValues.get("--output-include")===void 0?{}:{outputInclude:t.outputValues.get("--output-include")},...t.outputValues.get("--output-limit")===void 0?{}:{outputLimit:t.outputValues.get("--output-limit")},...t.outputValues.get("--output-budget")===void 0?{}:{outputBudget:t.outputValues.get("--output-budget")},...pe.has(t.outputValues.get("--output-format"))?{outputFormat:t.outputValues.get("--output-format")}:{},...t.outputValues.get("--output-session")===void 0?{}:{outputSession:t.outputValues.get("--output-session")},...t.outputValues.get("--output-cursor")===void 0?{}:{outputCursor:t.outputValues.get("--output-cursor")},...t.author===""?{authorMissingValue:!0}:t.author!==void 0?{author:t.author}:{}}}function X(e){let t=[],n=0;for(;n<e.length;){let o=e[n];if(o==="--")break;if(v.has(o)||o==="--profile"||o==="--id-only"||o==="--full-changed-fields"||o==="--explain"){n+=1;continue}if(I.has(o)){n+=A(o,e[n+1])?2:1;continue}if(D(o)){n+=1;continue}t.push(o),n+=1}return t}function ge(e){let t=X(e);if(t[0]?.trim().toLowerCase()==="help"){let o=[];for(let i=1;i<t.length;i+=1){let r=t[i];if(r.startsWith("-"))break;o.push(r.trim().toLowerCase())}return{requested:!0,commandPathTokens:o}}if(t.findIndex(o=>o==="--help"||o==="-h")<0)return{requested:!1,commandPathTokens:[]};let n=[];for(let o of t){if(o.startsWith("-"))break;n.push(o.trim().toLowerCase())}return{requested:!0,commandPathTokens:n}}function S(e){return _(e)}function be(e){return w(e)}function ye(e,t){return t.noPager?!0:process.stdout.isTTY===!0?!1:ge(e).requested}function ut(e){let t=["PAGER","MANPAGER","GIT_PAGER","LESS"],n=t.map(r=>process.env[r]),o=()=>{for(let[r,a]of t.entries()){let s=n[r];s===void 0?delete process.env[a]:process.env[a]=s}},i=he(e);return ye(e,i)&&(process.env.PAGER="cat",process.env.MANPAGER="cat",process.env.GIT_PAGER="cat",(typeof process.env.LESS!="string"||process.env.LESS.trim().length===0)&&(process.env.LESS="FRX")),o}var _e=new Set(["install","uninstall","explore","manage","doctor","adopt","adopt-all","activate","deactivate"]);function Ie(e){let t=S(e);if(t===void 0||e[t]!=="extension")return[...e];let n=e[t+1];if(!n||n.startsWith("-"))return[...e];if(!_e.has(n))return[...e];if(e.includes("--help")||e.includes("-h"))return[...e];let o=`--${n}`;return e.includes(o)?[...e]:[...e.slice(0,t+1),o,...e.slice(t+2)]}var we=new Set(["pm","pm-cli"]);function ke(e,t){let n=S(e);if(n===void 0)return e;let o=e[n];return we.has(o.trim().toLowerCase())?(t.push({from:o,to:[],reason:"executable_alias",confidence:"high"}),[...e.slice(0,n),...e.slice(n+1)]):e}function Ce(e,t){let n=S(e);if(n!==void 0&&e[n]==="help"){let s=S(e.slice(n+1));n=s===void 0?void 0:n+1+s}if(n===void 0)return e;let o=e[n],i=L[o.trim().toLowerCase()];if(!i)return e;let r=i.split(" "),a=[...e.slice(0,n),...r,...e.slice(n+1)];return t.push({from:o,to:r,reason:"command_alias",confidence:"high"}),a}function x(e){return e.replace(/^--?/,"").replace(/_/g,"-").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function K(e){return x(e).replace(/-/g,"")}function Y(e,t,n){let o=e.get(t);if(o===void 0){e.set(t,n);return}o!==n&&e.set(t,null)}function ve(e){let t=[],n=o=>{typeof o=="string"&&o.startsWith("--")&&t.push(o)};n(e.flag);for(let o of e.aliases??[])n(o);return t}function Te(e,t){let n=t??g(e),o=new Map,i=new Map,r=new Map,a=new Set;for(let s of n){let l=ve(s);if(l.length===0)continue;let c=`--${x(l[0])}`;for(let d of l)Y(o,x(d),c),Y(i,K(d),c);let u=K(c);r.has(c)||r.set(c,u),s.list===!0&&a.add(c)}return{canonicalByNormalized:o,canonicalByCompact:i,canonicalComparables:[...r.entries()].map(([s,l])=>({canonicalFlag:s,comparable:l})),listCanonicalFlags:a}}function Z(e,t){let n=x(e),o=t.canonicalByNormalized.get(n);if(typeof o=="string")return{flag:o,reason:"flag_alias",confidence:"high"};let i=n.replace(/-/g,""),r=t.canonicalByCompact.get(i);if(typeof r=="string")return{flag:r,reason:"flag_alias",confidence:"high"};let a=i.length>=8?2:1,s=Number.POSITIVE_INFINITY,l,c=!1;for(let u of t.canonicalComparables){let d=C(i,u.comparable,a);if(d!==null){if(d<s){s=d,l=u.canonicalFlag,c=!1;continue}d===s&&l!==u.canonicalFlag&&(c=!0)}}return!l||c||!Number.isFinite(s)||s<=0?null:{flag:l,reason:"flag_typo",confidence:s>=2?"medium":"high"}}function dt(e){let t=[`${e}s`];return e.endsWith("y")&&e.length>1&&t.push(`${e.slice(0,-1)}ies`),t}function Se(e,t=!1){if(t||e.includes("://"))return null;let n=e.match(/^([A-Za-z][A-Za-z0-9_-]{1,63})([:=])(.*)$/);if(!n)return null;let o=n[1],i=n[3];return i.length===0?null:{key:o,value:i}}function xe(e,t,n=!1){if(n||!e.startsWith("--"))return{tokens:[e]};let o=e.indexOf("="),i=o>=0?e.slice(0,o):e,r=o>=0?e.slice(o+1):void 0,a=Z(i,t);if(!a)return{tokens:[e]};let s=r===void 0?a.flag:`${a.flag}=${r}`;return s===e?{tokens:[e]}:{tokens:[s],event:{from:e,to:[s],reason:a.reason,confidence:a.confidence}}}function Oe(e){let t=new Set,n=!1;for(let o=0;o<e.length;o+=1){if(n){t.add(o),n=!1;continue}let i=e[o];n=i==="--path"||i==="--pm-path"}return t}function Ee(e){if(!e.startsWith("--"))return null;let t=e.indexOf("=");return t<0?{flag:e}:{flag:e.slice(0,t),inlineValue:e.slice(t+1)}}function Ae(e,t,n){n.push(e[t]);let o=e[t+1];return typeof o=="string"&&o!=="--"?(n.push(o),t+2):t+1}function Pe(e,t,n,o){if(n.inlineValue!==void 0)return{originalTokens:[e[t]],value:n.inlineValue,consumed:1};let i=[],r=t+1;for(;r<e.length&&e[r]!=="--"&&!e[r].startsWith("-")&&(i.length===0||o.has(n.flag));)i.push(e[r]),r+=1;let a=i.length===0?1:1+i.length;return{originalTokens:e.slice(t,t+a),value:i.length===0?void 0:i.join(","),consumed:a}}function Ne(e,t,n,o){let i=e.get(n);if(i){i.values.push(o.value),i.occurrences+=1;return}e.set(n,{outputIndex:t.length,originalTokens:o.originalTokens,values:[o.value],occurrences:1}),t.push(null)}function Le(e,t){let n=[],o=[];for(let[i,r]of e){if(!(r.occurrences>=2||t.has(i)&&r.originalTokens.length>2)){o.push({outputIndex:r.outputIndex,tokens:r.originalTokens});continue}let a=`${i}=${r.values.join(",")}`;o.push({outputIndex:r.outputIndex,tokens:[a]}),n.push({from:`${i} (x${r.occurrences})`,to:[a],reason:"list_merge",confidence:"high"})}return{events:n,splices:o}}function Me(e,t){t.sort((n,o)=>o.outputIndex-n.outputIndex);for(let n of t)e.splice(n.outputIndex,1,...n.tokens)}function Fe(e,t,n=new Set,o=new Set){if(t.size===0)return{argv:[...e],events:[]};let i=[],r=new Map,a=0;for(;a<e.length;){let c=e[a];if(c==="--"){i.push(...e.slice(a));break}if(n.has(c)){a=Ae(e,a,i);continue}let u=Ee(c);if(!u||!t.has(u.flag)){i.push(c),a+=1;continue}let d=Pe(e,a,u,o);if(d.value===void 0){i.push(c),a+=d.consumed;continue}Ne(r,i,u.flag,{originalTokens:d.originalTokens,value:d.value}),a+=d.consumed}let{events:s,splices:l}=Le(r,o);return Me(i,l),{argv:i,events:s}}var H=new Map([["--add",new Set(["command","cmd","path"])],["--remove",new Set(["command","path"])]]);function De(e,t){if(e!=="test"||t.length<2)return!1;let n=t[t.length-1],o=t[t.length-2],i=H.get(o);return i!==void 0&&i.has(n)}function Re(e,t,n){if(t!=="test")return e;let o=[],i=0;for(;i<e.length;){let r=e[i];if(r==="--")return o.push(...e.slice(i)),o;let a=H.get(r),s=a?e[i+1]:void 0;if(!a||typeof s!="string"||!a.has(s)){o.push(r),i+=1;continue}let l=i+2;for(;l<e.length&&!e[l].startsWith("-");)l+=1;if(l-(i+2)!==1){o.push(r),i+=1;continue}let c=e[i+2],u=`${s}=${c}`;o.push(r,u),n.push({from:`${r} ${s} ${c}`,to:[r,u],reason:"bare_key_value",confidence:"high"}),i+=3}return o}function Ve(e,t,n,o){let i=[],r=Oe(e);for(let a=0;a<e.length;a+=1){let s=e[a];if(s==="--"){i.push(...e.slice(a));break}let l=r.has(a),c=i[i.length-1];if(s.startsWith("--")){let h=xe(s,t,l);i.push(...h.tokens),h.event&&o.push(h.event);continue}let u=Se(s,l);if(!u||typeof c=="string"&&c.startsWith("-")&&!c.includes("=")||["search","comments","notes","learnings"].includes(n)||De(n,i)){i.push(s);continue}let d=Z(u.key,t);if(!d){i.push(s);continue}let p=u.value.startsWith("-")?[`${d.flag}=${u.value}`]:[d.flag,u.value];i.push(...p),o.push({from:s,to:p,reason:"bare_key_value",confidence:d.confidence})}return i}function $e(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n==="--")break;if(n==="--verify"){let o=e[t+1];if(o===void 0||o==="--")throw new y("history attest --verify requires a bundle file.",b.USAGE);e.splice(t,2,`--verify=${o}`)}else(I.has(n)||n==="--output"||n==="--hash-algorithm")&&(t+=1)}}function Be(e,t){if(!e.some(o=>o==="--help"||o==="-h"))return;let n=new Set(g(t).flatMap(o=>[o.flag,...o.aliases??[],...o.short===void 0?[]:[o.short]]));for(let o=0;o<e.length;o+=1){let i=e[o];if(i==="--")break;i!=="--help"&&i!=="-h"||n.has(e[o-1])&&!v.has(e[o-1])&&(e[o-1]=i)}}function ft(e){let t=[],n=ke(e,t),o=Ie(n);(o.length!==n.length||o.some((h,ie)=>h!==n[ie]))&&t.push({from:n.join(" "),to:[...o],reason:"legacy_extension_action",confidence:"high"});let i=Ce(o,t),r=q(i);if(r.conflict)throw new y("Provide the item id either positionally or with --id, not both.",b.USAGE);r.changed&&t.push({from:`--id ${r.itemId}`,to:[r.itemId],reason:"item_id_alias",confidence:"high"});let a=be(r.argv),s=J(r.argv),l=m(s??a??""),c=Te(s??a),u=Ve(r.argv,c,l,t),d=Re(u,l,t),p=Fe(d,c.listCanonicalFlags,I,a==="create"?new Set(["--tags"]):new Set);for(let h of p.events)t.push(h);return Be(p.argv,s??a),s==="history attest"&&$e(p.argv),{argv:p.argv,commandName:a,trace:t}}function J(e){let t=X(e),n=t[0]?.trim().toLowerCase(),o=t[1]?.trim().toLowerCase(),i=N(t);return i?i.canonical:(n==="extension"||n==="package"||n==="packages")&&typeof o=="string"&&o.length>0&&!o.startsWith("-")?`${n} ${o}`:n}function pt(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n==="--")break;if(n==="--type"){let o=e[t+1];if(typeof o=="string"&&o.trim().length>0)return o.trim();continue}if(n.startsWith("--type=")){let o=n.slice(7).trim();if(o.length>0)return o}}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fb625cd9-f8a8-56cf-88ab-abef64051497")}catch{}})();function yt(e){if(e===void 0)return()=>{};let t=e.trim();if(t.length===0)throw new y("--author requires a non-empty value.",b.USAGE,{code:"missing_required_argument",nextSteps:["Pass an explicit author identifier with --author <id>."]});let n=G();T(t);let o=!1;return()=>{o||(o=!0,n===void 0?T(void 0):T(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]="d0e60f7e-e0a8-5ef4-9af7-4a1f102ccb7d")}catch{}})();var f=Object.freeze({clock:"PM_CLOCK",tickMs:"PM_CLOCK_TICK_MS",seed:"PM_SEED"});function O(e,t,n,o){return new y(e,b.USAGE,{code:"invalid_reproducible_process_environment",reason:t,field:n,required:`${f.clock} and ${f.seed}; ${f.tickMs} is optional`,nextSteps:[`Set ${f.clock} to an ISO-8601 instant with Z or a numeric UTC offset and ${f.seed} to a non-empty reproducibility seed.`,`Optionally set ${f.tickMs} to a non-negative integer; it defaults to 1.`,"Unset all three variables to retain normal wall-clock and cryptographic-random behavior."],recovery:{recovery_mode:"compact",provided_fields:o,missing_required_fields:t==="incomplete"?[f.clock,f.seed].filter(i=>!o.includes(i)):void 0}})}function ze(e){let t=e[f.clock],n=e[f.tickMs],o=e[f.seed],i=[[f.clock,t],[f.tickMs,n],[f.seed,o]].filter(a=>a[1]!==void 0).map(([a])=>a);if(i.length===0)return;if(t===void 0||o===void 0)throw O("Reproducible process execution requires PM_CLOCK and PM_SEED together.","incomplete",t===void 0?f.clock:f.seed,i);if(o.trim().length===0)throw O(`${f.seed} must not be empty.`,"invalid_value",f.seed,i);if(!B(t))throw O(`${f.clock} must be a valid ISO-8601 instant with Z or a numeric UTC offset.`,"invalid_value",f.clock,i);let r=n===void 0?1:Number(n);if(n?.trim().length===0||!Number.isSafeInteger(r)||r<0)throw O(`${f.tickMs} must be a non-negative integer.`,"invalid_value",f.tickMs,i);return V({clock:t,seed:o,tickMs:r})}function Ge(e){let t=ze(e);return t===void 0?n=>n():$(t)}async function vt(e,t){return Ge(e)(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]="7eec77b5-0b24-5f0f-967c-a75907f4cd66")}catch{}})();var Q=new Set([...Object.values(M),...F,"--full","--brief","--compact","--summary","--fields","--section","--token-budget"]),ee=new Set(["--full-changed-fields","--no-changed-fields","--id-only"]);function Lt(e,t){if(!["block","unblock"].includes(e)||t.includes(e)||!t.includes("update"))return;let n=new Set(g("update").map(o=>o.flag));if((e==="block"?["--blocked-by","--blocked-reason"]:["--unset","--unblock-note"]).every(o=>n.has(o)))return e==="block"?{examples:[["update","<item-id>","--blocked-by","<blocker-id>","--blocked-reason","<reason>"]],nextSteps:["Choose the actual item and blocker identifiers before running update. --blocked-by records the blocker field and its blocked_by relationship."]}:{examples:[["update","<item-id>","--unset","blocked-by","--unset","blocked-reason","--unblock-note","<note>"]],nextSteps:["Inspect the item's blockers before running update. --unset blocked-by removes the blocker field and all blocked_by relationships; --unset blocked-reason clears the stale reason. --unblock-note alone records a note and does not unblock the item.","If your project also uses a blocked lifecycle status, choose its appropriate next status separately with update --status."]}}function We(e,t){let n=e.includes("="),o=n?e.slice(e.indexOf("=")+1):t;if(!(!o||o.startsWith("--")))return{consumed:n?1:2,replacement:["--from",o],conflicts:["--from"]}}function Ue(e,t,n,o){if(t==="--since"&&e==="activity")return We(n,o);if(t==="--full"&&e==="context"&&n===t)return{consumed:1,replacement:["--depth","full"],conflicts:["--depth","--output-include","--fields","--section","--for"]};if(t==="--depth"&&["list","search"].includes(e)){let i=n.includes("=");return(i?n.slice(n.indexOf("=")+1):o)!=="full"?void 0:{consumed:i?1:2,replacement:["--full"],conflicts:["--full","--brief","--compact","--output-include","--fields","--for"]}}return t==="--toon"&&n===t?{consumed:1,replacement:["--output-format","toon"],conflicts:["--json","--format","--output-format","--stream"]}:void 0}function Mt(e,t,n){let o=e==="ctx"?"context":m(e);if(!["context","list","search","get","activity"].includes(o)||t.includes("--"))return;let i=w(t);if((i==="ctx"?"context":i)!==o)return;let r=n.split("=",1)[0],a=t.flatMap((p,h)=>p===r||p.startsWith(`${r}=`)?[h]:[]);if(a.length!==1)return;let s=a[0],l=Ue(o,r,t[s],t[s+1]);if(!l)return;let{replacement:c,consumed:u,conflicts:d}=l;if(!t.some(p=>d.includes(p.split("=",1)[0])))return[...t.slice(0,s),...c,...t.slice(s+u)]}function te(e){let t=e.split("=",1)[0].replaceAll("_","-");return Q.has(t)||t.length>=5&&[...Q].some(n=>n.startsWith(t))}function Ft(e,t){let n=e.split("=",1)[0].replaceAll("_","-");return te(n)?!ee.has(t):ee.has(n)?!te(t):!0}function ne(e){return e.trim().match(/--[a-z0-9][a-z0-9_-]*/i)?.[0]?.replaceAll("_","-").toLowerCase()}function Dt(e){if(!(!Array.isArray(e)||e.length===0))return w(e)}function je(e,t){let n=ne(t);if(!n)return;let o=g(e).find(i=>i.flag===n||i.aliases?.includes(n));return o?o.value_type==="boolean"?null:`<${o.value_name??"value"}>`:"<value>"}function Rt(e,t,n){let o=[...e],i=o.indexOf("--"),r=i<0?o.length:i;for(let a of n){let s=ne(a);if(!s||o.slice(0,r).some(u=>u===s||u.startsWith(`${s}=`)))continue;let l=je(t,s),c=l?[s,l]:[s];o.splice(r,0,...c),r+=c.length}return o.length===e.length?void 0:R(o)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bd9a8d3b-bc6f-5309-a3fb-7e5f41ef9dab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="12066389-daef-5fce-b7a6-0ecffa926d66")}catch{}})();function Ut(e,t){let n=e.trim().split(/\s+/u);if(!(n.length<2||t.includes(n.join(" "))))for(let o=1;o<n.length;o+=1){if(!t.includes(n.slice(0,o).join(" ")))return;let i=n.slice(o).join(" "),r=k(i),a=new Set(t.filter(s=>s===i||s.endsWith(` ${i}`)||s===r?.canonical).map(s=>k(s)?.canonical??s).filter(s=>t.includes(s)));if(a.size>0)return a.size===1?[...a][0]:void 0}}var qe={add:["create","append"],fetch:["get"],inspect:["get","health"],log:["history","comments","notes"],ls:["list"],pause:["release"],read:["get"],remove:["delete"],rm:["delete"],show:["get"],start:["start-task"]};function oe(e,t){let n=e.trim().toLowerCase(),o=t.trim().toLowerCase();if(o.length===0)return Number.POSITIVE_INFINITY;let i=n.split(" "),r=qe[o]?.indexOf(m(n));if(r!==void 0&&r>=0)return r;if(n===o)return 10;if(i.includes(o))return 11;if(i.some(l=>l.startsWith(o)))return 12;let a=o.length>=5?2:1,s=Number.POSITIVE_INFINITY;for(let l of i){let c=C(l,o,a);c!==null&&(s=Math.min(s,c))}return Number.isFinite(s)?20+s:n.includes(o)?30:Number.POSITIVE_INFINITY}function jt(e,t){return e.map(n=>({path:n,score:oe(n,t)})).filter(n=>Number.isFinite(n.score)).sort((n,o)=>n.score!==o.score?n.score-o.score:n.path===o.path?0:n.path<o.path?-1:1).map(n=>n.path)}function qt(e,t,n){let o=new Set(t),i=E.filter(s=>s.lifecycle==="deprecated").slice().sort((s,l)=>l.alias.length-s.alias.length),r=[],a=e.flatMap(s=>{let l=i.find(u=>s===u.alias||s.startsWith(`${u.alias} `)),c=s;if(l){let u=s.slice(l.alias.length);if(!o.has(`${l.canonical}${u}`))return[];c=`${l.canonical_argv.join(" ")}${u}`}return n!==void 0&&oe(s,n)<10&&r.push(c),[c]});return[...new Set(r.length>0?r:a)]}export{Xe as a,j as b,q as c,he as d,X as e,ge as f,S as g,be as h,ut as i,Ie as j,dt as k,Fe as l,Re as m,ft as n,pt as o,yt as p,f as q,ze as r,Ge as s,vt as t,Lt as u,Mt as v,te as w,Ft as x,Dt as y,je as z,Rt as A,Ut as B,oe as C,jt as D,qt as E};
|
|
2
|
+
//# sourceMappingURL=chunk-2J7I54MQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as o,C as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{A as o,C as r}from"./chunk-RZQNFHXO.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="be9abae1-85ae-5a68-96bc-c738218ace5e")}catch{}})();function u(n){return n instanceof r||n instanceof Error?n.message:"Unknown failure"}function d(n){if(typeof n!="object"||n===null||!("exitCode"in n))return;let e=n.exitCode;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function f(n){let e=Math.trunc(n);return e>o.SUCCESS?e:o.GENERIC_FAILURE}function s(n){return typeof n=="object"&&n!==null&&"code"in n&&typeof n.code=="string"&&n.code.startsWith("commander.")}function l(n,e){if(n instanceof Error)return n;let t=new Error(e),i=d(n);return i!==void 0&&(t.exitCode=f(i)),t}export{u as a,d as b,f as c,s as d,l as e};
|
|
2
|
+
//# sourceMappingURL=chunk-3KMYHYJV.js.map
|