@unbrained/pm-cli 2026.11.19 → 2026.11.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-IUTN67EB.js → chunk-2IZGNOGT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4FNMPZ7Y.js → chunk-3BOR22MC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CTOE26W4.js → chunk-4QQPM3IY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N2CPCFSN.js → chunk-4TZW4NLM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AMHD7WIV.js → chunk-5LF5QZT3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CNMGGAZO.js → chunk-6HRPGEBF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P4A5RFLX.js → chunk-6X2AGUOT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-723PMYNX.js → chunk-7ESF676D.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OESI2ETD.js → chunk-7EZZ4W7O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Z5LHCEXG.js → chunk-DG2EOOFX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O7IFAJ76.js → chunk-FF4TXJDH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7UUPLMCU.js → chunk-FOYRE23V.js} +46 -46
- package/dist/cli-bundle/chunks/{chunk-PRVT7ITI.js → chunk-GXGW6KHB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-M76BEWTT.js → chunk-HJQ3XPS3.js} +28 -28
- package/dist/cli-bundle/chunks/{chunk-IQKCRLQP.js → chunk-KDDIHGAO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2UTJ5QIE.js → chunk-KEBLUTC3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GQCMICAL.js → chunk-KQSPKWFH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AOV5HG3Y.js → chunk-M5D3CEMY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XPBPGDFW.js → chunk-MGYAJONE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CR5GC3VO.js → chunk-OXG5XPC7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H64BNM4A.js → chunk-W4TLA5H3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AGPFANRX.js → chunk-XK25TAJZ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-Q32Q3LRH.js → chunk-ZAO7VGX3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NMVPQTZI.js → chunk-ZVEHACE6.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-YJKGOYBR.js → item-revision-GE2CQECR.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-YSAWJRA2.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-actor-DDYJW5B4.js → mutation-actor-5GYX7LP3.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-admission-JLMQJ2M5.js → mutation-admission-72TYKPGU.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-4AXLLXK7.js → register-list-query-OQZZEWEB.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-FJIXGGF4.js → register-mutation-YZEUZ6XT.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-W4E2KEMA.js → register-operations-JNVCF7EW.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-RYRIBNSN.js → register-setup-LDKULZSD.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-XGWW3T64.js → stage-Q2QZ2IBG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7A4VIRIU.js → chunk-3LRSQXCN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EZXLY6S4.js → chunk-5VSXKA35.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2XULTI5B.js → chunk-7SB6VKEI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MTBC32ZR.js → chunk-BZCLW5V7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ICEHI4SN.js → chunk-FPKVHC3Q.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-HO2YUD4P.js → chunk-I7XBR2RM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-XS2YZCT5.js → chunk-JUYJ7NXL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZFUZ4YYN.js → chunk-KQJNJZKP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7RF2YPZ5.js → chunk-MJP3TFVW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4S7I342K.js → chunk-O25KFLLA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7Z2NYAK4.js → chunk-PKMDWIP3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-D72EQN7Z.js → chunk-PQXTZLK3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-N64BUB63.js → chunk-PRFEOCNZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-A2CLYPDA.js → chunk-PZSTRYTA.js} +40 -40
- package/dist/cli-bundle/focused-chunks/{chunk-GAOWBALE.js → chunk-QNJQPJWO.js} +4 -4
- package/dist/cli-bundle/focused-chunks/{chunk-5JVB42Z7.js → chunk-SIPDQBJI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FPPYE6CY.js → chunk-SJE3PYPI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-77CDWGBW.js → chunk-TNKI6WKG.js} +48 -48
- package/dist/cli-bundle/focused-chunks/{chunk-P4TG4VMJ.js → chunk-TRCXANRR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OF4UM5B6.js → chunk-UATP3RK3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OPY43DNJ.js → chunk-V55XZFOP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OAIAZHRG.js → chunk-ZKGGGU2K.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-revision-32HFGFYG.js → item-revision-OXDZHMJ7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-C4VW3SHX.js → item-transaction-54VSTT6L.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-actor-2SVBO324.js → mutation-actor-6DYIF6NH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-PNK6ORZR.js → mutation-admission-2BYXANVJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-LVAGKCEE.js → stage-FGHSB3QX.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 +55 -55
- 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/fs/file-glob.js +1 -1
- package/dist/core/shared/text-normalization.d.ts +9 -0
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/read-output/continuation.d.ts +9 -3
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output-budget.d.ts +44 -3
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/docs/READ_OUTPUT_CONTRACTS.md +16 -1
- 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/item-transaction-K4YZ7GWR.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ja as s,ka as w,qb as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{ja as s,ka as w,qb as b}from"./chunk-7ESF676D.js";import{I as h,v as g}from"./chunk-OXG5XPC7.js";import{Ka as y,Sa as u,Ya as i,cj as I}from"./chunk-FOYRE23V.js";import{A as c,C as l,E as p}from"./chunk-5OFMWP3Q.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="59842825-3a81-53f4-845d-db2257ec6286")}catch{}})();async function R(o){let t=u(process.cwd(),o);await h(t);let r=await g(t),n=y(r,I());return{pmRoot:t,settings:r,typeRegistry:n}}async function C(o,t,r,n){i(o,s(t));let e=await b(o,t,r.id_prefix,r.item_format,n);if(e)return{id:e.id,historyPath:i(o,e.id),located:e};let a=w(t,r.id_prefix),d=s(t),_=a===d?[a]:[a,d];for(let f of _){let m=i(o,f);if(await p(m))return{id:f,historyPath:m,located:null}}throw new l(`Item ${t} not found`,c.NOT_FOUND)}export{R as a,C as b};
|
|
2
|
+
//# sourceMappingURL=chunk-DG2EOOFX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as T,m as F,n as O}from"./chunk-AGPFANRX.js";import{m as S,n as I}from"./chunk-M76BEWTT.js";import{Cc as p,Gc as s,Hc as u,Xc as y}from"./chunk-AOV5HG3Y.js";import{$g as A,ah as _,lb as c}from"./chunk-7UUPLMCU.js";import{A as f,C as m}from"./chunk-5OFMWP3Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e2514244-d31d-5ee4-b037-b9101f9a24e1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10a4ed4d-39d3-5b7b-87b1-4a6f95f0f2ab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="796e71dc-4693-50da-bbb8-57b19ff0af95")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9aa4d7a-f8f4-5c1a-a372-83ccb55c5668")}catch{}})();function g(e,n,t,i){if(n.trim().toLowerCase()!=="add"||!t?.trim())return;let o=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),d=[e,t.trim()];o!==void 0?d.push("--add",o):i.stdin===!0?d.push("--stdin"):r!==void 0?d.push("--file",r):d.push("--add","-");let a=c(d),l=c([e,t.trim(),"--add","-"]);throw new m(`The positional token "add" was parsed as the item id, while "${t.trim()}" was parsed as annotation text. ${e} does not use an add subcommand.`,f.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${e}, then use --add for annotation text.`,examples:[...new Set([a,l])],recovery:{attempted_command:`pm ${e} add ${t.trim()}`,normalized_args:[e,"add",t.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:t.trim()}],suggested_retry:a}})}var D={comments:["add","text","body","comment"],notes:["add","text","note"],learnings:["add","text"]};function N(e,n,t,i,o){let r=D[e].some(a=>`--${a}`!==n&&s(o,a)!==void 0),d=o.delete!==void 0||o.edit!==void 0&&o.ifAbsent===!0;if(!(r||d||o.stdin===!0||s(o,"file")!==void 0||s(o,"addJson")!==void 0)){if(t==="--file")return i===void 0?void 0:["--file",i];if(t==="--stdin"||t.startsWith("--file="))return i===void 0?[t]:void 0}}function h(e,n,t,i){let o=D[e].map(a=>({flag:`--${a}`,value:s(i,a)?.trim()})).find(a=>a.value!==void 0&&S(a.value));if(o===void 0)return;let r=[e,n,...typeof i.edit=="number"?["--edit",String(i.edit)]:[]],d=N(e,o.flag,o.value,t,i);throw I({collectionKey:e,textFlag:o.flag,value:o.value,commandPrefix:c(r),...d===void 0?{}:{retryArgs:[...r,...d]},...d===void 0&&t!==void 0&&o.value!=="--file"?{conflictingOperand:t}:{}})}function R(e,n,t){let i=t.flatMap(o=>{let r=s(n,o);return r===void 0?[]:[{alias:o,value:r}]});if([...new Set(i.map(({value:o})=>o))].length>1)throw new m(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:o})=>`--${o}`).join(", ")}`,f.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function C(e,n){let t=typeof n.edit=="number"?n.edit:void 0,i=typeof n.delete=="number"?n.delete:void 0,o=R("comment",n,["add","text","body","comment"]),r=typeof e=="string"?e:void 0,d=n.stdin===!0,a=s(n,"file");if(+(o!==void 0)+ +(r!==void 0)+Number(d)+ +(a!==void 0)>1)throw o!==void 0&&r!==void 0&&!d&&a===void 0?new m("Specify comment text either as positional [text] or with --add, not both",f.USAGE):new m("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",f.USAGE);let l=o??r;return{add:l,readFromStdin:d,readFromFile:a,editIndex:t,deleteIndex:i,isMutation:typeof l=="string"||d||a!==void 0||t!==void 0||i!==void 0}}function E(e,n,t){let i=R(e,t,e==="note"?["add","text","note"]:["add","text"]),o=typeof n=="string"?n:void 0;if(i!==void 0&&o!==void 0)throw new m(`Specify ${e} text either as positional [text] or with --add, not both`,f.USAGE);let r=i??o,d=e==="note"?s(t,"addJson"):void 0,a=t.stdin===!0,l=s(t,"file"),x=typeof t.edit=="number"?t.edit:void 0,w=typeof t.delete=="number"?t.delete:void 0;return{add:r,addJson:d,readFromStdin:a,readFromFile:l,editIndex:x,deleteIndex:w,isMutation:typeof r=="string"||d!==void 0||a||l!==void 0||x!==void 0||w!==void 0}}var $=new Set(["comments","notes","learnings"]);function Y(e,n){let t=n[1];return $.has(e)&&typeof t=="string"?{add:t}:{}}function b(e){return{fullHistory:e.fullHistory===!0,ifAbsent:e.ifAbsent===!0,expectAt:s(e,"expectAt"),author:s(e,"author"),message:s(e,"message"),ownershipAppendBypass:e.ownershipAppendBypass===!0,force:!!e.force}}async function k(e,n,t,i){let o=p(i),r=Date.now();g("comments",e,n,t),h("comments",e,n,t);let d=C(n,t),a=await T(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("comments",a,o,r)}async function H(e,n,t,i){let o=p(i),r=Date.now();g("notes",e,n,t),h("notes",e,n,t);let d=E("note",n,t),a=await O(e,{add:d.add,addJson:d.addJson,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),since:s(t,"since"),eventType:s(t,"eventType"),includeMeta:t.includeMeta===!0,...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("notes",a,o,r)}async function J(e,n,t,i){let o=p(i),r=Date.now();g("learnings",e,n,t),h("learnings",e,n,t);let d=E("learning",n,t),a=await F(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("learnings",a,o,r)}function v(e,n,t,i){A(n,t),t.profile&&_(`profile:command=${e} took_ms=${Date.now()-i}`)}function Z(e,n){let t=e.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(k);u(t,"--body <text>","Alias for --add",!1),u(t,"--text <text>","Alias for --add",!1),u(t,"--comment <text>","Alias for --add",!1);let i=e.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",n("--edit")).option("--delete <index>","Delete the note at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(H);u(i,"--text <text>","Alias for --add",!1);let o=e.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(J);u(o,"--text <text>","Alias for --add",!1)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="be983589-7a52-5022-b7b8-62d31572c012")}catch{}})();var M=[];function te(e){M=e.flatMap(n=>n.reason==="bare_key_value"&&typeof n.from=="string"&&Array.isArray(n.to)&&typeof n.to[0]=="string"?[{from:n.from,flag:n.to[0].split("=")[0]}]:[])}function ne(){return M}export{Y as a,Z as b,te as c,ne as d};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as T,m as F,n as O}from"./chunk-XK25TAJZ.js";import{m as S,n as I}from"./chunk-HJQ3XPS3.js";import{Cc as p,Gc as s,Hc as u,Xc as y}from"./chunk-M5D3CEMY.js";import{$g as A,ah as _,lb as c}from"./chunk-FOYRE23V.js";import{A as f,C as m}from"./chunk-5OFMWP3Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e2514244-d31d-5ee4-b037-b9101f9a24e1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10a4ed4d-39d3-5b7b-87b1-4a6f95f0f2ab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="796e71dc-4693-50da-bbb8-57b19ff0af95")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9aa4d7a-f8f4-5c1a-a372-83ccb55c5668")}catch{}})();function g(e,n,t,i){if(n.trim().toLowerCase()!=="add"||!t?.trim())return;let o=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),d=[e,t.trim()];o!==void 0?d.push("--add",o):i.stdin===!0?d.push("--stdin"):r!==void 0?d.push("--file",r):d.push("--add","-");let a=c(d),l=c([e,t.trim(),"--add","-"]);throw new m(`The positional token "add" was parsed as the item id, while "${t.trim()}" was parsed as annotation text. ${e} does not use an add subcommand.`,f.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${e}, then use --add for annotation text.`,examples:[...new Set([a,l])],recovery:{attempted_command:`pm ${e} add ${t.trim()}`,normalized_args:[e,"add",t.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:t.trim()}],suggested_retry:a}})}var D={comments:["add","text","body","comment"],notes:["add","text","note"],learnings:["add","text"]};function N(e,n,t,i,o){let r=D[e].some(a=>`--${a}`!==n&&s(o,a)!==void 0),d=o.delete!==void 0||o.edit!==void 0&&o.ifAbsent===!0;if(!(r||d||o.stdin===!0||s(o,"file")!==void 0||s(o,"addJson")!==void 0)){if(t==="--file")return i===void 0?void 0:["--file",i];if(t==="--stdin"||t.startsWith("--file="))return i===void 0?[t]:void 0}}function h(e,n,t,i){let o=D[e].map(a=>({flag:`--${a}`,value:s(i,a)?.trim()})).find(a=>a.value!==void 0&&S(a.value));if(o===void 0)return;let r=[e,n,...typeof i.edit=="number"?["--edit",String(i.edit)]:[]],d=N(e,o.flag,o.value,t,i);throw I({collectionKey:e,textFlag:o.flag,value:o.value,commandPrefix:c(r),...d===void 0?{}:{retryArgs:[...r,...d]},...d===void 0&&t!==void 0&&o.value!=="--file"?{conflictingOperand:t}:{}})}function R(e,n,t){let i=t.flatMap(o=>{let r=s(n,o);return r===void 0?[]:[{alias:o,value:r}]});if([...new Set(i.map(({value:o})=>o))].length>1)throw new m(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:o})=>`--${o}`).join(", ")}`,f.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function C(e,n){let t=typeof n.edit=="number"?n.edit:void 0,i=typeof n.delete=="number"?n.delete:void 0,o=R("comment",n,["add","text","body","comment"]),r=typeof e=="string"?e:void 0,d=n.stdin===!0,a=s(n,"file");if(+(o!==void 0)+ +(r!==void 0)+Number(d)+ +(a!==void 0)>1)throw o!==void 0&&r!==void 0&&!d&&a===void 0?new m("Specify comment text either as positional [text] or with --add, not both",f.USAGE):new m("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",f.USAGE);let l=o??r;return{add:l,readFromStdin:d,readFromFile:a,editIndex:t,deleteIndex:i,isMutation:typeof l=="string"||d||a!==void 0||t!==void 0||i!==void 0}}function E(e,n,t){let i=R(e,t,e==="note"?["add","text","note"]:["add","text"]),o=typeof n=="string"?n:void 0;if(i!==void 0&&o!==void 0)throw new m(`Specify ${e} text either as positional [text] or with --add, not both`,f.USAGE);let r=i??o,d=e==="note"?s(t,"addJson"):void 0,a=t.stdin===!0,l=s(t,"file"),x=typeof t.edit=="number"?t.edit:void 0,w=typeof t.delete=="number"?t.delete:void 0;return{add:r,addJson:d,readFromStdin:a,readFromFile:l,editIndex:x,deleteIndex:w,isMutation:typeof r=="string"||d!==void 0||a||l!==void 0||x!==void 0||w!==void 0}}var $=new Set(["comments","notes","learnings"]);function Y(e,n){let t=n[1];return $.has(e)&&typeof t=="string"?{add:t}:{}}function b(e){return{fullHistory:e.fullHistory===!0,ifAbsent:e.ifAbsent===!0,expectAt:s(e,"expectAt"),author:s(e,"author"),message:s(e,"message"),ownershipAppendBypass:e.ownershipAppendBypass===!0,force:!!e.force}}async function k(e,n,t,i){let o=p(i),r=Date.now();g("comments",e,n,t),h("comments",e,n,t);let d=C(n,t),a=await T(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("comments",a,o,r)}async function H(e,n,t,i){let o=p(i),r=Date.now();g("notes",e,n,t),h("notes",e,n,t);let d=E("note",n,t),a=await O(e,{add:d.add,addJson:d.addJson,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),since:s(t,"since"),eventType:s(t,"eventType"),includeMeta:t.includeMeta===!0,...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("notes",a,o,r)}async function J(e,n,t,i){let o=p(i),r=Date.now();g("learnings",e,n,t),h("learnings",e,n,t);let d=E("learning",n,t),a=await F(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("learnings",a,o,r)}function v(e,n,t,i){A(n,t),t.profile&&_(`profile:command=${e} took_ms=${Date.now()-i}`)}function Z(e,n){let t=e.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(k);u(t,"--body <text>","Alias for --add",!1),u(t,"--text <text>","Alias for --add",!1),u(t,"--comment <text>","Alias for --add",!1);let i=e.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",n("--edit")).option("--delete <index>","Delete the note at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(H);u(i,"--text <text>","Alias for --add",!1);let o=e.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(J);u(o,"--text <text>","Alias for --add",!1)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="be983589-7a52-5022-b7b8-62d31572c012")}catch{}})();var M=[];function te(e){M=e.flatMap(n=>n.reason==="bare_key_value"&&typeof n.from=="string"&&Array.isArray(n.to)&&typeof n.to[0]=="string"?[{from:n.from,flag:n.to[0].split("=")[0]}]:[])}function ne(){return M}export{Y as a,Z as b,te as c,ne as d};
|
|
2
|
+
//# sourceMappingURL=chunk-FF4TXJDH.js.map
|