@unbrained/pm-cli 2026.9.19 → 2026.9.21
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 +954 -924
- package/dist/cli/main.d.ts +10 -76
- package/dist/cli/main.js +1 -2
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli/runtime/activation.d.ts +51 -0
- package/dist/cli/runtime/activation.js +2 -0
- package/dist/cli/runtime/invocation-options.d.ts +41 -0
- package/dist/cli/runtime/invocation-options.js +2 -0
- package/dist/cli/runtime/selection.d.ts +29 -0
- package/dist/cli/runtime/selection.js +2 -0
- package/dist/cli/runtime/telemetry-outcome.d.ts +20 -0
- package/dist/cli/runtime/telemetry-outcome.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +150 -150
- package/dist/cli-bundle/chunks/{chunk-QA4GUEKJ.js → chunk-2QLXN6HZ.js} +46 -46
- package/dist/cli-bundle/chunks/chunk-2UNYUB4A.js +2 -0
- package/dist/cli-bundle/chunks/chunk-4SI67A2F.js +8 -0
- package/dist/cli-bundle/chunks/chunk-7YUYLYJQ.js +6 -0
- package/dist/cli-bundle/chunks/{chunk-7CN53F4S.js → chunk-FBWAECBI.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-GRHSNUQO.js +20 -0
- package/dist/cli-bundle/chunks/chunk-HAFSMFJK.js +3 -0
- package/dist/cli-bundle/chunks/chunk-JBJUOOJI.js +238 -0
- package/dist/cli-bundle/chunks/chunk-K7RWRJLT.js +29 -0
- package/dist/cli-bundle/chunks/chunk-NHRB3L5T.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-CCLWCESZ.js → chunk-QZTS23BV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-K4VAU4HU.js → chunk-SDLBF4PY.js} +1252 -1252
- package/dist/cli-bundle/chunks/{register-list-query-RMZNHSII.js → register-list-query-5V43MYPN.js} +6 -6
- package/dist/cli-bundle/chunks/{register-mutation-HJGSGX3H.js → register-mutation-DXES37MA.js} +4 -4
- package/dist/cli-bundle/chunks/register-operations-LJU5H2CU.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-HJUNGYBB.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-3XPBKIV6.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7Y7PAC56.js → chunk-5BLRMUMK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5SZ4JSPZ.js → chunk-6MNKQKT6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IKPR4VVN.js → chunk-DPBTIFW7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-J3GN4SQT.js → chunk-DRNXMOSV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-P4BA7OX7.js → chunk-FXAZPSU6.js} +7 -7
- package/dist/cli-bundle/focused-chunks/{chunk-ARK4FIO4.js → chunk-HYPK5OPA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-I4WDON3K.js → chunk-IA5CCSBB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-CJ4QA4RW.js → chunk-ISEOBALS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZI2YBJFH.js → chunk-K5ZCBC6Y.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-V3YMNAO7.js → chunk-L6L4XCLY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TDHVROGL.js → chunk-N6KI3LWF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-PC6ZZVNP.js +20 -0
- package/dist/cli-bundle/focused-chunks/chunk-RQL5WLNZ.js +30 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZDBKYZFE.js → chunk-U2SB2BMM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YDFEWXXZ.js → chunk-UIS5FVHH.js} +53 -53
- package/dist/cli-bundle/main.js +26 -27
- 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 +39 -39
- 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 +42 -42
- 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 +8 -8
- package/dist/core/diagnostics/remediation.js +1 -1
- package/dist/core/extensions/extension-types.d.ts +2 -2
- package/dist/core/extensions/loader.d.ts +9 -15
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/manifest-parser.d.ts +5 -0
- package/dist/core/extensions/manifest-parser.js +2 -0
- package/dist/core/extensions/registration-contracts.d.ts +34 -0
- package/dist/core/extensions/registration-contracts.js +2 -0
- package/dist/core/governance/issue-codes.d.ts +10 -1
- package/dist/core/governance/issue-codes.js +1 -1
- package/dist/core/validate/fix-planning.d.ts +3 -3
- package/dist/core/validate/fix-planning.js +1 -1
- package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
- package/dist/sdk/completion/bash.d.ts +3 -0
- package/dist/sdk/completion/bash.js +2 -0
- package/dist/sdk/completion/fish.d.ts +3 -0
- package/dist/sdk/completion/fish.js +1054 -0
- package/dist/sdk/completion/shared.d.ts +103 -0
- package/dist/sdk/completion/shared.js +2 -0
- package/dist/sdk/completion/zsh.d.ts +3 -0
- package/dist/sdk/completion/zsh.js +1109 -0
- package/dist/sdk/completion.d.ts +5 -30
- package/dist/sdk/completion.js +1 -2160
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/governance/closure-timestamps.d.ts +32 -0
- package/dist/sdk/governance/closure-timestamps.js +2 -0
- package/dist/sdk/governance/validate-normalization.d.ts +2 -0
- package/dist/sdk/governance/validate-normalization.js +1 -1
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/governance.d.ts +1 -0
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/search/corpus.d.ts +27 -0
- package/dist/sdk/query/search/corpus.js +2 -0
- package/dist/sdk/query/search/filters.d.ts +27 -0
- package/dist/sdk/query/search/filters.js +2 -0
- package/dist/sdk/query/search/input.d.ts +28 -0
- package/dist/sdk/query/search/input.js +2 -0
- package/dist/sdk/query/search/lexical.d.ts +34 -0
- package/dist/sdk/query/search/lexical.js +2 -0
- package/dist/sdk/query/search/response.d.ts +34 -0
- package/dist/sdk/query/search/response.js +2 -0
- package/dist/sdk/query/search/semantic.d.ts +229 -0
- package/dist/sdk/query/search/semantic.js +3 -0
- package/dist/sdk/query/search/types.d.ts +123 -0
- package/dist/sdk/query/search/types.js +2 -0
- package/dist/sdk/query/search.d.ts +13 -364
- package/dist/sdk/query/search.js +1 -2
- package/dist/sdk/runtime/actions.d.ts +4 -0
- package/dist/sdk/runtime/actions.js +2 -0
- package/dist/sdk/runtime/context.d.ts +38 -0
- package/dist/sdk/runtime/context.js +2 -0
- package/dist/sdk/runtime/schema.d.ts +4 -0
- package/dist/sdk/runtime/schema.js +2 -0
- package/dist/sdk/runtime.d.ts +90 -95
- package/dist/sdk/runtime.js +1 -1
- package/docs/ARCHITECTURE.md +68 -0
- package/docs/HISTORY_GOVERNANCE_REPAIR.md +66 -0
- package/docs/README.md +2 -0
- package/docs/VALIDATION_PORTABILITY.md +82 -0
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -3
- package/marketplace.json +2 -2
- package/package.json +6 -6
- 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/extensions/guide-shell/runtime.ts +23 -17
- 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/dist/cli-bundle/chunks/chunk-AACGU5IA.js +0 -3
- package/dist/cli-bundle/chunks/chunk-J7NP7QLW.js +0 -6
- package/dist/cli-bundle/chunks/chunk-KHN4NMKT.js +0 -238
- package/dist/cli-bundle/chunks/chunk-KYG2QKNY.js +0 -29
- package/dist/cli-bundle/chunks/chunk-OQS2Y6VN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-QTHR3LXF.js +0 -20
- package/dist/cli-bundle/chunks/chunk-RVMDPIGD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-WASMH647.js +0 -8
- package/dist/cli-bundle/chunks/register-operations-LBEMFUMM.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-MU557JAA.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-I32L3FWW.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-OOZHQFBF.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-QL4MO5M2.js +0 -30
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as M,$e as _,O as p,Q as h,Qh as B,_ as L,_e as D,bo as y,da as F,g as P,h as m,j as E,k as N,oa as I,pf as w,qf as S,rf as V,sf as A,tf as b,uf as v,xf as $}from"./chunk-KHN4NMKT.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="69117358-9878-589b-8918-e71599e6c7df")}catch{}})();var f=Object.freeze({clock:"PM_CLOCK",tickMs:"PM_CLOCK_TICK_MS",seed:"PM_SEED"});function C(e,t,n,o){return new h(e,p.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 Q(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 C("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 C(`${f.seed} must not be empty.`,"invalid_value",f.seed,i);if(!F(t))throw C(`${f.clock} must be a valid ISO-8601 instant with Z or a numeric UTC offset.`,"invalid_value",f.clock,i);let s=n===void 0?1:Number(n);if(n?.trim().length===0||!Number.isSafeInteger(s)||s<0)throw C(`${f.tickMs} must be a non-negative integer.`,"invalid_value",f.tickMs,i);return L({clock:t,seed:o,tickMs:s})}function ee(e){let t=Q(e);return t===void 0?n=>n():M(t)}async function Ue(e,t){return ee(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]="e1db7644-e481-5049-a773-fcffa09f1779")}catch{}})();var R=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"]),z=new Map([["files","discover"],["item","complete"]]),te=new Map([["append",1],["close",1],["close-task",1],["comments",1],["item complete",1],["learnings",1],["notes",1],["restore",1]]);function G(e){let t=m(e?.trim().toLowerCase()??"");return R.has(t)||z.has(t)}function ne(e,t,n){let o=R.has(n)?t+1:void 0,i=b(e.slice(t+1));if(i===void 0)return o;let s=t+1+i,a=`${n} ${e[s]}`,r=m(a);return r===a?n==="item"&&e[s]==="complete"?s+1:o:G(r)?O(e,s,r):void 0}function O(e,t,n){if(["history","context","ctx","update","close","item"].includes(n))return ne(e,t,n);let o=z.get(n);if(o===void 0)return t+1;let i=e[t+1]?.toLowerCase()===o;return t+(i?2:1)}function oe(e){let t=new Map;for(let n of y(e))for(let o of[n.flag,n.short,...n.aliases??[]])o&&t.set(o,n);return t}function ie(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 se(e,t,n){if(e.indexOf("=")>=0||t===void 0||t.startsWith("-"))return!1;let i=n.get(e);return i!==void 0&&i.value_type!=="boolean"}function re(e,t,n,o,i){let s=0;for(let a=t;a<e.length;a+=1){let r=e[a];if(r==="--")break;if(r==="--id"){a+=1;continue}if(!r.startsWith("--id=")){if(!r.startsWith("-")){if(a<o)return!0;s+=1;continue}se(r,e[a+1],i)&&(a+=1)}}return s>(te.get(m(n))??0)}function W(e){let t=b(e),n=t===void 0?void 0:e[t]?.toLowerCase();if(n!=="context"&&n!=="ctx"&&!G(n))return{argv:[...e],changed:!1,conflict:!1};let o=O(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,s=oe(i),a=ie(e),r=a[0];if(!r||!r.value?.trim())return{argv:[...e],changed:!1,conflict:!1};if(a.length>1||re(e,o,i,r.index,s))return{argv:[...e],changed:!1,conflict:!0,itemId:r.value};let c=[...e.slice(0,r.index),...e.slice(r.index+r.consumed)],l=b(c),u=O(c,l,n);return c.splice(u,0,r.value),{argv:c,changed:!0,conflict:!1,itemId:r.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]="8ef3b254-0494-57bc-8bbf-8ee58eb7d152")}catch{}})();var ae=new Set(["--output-include","--output-limit","--output-budget","--output-format","--output-session","--output-cursor"]);function ce(e,t,n){let o=e[t];if(S.has(o))return n.booleanFlags.add(o),1;let i=o.indexOf("="),s=i>0?o.slice(0,i):o;if(!w.has(s))return 1;let a=i>0?o.slice(i+1):void 0,r=a===void 0&&A(s,e[t+1]),c=a??(r?e[t+1]:void 0);return s==="--author"?n.author=c??"":typeof c=="string"&&c.length>0&&(ae.has(s)?n.outputValues:n.pathValues).set(s,c),r?2:1}function le(e){let t={booleanFlags:new Set,outputValues:new Map,pathValues:new Map},n=0;for(;n<e.length&&e[n]!=="--";)n+=ce(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(X(e)??""),noPager:t.booleanFlags.has("--no-pager"),json:t.booleanFlags.has("--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")},...t.outputValues.get("--output-format")==="toon"||t.outputValues.get("--output-format")==="json"?{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 j(e){let t=[],n=0;for(;n<e.length;){let o=e[n];if(o==="--")break;if(S.has(o)||o==="--profile"||o==="--id-only"||o==="--full-changed-fields"||o==="--explain"){n+=1;continue}if(w.has(o)){n+=A(o,e[n+1])?2:1;continue}if(V(o)){n+=1;continue}t.push(o),n+=1}return t}function ue(e){let t=j(e);if(t[0]?.trim().toLowerCase()==="help"){let s=[];for(let a=1;a<t.length;a+=1){let r=t[a];if(r.startsWith("-"))break;s.push(r.trim().toLowerCase())}return{requested:!0,commandPathTokens:s}}if(t.findIndex(s=>s==="--help"||s==="-h")<0)return{requested:!1,commandPathTokens:[]};let i=[];for(let s of t){if(s.startsWith("-"))break;i.push(s.trim().toLowerCase())}return{requested:!0,commandPathTokens:i}}function k(e){return b(e)}function de(e){return v(e)}function fe(e,t){return t.noPager?!0:process.stdout.isTTY===!0?!1:ue(e).requested}function rt(e){let t=["PAGER","MANPAGER","GIT_PAGER","LESS"],n=t.map(s=>process.env[s]),o=()=>{for(let[s,a]of t.entries()){let r=n[s];r===void 0?delete process.env[a]:process.env[a]=r}},i=le(e);return fe(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 pe=new Set(["install","uninstall","explore","manage","doctor","adopt","adopt-all","activate","deactivate"]);function me(e){let t=k(e);if(t===void 0||e[t]!=="extension")return[...e];let n=e[t+1];if(!n||n.startsWith("-"))return[...e];if(!pe.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 he=new Set(["pm","pm-cli"]);function ge(e,t){let n=k(e);if(n===void 0)return e;let o=e[n];return he.has(o.trim().toLowerCase())?(t.push({from:o,to:[],reason:"executable_alias",confidence:"high"}),[...e.slice(0,n),...e.slice(n+1)]):e}function be(e,t){let n=k(e);if(n!==void 0&&e[n]==="help"){let r=k(e.slice(n+1));n=r===void 0?void 0:n+1+r}if(n===void 0)return e;let o=e[n],i=N[o.trim().toLowerCase()];if(!i)return e;let s=i.split(" "),a=[...e.slice(0,n),...s,...e.slice(n+1)];return t.push({from:o,to:s,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 U(e){return x(e).replace(/-/g,"")}function q(e,t,n){let o=e.get(t);if(o===void 0){e.set(t,n);return}o!==n&&e.set(t,null)}function ye(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 we(e,t){let n=t??y(e),o=new Map,i=new Map,s=new Map,a=new Set;for(let r of n){let c=ye(r);if(c.length===0)continue;let l=`--${x(c[0])}`;for(let d of c)q(o,x(d),l),q(i,U(d),l);let u=U(l);s.has(l)||s.set(l,u),r.list===!0&&a.add(l)}return{canonicalByNormalized:o,canonicalByCompact:i,canonicalComparables:[...s.entries()].map(([r,c])=>({canonicalFlag:r,comparable:c})),listCanonicalFlags:a}}function K(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,""),s=t.canonicalByCompact.get(i);if(typeof s=="string")return{flag:s,reason:"flag_alias",confidence:"high"};let a=i.length>=8?2:1,r=Number.POSITIVE_INFINITY,c,l=!1;for(let u of t.canonicalComparables){let d=I(i,u.comparable,a);if(d!==null){if(d<r){r=d,c=u.canonicalFlag,l=!1;continue}d===r&&c!==u.canonicalFlag&&(l=!0)}}return!c||l||!Number.isFinite(r)||r<=0?null:{flag:c,reason:"flag_typo",confidence:r>=2?"medium":"high"}}function at(e){let t=[`${e}s`];return e.endsWith("y")&&e.length>1&&t.push(`${e.slice(0,-1)}ies`),t}function Ie(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 _e(e,t,n=!1){if(n||!e.startsWith("--"))return{tokens:[e]};let o=e.indexOf("="),i=o>=0?e.slice(0,o):e,s=o>=0?e.slice(o+1):void 0,a=K(i,t);if(!a)return{tokens:[e]};let r=s===void 0?a.flag:`${a.flag}=${s}`;return r===e?{tokens:[e]}:{tokens:[r],event:{from:e,to:[r],reason:a.reason,confidence:a.confidence}}}function ve(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 Ce(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 ke(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 xe(e,t,n,o){if(n.inlineValue!==void 0)return{originalTokens:[e[t]],value:n.inlineValue,consumed:1};let i=[],s=t+1;for(;s<e.length&&e[s]!=="--"&&!e[s].startsWith("-")&&(i.length===0||o.has(n.flag));)i.push(e[s]),s+=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 Te(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 Ee(e,t){let n=[],o=[];for(let[i,s]of e){if(!(s.occurrences>=2||t.has(i)&&s.originalTokens.length>2)){o.push({outputIndex:s.outputIndex,tokens:s.originalTokens});continue}let r=`${i}=${s.values.join(",")}`;o.push({outputIndex:s.outputIndex,tokens:[r]}),n.push({from:`${i} (x${s.occurrences})`,to:[r],reason:"list_merge",confidence:"high"})}return{events:n,splices:o}}function Se(e,t){t.sort((n,o)=>o.outputIndex-n.outputIndex);for(let n of t)e.splice(n.outputIndex,1,...n.tokens)}function Ae(e,t,n=new Set,o=new Set){if(t.size===0)return{argv:[...e],events:[]};let i=[],s=new Map,a=0;for(;a<e.length;){let l=e[a];if(l==="--"){i.push(...e.slice(a));break}if(n.has(l)){a=ke(e,a,i);continue}let u=Ce(l);if(!u||!t.has(u.flag)){i.push(l),a+=1;continue}let d=xe(e,a,u,o);if(d.value===void 0){i.push(l),a+=d.consumed;continue}Te(s,i,u.flag,{originalTokens:d.originalTokens,value:d.value}),a+=d.consumed}let{events:r,splices:c}=Ee(s,o);return Se(i,c),{argv:i,events:r}}var Y=new Map([["--add",new Set(["command","cmd","path"])],["--remove",new Set(["command","path"])]]);function Oe(e,t){if(e!=="test"||t.length<2)return!1;let n=t[t.length-1],o=t[t.length-2],i=Y.get(o);return i!==void 0&&i.has(n)}function Pe(e,t){return e==="search"||Oe(e,t)}function Ne(e,t,n){if(t!=="test")return e;let o=[],i=0;for(;i<e.length;){let s=e[i];if(s==="--")return o.push(...e.slice(i)),o;let a=Y.get(s),r=a?e[i+1]:void 0;if(!a||typeof r!="string"||!a.has(r)){o.push(s),i+=1;continue}let c=i+2;for(;c<e.length&&!e[c].startsWith("-");)c+=1;if(c-(i+2)!==1){o.push(s),i+=1;continue}let l=e[i+2],u=`${r}=${l}`;o.push(s,u),n.push({from:`${s} ${r} ${l}`,to:[s,u],reason:"bare_key_value",confidence:"high"}),i+=3}return o}function Le(e,t,n,o){let i=[],s=ve(e);for(let a=0;a<e.length;a+=1){let r=e[a];if(r==="--"){i.push(...e.slice(a));break}let c=s.has(a),l=i[i.length-1];if(r.startsWith("--")){let d=_e(r,t,c);i.push(...d.tokens),d.event&&o.push(d.event);continue}let u=Ie(r,c);if(u&&!(typeof l=="string"&&l.startsWith("-"))&&!Pe(n,i)){let d=K(u.key,t);if(d){let g=[d.flag,u.value];i.push(...g),o.push({from:r,to:g,reason:"bare_key_value",confidence:d.confidence});continue}}i.push(r)}return i}function Me(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 h("history attest --verify requires a bundle file.",p.USAGE);e.splice(t,2,`--verify=${o}`)}else(w.has(n)||n==="--output"||n==="--hash-algorithm")&&(t+=1)}}function ct(e){let t=[],n=ge(e,t),o=me(n);(o.length!==n.length||o.some((T,J)=>T!==n[J]))&&t.push({from:n.join(" "),to:[...o],reason:"legacy_extension_action",confidence:"high"});let i=be(o,t),s=W(i);if(s.conflict)throw new h("Provide the item id either positionally or with --id, not both.",p.USAGE);s.changed&&t.push({from:`--id ${s.itemId}`,to:[s.itemId],reason:"item_id_alias",confidence:"high"});let a=de(s.argv),r=X(s.argv),c=m(r??a??""),l=we(r??a),u=Le(s.argv,l,c,t),d=Ne(u,c,t),g=Ae(d,l.listCanonicalFlags,w,a==="create"?new Set(["--tags"]):new Set);for(let T of g.events)t.push(T);return r==="history attest"&&Me(g.argv),{argv:g.argv,commandName:a,trace:t}}function X(e){let t=j(e),n=t[0]?.trim().toLowerCase(),o=t[1]?.trim().toLowerCase(),i=P(t);return i?i.canonical:(n==="extension"||n==="package"||n==="packages")&&typeof o=="string"&&o.length>0&&!o.startsWith("-")?`${n} ${o}`:n}function lt(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]="4f7274c6-547e-5590-b7c9-a4d6418bf860")}catch{}})();function Z(e){return e.trim().match(/--[a-z0-9][a-z0-9_-]*/i)?.[0]?.replaceAll("_","-").toLowerCase()}function mt(e){if(!(!Array.isArray(e)||e.length===0))return v(e)}function Fe(e,t){let n=Z(t);if(!n)return;let o=y(e).find(i=>i.flag===n||i.aliases?.includes(n));return o?o.value_type==="boolean"?null:`<${o.value_name??"value"}>`:"<value>"}function ht(e,t,n){let o=[...e],i=o.indexOf("--"),s=i<0?o.length:i;for(let a of n){let r=Z(a);if(!r||o.slice(0,s).some(u=>u===r||u.startsWith(`${r}=`)))continue;let c=Fe(t,r),l=c?[r,c]:[r];o.splice(s,0,...l),s+=l.length}return o.length===e.length?void 0:$(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]="bdf3dec8-63d1-5ea6-a413-64be0ae8f69f")}catch{}})();function vt(e){return e instanceof h||e instanceof Error?e.message:"Unknown failure"}function De(e){if(typeof e!="object"||e===null||!("exitCode"in e))return;let t=e.exitCode;return typeof t=="number"&&Number.isFinite(t)?t:void 0}function Ve(e){let t=Math.trunc(e);return t>p.SUCCESS?t:p.GENERIC_FAILURE}function Ct(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"&&e.code.startsWith("commander.")}function kt(e,t){if(e instanceof Error)return e;let n=new Error(t),o=De(e);return o!==void 0&&(n.exitCode=Ve(o)),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]="d22b586a-5c12-518e-b1ee-4baa0d04243b")}catch{}})();function At(e){if(e===void 0)return()=>{};let t=e.trim();if(t.length===0)throw new h("--author requires a non-empty value.",p.USAGE,{code:"missing_required_argument",nextSteps:["Pass an explicit author identifier with --author <id>."]});let n=D();_(t);let o=!1;return()=>{o||(o=!0,n===void 0?_(void 0):_(n))}}import{Command as $e}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]="59132bc6-2d45-5049-981f-fadcf0c75091")}catch{}})();function Lt(e){return new $e().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=>{B(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 a budget-compacted declared row collection").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]="925e5fec-4cc0-5315-a331-03cb128893f0")}catch{}})();var Be={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 H(e,t){let n=e.trim().toLowerCase(),o=t.trim().toLowerCase();if(o.length===0)return Number.POSITIVE_INFINITY;let i=n.split(" "),s=Be[o]?.indexOf(m(n));if(s!==void 0&&s>=0)return s;if(n===o)return 10;if(i.includes(o))return 11;if(i.some(c=>c.startsWith(o)))return 12;let a=o.length>=5?2:1,r=Number.POSITIVE_INFINITY;for(let c of i){let l=I(c,o,a);l!==null&&(r=Math.min(r,l))}return Number.isFinite(r)?20+r:n.includes(o)?30:Number.POSITIVE_INFINITY}function Vt(e,t){return e.map(n=>({path:n,score:H(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 $t(e,t,n){let o=new Set(t),i=E.filter(r=>r.lifecycle==="deprecated").slice().sort((r,c)=>c.alias.length-r.alias.length),s=[],a=e.flatMap(r=>{let c=i.find(u=>r===u.alias||r.startsWith(`${u.alias} `)),l=r;if(c){let u=r.slice(c.alias.length);if(!o.has(`${c.canonical}${u}`))return[];l=`${c.canonical_argv.join(" ")}${u}`}return n!==void 0&&H(r,n)<10&&s.push(l),[l]});return[...new Set(s.length>0?s:a)]}export{f as a,Q as b,ee as c,Ue as d,G as e,W as f,le as g,j as h,ue as i,k as j,de as k,rt as l,me as m,at as n,Ae as o,Ne as p,ct as q,lt as r,mt as s,Fe as t,ht as u,vt as v,De as w,Ve as x,Ct as y,kt as z,At as A,Lt as B,H as C,Vt as D,$t as E};
|
|
2
|
-
//# sourceMappingURL=chunk-OQS2Y6VN.js.map
|