@unbrained/pm-cli 2026.11.28 → 2026.11.30
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/dist/cli/commander-usage.js +4 -4
- package/dist/cli/error-guidance.js +5 -5
- package/dist/cli/linked-resource-value-list.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-O2WNNIKK.js → chunk-2SBTXR6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YEMFOKFG.js → chunk-3AZOATC2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CATRDGAB.js → chunk-3TXEWHQX.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-47ZS6RPL.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-MGJMQSN4.js → chunk-4QA5O64H.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-5EFS7K7Y.js +1 -0
- package/dist/cli-bundle/chunks/{chunk-E2LQ6LCJ.js → chunk-5PNOVDVO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OFIYA3PI.js → chunk-AOTI76Q6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TWRUA2NH.js → chunk-CCKM5YQM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CTM26LUE.js → chunk-DCWGM7CY.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-FECZV72T.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-O2SWNEBW.js → chunk-FR7ULTM4.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GSLOAEY2.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-ZXERHBMA.js → chunk-HXQ3OHQR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T7RZPIOB.js → chunk-IGEFPHV7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FG4TNQQM.js → chunk-JPJNJHQW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6OIHST4I.js → chunk-K672XXGQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CDUV7DFD.js → chunk-KCVSSONY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LMDIKSDZ.js → chunk-KXTKLDKD.js} +8 -8
- package/dist/cli-bundle/chunks/chunk-NHBG5ET3.js +2 -0
- package/dist/cli-bundle/chunks/chunk-NVYDPNQP.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-C4O5TZY3.js → chunk-NZSXWIX7.js} +60 -60
- package/dist/cli-bundle/chunks/{chunk-KHFUHGL3.js → chunk-OGVSGXQX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LRGYV6QQ.js → chunk-Q4VZSMUL.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-SJWIPGZW.js +113 -0
- package/dist/cli-bundle/chunks/chunk-TE6FBDHP.js +4 -0
- package/dist/cli-bundle/chunks/{chunk-Q6BGQRCB.js → chunk-TX74QJ4W.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TY55UX6M.js +10 -0
- package/dist/cli-bundle/chunks/chunk-USBTXMKS.js +2 -0
- package/dist/cli-bundle/chunks/chunk-VCXQ6A35.js +3 -0
- package/dist/cli-bundle/chunks/chunk-WFYE34TO.js +23 -0
- package/dist/cli-bundle/chunks/chunk-X5D5YUHR.js +2 -0
- package/dist/cli-bundle/chunks/chunk-YPMNXG2C.js +2 -0
- package/dist/cli-bundle/chunks/chunk-YVTALIN3.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-JQYPSABI.js → chunk-Z7YL2SUM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T7UTG56V.js → chunk-ZA5NS3PL.js} +3 -3
- package/dist/cli-bundle/chunks/field-definition-losses-XKE4DRUA.js +2 -0
- package/dist/cli-bundle/chunks/{field-option-collisions-G4LQ2646.js → field-option-collisions-2F2Z7R7B.js} +2 -2
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-H3MMNXXG.js → indexed-receipt-blobs-DR3FDHND.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-O7L3AA2W.js → item-revision-UAF6L47R.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-RJECL53Y.js +2 -0
- package/dist/cli-bundle/chunks/linked-resource-value-list-WXPPYUVQ.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-actor-A45DFDEO.js → mutation-actor-UK3QNEEB.js} +2 -2
- package/dist/cli-bundle/chunks/mutation-admission-UTDYPFWP.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-FCPGG2UT.js → register-list-query-DRA3CWHI.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-VD3JX23I.js → register-mutation-WO74VLEQ.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-CRBKH7WN.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-EWAZZWPL.js → register-setup-6V6NQB5C.js} +2 -2
- package/dist/cli-bundle/chunks/runtime-schema-OAIUNQRL.js +2 -0
- package/dist/cli-bundle/chunks/{settlement-hook-KWBOSRDZ.js → settlement-hook-BIVNGBZF.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-UIDZMTE5.js → stage-DYEHGASU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-26P6C6OO.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-2UUBS4BG.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-J4V3J5MC.js → chunk-4ER3VMST.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4YBMHMBJ.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Y7EC2L2G.js → chunk-62AMZMR4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OEMI52ZS.js → chunk-7G7JIXLL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YC3PFFDE.js → chunk-A3DORTXS.js} +57 -57
- package/dist/cli-bundle/focused-chunks/{chunk-AHCOSTL7.js → chunk-CWQLW4ZO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-CQLOYNJY.js → chunk-FM5WQ6ZU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-HXM7K6VH.js +100 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7EKKUYN5.js → chunk-IIVDBAJM.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-ZYHGQIQ7.js → chunk-IJ3T3W4U.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NGFDPEP7.js → chunk-IRYNVGKH.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-JFICNN4T.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-KPASZGBL.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-YX75PQFO.js → chunk-L357ZAES.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-HCWDMFWA.js → chunk-LWBZ7UGG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JD45Y2BR.js → chunk-M57KDG7I.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MZNV26XE.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-NGHT2LNG.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-NJTKGBSK.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7P6OGPEG.js → chunk-P55AZPFN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-RQYVX2T6.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Q6JCMFGU.js → chunk-SXC3NVZI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-TQQO42C2.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-VNU3IFBL.js → chunk-U35K7FSE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-UQJ4PY2Y.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-XVCMYFQU.js → chunk-WAP3DF4B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4SX2BN4V.js → chunk-XR6MLUVW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-XR745UGE.js +4 -0
- package/dist/cli-bundle/focused-chunks/field-definition-losses-GGA6FUHD.js +2 -0
- package/dist/cli-bundle/focused-chunks/{field-option-collisions-63YQ2J3N.js → field-option-collisions-7TG7STO7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-PG2VJ3MB.js → indexed-receipt-blobs-EUYZJR5R.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-revision-PV5O6F5Y.js → item-revision-J7EUGCHR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-transaction-2IC2MLML.js +2 -0
- package/dist/cli-bundle/focused-chunks/{mutation-actor-2AAUJG2Z.js → mutation-actor-LJVF2HVD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-SLFAUONA.js +2 -0
- package/dist/cli-bundle/focused-chunks/runtime-schema-IDRXWCC4.js +2 -0
- package/dist/cli-bundle/focused-chunks/{settlement-hook-4MGRERCT.js → settlement-hook-Q6MJQKIE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-56RYPMBK.js → stage-MWR73LTZ.js} +2 -2
- package/dist/cli-bundle/main.js +26 -26
- 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 +1 -1
- 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 +63 -63
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +1 -1
- package/dist/core/extensions/item-fields.d.ts +18 -1
- package/dist/core/extensions/item-fields.js +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/fs/fs-utils.d.ts +8 -0
- package/dist/core/fs/fs-utils.js +2 -2
- package/dist/core/item/item-type-inspection.js +2 -0
- package/dist/core/item/type-registry.js +1 -1
- package/dist/core/schema/runtime-schema.d.ts +19 -0
- package/dist/core/schema/runtime-schema.js +2 -2
- package/dist/core/shared/url-credentials.d.ts +4 -2
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/store/settings.d.ts +7 -0
- package/dist/core/store/settings.js +5 -5
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/runtime/schema.js +1 -1
- package/dist/sdk/schema/field-definition-losses.js +1 -1
- package/dist/sdk/schema/schema-file-entry-losses.js +2 -0
- package/dist/sdk/test/execution.d.ts +9 -1
- package/dist/sdk/test/execution.js +4 -4
- package/docs/COMMANDS.md +3 -1
- package/docs/CONFIGURATION.md +23 -4
- package/docs/EXTENSIONS.md +1 -1
- package/docs/READ_OUTPUT_CONTRACTS.md +5 -0
- package/docs/SDK.md +19 -3
- package/docs/SDK_AUDITED_MUTATIONS.md +9 -0
- package/marketplace.json +1 -1
- package/node_modules/fast-json-patch/README.md +2 -2
- package/node_modules/fast-json-patch/dist/fast-json-patch.js +604 -818
- package/node_modules/fast-json-patch/dist/fast-json-patch.min.js +4 -8
- package/node_modules/fast-json-patch/package.json +14 -17
- package/package.json +2 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-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-2YD2AERA.js +0 -2
- package/dist/cli-bundle/chunks/chunk-54AQJTUH.js +0 -3
- package/dist/cli-bundle/chunks/chunk-56DKWGHE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-56GUDMXN.js +0 -113
- package/dist/cli-bundle/chunks/chunk-5ECCMDSU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-6RBD2AKU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-D3I5AHNN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-MO6PPUI6.js +0 -2
- package/dist/cli-bundle/chunks/chunk-RGE3XW3A.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SP6CDM6B.js +0 -31
- package/dist/cli-bundle/chunks/chunk-WKDKBS4P.js +0 -4
- package/dist/cli-bundle/chunks/chunk-YLS2N4SN.js +0 -2
- package/dist/cli-bundle/chunks/field-definition-losses-JFMMMVTV.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-4XC74ULD.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-SIUIMAEO.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-KHJD4GFZ.js +0 -2
- package/dist/cli-bundle/chunks/runtime-schema-3RAXYNG5.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5MZXU6HB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-64DSKZJN.js +0 -100
- package/dist/cli-bundle/focused-chunks/chunk-A5B43EWU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-E4C6T3NL.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KMGI5GZP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-MSLRDKWL.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-O33WUEAF.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-RBOWKXFV.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-TF57RHS2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-X5ZVPFK7.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-Z4FWJGQG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZHHFOQSL.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-ZUAPUBJK.js +0 -2
- package/dist/cli-bundle/focused-chunks/field-definition-losses-NUZO3JCP.js +0 -2
- package/dist/cli-bundle/focused-chunks/item-transaction-S5QXBGAT.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-X7HHNERR.js +0 -2
- package/dist/cli-bundle/focused-chunks/runtime-schema-5J2ONRNV.js +0 -2
- package/node_modules/fast-json-patch/webpack.config.js +0 -63
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as m}from"./chunk-3AZOATC2.js";import{r as p}from"./chunk-GSLOAEY2.js";import{P as o,U as u,Y as f,Z as l}from"./chunk-TE6FBDHP.js";import{I as c}from"./chunk-K672XXGQ.js";import{constants as h}from"node:fs";import{open as w}from"node:fs/promises";import _ from"node:path";async function y(e){try{let i=await w(e,h.O_RDONLY|h.O_NONBLOCK);try{return(await i.stat()).isFile()?JSON.parse(await i.readFile("utf8")):void 0}finally{await i.close()}}catch{return}}function v(e){let i=m(e);return i.success?i.data.schema:void 0}async function S(e,i){let t=l(e,i?.files?.fields,o.fields);return f(await y(t))??[]}async function j(e,i){let t=await c(l(e,i?.files?.fields,o.fields));if(t===null)return[];let a;try{a=JSON.parse(t)}catch{return[]}return f(a)??[]}function O(e,i,t,a){return i.flatMap((r,d)=>{let n=a(r,d);if(n.dropped===void 0&&n.ignored.length===0)return[];let s=r?.[t];return[{source:e,index:d,[t]:typeof s=="string"?s:null,...n.dropped===void 0?{}:{dropped:n.dropped},...n.ignored.length===0?{}:{ignored:n.ignored}}]})}function g(e,i){return O(e,i,"key",t=>u(t).loss)}async function k(e,i){let t=v(await y(p(e)));return{inline:t,configured:t?.files===void 0?i:t}}function x(e,i){return _.relative(e,i).split(_.sep).join("/")}async function C(e,i,t){let{inline:a,configured:r}=await k(e,i),d=l(e,r.files?.fields,o.fields),n=[...g("settings.json",a?.fields??[]),...g(x(e,d),await S(e,r))];if(n.length===0)return{details:{},warnings:[]};let s=n.filter(F=>F.dropped!==void 0).length;return{details:{schema_field_definition_loss_count:n.length,schema_field_definition_losses:n.slice(0,t),schema_field_definition_losses_truncated:n.length>t,schema_field_definition_loss_fix_hint:"A dropped definition registers no option and a field read in part ignores the listed members. Re-register a file-backed field with valid values: pm schema add-field <key> --cli-flag <flag> --alias <alias> --commands <commands>. add-field replaces the type, commands, description, flag, aliases and requirement settings it is given but keeps value_schema, metadata_key, front_matter_key and repeatable, so edit or remove those members in the fields file. Edit or remove an entry stored inline in settings.json there."},warnings:[...s>0?[`validate_schema_field_definition_dropped:${s}`]:[],...n.length>s?[`validate_schema_field_definition_partial:${n.length-s}`]:[]]}}export{y as a,S as b,j as c,O as d,k as e,x as f,C as g};
|
|
2
|
+
//# sourceMappingURL=chunk-X5D5YUHR.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ac as P,Bb as R,Bc as M,Cb as g,M as O,N as v,Oc as x,Pc as N,Pe as T,ja as E}from"./chunk-SJWIPGZW.js";import{nb as b}from"./chunk-JPJNJHQW.js";import{L as w,M as S,S as I,k as p,m as C,o as k,x as y}from"./chunk-VCXQ6A35.js";import{A as f,C as h}from"./chunk-K672XXGQ.js";import{Command as U}from"commander";function Q(n){return new U().name("pm").description("Universal, flexible, extensible, agent-optimized project management CLI for any project or programming language.").version(n).showHelpAfterError(!1).allowExcessArguments(!1).allowUnknownOption(!1).configureOutput({writeOut:e=>{T(e)},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").option("--expect-hash <revision>","Refuse writes to the named item unless it is still at this item_hash from pm get (a bare hash names the command's <id>; guard each other item with <id>=<item_hash>, repeatable)",(e,t)=>[...t??[],e]).exitOverride()}function re(n){if(n===void 0)return()=>{};let e=n.trim();if(e.length===0)throw new h("--author requires a non-empty value.",f.USAGE,{code:"missing_required_argument",nextSteps:["Pass an explicit author identifier with --author <id>."]});let t=R();g(e);let o=!1;return()=>{o||(o=!0,t===void 0?g(void 0):g(t))}}var c=Object.freeze({clock:"PM_CLOCK",tickMs:"PM_CLOCK_TICK_MS",seed:"PM_SEED"});function _(n,e,t,o){return new h(n,f.USAGE,{code:"invalid_reproducible_process_environment",reason:e,field:t,required:`${c.clock} and ${c.seed}; ${c.tickMs} is optional`,nextSteps:[`Set ${c.clock} to an ISO-8601 instant with Z or a numeric UTC offset and ${c.seed} to a non-empty reproducibility seed.`,`Optionally set ${c.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:e==="incomplete"?[c.clock,c.seed].filter(r=>!o.includes(r)):void 0}})}function z(n){let e=n[c.clock],t=n[c.tickMs],o=n[c.seed],r=[[c.clock,e],[c.tickMs,t],[c.seed,o]].filter(s=>s[1]!==void 0).map(([s])=>s);if(r.length===0)return;if(e===void 0||o===void 0)throw _("Reproducible process execution requires PM_CLOCK and PM_SEED together.","incomplete",e===void 0?c.clock:c.seed,r);if(o.trim().length===0)throw _(`${c.seed} must not be empty.`,"invalid_value",c.seed,r);if(!I(e))throw _(`${c.clock} must be a valid ISO-8601 instant with Z or a numeric UTC offset.`,"invalid_value",c.clock,r);let a=t===void 0?1:Number(t);if(t?.trim().length===0||!Number.isSafeInteger(a)||a<0)throw _(`${c.tickMs} must be a non-negative integer.`,"invalid_value",c.tickMs,r);return w({clock:e,seed:o,tickMs:a})}function W(n){let e=z(n);return e===void 0?t=>t():S(e)}async function ue(n,e){return W(n)(e)}var $=new Set([...Object.values(P),...M,"--full","--brief","--compact","--summary","--fields","--section","--token-budget"]),L=new Set(["--full-changed-fields","--no-changed-fields","--id-only"]);function ke(n,e){if(!["block","unblock"].includes(n)||e.includes(n)||!e.includes("update"))return;let t=new Set(b("update").map(r=>r.flag));if((n==="block"?["--blocked-by","--blocked-reason"]:["--unset","--unblock-note"]).every(r=>t.has(r)))return n==="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 the blocked_by rows naming it; other blocked_by relationships stay, so remove one with --dep-remove "id=<id>,kind=blocked_by" or all with --dep-remove kind=blocked_by. --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 q(n,e){let t=n.includes("="),o=t?n.slice(n.indexOf("=")+1):e;if(!(!o||o.startsWith("--")))return{consumed:t?1:2,replacement:["--from",o],conflicts:["--from"]}}var G=["--depth","--output-include","--fields","--section","--for"];function B(n){let e=x(p(n.trim().toLowerCase()));if(e===void 0)return;let t=b(e),o=t.flatMap(s=>[s.flag,...s.aliases??[]]),r=[...N(e).keys()].filter(s=>o.includes(`--${s}`)),a=[...t.find(s=>s.flag==="--depth")?.values??[]];if(!(r.length===0&&a.length===0))return{command:e,modes:r,depth_values:a,declared_flags:o}}function xe(n){return[...n.depth_values.length>0?[`--depth ${n.depth_values.join("|")}`]:[],...n.modes.map(e=>`--${e}`)].join(", ")}function V(n,e,t,o){let r=B(n);if(r===void 0||r.declared_flags.includes(e))return;let a=[...G,...r.modes.map(i=>`--${i}`)].filter(i=>i!==e);if(e==="--depth"){let i=t.includes("="),l=(i?t.slice(t.indexOf("=")+1):o)?.trim().toLowerCase();if(!l)return;let u=i?1:2;return r.modes.includes(l)?{consumed:u,replacement:[`--${l}`],conflicts:a}:l==="standard"?{consumed:u,replacement:[],conflicts:a}:void 0}let s=e.slice(2);return t===e&&r.depth_values.includes(s)?{consumed:1,replacement:["--depth",s],conflicts:a}:void 0}function Y(n,e,t,o){return e==="--since"&&n==="activity"?q(t,o):e==="--toon"&&t===e?{consumed:1,replacement:["--output-format","toon"],conflicts:["--json","--format","--output-format","--stream"]}:V(n,e,t,o)}function J(n){let e=O(n);if(e===void 0)return;let t=n[e].trim().toLowerCase(),o=`${t} ${n[e+1]?.trim().toLowerCase()??""}`,r=p(o);return r!==o.trim()?r:t==="ctx"?"context":p(t)}function Ce(n,e,t){let o=n==="ctx"?"context":p(n);if(x(o)===void 0||e.includes("--")||J(e)!==o)return;let r=t.split("=",1)[0],a=e.flatMap((m,j)=>m===r||m.startsWith(`${r}=`)?[j]:[]);if(a.length!==1)return;let s=a[0],i=Y(o,r,e[s],e[s+1]);if(!i)return;let{replacement:l,consumed:u,conflicts:d}=i;if(!e.some(m=>d.includes(m.split("=",1)[0])))return[...e.slice(0,s),...l,...e.slice(s+u)]}function A(n){let e=n.split("=",1)[0].replaceAll("_","-");return $.has(e)||e.length>=5&&[...$].some(t=>t.startsWith(e))}function Oe(n,e){let t=n.split("=",1)[0].replaceAll("_","-");return A(t)?!L.has(e):L.has(t)?!A(e):!0}function F(n){return n.trim().match(/--[a-z0-9][a-z0-9_-]*/i)?.[0]?.replaceAll("_","-").toLowerCase()}function ve(n){if(!(!Array.isArray(n)||n.length===0))return v(n)}function K(n,e){let t=F(e);if(!t)return;let o=b(n).find(r=>r.flag===t||r.aliases?.includes(t));return o?o.value_type==="boolean"?null:`<${o.value_name??"value"}>`:"<value>"}function ye(n,e,t){let o=[...n],r=o.indexOf("--"),a=r<0?o.length:r;for(let s of t){let i=F(s);if(!i||o.slice(0,a).some(d=>d===i||d.startsWith(`${i}=`)))continue;let l=K(e,i),u=l?[i,l]:[i];o.splice(a,0,...u),a+=u.length}return o.length===n.length?void 0:y(o)}function Ne(n,e){let t=n.trim().split(/\s+/u);if(!(t.length<2||e.includes(t.join(" "))))for(let o=1;o<t.length;o+=1){if(!e.includes(t.slice(0,o).join(" ")))return;let r=t.slice(o).join(" "),a=k(r),s=new Set(e.filter(i=>i===r||i.endsWith(` ${r}`)||i===a?.canonical).map(i=>k(i)?.canonical??i).filter(i=>e.includes(i)));if(s.size>0)return s.size===1?[...s][0]:void 0}}var X={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 D(n,e){let t=n.trim().toLowerCase(),o=e.trim().toLowerCase();if(o.length===0)return Number.POSITIVE_INFINITY;let r=t.split(" "),a=X[o]?.indexOf(p(t));if(a!==void 0&&a>=0)return a;if(t===o)return 10;if(r.includes(o))return 11;if(r.some(l=>l.startsWith(o)))return 12;let s=o.length>=5?2:1,i=Number.POSITIVE_INFINITY;for(let l of r){let u=E(l,o,s);u!==null&&(i=Math.min(i,u))}return Number.isFinite(i)?20+i:t.includes(o)?30:Number.POSITIVE_INFINITY}function Te(n,e){return n.map(t=>({path:t,score:D(t,e)})).filter(t=>Number.isFinite(t.score)).sort((t,o)=>t.score!==o.score?t.score-o.score:t.path===o.path?0:t.path<o.path?-1:1).map(t=>t.path)}function $e(n,e,t){let o=new Set(e),r=C.filter(i=>i.lifecycle==="deprecated").slice().sort((i,l)=>l.alias.length-i.alias.length),a=[],s=n.flatMap(i=>{let l=r.find(d=>i===d.alias||i.startsWith(`${d.alias} `)),u=i;if(l){let d=i.slice(l.alias.length);if(!o.has(`${l.canonical}${d}`))return[];u=`${l.canonical_argv.join(" ")}${d}`}return t!==void 0&&D(i,t)<10&&a.push(u),[u]});return[...new Set(a.length>0?a:s)]}export{Q as a,re as b,c,z as d,W as e,ue as f,ke as g,B as h,xe as i,Ce as j,A as k,Oe as l,ve as m,K as n,ye as o,Ne as p,D as q,Te as r,$e as s};
|
|
2
|
+
//# sourceMappingURL=chunk-YVTALIN3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as w,d as s,f as S,k as x,r as E,s as c,v as A,w as j}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as w,d as s,f as S,k as x,r as E,s as c,v as A,w as j}from"./chunk-DCWGM7CY.js";import{q as v}from"./chunk-GSLOAEY2.js";import{A as g,C as b}from"./chunk-K672XXGQ.js";import k from"node:fs/promises";import d from"node:path";var C=[["install","--install"],["uninstall","--uninstall"],["explore","--explore"],["list","--list"],["manage","--manage"],["describe","--describe"],["markdown","--markdown"],["output","--output"],["reload","--reload"],["doctor","--doctor"],["catalog","--catalog"],["adopt","--adopt"],["adoptAll","--adopt-all"],["activate","--activate"],["deactivate","--deactivate"],["migrate","--migrate"],["init","--init"],["scaffold","--scaffold"],["capability","--capability"],["declarative","--declarative"],["gh","--gh"],["github","--github"],["ref","--ref"],["fixManagedState","--fix-managed-state"],["runtimeProbe","--runtime-probe"],["trace","--trace"],["watch","--watch"],["strictExit","--strict-exit"],["failOnWarn","--fail-on-warn"],["isolated","--isolated"],["ignoreGlobal","--ignore-global"],["detail","--detail"],["dryRun","--dry-run"]];function ne(e){let n=C.filter(([t])=>e[t]!==void 0&&e[t]!==!1).map(([,t])=>t);if(n.length!==0)throw new b(`${n.join(", ")} ${n.length===1?"does":"do"} not apply to pm package list, a read that changes nothing.`,g.USAGE,{code:"invalid_argument_value",required:"Drop the option, or run the package action that owns it (pm package manage, pm package doctor, pm package reload).",examples:["pm package manage --fix-managed-state","pm package list --fields name,version,update"]})}function ae(e){if(e.outputFormat!==void 0&&e.outputFormat!=="json"&&e.outputFormat!=="toon")throw new b("--output-format must be toon or json.",g.USAGE,{code:"invalid_argument_value"});let n=[["--output-limit",e.outputLimit],["--output-include",e.outputInclude],["--output-session",e.outputSession],["--output-cursor",e.outputCursor],["--output-row-contract",e.outputRowContract===!0?"true":void 0],["--output-budget",e.outputBudget==="unbounded"?void 0:e.outputBudget]].filter(t=>typeof t[1]=="string").map(([t])=>t);if(n.length!==0)throw new b(`pm package list does not apply ${n.join(", ")}: it returns every installed package. Narrow rows with --fields, or use pm package manage or pm package catalog for read-output controls.`,g.USAGE,{code:"read_output_surface_unsupported",flag:n[0],details:{command:"package list",output_option_keys:n},required:"Drop the row-shaping output controls; pm package list keeps --output-format and an unbounded --output-budget.",examples:["pm package list --fields name,version,update"]})}var D=16*1024*1024,L=1024*1024,T=4*1024*1024;async function I(e){try{let n=await c(d.join(e,"settings.json"),T,{followLinks:!0}),t=n===void 0?void 0:JSON.parse(n);return typeof t=="object"&&t!==null?t:void 0}catch{return}}async function re(e){let n=(await I(e))?.output?.default_format;return n==="json"||n==="toon"?n:void 0}async function oe(e){return(await I(e))?.ux?.deprecation_hints!==!1}var ie=["name","directory","scope","installed","status","configured_enabled","managed","runtime_active","version","update"];function p(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function y(e){return e!=="invalid"&&e!=="unreadable"}function G(e){let n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))throw new SyntaxError("Invalid settings object");let t=n.extensions;if(t===void 0)return{enabled:[],disabled:[]};if(typeof t!="object"||t===null||Array.isArray(t))throw new SyntaxError("Invalid extensions settings");let a=t;if(a.enabled!==void 0&&(!Array.isArray(a.enabled)||!a.enabled.every(r=>typeof r=="string"))||a.disabled!==void 0&&(!Array.isArray(a.disabled)||!a.disabled.every(r=>typeof r=="string")))throw new SyntaxError("Invalid extension enablement lists");return{enabled:a.enabled??[],disabled:a.disabled??[]}}async function U(e){let n;try{n=await c(e,T,{followLinks:!0})}catch(t){return p(t)?{status:"absent",enabled:[],disabled:[]}:{status:"unreadable",enabled:[],disabled:[],error:{code:"settings_unreadable",path:e}}}if(n===void 0)return{status:"unreadable",enabled:[],disabled:[],error:{code:"settings_unreadable",path:e}};try{return{status:"ok",...G(n)}}catch{return{status:"invalid",enabled:[],disabled:[],error:{code:"settings_invalid",path:e}}}}async function B(e){let n;try{n=await c(e,D,{followLinks:!0})}catch(t){if(p(t))try{if((await k.stat(d.dirname(e))).isDirectory())return{status:"absent",entries:[]}}catch(a){if(p(a))return{status:"absent",entries:[]}}return{status:"unreadable",entries:[],error:{code:"managed_state_unreadable",path:e}}}if(n===void 0)return{status:"unreadable",entries:[],error:{code:"managed_state_unreadable",path:e}};try{let t=JSON.parse(n),a=x(t);if(!a||typeof t!="object"||t===null||!Array.isArray(t.entries)||a.entries.length!==t.entries.length)throw new SyntaxError("Invalid managed extension state");return{status:"ok",entries:a.entries}}catch{return{status:"invalid",entries:[],error:{code:"managed_state_invalid",path:e}}}}async function z(e){try{return{directories:(await k.readdir(e,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).sort((t,a)=>t.localeCompare(a))}}catch(n){return p(n)?{directories:[]}:{directories:[],error:{code:"extensions_unreadable",path:e}}}}async function Y(e){let n;try{n=await c(e,L,{followLinks:!0})}catch(t){return p(t)?{manifest:null,error:{code:"manifest_invalid",path:e}}:{manifest:null,error:{code:"manifest_unreadable",path:e}}}if(n===void 0)return{manifest:null,error:{code:"manifest_unreadable",path:e}};try{let t=S(JSON.parse(n));return t?{manifest:t}:{manifest:null,error:{code:"manifest_invalid",path:e}}}catch{return{manifest:null,error:{code:"manifest_invalid",path:e}}}}function J(e,n,t){return e.find(a=>s(a.name)===s(n)||s(a.directory)===s(t))}function X(e){let n=e.manifest?.name??e.directory,t=new Set(w(e.settings.enabled)),a=new Set(w(e.settings.disabled)),r=!y(e.settings.status)||!e.manifest?null:!a.has(n)&&(t.size===0||t.has(n)),i=y(e.managed.status)?J(e.managed.entries,n,e.directory)!==void 0:null;return{name:n,directory:e.directory,scope:e.scope,installed:!0,status:e.manifest?r===!1?"inactive":"installed":"malformed_manifest",configured_enabled:r,managed:i,runtime_active:null,...e.manifest?{version:e.manifest.version}:{}}}function q(e,n,t,a){let r=t.find(f=>f.directory===n),i={name:e.name,version:e.version,updated_at:r?.updated_at,source:r?.source};return{...e,update:j(A(a,i))}}async function se(e){let n=e.scope??"project",t=n==="global"?v(e.cwd??process.cwd()):e.pmRoot,a=d.join(t,"extensions"),r=await U(d.join(t,"settings.json")),i=await B(d.join(a,".managed-extensions.json")),f=await z(a),u=[];for(let o of[r,i,f])o.error&&u.push(o.error);let m=e.name?.trim(),O=await E(t),N=i.entries,l=[];for(let o of f.directories){let M=d.join(a,o,"manifest.json"),_=await Y(M);_.error&&u.push(_.error);let h=X({directory:o,scope:n,manifest:_.manifest,settings:r,managed:i});m&&![h.name,o].some(F=>s(F)===s(m))||l.push(q(h,o,N,O))}m&&l.length===0&&u.every(o=>o.code!=="extensions_unreadable")&&l.push({name:m,directory:null,scope:n,installed:!1,status:"absent",configured_enabled:y(r.status)?!1:null,managed:y(i.status)?!1:null,runtime_active:null});let R=l.filter(o=>typeof o.update=="string").length;return{scope:n,complete:u.length===0,settings_status:r.status,managed_state_status:i.status,updates_available:R,extensions:l,errors:u}}export{ne as a,ae as b,re as c,oe as d,ie as e,se as f};
|
|
2
|
+
//# sourceMappingURL=chunk-Z7YL2SUM.js.map
|