@unbrained/pm-cli 2026.11.12 → 2026.11.13
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 +11 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-3DWEBVIK.js → chunk-36E4L2R4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FJNHTBJ2.js → chunk-4WD4CHVH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OBTU2BHJ.js → chunk-5LG5YZYF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UY7Z3ZHQ.js → chunk-6UXBWMEM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OFIXSWJS.js → chunk-CO7RWLCM.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-COTC2QOR.js +6 -0
- package/dist/cli-bundle/chunks/{chunk-6ESY4Y2B.js → chunk-FAYX6C7H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PS2YAPXC.js → chunk-GIAJX2QJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GLPUIQDB.js → chunk-GWVP23RZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GDS4DC5A.js → chunk-GXGMMIZN.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-PZI6CR24.js → chunk-HQINCDF6.js} +47 -47
- package/dist/cli-bundle/chunks/{chunk-U7MZIX3D.js → chunk-IYDIPXBO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KJL42AN5.js → chunk-L4F4ZHGR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T4UC3ZKL.js → chunk-LKVFPQNY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MR3CRLA7.js → chunk-O6PBQMD7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5NY6EQSX.js → chunk-O6T24Z3M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L3SA3354.js → chunk-OQCVU2SG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2DUUL53Z.js → chunk-PUU5DXSV.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-QSSENTXG.js +20 -0
- package/dist/cli-bundle/chunks/{chunk-UTNPDAID.js → chunk-TCYIGAQG.js} +31 -31
- package/dist/cli-bundle/chunks/chunk-UFZQPKQS.js +124 -0
- package/dist/cli-bundle/chunks/{chunk-EALO2FPM.js → chunk-URWNUZQZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2K6GJUW7.js → chunk-UYARS5XF.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-SYJT6TVZ.js → item-revision-G5OVYGZ5.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-I2X2P4TW.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-T57TAVWI.js → mutation-admission-SET4KY73.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-5XZXTPNG.js → register-list-query-JNJY2D3N.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-V6WJFL77.js → register-mutation-WTHZHPOP.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-5RAWXY2F.js → register-operations-EZP3EG6A.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-HCKCSQWQ.js → register-setup-THFZP23A.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-VIDXGF3T.js → stage-JXJILTYE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ZPGEGTB.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-NSOXVVQX.js → chunk-3MB47JLT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5OCUNAQN.js → chunk-4LFE3FQL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-5KTOMFLR.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MK7UQEE5.js → chunk-5NTLNE54.js} +18 -18
- package/dist/cli-bundle/focused-chunks/{chunk-P6KYUJD4.js → chunk-ADBFVDTG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-AXPRCCYM.js → chunk-CSKDIMQP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IPIFI4NT.js → chunk-FNIX62V6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VUNX6NBR.js → chunk-IYV3IPRF.js} +51 -51
- package/dist/cli-bundle/focused-chunks/{chunk-KN7RBRRH.js → chunk-J3LQQP3N.js} +22 -22
- package/dist/cli-bundle/focused-chunks/{chunk-BHYGUVAU.js → chunk-JR75B6HU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NP5C2TQM.js → chunk-Q3OA5OAK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TZO6L523.js → chunk-QGQJBQCH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GB2N4OM7.js → chunk-RIMNSVFA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GBW2EAAG.js → chunk-TVJ2PHAK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LAIN47EJ.js → chunk-VGFKTSGY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-RXY6BFRW.js → chunk-VGJDKDKA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VGUQ4V47.js +82 -0
- package/dist/cli-bundle/focused-chunks/chunk-VTOTZ5UC.js +91 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SPAEZKVA.js → chunk-WFVZ7GGR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-3FN4ON2Z.js → chunk-ZJF6ZA7B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GAXO2UQX.js → chunk-ZOGEQFGH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-revision-PWJNBW3F.js → item-revision-IF7E7BVY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-T6HXC3NS.js → item-transaction-5TFWIOXI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-CLPOLSXZ.js → mutation-admission-KELM46JF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-EKYWEU2Y.js → stage-UAKMQTCI.js} +2 -2
- package/dist/cli-bundle/main.js +2 -2
- 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 +57 -57
- 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/history/history-rewrite.js +1 -1
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/shared/author.js +2 -2
- package/dist/core/shared/secret-rules.d.ts +8 -2
- package/dist/core/shared/secret-rules.js +3 -3
- package/dist/core/shared/url-credentials.d.ts +33 -5
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/update.js +2 -2
- package/dist/sdk/ownership-source.js +1 -1
- package/docs/MUTATION_INTEGRITY.md +56 -6
- 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-5NGGI7JC.js +0 -6
- package/dist/cli-bundle/chunks/chunk-A7L5IEYV.js +0 -20
- package/dist/cli-bundle/chunks/chunk-FOT5K5OM.js +0 -124
- package/dist/cli-bundle/chunks/item-transaction-YXZ27UC6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-AIYJHVKV.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-BB2GMKRB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HIKZYZ26.js +0 -82
- package/dist/cli-bundle/focused-chunks/chunk-NY65XTX7.js +0 -91
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as W,c as j}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as W,c as j}from"./chunk-Q3OA5OAK.js";import{gb as V}from"./chunk-J3LQQP3N.js";import{A as _,B as O,C as H,F as k,G as L,H as M,I as P,J as D,K as U,L as l,Y as F,Z as $,da as q,na as G,y as f,z as N}from"./chunk-VTOTZ5UC.js";import{Ma as A,vb as T,xa as S}from"./chunk-VGUQ4V47.js";import{Bb as R,Da as I,Kc as b,Lc as C,qc as E,ra as w,sb as y,xa as x}from"./chunk-5NTLNE54.js";import{A as c,y as v,z as h}from"./chunk-G6ERMFJ5.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]="222cbba7-e2df-5afb-8d75-14f9f99b3bd2")}catch{}})();var B="item_revision_conflict",ee=10,J=/^[0-9a-f]{64}$/u;function m(e,t){return new c(`Invalid expected revision ${JSON.stringify(e)}: ${t}.`,h.USAGE,{code:"expect_hash_invalid",value:e,required:"Pass the 64-character item_hash from pm get <id> --json, optionally as <id>=<item_hash>.",examples:["--expect-hash <item_hash>","--expect-hash pm-a1b2=<item_hash>"]})}function K(e){let t=typeof e=="string"?e.trim().toLowerCase():"";if(!J.test(t))throw m(String(e),"the revision is not a 64-character hexadecimal item_hash");return t}function te(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw m(String(t),"expected a string");let i=t.split(",").map(o=>o.trim()).filter(o=>o.length>0);if(i.length===0)throw m(t,"the value is empty");let n=o=>C(t)===t?o:b;return i.map(o=>{let r=o.lastIndexOf("="),a=r===-1?void 0:o.slice(0,r).trim();if(a!==void 0&&a.length===0)throw m(n(o),"the item id before = is empty");let s=r===-1?o:o.slice(r+1);if(!J.test(s.trim().toLowerCase()))throw m(n(s),"the revision is not a 64-character hexadecimal item_hash");let d=K(s);return a===void 0?{itemHash:d}:{id:a,itemHash:d}})})}async function X(e,t){let i=await T(e),n=w(i,E()).type_to_folder,o=await F(e,t,i.id_prefix,i.item_format,n);if(o){let{document:r}=await $(o,{schema:i.schema});if(r.metadata.id!==await j(o.itemPath,o.id))throw new c(`Item file ${o.id} embeds the id ${r.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,h.CONFLICT,{code:"item_identity_conflict",item_id:o.id,required:`Repair ${o.id}'s identity first (pm validate reports it; pm restore ${o.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:r.metadata.id,document:r}}try{return{id:(await W(e,t,i,n)).id,document:v}}catch{throw await q(e,t,i.id_prefix,n)}}function g(e){return x(e.cwd??process.cwd(),e.pmRoot)}async function Ae(e,t={}){let i=await X(g(t),e);return{id:i.id,item_hash:A(i.document)}}async function Y(e,t,i){let n=[];for(let o of t){let r=o.id??i;if(r===void 0||r.trim().length===0)throw new c("A bare expected revision needs an item to bind to.",h.USAGE,{code:"expect_hash_target_required",required:"This command has no single item argument; name each target as --expect-hash <id>=<item_hash>.",examples:["--expect-hash pm-a1b2=<item_hash>"]});n.push({id:(await X(e,r)).id,itemHash:o.itemHash})}return n}function ie(e){return[...new Set(e.patch.map(t=>{let i=t.path.split("/");return String(i[1]==="metadata"?i[2]:i[1])}))].sort()}async function ne(e,t,i){let n;try{n=await S(I(e,t),t)}catch{return}let o=-1;for(let s=n.length-1;s>=0;s-=1){let d=n[s];if(d.after_hash===i){o=s+1;break}if(d.before_hash===i){o=s;break}}if(o===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let r=n.slice(o),a=r.slice(-ee);return{expected_revision_recorded:!0,changes_since:a.map(s=>({ts:s.ts,op:s.op,author:s.author,fields:ie(s)})),changes_since_omitted:r.length-a.length}}async function Te(e,t){if(!u(e))return{};let i=await Q(e,t);return{error_code:B,expected_revision:String(i.context.expected_revision),current_revision:String(i.context.current_revision),details:i.context.details}}function u(e){return G(e)&&e.context.code===B}function Ne(e){let t=e.find(i=>u(i));if(t!==void 0)throw t}function Oe(){return new c("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",h.USAGE,{code:"expect_hash_invocation_rewritten",required:"Run the command without the rewriting extension (--no-extensions), or drop --expect-hash.",why:"An extension parser or preflight override changed this invocation's tracker or arguments, and final dispatch, the extension SDK client and the guard do not share one rewritten view."})}function oe(e,t){if(t===void 0||!u(e)||typeof e.context.item_id!="string"||D(e))return e;let i=e.context.reason===L;if(!i&&e.context.reason!==k)return e;let n=U(l(e,new c(e.message,e.exitCode,{...e.context,...M(e.context.item_id,i,t)})));return n.stack=e.stack,n}async function Q(e,t,i){if(!P(e,t))return e;let n=oe(e,i);if(!u(n)||n.context.details!==void 0)return n;let o=n.context.item_id,r=n.context.expected_revision;if(typeof o!="string"||typeof r!="string")return n;let a;try{a=await ne(t,o,r)}catch{return n}if(a===void 0)return n;let s={expected_revision_recorded:a.expected_revision_recorded,changes_since:a.changes_since.map(p=>({ts:p.ts,op:p.op,author:p.author,fields:[...p.fields]})),changes_since_omitted:a.changes_since_omitted},d=l(n,new c(n.message,n.exitCode,{...n.context,details:s}));return d.stack=n.stack,d}async function Z(e,t,i){try{return{result:await N(e,t),...O(e)}}catch(n){throw e.pmRoot===void 0?n:await Q(n,e.pmRoot,i)}}function re(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",g(e)]}}async function He(e,t,i={}){return Z(await se(e,i),t,re(i))}async function se(e,t={}){let i=g(t),n=e.map(({id:r,itemHash:a})=>({id:r,itemHash:K(a)})),o=f();return _(o,i,await Y(i,n)),o}function ke(e){let t=H(e);return t===void 0||t.length>0}function ae(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var z=new Set(y);function ce(e,t={}){let i=e.trim().replace(/\s+/gu,"-"),n=z.has(i)?i:e;if(z.has(n)&&(!V(n)||n==="deps")&&!R.has(n))throw de(n);if((n==="test"||n==="test-all")&&t.background===!0)throw new c(`--expect-hash cannot guard ${n} --background: the worker runs in another process.`,h.USAGE,{code:"expect_hash_background_unsupported",required:`Run ${n} in the foreground to guard its result recording, or drop --expect-hash for a background run.`})}function de(e){return new c(`--expect-hash guards item writes, and ${e} is not a mutation.`,h.USAGE,{code:"expect_hash_requires_mutation",required:"Use --expect-hash (MCP/SDK expectHash) only on a command or action that writes items."})}function he(e,t){if(t.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let i=e,n=Array.isArray(i.warnings)?i.warnings:[];return{...i,warnings:[...n,...t.map(ae)]}}async function Le(e){let t=e.expectHash;if(t!==void 0&&typeof t!="string"&&!(Array.isArray(t)&&t.every(r=>typeof r=="string")))throw m(JSON.stringify(t)??String(t),"expected a string or an array of strings");let i=te(t);if(i.length===0)return e.run();ce(e.action,{background:e.background===!0||e.options?.background===!0});let n=f();_(n,e.pmRoot,await Y(e.pmRoot,i,e.defaultId));let o=await Z(n,e.run,e.invocation);return he(o.result,o.unchecked)}export{B as a,ee as b,K as c,te as d,Ae as e,Y as f,ne as g,Te as h,u as i,Ne as j,Oe as k,oe as l,Q as m,Z as n,He as o,se as p,ke as q,ae as r,ce as s,de as t,Le as u};
|
|
2
|
+
//# sourceMappingURL=chunk-4LFE3FQL.js.map
|