@unbrained/pm-cli 2026.11.23 → 2026.11.24
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/main.js +5 -5
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-2UQU7HRR.js → chunk-23K6DQQY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O7JHS64G.js → chunk-37UDIJ2K.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7IROAPWI.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-KZHIBEJL.js → chunk-7VRFEURZ.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7X253M6Z.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AWB5KBJS.js +2 -0
- package/dist/cli-bundle/chunks/chunk-DQDRA3SW.js +2 -0
- package/dist/cli-bundle/chunks/chunk-FXJYZBWV.js +113 -0
- package/dist/cli-bundle/chunks/{chunk-BSRIVYTM.js → chunk-HNKK2UG6.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I2OJ5B4A.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I3BFCKZR.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-ENKXRSFZ.js → chunk-MXUSC5RS.js} +31 -31
- package/dist/cli-bundle/chunks/chunk-PLIUU37C.js +3 -0
- package/dist/cli-bundle/chunks/chunk-PQUBVRV5.js +2 -0
- package/dist/cli-bundle/chunks/chunk-PW7U7WCE.js +3 -0
- package/dist/cli-bundle/chunks/chunk-SSALO4DB.js +2 -0
- package/dist/cli-bundle/chunks/chunk-STOOTHZZ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-TKRY22SO.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-AEOHUSUI.js → chunk-TVIJ2VCU.js} +68 -68
- package/dist/cli-bundle/chunks/{chunk-F2Z6XLZB.js → chunk-VJSGUXGU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H7JEXRIN.js → chunk-WWTPNIC2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J2PDAVBC.js → chunk-XFADNMGD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZY5MVJF.js → chunk-YOPTAIBD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CFWLQFJM.js → chunk-YW2HBHRO.js} +50 -51
- package/dist/cli-bundle/chunks/chunk-Z7MFVRDV.js +2 -0
- package/dist/cli-bundle/chunks/chunk-ZOX4SWRL.js +8 -0
- package/dist/cli-bundle/chunks/chunk-ZYCOM4MS.js +9 -0
- package/dist/cli-bundle/chunks/field-option-collisions-W66HSWMK.js +2 -0
- package/dist/cli-bundle/{focused-chunks/item-revision-YDACCDVY.js → chunks/item-revision-D3LSBNIR.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-M6NTBYH3.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-OKL3CQVX.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-EKPEOZMF.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-L4IBU64P.js → register-list-query-3LBV6CS2.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-72AGTMNE.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-XERFG2SH.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-W22L34Z4.js +2 -0
- package/dist/cli-bundle/chunks/runtime-schema-JP2KBHBY.js +2 -0
- package/dist/cli-bundle/chunks/stage-T2LKWN7C.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-24VRBNKE.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-3ELVASVA.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-XRS3VNC6.js → chunk-3GT4A3ZN.js} +23 -23
- package/dist/cli-bundle/focused-chunks/{chunk-IROZDIDX.js → chunk-3OCDKITJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3Z7MCUJM.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-46MP7IZN.js +5 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OTMMOKPM.js → chunk-5LDBS6MS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZHWPCVQL.js → chunk-B6BNHKUW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-C7WHWI7K.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-EUQGZPGO.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UFTUNBMY.js → chunk-FDZPRJXJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-GXP7Q4XM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HL47UQZJ.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMFIAQ2V.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMU7DDOA.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OZOCEB2Q.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-NQTEE66P.js → chunk-Q2HY44LV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-REFMQY47.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIQUIHYU.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-QQIIMMFU.js → chunk-RLO2HCZT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-SMMOZ3H3.js +100 -0
- package/dist/cli-bundle/focused-chunks/chunk-UVTUX54T.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Y2ESLKCF.js → chunk-XDBHD4CY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-YD66IRSL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z7W2RQIB.js +2 -0
- package/dist/cli-bundle/focused-chunks/field-option-collisions-UODPSV6W.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-revision-QH7RNBX4.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-transaction-ZO72OINF.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-PHVLKG4I.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-ZSG5OECH.js +2 -0
- package/dist/cli-bundle/focused-chunks/runtime-schema-6RQMIDTN.js +2 -0
- package/dist/cli-bundle/focused-chunks/stage-AQMKRVX4.js +2 -0
- package/dist/cli-bundle/main.js +26 -26
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +4 -4
- 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 +11 -11
- package/dist/core/profile/profile-lint.d.ts +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/schema/runtime-schema.d.ts +2 -0
- package/dist/core/schema/runtime-schema.js +1 -1
- package/dist/sdk/extension/command-options.d.ts +26 -1
- package/dist/sdk/extension/command-options.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/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output-contracts.d.ts +11 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/schema/field-flag-spelling.d.ts +22 -0
- package/dist/sdk/schema/field-flag-spelling.js +2 -0
- package/dist/sdk/schema/field-option-collisions.js +1 -1
- package/docs/COMMANDS.md +1 -1
- package/docs/EXTENSIONS.md +1 -1
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -0
- package/docs/SDK.md +20 -1
- package/docs/SDK_AUDITED_MUTATIONS.md +11 -0
- 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-5WZZ5XEN.js +0 -3
- package/dist/cli-bundle/chunks/chunk-6MYJLOSG.js +0 -2
- package/dist/cli-bundle/chunks/chunk-FJOEL75F.js +0 -2
- package/dist/cli-bundle/chunks/chunk-GDXCAC52.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KE7HMBEW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NGJ5ERBF.js +0 -115
- package/dist/cli-bundle/chunks/chunk-NQ54T7T2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKEZF7HU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKIKF4FD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OPJF254V.js +0 -9
- package/dist/cli-bundle/chunks/chunk-RWA5YZ5X.js +0 -2
- package/dist/cli-bundle/chunks/chunk-S32NGRQM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ZPS4B6SI.js +0 -8
- package/dist/cli-bundle/chunks/item-revision-FMD4KWBB.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-SEHTH7N2.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-SFGYIRPW.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-57LBSKQI.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-6NUOPHZ3.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-JGYVORNN.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-C44SIXEH.js +0 -2
- package/dist/cli-bundle/chunks/stage-PQ7AB63N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-6LKTEKHS.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-6LPXMFLM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HMDQDRV2.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-I66IKYKP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IR2J3NOT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ITKDHSBR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LQYYPXUK.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-O7Z73ALG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OXOCZJC6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QLAHEDT6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-TD544C74.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-XYPEZGTR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-YSJKQLFR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z2X7HH3C.js +0 -102
- package/dist/cli-bundle/focused-chunks/item-transaction-UKEQCTKB.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-AS465LRX.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-E5UHJZFE.js +0 -2
- package/dist/cli-bundle/focused-chunks/stage-36J7YLGI.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as y}from"./chunk-5DUP4AZA.js";import{i as w}from"./chunk-HNKK2UG6.js";import{d as u}from"./chunk-D6PDUKUG.js";import{c as g}from"./chunk-AA52P34H.js";import"./chunk-PZA7QECY.js";import"./chunk-23K6DQQY.js";import{ba as h}from"./chunk-FXJYZBWV.js";import"./chunk-7IROAPWI.js";import"./chunk-7X253M6Z.js";import{A as d,C as f}from"./chunk-YYT3MIRF.js";import"./chunk-XAWE4EAK.js";import{execFile as x}from"node:child_process";import{realpath as R}from"node:fs/promises";import p from"node:path";import{promisify as $}from"node:util";var b=$(x);function c(t){return new f(`Automatic merge settlement refused: ${t}`,d.CONFLICT,{code:"merge_settlement_review_required",recovery:{suggested_retry:"pm merge reconcile --dry-run"},nextSteps:["Inspect receipts, repair streams and Git changes. Resolve competing values or unrelated drift explicitly, then run pm merge reconcile and stage the reviewed artifacts manually."]})}async function G(t){let e=process.env.GIT_INDEX_FILE;if(e===void 0)return;let s=(await t(["rev-parse","--path-format=absolute","--git-path","index"])).stdout.trim();if(p.resolve(e)!==p.resolve(s))throw c("an alternate Git index requires explicit manual settlement")}async function k(t,e){if(e.length===0)return[];let s=e.map(n=>`:(literal)${n}`),a=new Set((await t(["ls-files","--cached","-z","--",...s])).stdout.split("\0")),i=e.filter(n=>!a.has(n)).map(n=>`:(literal)${n}`);if(i.length>0&&(await t(["diff","--cached","--name-only","--diff-filter=D","-z","--",...i])).stdout.length>0)throw c("a receipt has a staged deletion that requires explicit review");return i}async function I(t){let{git:e,preview:s,paths:a,newReceiptPathspecs:i}=t,n=!1;try{i.length>0&&(n=!0,await e(["add","--",...i]));let o=await t.apply();if(!o.ok||JSON.stringify(o.receipts.summaries)!==JSON.stringify(s.receipts.summaries)||o.repair.streams.some(m=>!s.repair.streams.some(l=>l.id===m.id)))throw c("reconciliation changed or did not finish; inspect the audit artifacts before staging");return a.length>0&&await e(["add","--",...a.map(m=>`:(literal)${m}`)]),{...o,staged_paths:a,guidance:["Lossless reconciliation artifacts are staged for the merge commit. Review git diff --cached before committing."]}}catch(o){throw n&&await e(["reset","--quiet","--",...i]),o}}function S(t){if(t.repair.totals.failed>0||t.receipts.missing_history_references_after>0||t.receipts.summaries.some(e=>e.conflict_fields.length>0)||t.repair.streams.some(e=>e.merge_receipt_proof?.trusted!==!0)||t.validation.checks.some(e=>e.name!=="history_drift"&&e.status!=="ok"))throw c("only fully authenticated receipt-backed repairs without discarded values can be staged")}async function q(t){try{return{...t,path:await R(h(process.cwd(),t.path))}}catch{throw c("the tracker root cannot be resolved")}}async function z(t){let{preview:e}=t;S(e);let{path:s}=await q(t.global),a=await w(s);if(a===null)throw c("a Git workspace is required");let i=r=>b("git",r,{cwd:a,env:g(),timeout:1e4});if(await G(i),(await i(["ls-files","--unmerged","-z"])).stdout.length>0)throw c("Git still has unresolved paths");let o=[...new Set([...[...new Set([...e.repair.streams.map(r=>r.id),...e.receipts.summaries.map(r=>r.item_id)])].map(r=>p.join(s,"history",`${r}.jsonl`)),...e.receipts.summaries.map(r=>p.join(s,"merge-receipts",`${r.receipt_id}.json`))])].map(r=>p.relative(a,r).replaceAll("\\","/"));if(o.some(u))throw c("reconciliation artifacts must belong to this Git workspace");let m=await y(a,o);if(m.length>0)throw new f(`Automatic merge settlement refused: required artifacts are ignored by Git: ${m.map(r=>`${r.path} (${r.source}:${r.line}: ${r.pattern})`).join(", ")}. Remove or narrow the owning ignore rules because merge receipts must travel with the commit.`,d.CONFLICT,{code:"merge_settlement_review_required",reason:"ignored_merge_artifacts",paths:m.map(r=>r.path),nextSteps:["Remove or narrow the named ignore rules, preserve receipt and history files, then retry pm merge reconcile --stage --dry-run before applying pm merge reconcile --stage. Do not force-add ignored proof as a substitute for fixing the shared policy."]});let l=o.map(r=>`:(literal)${r}`),v=e.receipts.summaries.map(r=>p.relative(a,p.join(s,"merge-receipts",`${r.receipt_id}.json`)).replaceAll("\\","/"));if(l.length>0)try{await i(["diff","--quiet","--",...l])}catch{throw c("reconciliation paths have unstaged edits or Git cannot verify their index state")}let _=await k(i,v);return t.dryRun?{...e,staged_paths:[]}:I({...t,git:i,paths:o,newReceiptPathspecs:_})}export{q as resolveMergeSettlementGlobal,z as stageLosslessMergeReconciliation};
|
|
2
|
+
//# sourceMappingURL=stage-T2LKWN7C.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{f as A,j as g,k as fe,l as pe,m as me}from"./chunk-46MP7IZN.js";import{a as h,b as le,c as ce,d as ue,g as he,i as ge,j as _e,k as ke}from"./chunk-C7WHWI7K.js";import{_ as ye,a as ee,b as te}from"./chunk-3OCDKITJ.js";import{c as y,f as se,g as ie,i as ae}from"./chunk-FDZPRJXJ.js";import{B as ne,F as re,fb as oe}from"./chunk-LMFIAQ2V.js";import{E,Xa as Z,Ya as L,Za as F,_a as $,h as x}from"./chunk-SMMOZ3H3.js";import{b as Q,m as C}from"./chunk-3Z7MCUJM.js";import{C as k,H as de,a as H,z as J}from"./chunk-RIQUIHYU.js";import{A as p,a as U,e as V,f as G,g as X,i as Y,z as f}from"./chunk-A6VEMCRR.js";var Kt=U,Wt=V,Bt=Y,Ut=G,Vt=X;function we(e,t,n,r){let o=e.flag.slice(2).replace(/[-_]([a-z])/gu,(i,a)=>a.toUpperCase()),s=n.has(o);return{long:t,...r?{short:r}:{},description:e.description??`Standard pm ${e.flag} option.`,...e.required===!0?{required:!0}:{},...e.list===!0?{list:!0}:{},...e.repeatable===!0?{repeatable:!0}:{},value_type:s?"string":"boolean",...s?{value_name:e.value_name??"value"}:{}}}function be(e,t=[]){let n=new Set(t.flatMap(o=>o.keys)),r=[];for(let o of ne(e.map(s=>({...s})))){r.push(we(o,o.flag,n,o.short));for(let s of o.aliases??[])r.push(we(o,s,n))}return r}var Gt=be(re,ee),Xt=be(oe,te);var w=["agile","ops","research"],R={agile:{name:"agile",title:"Agile delivery",summary:"Story/Spike delivery with a review stage, story points, and acceptance ownership.",types:A.agile,statuses:[{id:"review",roles:["active"],aliases:["in-review"],description:"Work is implementation-complete and awaiting peer review."}],fields:[{key:"story_points",type:"number",commands:["create","update","list"],description:"Relative estimation size for a story or spike.",aliases:["points"]},{key:"acceptance_owner",type:"string",commands:["create","update","list"],description:"Stakeholder accountable for accepting the delivered story.",aliases:["acceptor"]}],workflows:[{type:"Story",allowed_transitions:[["open","in_progress"],["in_progress","review"],["review","in_progress"],["review","closed"],["in_progress","blocked"],["blocked","in_progress"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search works without an embedding service."},{key:"search_max_results",value:"20",summary:"Sprint-sized result cap for quick triage."}],templates:[{name:"story",options:{type:"Story",priority:"2",tags:"story",acceptanceCriteria:"Story delivers the stated user outcome with tests and docs updated.",body:`## As a
|
|
2
|
+
|
|
3
|
+
## I want
|
|
4
|
+
|
|
5
|
+
## So that
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
- [ ]
|
|
9
|
+
`}}],packages:[{spec:"templates",reason:"Reusable create templates for recurring story shapes."},{spec:"calendar",reason:"Sprint and iteration scheduling views."},{spec:"search-advanced",reason:"Richer retrieval as the backlog grows."}]},ops:{name:"ops",title:"Operations",summary:"Incident/Runbook response with mitigation and monitoring stages, severity, and service fields.",types:A.ops,statuses:[{id:"mitigating",roles:["active"],aliases:["mitigation"],description:"Active mitigation is underway to restore service."},{id:"monitoring",roles:["active"],aliases:["observing"],description:"Mitigation applied; monitoring for recurrence before closure."}],fields:[{key:"severity",type:"string",commands:["create","update","list"],description:"Incident severity classification (e.g. sev1, sev2, sev3).",aliases:["sev"]},{key:"service",type:"string",commands:["create","update","list"],description:"Primary affected service or component."}],workflows:[{type:"Incident",allowed_transitions:[["open","mitigating"],["mitigating","monitoring"],["monitoring","mitigating"],["monitoring","closed"],["mitigating","blocked"],["blocked","mitigating"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search for fast incident lookup."},{key:"search_max_results",value:"25",summary:"Wider result cap to surface related incidents and runbooks."}],templates:[{name:"incident",options:{type:"Incident",priority:"1",tags:"incident",acceptanceCriteria:"Service restored, root cause documented, and follow-ups filed.",body:`## Impact
|
|
10
|
+
|
|
11
|
+
## Timeline
|
|
12
|
+
|
|
13
|
+
## Root cause
|
|
14
|
+
|
|
15
|
+
## Mitigation
|
|
16
|
+
|
|
17
|
+
## Follow-ups
|
|
18
|
+
`}}],packages:[{spec:"lifecycle-hooks",reason:"Automate transitions and notifications on incident state changes."},{spec:"governance-audit",reason:"Audit incident metadata completeness and closure quality."},{spec:"calendar",reason:"On-call and follow-up scheduling."}]},research:{name:"research",title:"Research",summary:"Experiment/Hypothesis investigation with an analysis stage, hypothesis, and method fields.",types:A.research,statuses:[{id:"analyzing",roles:["active"],aliases:["analysis"],description:"Data collected; analysis and synthesis in progress."}],fields:[{key:"hypothesis",type:"string",commands:["create","update"],description:"The testable claim the experiment evaluates."},{key:"method",type:"string",commands:["create","update","list"],description:"Experimental method or protocol used to evaluate the hypothesis.",aliases:["protocol"]}],workflows:[{type:"Experiment",allowed_transitions:[["open","in_progress"],["in_progress","analyzing"],["analyzing","in_progress"],["analyzing","closed"],["in_progress","blocked"],["blocked","in_progress"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search across the research corpus."},{key:"search_max_results",value:"50",summary:"Broader recall cap for literature and prior-experiment discovery."}],templates:[{name:"experiment",options:{type:"Experiment",priority:"2",tags:"experiment",acceptanceCriteria:"Hypothesis is supported, rejected, or refined with recorded evidence.",body:`## Hypothesis
|
|
19
|
+
|
|
20
|
+
## Method
|
|
21
|
+
|
|
22
|
+
## Results
|
|
23
|
+
|
|
24
|
+
## Conclusion
|
|
25
|
+
`}}],packages:[{spec:"search-advanced",reason:"Semantic retrieval over experiments and findings."},{spec:"templates",reason:"Consistent experiment and hypothesis scaffolds."},{spec:"beads",reason:"Import structured prior work into the tracker."}]}};function ze(e){if(e===void 0)return;let t=m(e);if(t.length===0)throw new Error("Profile name must not be empty.");if(w.includes(t))return t;throw new Error(`Invalid profile "${e}". Allowed: ${w.join(", ")}.`)}function Jt(e){let t=ze(e);if(t===void 0)throw new Error(`Profile name is required. Allowed: ${w.join(", ")}.`);return R[t]}function Qt(){return w.map(e=>R[e])}function m(e){return e.trim().toLowerCase().replaceAll("-","_")}function ve(e){return e.map(t=>t.definition.name).join(", ")}function Ke(e=[]){let t=w.map(s=>({definition:R[s],source:"builtin"})),n=new Set(w.map(s=>m(s))),r=new Set(n),o=[];for(let s of e){let i=m(s.profile.name);if(n.has(i)){o.push(`Extension "${s.name}" profile "${s.profile.name}" uses a name reserved by a built-in archetype and was ignored.`);continue}if(r.has(i)){o.push(`Profile "${s.profile.name}" from extension "${s.name}" duplicates an already-registered profile and was ignored.`);continue}r.add(i),t.push({definition:s.profile,source:"extension",package:s.name})}return{profiles:t,warnings:o}}function Zt(e,t=[]){let{profiles:n,warnings:r}=Ke(t);if(typeof e!="string"||e.trim().length===0)throw new Error(`Profile name is required. Allowed: ${ve(n)}.`);let o=m(e),s=n.find(i=>m(i.definition.name)===o);if(s===void 0)throw new Error(`Invalid profile "${e}". Allowed: ${ve(n)}.`);return{resolved:s,warnings:r}}function We(e){return{types:e.types.length,statuses:e.statuses.length,fields:e.fields.length,workflows:e.workflows.length,config:e.config.length,templates:e.templates.length,packages:e.packages.length}}function on(e){return{name:e.name,title:e.title,summary:e.summary,composition:We(e),types:e.types.map(t=>D(()=>y(t).name,()=>String(t.name??""))),statuses:e.statuses.map(t=>D(()=>g(t).id,()=>String(t.id??""))),fields:e.fields.map(t=>D(()=>h(t).key,()=>String(t.key??""))),workflows:e.workflows.map(t=>t.type),config:e.config.map(t=>`${t.key}=${t.value}`),templates:e.templates.map(t=>t.name),packages:e.packages.map(t=>({spec:t.spec,reason:t.reason}))}}function D(e,t){try{return e()}catch{return t()}}var Be=[{key:"context_default_depth",path:"context.default_depth",kind:"string",choices:J,summary:"Default context depth."},{key:"context_activity_limit",path:"context.activity_limit",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Default context activity row limit; positive decimal integer."},{key:"context_stale_threshold_days",path:"context.stale_threshold_days",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Days before context marks an item stale; positive decimal integer."},...["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"].map(e=>({key:`context_sections_${e}`,path:`context.sections.${e}`,kind:"boolean",summary:`Include ${e} in default context output.`})),{key:"context_next_ranking_policy",path:"context.next_ranking_policy",kind:"string",choices:["priority_floor","weighted"],summary:"Ready-queue order for pm next with the built-in scorer: priority_floor (resume in-progress work, then priority tiers, relevance within a tier) or weighted (blended relevance order). An extension context_relevance scorer keeps its own order."},{key:"search_provider",path:"search.provider",kind:"string",summary:"Search embedding provider name (e.g. openai, ollama, or an extension provider)."},{key:"search_default_mode",path:"search.default_mode",kind:"string",choices:["auto","keyword","semantic","hybrid"],summary:"Mode a bare pm search runs in: auto (hybrid when semantic search is explicitly configured and runnable, else keyword), or a pinned keyword, semantic, or hybrid."},{key:"search_mutation_refresh_policy",path:"search.mutation_refresh_policy",kind:"string",choices:["cache_only","semantic_configured","semantic_auto"],summary:"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto."},{key:"search_query_expansion_enabled",path:"search.query_expansion.enabled",kind:"boolean",summary:"Enable or disable query expansion for semantic/hybrid search."},{key:"search_query_expansion_provider",path:"search.query_expansion.provider",kind:"string",summary:"Query expansion provider name (built-in openai/ollama or extension provider)."},{key:"search_rerank_enabled",path:"search.rerank.enabled",kind:"boolean",summary:"Enable or disable post-retrieval reranking for hybrid search."},{key:"search_rerank_model",path:"search.rerank.model",kind:"string",summary:"Rerank model name override used by built-in providers."},{key:"search_rerank_top_k",path:"search.rerank.top_k",kind:"integer",min:1,summary:"Number of top hybrid candidates to rerank when rerank is enabled."},{key:"search_embedding_model",path:"search.embedding_model",kind:"string",summary:"Default embedding model name (overrides provider-specific model when set)."},{key:"search_embedding_corpus_max_characters",path:"search.embedding_corpus_max_characters",kind:"integer",min:1,summary:"Maximum semantic corpus characters per item before truncation."},{key:"search_embedding_batch_size",path:"search.embedding_batch_size",kind:"integer",min:1,summary:"Number of items embedded per request batch."},{key:"search_embedding_timeout_ms",path:"search.embedding_timeout_ms",kind:"integer",min:1,summary:"Per-request embedding timeout in milliseconds."},{key:"search_score_threshold",path:"search.score_threshold",kind:"number",summary:"Minimum score for a hit to be returned (0 keeps all matches)."},{key:"search_hybrid_semantic_weight",path:"search.hybrid_semantic_weight",kind:"ratio",summary:"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword)."},{key:"search_max_results",path:"search.max_results",kind:"integer",min:1,summary:"Default upper bound on search hits when --limit is not supplied."},{key:"search_bm25_k1",path:"search.bm25.k1",kind:"number",min:0,summary:"Offline BM25 term-frequency saturation (k1); higher saturates repeated terms slower (default 1.2)."},{key:"search_bm25_b",path:"search.bm25.b",kind:"ratio",summary:"Offline BM25 document-length normalization (b) in [0, 1]; 0 disables, 1 fully normalizes (default 0.75)."},{key:"openai_base_url",path:"providers.openai.base_url",kind:"string",summary:"OpenAI-compatible API base URL (LM Studio/vLLM also use this)."},{key:"openai_api_key",path:"providers.openai.api_key",kind:"string",summary:"OpenAI-compatible API key."},{key:"openai_model",path:"providers.openai.model",kind:"string",summary:"OpenAI-compatible embedding model name."},{key:"ollama_base_url",path:"providers.ollama.base_url",kind:"string",summary:"Ollama API base URL (typically http://localhost:11434)."},{key:"ollama_model",path:"providers.ollama.model",kind:"string",summary:"Ollama embedding model name (e.g. nomic-embed-text)."},{key:"vector_store_adapter",path:"vector_store.adapter",kind:"string",summary:"Vector store adapter name (lancedb, qdrant, or an extension adapter)."},{key:"vector_store_collection_name",path:"vector_store.collection_name",kind:"string",non_empty:!0,summary:"Vector collection/table name shared by Qdrant and LanceDB adapters."},{key:"qdrant_url",path:"vector_store.qdrant.url",kind:"string",summary:"Qdrant HTTP API URL."},{key:"qdrant_api_key",path:"vector_store.qdrant.api_key",kind:"string",summary:"Qdrant API key (empty if running unauthenticated)."},{key:"lancedb_path",path:"vector_store.lancedb.path",kind:"string",summary:"LanceDB storage path (relative to pm root or absolute)."},{key:"id_prefix",path:"id_prefix",kind:"string",non_empty:!0,summary:'Prefix for generated item IDs (e.g. "pm" produces pm-xxxx).'},{key:"author_default",path:"author_default",kind:"string",non_empty:!0,summary:"Default author recorded on mutations when --author is not supplied."},{key:"agent_identity_probes_enabled",path:"agent_identity.probes_enabled",kind:"boolean",summary:"Allow privacy-bounded local harness provenance probes; no network or subprocess access is permitted."},{key:"mutation_guard_require_attributed_author",path:"mutation_guard.require_attributed_author",kind:"boolean",summary:"Reject mutations whose effective author resolves to unknown."},{key:"mutation_guard_secret_guard",path:"mutation_guard.secret_guard",kind:"string",choices:["off","advise","block"],summary:"Detect credential-shaped mutation content: off, advise, or block."},{key:"mutation_guard_stale_in_progress_hours",path:"mutation_guard.stale_in_progress_hours",kind:"integer",min:1,summary:"Age threshold for unclaimed in-progress work surfaced by health."},{key:"governance_duplicate_detection_mode",path:"governance.duplicate_detection_mode",kind:"string",choices:["off","advisory","strict"],summary:"Create/copy duplicate governance: off, advisory, or strict explicit-bypass enforcement."},{key:"governance_duplicate_detection_threshold",path:"governance.duplicate_detection_threshold",kind:"ratio",summary:"Minimum shared similarity score in [0, 1] for create/copy duplicate governance."},{key:"governance_duplicate_detection_limit",path:"governance.duplicate_detection_limit",kind:"integer",min:0,max:20,summary:"Maximum likely duplicates returned by create/copy governance (0-20)."},{key:"output_default_format",path:"output.default_format",kind:"string",choices:["toon","json"],summary:"Default output format for commands that support it: toon or json."},{key:"ux_deprecation_hints",path:"ux.deprecation_hints",kind:"boolean",summary:"Emit one stderr migration hint for deprecated command aliases."},{key:"locks_ttl_seconds",path:"locks.ttl_seconds",kind:"integer",min:1,summary:"Claim/lock time-to-live in seconds before a stale lock can be reclaimed."},{key:"locks_wait_ms",path:"locks.wait_ms",kind:"integer",min:0,summary:"Wait budget in milliseconds before a contended lock fails with lock_conflict; item-store mutations, restore and the hierarchy lock treat it as a no-progress window that each observed owner handoff restarts (120 s total cap), other locks as a fixed total; 0 fails fast. PM_LOCK_WAIT_MS overrides per invocation."},{key:"ids_token_length",path:"ids.token_length",kind:"integer",min:4,max:12,summary:"Random base36 token length for newly minted item ids (4-12, default 4). Raise it to shrink cross-branch id collision odds in concurrent multi-agent workflows (pm-pibw)."},{key:"checkpoints_retention_days",path:"checkpoints.retention_days",kind:"integer",min:1,summary:"Age in days above which pm gc --scope checkpoints prunes bulk-mutation rollback checkpoints."},{key:"schema_unknown_field_policy",path:"schema.unknown_field_policy",kind:"string",choices:["allow","warn","reject"],summary:"How item I/O handles metadata keys not in the field registry: allow, warn, or reject."},{key:"history_compact_policy_enabled",path:"history.compact_policy.enabled",kind:"boolean",summary:"Enable the history-compaction advisory: pm health warns on over-threshold streams."},{key:"history_compact_policy_max_entries",path:"history.compact_policy.max_entries",kind:"integer",min:1,summary:"Entry count above which a history stream is flagged (and the default pm history-compact --all-over threshold)."},{key:"history_compact_policy_trigger",path:"history.compact_policy.trigger",kind:"string",choices:["health_warn","auto"],summary:"History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected)."}],Ue=new Map(Be.flatMap(e=>[[e.key,e],[e.path.toLowerCase().replaceAll("-","_"),e]]));function N(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replaceAll("-","_");if(t.length!==0)return Ue.get(t)}function Ve(e,t){let n=t.trim().toLowerCase();return n==="true"||n==="1"||n==="yes"||n==="on"?{ok:!0,parsed:{descriptor:e,value:!0}}:n==="false"||n==="0"||n==="no"||n==="off"?{ok:!0,parsed:{descriptor:e,value:!1}}:{ok:!1,error:{message:`Config set ${e.key} requires a boolean value (true|false), got "${t}"`}}}function Ge(e,t,n){return e.key==="context_default_depth"&&(n=n.toLowerCase()),e.non_empty===!0&&n.length===0?{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}}:e.choices&&!e.choices.includes(n)?{ok:!1,error:{message:`Config set ${e.key} must be one of ${e.choices.join("|")}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function Se(e,t){let n=[e.min===void 0?"":`minimum ${e.min}`,e.max===void 0?"":`maximum ${e.max}`].filter(Boolean).join(", ");return{message:`Config set ${e.key} requires non-empty decimal integer digits${n?` (${n})`:""}, got "${t}"`}}function Xe(e,t,n){if(e.decimal_only&&!/^\d+$/u.test(n))return{ok:!1,error:Se(e,t)};if(n.length===0)return{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}};let r=Number(n);return Number.isFinite(r)?{ok:!0,value:r}:{ok:!1,error:e.decimal_only?Se(e,t):{message:`Config set ${e.key} requires a finite number, got "${t}"`}}}function Ye(e,t,n){return!Number.isInteger(n)||n<0?{ok:!1,error:{message:`Config set ${e.key} requires a non-negative integer, got "${t}"`}}:e.min!==void 0&&n<e.min?{ok:!1,error:{message:`Config set ${e.key} requires an integer >= ${e.min}, got "${t}" (the runtime silently ignores 0 here and falls back to the default)`}}:e.max!==void 0&&n>e.max?{ok:!1,error:{message:`Config set ${e.key} requires an integer <= ${e.max}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function He(e,t,n){return n<0||n>1?{ok:!1,error:{message:`Config set ${e.key} requires a number in [0, 1], got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function Je(e,t,n){return e.min!==void 0&&n<e.min?{ok:!1,error:{message:`Config set ${e.key} requires a number >= ${e.min}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function I(e,t){if(typeof t!="string")return{ok:!1,error:{message:`Config set ${e.key} requires a string value`}};let n=t.trim();if(e.kind==="boolean")return Ve(e,t);if(e.kind==="string")return Ge(e,t,n);let r=Xe(e,t,n);return r.ok?e.kind==="integer"?Ye(e,t,r.value):e.kind==="ratio"?He(e,t,r.value):Je(e,t,r.value):{ok:!1,error:r.error}}function Oe(e,t){let n=t.path.split("."),r=e;for(let o of n){if(typeof r!="object"||r===null)return null;let s=Object.getOwnPropertyDescriptor(r,o);if(!s||!Object.hasOwn(s,"value"))return null;r=s.value}return typeof r=="string"||typeof r=="number"||typeof r=="boolean"?r:null}function ln(e,t,n){let r=t.path.split(".");if(r.some(a=>a.length===0||["__proto__","constructor","prototype"].includes(a)))throw new Error("Unsafe settings path");let o=e;for(let a=0;a<r.length-1;a+=1){let u=r[a],c=Object.getOwnPropertyDescriptor(o,u)?.value;if(typeof c!="object"||c===null||Array.isArray(c)){let l={};Object.defineProperty(o,u,{value:l,writable:!0,enumerable:!0,configurable:!0}),o=l}else o=c}let s=r[r.length-1];return Object.getOwnPropertyDescriptor(o,s)?.value===n?!1:(Object.defineProperty(o,s,{value:n,writable:!0,enumerable:!0,configurable:!0}),!0)}var bn=["profile","types","statuses","fields","workflows","config","templates","packages"],vn=["profile_name_empty","profile_name_not_normalized","profile_title_empty","profile_summary_empty","type_invalid","type_duplicate","status_invalid","status_duplicate","field_invalid","field_duplicate","field_mcp_input_collision","field_option_collision","field_flag_invalid","workflow_type_empty","workflow_type_unknown","workflow_duplicate_type","workflow_transition_malformed","workflow_status_unknown","config_key_unknown","config_value_invalid","config_duplicate","template_type_unknown","package_spec_empty"],Qe=new Set(de.flatMap(e=>[k(e.id),...(e.aliases??[]).map(t=>k(t))]).filter(e=>e.length>0)),xe=new Set(H.map(e=>e.toLowerCase()));function Ze(e,t){e.name.trim().length===0?t.push({severity:"error",code:"profile_name_empty",dimension:"profile",message:"Profile name must not be empty; profile resolution requires a non-blank name."}):e.name!==m(e.name)&&t.push({severity:"warning",code:"profile_name_not_normalized",dimension:"profile",target:e.name,message:`Profile name "${e.name}" is not in canonical form; resolution folds it to "${m(e.name)}" (lowercase, hyphens as underscores).`}),e.title.trim().length===0&&t.push({severity:"warning",code:"profile_title_empty",dimension:"profile",message:"Profile title is empty; list and show surfaces will render a blank title."}),e.summary.trim().length===0&&t.push({severity:"warning",code:"profile_summary_empty",dimension:"profile",message:"Profile summary is empty; list and show surfaces will render a blank archetype description."})}function et(e,t){let n=new Set,r=new Set;for(let[o,s]of e.types.entries()){let i;try{i=y(s).name}catch(u){t.push({severity:"error",code:"type_invalid",dimension:"types",target:typeof s.name=="string"?s.name:`#${o}`,message:E(u)});continue}let a=i.toLowerCase();if(r.has(a)){t.push({severity:"error",code:"type_duplicate",dimension:"types",target:i,message:`Item type "${i}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}r.add(a),n.add(a)}return n}function tt(e,t){let n=new Set,r=new Set;for(let[o,s]of e.statuses.entries()){let i;try{i=g(s)}catch(a){t.push({severity:"error",code:"status_invalid",dimension:"statuses",target:typeof s.id=="string"?s.id:`#${o}`,message:E(a)});continue}if(r.has(i.id)){t.push({severity:"error",code:"status_duplicate",dimension:"statuses",target:i.id,message:`Status "${i.id}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}r.add(i.id),n.add(i.id);for(let a of i.aliases??[])n.add(k(a))}return n}function nt(e,t){let n=new Set;for(let[r,o]of e.fields.entries()){let s,i;try{i=h(o),s=i.key}catch(l){t.push({severity:"error",code:"field_invalid",dimension:"fields",target:typeof o.key=="string"?o.key:`#${r}`,message:E(l)});continue}if(n.has(s)){t.push({severity:"error",code:"field_duplicate",dimension:"fields",target:s,message:`Field "${s}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}n.add(s);let a=ge(i);a.length>0&&t.push({severity:"error",code:"field_flag_invalid",dimension:"fields",target:s,message:`Field "${s}" declares a flag that is not one option spelling: ${a.map(_e).join("; ")}. Pass one spelling per alias.`});let u=he(i);u.length>0&&t.push({severity:"error",code:"field_option_collision",dimension:"fields",target:s,message:`Field "${s}" would disable a built-in option: ${u.map(ke).join("; ")}. Rename the field or narrow its commands.`});let c=ye(s);c&&t.push({severity:"warning",code:"field_mcp_input_collision",dimension:"fields",target:s,message:`Field "${s}" collides with canonical MCP property "${c.property}" owned by ${c.owner}; callers must pass the custom value through ${c.nested_path}.`})}}function rt(e,t,n,r){let o=new Set;for(let[s,i]of e.workflows.entries()){let a=i.type.trim().toLowerCase();if(a.length===0){r.push({severity:"error",code:"workflow_type_empty",dimension:"workflows",target:`#${s}`,message:"Workflow has an empty type; the workflow resolver drops entries without a type."});continue}let u=o.has(a);o.add(a),u?r.push({severity:"warning",code:"workflow_duplicate_type",dimension:"workflows",target:i.type,message:`Workflow type "${i.type}" is declared more than once; the later transition set wins.`}):!xe.has(a)&&!t.has(a)&&r.push({severity:"warning",code:"workflow_type_unknown",dimension:"workflows",target:i.type,message:`Workflow governs type "${i.type}" which is neither a built-in type nor declared by this profile; it has no effect unless that type already exists.`});let c=new Set;for(let l of i.allowed_transitions){let d=k(l[0]),B=k(l[1]);if(d.length===0||B.length===0){r.push({severity:"error",code:"workflow_transition_malformed",dimension:"workflows",target:i.type,message:`Workflow "${i.type}" has a transition with an empty status; the workflow resolver silently drops it.`});continue}for(let _ of[d,B])Qe.has(_)||n.has(_)||c.has(_)||(c.add(_),r.push({severity:"warning",code:"workflow_status_unknown",dimension:"workflows",target:_,message:`Workflow "${i.type}" references status "${_}" which is neither a built-in status nor declared by this profile; transitions to or from it are unreachable.`}))}}}function ot(e,t){let n=new Set;for(let r of e.config){let o=N(r.key);if(o===void 0){t.push({severity:"error",code:"config_key_unknown",dimension:"config",target:r.key,message:`Config knob "${r.key}" is not a recognized setting; apply rejects it with a usage error.`});continue}n.has(o.key)?t.push({severity:"error",code:"config_duplicate",dimension:"config",target:o.key,message:`Config knob "${o.key}" is set more than once; the later value silently overwrites the earlier one.`}):n.add(o.key);let s=I(o,r.value);s.ok||t.push({severity:"error",code:"config_value_invalid",dimension:"config",target:r.key,message:s.error.message})}}function st(e,t,n){for(let r of e.templates){let o=r.options.type;if(typeof o!="string"||o.trim().length===0)continue;let s=o.trim().toLowerCase();!xe.has(s)&&!t.has(s)&&n.push({severity:"warning",code:"template_type_unknown",dimension:"templates",target:r.name,message:`Template "${r.name}" creates type "${o}" which is neither a built-in type nor declared by this profile.`})}}function it(e,t){for(let[n,r]of e.packages.entries())r.spec.trim().length===0&&t.push({severity:"warning",code:"package_spec_empty",dimension:"packages",target:`#${n}`,message:"Package recommendation has an empty spec; it cannot be surfaced as an install hint."})}function Sn(e){let t=[];Ze(e,t);let n=et(e,t),r=tt(e,t);nt(e,t),rt(e,n,r,t),ot(e,t),st(e,n,t),it(e,t);let o=t.filter(i=>i.severity==="error").length,s=t.length-o;return{profile:e.name,ok:o===0,findings:t,errorCount:o,warningCount:s}}function M(e,t,n,r,o){let s=e,i=[];for(let a of t){let u=r(s),c=o(s,a),l=r(c.file);s=c.file;let d=u===l?"unchanged":c.replaced?"update":"add";i.push({key:n(a),status:d})}return{file:s,changes:i,changed:i.some(a=>a.status!=="unchanged")}}function Ee(e){return JSON.stringify(e.map(t=>t.join("\0")).sort())}function at(e,t){let n=e.map(o=>({...o})),r=[];for(let o of t){let s=n.findIndex(a=>a.type===o.type),i={type:o.type,allowed_transitions:o.allowed_transitions};s<0?(n.push(i),r.push({type:o.type,status:"add"})):Ee(n[s].allowed_transitions)===Ee(o.allowed_transitions)?r.push({type:o.type,status:"unchanged"}):(n[s]=i,r.push({type:o.type,status:"update"}))}return{changes:r,result:n,changed:r.some(o=>o.status!=="unchanged")}}function lt(e,t){let n=[];for(let r of e.config){let o=N(r.key);if(o===void 0)throw new Error(`Profile "${e.name}" references unknown config key "${r.key}".`);let s=I(o,r.value);if(!s.ok)throw new Error(`Profile "${e.name}" config ${r.key}: ${s.error.message}`);let i=Oe(t,o),a=i===null?"add":i===s.parsed.value?"unchanged":"update";n.push({key:o.key,path:o.path,value:s.parsed.value,status:a})}return{changes:n,changed:n.some(r=>r.status!=="unchanged")}}function $e(e){let t=Object.entries(e).sort(([n],[r])=>n.localeCompare(r));return JSON.stringify(t)}function ct(e,t){let n=[];for(let r of e.templates){let o=t.get(r.name),s;o===void 0?s="add":$e(o)===$e(r.options)?s="unchanged":s="update",n.push({name:r.name,options:r.options,status:s})}return{changes:n,changed:n.some(r=>r.status!=="unchanged")}}function Nn(e,t){let n=M(se(t.typesRaw),e.types,l=>y(l).name,ae,(l,d)=>ie(l,y(d))),r=M(fe(t.statusesRaw),e.statuses,l=>g(l).id,pe,(l,d)=>me(l,g(d))),o=M(le(t.fieldsRaw),e.fields,l=>h(l).key,ce,(l,d)=>ue(l,h(d))),s=at(t.workflows,e.workflows),i=lt(e,t.settings),a=ct(e,t.templates),u=e.packages.map(l=>({spec:l.spec,reason:l.reason,status:t.installedPackages.has(l.spec)?"installed":"recommended"})),c=n.changed||r.changed||o.changed||s.changed||i.changed||a.changed;return{profile:{name:e.name,title:e.title,summary:e.summary},types:n,statuses:r,fields:o,workflows:s,config:i,templates:a,packages:u,changed:c}}import{isDeepStrictEqual as ut}from"node:util";var dt=new Set(["__proto__","prototype","constructor"]),Ce=Symbol("looseOptionOccurrences");function b(e){return e.trim().toLowerCase().replaceAll(/-([a-z0-9])/g,(n,r)=>r.toUpperCase())}function j(e){return dt.has(e)}function Le(e){let t=(typeof e.value_type=="string"?e.value_type:void 0)??(typeof e.type=="string"?e.type:void 0);return Z(t)}function Fe(e){let t=[],n=x(e.long)??"",r=typeof e.short=="string"?e.short.trim():"";if(n.startsWith("--")){let o=b(n.slice(2));o.length>0&&!j(o)&&t.push(o)}if(r.startsWith("-")&&!r.startsWith("--")){let o=b(r.slice(1));o.length>0&&!j(o)&&t.push(o)}return[...new Set(t)]}function S(e){let t=x(e.long)??"";if(t.startsWith("--")){let n=b(t.slice(2));if(n.length>0&&!j(n))return n}return Fe(e)[0]??null}function O(e){let t=x(e.long)??"";if(t.startsWith("--")&&t.length>2)return t;let n=typeof e.short=="string"?e.short.trim():"";return n.startsWith("-")&&!n.startsWith("--")&&n.length>1?n:null}function ft(e,t){return[...(t.definitions??e).map(r=>O(r)).filter(r=>r!==null),...t.inheritedFlags??[]]}function pt(e,t,n,r){let o=r.length>0?` Expected one of: ${[...new Set(r)].join(", ")}.`:"";throw new p(`Unknown option '${e}' for extension command '${n}'.${o}`,f.USAGE,{code:"unknown_option",flag:t,required:`Use a flag the command accepts; run pm contracts --command ${n} --flags-only --json to list them.`})}function mt(e,t){throw new p(`Option '${e}' is disabled for extension command '${t}'.`,f.USAGE,{code:"extension_option_disabled",flag:e,required:`Remove ${e}; the command declares it with enabled: false.`,why:"A disabled declaration keeps the flag in the contract while refusing every value for it.",examples:[`pm ${t} --help`],nextSteps:[`Run pm contracts --command ${t} --flags-only --json to list the flags this command accepts.`]})}function yt(e,t,n,r){let o=L(e),s=o.value_arity==="none"?n:o.value_arity==="optional"?`${n} [${o.value_name}]`:`${n} <${o.value_name}>`;throw new p(`Missing required option '${n}' for extension command '${r}'.`,f.USAGE,{code:"missing_required_option",flag:n,field:t,required:`Pass ${s}.`,why:"The command declares this flag as required, so pm refuses the invocation before the extension handler runs.",examples:[`pm ${r} ${s}`],nextSteps:[`Run pm contracts --command ${r} --flags-only --json to read each flag's sdk_option key.`],recovery:{missing:[n]}})}function ht(e){return typeof e=="string"||e==null?e:String(e)}function gt(e){if(typeof e=="number")return e;if(typeof e=="string"&&e.trim().length>0){let t=Number(e);return Number.isFinite(t)?t:e}return e}function Re(e){if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true"||t==="1")return!0;if(t==="false"||t==="0")return!1}return e}var _t={string:ht,number:gt,boolean:Re};function v(e,t){return Array.isArray(e)?e.map(n=>v(n,t)):_t[t](e)}function P(e,t,n){let r=n?(Array.isArray(e)?e.flat(1/0):[e]).filter(o=>o!=null&&o!==""):F(e);return t?r.map(o=>v(o,t)):r}function kt(e,t){return P(t,null,e.repeatable===!0).length>0}function wt(e,t,n,r){return n?P(e,t,r):t?v(e,t):e}function bt(e,t,n){let r=Me(e,t);return r.length===0?n:r.map(o=>o.value)}function De(e){return L(e).value_arity==="none"}function z(e,t,n,r,o){let s=O(e),i=o?` for extension command '${o}'`:"",a=n===!0?"no value":JSON.stringify(n);throw new p(`Option '${s}'${i} expects ${r}; received ${a}.`,f.USAGE,{code:"extension_flag_value_invalid",flag:s,required:`Pass ${s} ${t==="number"?"<number>":"<true|false|1|0>"}.`,why:`The flag declares value_type ${t} with value_validation strict, so a malformed token is refused before the extension handler runs.`,nextSteps:[`Re-run with a valid ${t} value for ${s}.`,`Run pm ${o??"<command>"} --help to review the declared flag contract.`]})}function K(e,t){return e.value_validation==="strict"&&t!=="string"}function Me(e,t){let n=e[Ce];if(!n)return[];let r=new Set(t);return n.filter(o=>r.has(o.key))}function vt(e,t,n,r){if(De(e))for(let o of Me(n,t)){if(o.attached!==!0)continue;let s=e.list===!0&&e.repeatable!==!0?F(o.value):[o.value];for(let i of s){let a=$(v(i,"boolean"),"boolean");a!==null&&z(e,"boolean",i,a.expected,r)}}}function St(e,t,n,r,o){let s=Array.isArray(n)?n.flat(1/0):[n],i=r?s:s.flatMap(a=>typeof a=="string"?a.split(","):[a]);for(let a of i)if(typeof a=="string"&&a.trim().length===0){let u=$(a,t);z(e,t,a,u.expected,o)}}function W(e,t,n,r){if(!K(e,n))return t;let o=n==="boolean"&&De(e),s=i=>{let a=$(i,n);return a===null?i:o&&typeof i=="string"?!0:z(e,n,i,a.expected,r)};return Array.isArray(t)?t.map(s):s(t)}function Ot(e,t,n,r){for(let o of n)if(!(o===t||!Object.hasOwn(e,o))){if(Object.hasOwn(e,t)){if(r){let s=e[t],i=e[o];e[t]=[...Array.isArray(s)?s:[s],...Array.isArray(i)?i:[i]].filter(a=>a!=null)}delete e[o];continue}e[t]=e[o],delete e[o]}}function je(e,t,n=e,r){if(t.length===0)return e;let o=Object.create(null);for(let[i,a]of Object.entries(e))o[i]=a;let s=new Set(t.map(i=>S(i)).filter(i=>i!==null));for(let i of t){let a=S(i);if(a){let u=Fe(i).filter(c=>c===a||!s.has(c));xt(o,i,a,u,n,r)}}return o}function xt(e,t,n,r,o,s){let i=t.list===!0,a=Le(t);a&&!i&&Et(e,t,n,r,a,s),Ot(e,n,r,i);let u=t.repeatable===!0;if(!Object.hasOwn(e,n)){t.default!==void 0&&(e[n]=wt(t.default,a,i,u));return}if(a==="boolean"&&K(t,a)&&vt(t,r,o,s),i){e[n]=$t(t,r,o,e[n],a,u,s);return}a&&(e[n]=W(t,v(e[n],a),a,s))}function Et(e,t,n,r,o,s){for(let i of r)i!==n&&Object.hasOwn(e,i)&&W(t,v(e[i],o),o,s)}function $t(e,t,n,r,o,s,i){let a=bt(n,t,r);o&&K(e,o)&&St(e,o,a,s,i);let u=P(a,o,s);return o?W(e,u,o,i):u}function Rn(e){return S(e)}function Ae(e){return e.trim().toLowerCase().split(/\s+/u).filter(t=>t.length>0).join(" ")}function Dn(e,t){let n=Ae(t);if(n.length===0)return[];let r=C(n);return e.flags.filter(o=>C(Ae(o.target_command))===r).flatMap(o=>[...o.flags])}function At(e,t,n,r){let o=O(e),[s,i]=n;throw new p(`Options '${s}' and '${i}' both set ${o} for extension command '${r}' with different values.`,f.USAGE,{code:"extension_option_spelling_conflict",required:`Pass ${o} once, under the handler key '${t}'.`,why:`'${s}' and '${i}' are spellings of the same declared flag, and pm refuses to choose between two different values.`,nextSteps:[`Remove '${s}' or '${i}' and pass one value as '${t}'.`,`Run pm contracts --command ${r} --flags-only --json to read each flag's sdk_option key.`]})}function Mn(e,t,n,r={}){if(t.length===0)return e;let o=t.map(l=>l.repeatable===!0&&l.list!==!0?{...l,list:!0}:l),s=Ct(o),i=Rt(e,s,n),a=new Set([...s.long.values()].map(({handlerKey:l})=>l)),u=Object.create(null),c=Object.create(null);for(let[l,d]of Object.entries(i))a.has(l)?u[l]=d:d===void 0||r.undeclaredKeys==="pass"||It(l)?c[l]=d:pt(l,Tt(l),n,ft(o,{}));return Pe(u,o,n),Object.assign(c,je(u,o,qe(u,s),n))}function qe(e,t){let n=new Set([...t.long.values()].map(({handlerKey:s})=>s)),r=Object.entries(e).filter(([s])=>n.has(s)).flatMap(([s,i])=>(Array.isArray(i)?i.flat(1/0):[i]).map(a=>({consumed:1,key:s,value:a,attached:!0}))),o=Object.create(null);return Object.defineProperty(o,Ce,{value:r}),o}function Pe(e,t,n){for(let r of t){let o=S(r);if(o===null)continue;let s=O(r),i=e[o],a=Object.hasOwn(e,o);r.enabled===!1&&a&&mt(s,n);let u=a&&(r.list!==!0||kt(r,i));r.required===!0&&r.enabled!==!1&&!u&&yt(r,o,s,n),r.list!==!0&&Array.isArray(i)&&Nt(s,n)}}function Nt(e,t){throw new p(`Option '${e}' for extension command '${t}' takes one value; received an array.`,f.USAGE,{code:"extension_flag_value_invalid",flag:e,required:`Pass one value for ${e}, or ask the package to declare it with list: true or repeatable: true.`,why:"The flag is not declared list or repeatable, so pm refuses an array before the extension handler runs instead of handing it a value of the wrong shape.",nextSteps:[`Run pm contracts --command ${t} --flags-only --json to read each flag's value contract.`]})}var Ne=new Set([...[...Q].flatMap(e=>{let t=e.replace(/^--/u,"");return[t,...t.startsWith("no-")?[t.slice(3)]:[]].flatMap(r=>[b(r),r.replaceAll("-","_")])}),"force","subcommand","inputResponses","requestState"]);function It(e){return Ne.has(e)||Ne.has(b(e.replace(/^-{1,2}/u,"")))}function Tt(e){return`--${e.replace(/^-+/u,"").replace(/([a-z0-9])([A-Z])/gu,"$1-$2").replaceAll("_","-").toLowerCase()}`}function Ct(e){let t={long:new Map,short:new Map},n=(r,o,s)=>{o.length>0&&!r.has(o)&&r.set(o,s)};for(let r of e){let o=S(r);if(o===null)continue;let s={handlerKey:o,definition:r};n(t.long,o,s);let i=typeof r.short=="string"?r.short.trim():"";i.startsWith("-")&&!i.startsWith("--")&&n(t.short,i.slice(1),s)}return t}function q(e,t){return e.long.get(t)??e.short.get(t.replace(/^-(?!-)/u,""))??e.long.get(b(t.replace(/^-{1,2}/u,"")))}function Lt(e,t,n,r){let o=/^(?:--)?no-(.+)$/u.exec(t)?.[1];if(o===void 0||q(e,t)!==void 0)return{spelling:t,value:n};let s=q(e,o);return s===void 0||Le(s.definition)!=="boolean"?{spelling:t,value:n}:(s.definition.list===!0||s.definition.repeatable===!0)&&Array.isArray(n)?{spelling:o,value:n.flat(1/0).map(i=>Ie(t,s.definition,i,r))}:s.definition.list===!0&&n!==void 0?{spelling:o,value:Ie(t,s.definition,n,r)}:{spelling:o,value:n===void 0?n:T(t,s.definition,n,r)}}function Ie(e,t,n,r){let o=s=>s.trim().length===0?s:String(T(e,t,s.trim(),r));return n==null?n:typeof n!="string"?T(e,t,n,r):n.trim().length===0?n:t.repeatable===!0||!n.includes(",")?T(e,t,n,r):n.split(",").map(o).join(",")}function T(e,t,n,r){let o=Re(n);return typeof o=="boolean"?!o:Ft(e,t,n,r)}function Ft(e,t,n,r){let o=O(t);throw new p(`Option '${e}' for extension command '${r}' negates ${o} and expects true, false, 1, or 0; received ${JSON.stringify(n)}.`,f.USAGE,{code:"extension_flag_value_invalid",flag:o,required:`Pass ${o} as true or false, or '${e}' as true.`,why:`'${e}' is the negated spelling of the boolean ${o}, so only a boolean value can be inverted before the extension handler runs.`,nextSteps:[`Run pm contracts --command ${r} --flags-only --json to read each flag's value contract.`]})}function Rt(e,t,n){let r=Object.create(null),o=new Map;for(let[s,i]of Object.entries(e)){let{spelling:a,value:u}=Lt(t,s,i,n),c=q(t,a);if(c===void 0)r[a]=u;else if(u!==void 0){let l=o.get(c.handlerKey);l===void 0?(o.set(c.handlerKey,a),r[c.handlerKey]=u):ut(Te(c.definition,c.handlerKey,r[c.handlerKey],t,n),Te(c.definition,c.handlerKey,u,t,n))||At(c.definition,c.handlerKey,[l,a],n)}}return r}function Te(e,t,n,r,o){let s={[t]:n};return Pe(s,[e],o),je(s,[e],qe(s,r),o)[t]}export{Kt as a,Wt as b,Bt as c,Ut as d,Vt as e,be as f,Gt as g,Xt as h,w as i,R as j,ze as k,Jt as l,Qt as m,Ke as n,Zt as o,We as p,on as q,Be as r,N as s,I as t,Oe as u,ln as v,bn as w,vn as x,Sn as y,Nn as z,Rn as A,Dn as B,Mn as C};
|
|
26
|
+
//# sourceMappingURL=chunk-24VRBNKE.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as W,c as j}from"./chunk-GXP7Q4XM.js";import{jb as V}from"./chunk-FDZPRJXJ.js";import{H as $,I as D,O as q,Y as G}from"./chunk-5LDBS6MS.js";import{s as F}from"./chunk-HL47UQZJ.js";import{Ba as R,Dd as f,Ed as T,Fd as _,Gd as b,Hd as N,Ka as y,Kd as O,Lc as S,Ld as k,Md as H,Nd as L,Od as M,Pd as P,Q as v,Qd as l,W as w,aa as I,je as U,xd as A}from"./chunk-SMMOZ3H3.js";import{C as E,D as C}from"./chunk-3Z7MCUJM.js";import{A as d,y as g,z as m}from"./chunk-A6VEMCRR.js";var B="item_revision_conflict",ee=10,J=/^[0-9a-f]{64}$/u;function p(e,n){return new d(`Invalid expected revision ${JSON.stringify(e)}: ${n}.`,m.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 n=typeof e=="string"?e.trim().toLowerCase():"";if(!J.test(n))throw p(String(e),"the revision is not a 64-character hexadecimal item_hash");return n}function te(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw p(String(t),"expected a string");let i=t.split(",").map(o=>o.trim()).filter(o=>o.length>0);if(i.length===0)throw p(t,"the value is empty");let r=o=>C(t)===t?o:E;return i.map(o=>{let c=o.lastIndexOf("="),s=c===-1?void 0:o.slice(0,c).trim();if(s!==void 0&&s.length===0)throw p(r(o),"the item id before = is empty");let a=c===-1?o:o.slice(c+1);if(!J.test(a.trim().toLowerCase()))throw p(r(a),"the revision is not a 64-character hexadecimal item_hash");let h=K(a);return s===void 0?{itemHash:h}:{id:s,itemHash:h}})})}async function X(e,n){let t=await F(e),i=v(t,U()).type_to_folder,r=await $(e,n,t.id_prefix,t.item_format,i);if(r){let{document:o}=await D(r,{schema:t.schema});if(o.metadata.id!==await j(r.itemPath,r.id))throw new d(`Item file ${r.id} embeds the id ${o.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,m.CONFLICT,{code:"item_identity_conflict",item_id:r.id,required:`Repair ${r.id}'s identity first (pm validate reports it; pm restore ${r.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:o.metadata.id,document:o}}try{return{id:(await W(e,n,t,i)).id,document:g}}catch{throw await q(e,n,t.id_prefix,i)}}function x(e){return w(e.cwd??process.cwd(),e.pmRoot)}async function Te(e,n={}){let t=await X(x(n),e);return{id:t.id,item_hash:A(t.document)}}async function Y(e,n,t){let i=[];for(let r of n){let o=r.id??t;if(o===void 0||o.trim().length===0)throw new d("A bare expected revision needs an item to bind to.",m.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>"]});i.push({id:(await X(e,o)).id,itemHash:r.itemHash})}return i}function ie(e){return[...new Set(e.patch.map(n=>{let t=n.path.split("/");return String(t[1]==="metadata"?t[2]:t[1])}))].sort()}async function ne(e,n,t){let i;try{i=await S(I(e,n),n)}catch{return}let r=-1;for(let s=i.length-1;s>=0;s-=1){let a=i[s];if(a.after_hash===t){r=s+1;break}if(a.before_hash===t){r=s;break}}if(r===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let o=i.slice(r),c=o.slice(-ee);return{expected_revision_recorded:!0,changes_since:c.map(s=>({ts:s.ts,op:s.op,author:s.author,fields:ie(s)})),changes_since_omitted:o.length-c.length}}async function be(e,n){if(!u(e))return{};let t=await Q(e,n);return{error_code:B,expected_revision:String(t.context.expected_revision),current_revision:String(t.context.current_revision),details:t.context.details}}function u(e){return G(e)&&e.context.code===B}function Ne(e){let n=e.find(t=>u(t));if(n!==void 0)throw n}function Oe(){return new d("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",m.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,n){if(n===void 0||!u(e)||typeof e.context.item_id!="string"||M(e))return e;let t=e.context.reason===k;if(!t&&e.context.reason!==O)return e;let i=P(l(e,new d(e.message,e.exitCode,{...e.context,...H(e.context.item_id,t,n)})));return i.stack=e.stack,i}async function Q(e,n,t){if(!L(e,n))return e;let i=oe(e,t);if(!u(i)||i.context.details!==void 0)return i;let r=i.context.item_id,o=i.context.expected_revision;if(typeof r!="string"||typeof o!="string")return i;let c;try{c=await ne(n,r,o)}catch{return i}if(c===void 0)return i;let s={expected_revision_recorded:c.expected_revision_recorded,changes_since:c.changes_since.map(h=>({ts:h.ts,op:h.op,author:h.author,fields:[...h.fields]})),changes_since_omitted:c.changes_since_omitted},a=l(i,new d(i.message,i.exitCode,{...i.context,details:s}));return a.stack=i.stack,a}async function Z(e,n,t){try{return{result:await T(e,n),...b(e)}}catch(i){throw e.pmRoot===void 0?i:await Q(i,e.pmRoot,t)}}function re(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",x(e)]}}async function ke(e,n,t={}){return Z(await se(e,t),n,re(t))}async function se(e,n={}){let t=x(n),i=e.map(({id:o,itemHash:c})=>({id:o,itemHash:K(c)})),r=f();return _(r,t,await Y(t,i)),r}function He(e){let n=N(e);return n===void 0||n.length>0}function ce(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var z=new Set(R);function ae(e,n={}){let t=e.trim().replace(/\s+/gu,"-"),i=z.has(t)?t:e;if(z.has(i)&&(!V(i)||i==="deps")&&!y.has(i))throw de(i);if((i==="test"||i==="test-all")&&n.background===!0)throw new d(`--expect-hash cannot guard ${i} --background: the worker runs in another process.`,m.USAGE,{code:"expect_hash_background_unsupported",required:`Run ${i} in the foreground to guard its result recording, or drop --expect-hash for a background run.`})}function de(e){return new d(`--expect-hash guards item writes, and ${e} is not a mutation.`,m.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,n){if(n.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let t=e,i=Array.isArray(t.warnings)?t.warnings:[];return{...t,warnings:[...i,...n.map(ce)]}}async function Le(e){let n=e.expectHash;if(n!==void 0&&typeof n!="string"&&!(Array.isArray(n)&&n.every(o=>typeof o=="string")))throw p(JSON.stringify(n)??String(n),"expected a string or an array of strings");let t=te(n);if(t.length===0)return e.run();ae(e.action,{background:e.background===!0||e.options?.background===!0});let i=f();_(i,e.pmRoot,await Y(e.pmRoot,t,e.defaultId));let r=await Z(i,e.run,e.invocation);return he(r.result,r.unchecked)}export{B as a,ee as b,K as c,te as d,Te as e,Y as f,ne as g,be as h,u as i,Ne as j,Oe as k,oe as l,Q as m,Z as n,ke as o,se as p,He as q,ce as r,ae as s,de as t,Le as u};
|
|
2
|
+
//# sourceMappingURL=chunk-3ELVASVA.js.map
|