@unbrained/pm-cli 2026.11.4 → 2026.11.5

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.
Files changed (219) hide show
  1. package/.agents/skills/HARNESS_COMPATIBILITY.md +1 -1
  2. package/.agents/skills/README.md +14 -14
  3. package/.agents/skills/pm-developer/SKILL.md +16 -16
  4. package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +14 -14
  5. package/.agents/skills/pm-developer/references/SCRIPTING_COMPOSITION.md +10 -10
  6. package/.agents/skills/pm-extensions/SKILL.md +13 -13
  7. package/.agents/skills/pm-extensions/references/AUTHORING.md +12 -12
  8. package/.agents/skills/pm-sdk/SKILL.md +27 -27
  9. package/.agents/skills/pm-sdk/references/SURFACE_MAP.md +32 -32
  10. package/.agents/skills/pm-test-audit/references/AUDIT.md +1 -1
  11. package/.agents/skills/pm-user/SKILL.md +35 -35
  12. package/.claude-plugin/marketplace.json +1 -1
  13. package/AGENTS.md +9 -9
  14. package/CHANGELOG.md +9 -0
  15. package/README.md +13 -13
  16. package/dist/cli/register-setup.js +1 -1
  17. package/dist/cli-bundle/bundle-manifest.json +1 -1
  18. package/dist/cli-bundle/chunks/chunk-2RPORE7M.js +31 -0
  19. package/dist/cli-bundle/chunks/{chunk-NPEDFOVQ.js → chunk-335BZ75D.js} +2 -2
  20. package/dist/cli-bundle/chunks/chunk-5GWEY4P6.js +122 -0
  21. package/dist/cli-bundle/chunks/chunk-6VRX2CM7.js +2 -0
  22. package/dist/cli-bundle/chunks/{chunk-7PGNAHNW.js → chunk-7DEKAXVA.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-3OXQGGRD.js → chunk-7ZRCYESH.js} +42 -41
  24. package/dist/cli-bundle/chunks/{chunk-BWAXA6S4.js → chunk-AUEKTX7V.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-SRDO2NJU.js → chunk-D7KYPRK4.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-ODMJ3HIB.js → chunk-DAX3AOFI.js} +2 -2
  27. package/dist/cli-bundle/chunks/{chunk-L4BKTPJ6.js → chunk-F6NDMKZ4.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-T56MB6SF.js → chunk-FRNMQM45.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-5S6RT5LX.js → chunk-HNGLDMSZ.js} +3 -3
  30. package/dist/cli-bundle/chunks/{chunk-QN7VCOUU.js → chunk-HRCMORE7.js} +2 -2
  31. package/dist/cli-bundle/chunks/{chunk-BK2XAQVC.js → chunk-HRFGFIYU.js} +2 -2
  32. package/dist/cli-bundle/chunks/{chunk-CERNIZLB.js → chunk-JI2GDE4I.js} +42 -42
  33. package/dist/cli-bundle/chunks/{chunk-6T2V3UIK.js → chunk-LS3GI3H4.js} +53 -53
  34. package/dist/cli-bundle/chunks/chunk-OH6WQ7VT.js +3 -0
  35. package/dist/cli-bundle/chunks/{chunk-BRIPGUAO.js → chunk-OJDMJT7Y.js} +2 -2
  36. package/dist/cli-bundle/chunks/{chunk-7RCI7AAA.js → chunk-S4LPZ4TN.js} +2 -2
  37. package/dist/cli-bundle/chunks/{chunk-AQ5UHHQS.js → chunk-UEGXWXUZ.js} +2 -2
  38. package/dist/cli-bundle/chunks/{chunk-5BVZ32G7.js → chunk-XLSHFYXZ.js} +2 -2
  39. package/dist/cli-bundle/chunks/{chunk-2GW662DP.js → chunk-YKXATU2G.js} +2 -2
  40. package/dist/cli-bundle/chunks/{item-revision-UAZOBP2Q.js → item-revision-OJJVPQY7.js} +2 -2
  41. package/dist/cli-bundle/chunks/item-transaction-QEPBUCMY.js +2 -0
  42. package/dist/cli-bundle/chunks/{mutation-admission-QZQI2NN5.js → mutation-admission-INMM3HHG.js} +2 -2
  43. package/dist/cli-bundle/chunks/{register-list-query-P3NOKQUA.js → register-list-query-5Y5JKWU5.js} +2 -2
  44. package/dist/cli-bundle/chunks/{register-mutation-A6I5K5N6.js → register-mutation-WC7OSQID.js} +2 -2
  45. package/dist/cli-bundle/chunks/{register-operations-SPKB3TNM.js → register-operations-PO63DBZH.js} +2 -2
  46. package/dist/cli-bundle/chunks/register-setup-RRFOS7IT.js +2 -0
  47. package/dist/cli-bundle/chunks/{stage-L3T725DS.js → stage-E3MMV4TV.js} +2 -2
  48. package/dist/cli-bundle/focused-chunks/chunk-5PMJOJCZ.js +44 -0
  49. package/dist/cli-bundle/focused-chunks/{chunk-TFYTTDAK.js → chunk-7KK66ISG.js} +2 -2
  50. package/dist/cli-bundle/focused-chunks/{chunk-Y5GOUUYJ.js → chunk-AHWJPZSJ.js} +2 -2
  51. package/dist/cli-bundle/focused-chunks/{chunk-C7UX2ZI3.js → chunk-C6P6HPCX.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-Q4OIRSKL.js → chunk-CPMSL4HS.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/chunk-CZM75DE3.js +2 -0
  54. package/dist/cli-bundle/focused-chunks/{chunk-CO2DNPH7.js → chunk-D2TBEBNW.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/chunk-E56OXRYH.js +2 -0
  56. package/dist/cli-bundle/focused-chunks/{chunk-FXFDVM5O.js → chunk-F62XGAAY.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/chunk-G4QP365K.js +2 -0
  58. package/dist/cli-bundle/focused-chunks/{chunk-J7M52SCZ.js → chunk-G5PJCR7R.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/chunk-GS3JC5UU.js +23 -0
  60. package/dist/cli-bundle/focused-chunks/{chunk-W3CSX6GI.js → chunk-LW64TINU.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/{chunk-MEJKELWC.js → chunk-M6V7UMWL.js} +3 -3
  62. package/dist/cli-bundle/focused-chunks/{chunk-CXTDEQ3N.js → chunk-MC7IE7D7.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/chunk-MG7C3JUY.js +2 -0
  64. package/dist/cli-bundle/focused-chunks/{chunk-QEVJ3Y67.js → chunk-MK4HV4JO.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{chunk-A2246ZM7.js → chunk-NQ7GYFOX.js} +54 -54
  66. package/dist/cli-bundle/focused-chunks/chunk-O7EI33NP.js +91 -0
  67. package/dist/cli-bundle/focused-chunks/{chunk-FFO7RBLN.js → chunk-RFTJZ5VB.js} +2 -2
  68. package/dist/cli-bundle/focused-chunks/{chunk-PNPYQDHU.js → chunk-SNOXXRSJ.js} +2 -2
  69. package/dist/cli-bundle/focused-chunks/{chunk-JQS7TYQ6.js → chunk-UPJUTP2V.js} +2 -2
  70. package/dist/cli-bundle/focused-chunks/{chunk-SDLIUZEL.js → chunk-VWWTIX5L.js} +2 -2
  71. package/dist/cli-bundle/focused-chunks/{chunk-J6FDCAMH.js → chunk-XHOBYCVE.js} +2 -2
  72. package/dist/cli-bundle/focused-chunks/{chunk-J3YOATXR.js → chunk-YMGB2O4E.js} +25 -24
  73. package/dist/cli-bundle/focused-chunks/{item-revision-L6GVT42D.js → item-revision-CTDO4H3I.js} +2 -2
  74. package/dist/cli-bundle/focused-chunks/{item-transaction-GYGP264N.js → item-transaction-AEAYVVHA.js} +2 -2
  75. package/dist/cli-bundle/focused-chunks/{mutation-admission-UWTH56OD.js → mutation-admission-4WM7TNHZ.js} +2 -2
  76. package/dist/cli-bundle/focused-chunks/{stage-WRSNJ7VI.js → stage-WV7QXR4C.js} +2 -2
  77. package/dist/cli-bundle/main.js +2 -2
  78. package/dist/cli-bundle/sdk-authoring.js +1 -1
  79. package/dist/cli-bundle/sdk-contracts.js +1 -1
  80. package/dist/cli-bundle/sdk-core.js +1 -1
  81. package/dist/cli-bundle/sdk-governance.js +1 -1
  82. package/dist/cli-bundle/sdk-graph.js +1 -1
  83. package/dist/cli-bundle/sdk-merge.js +57 -57
  84. package/dist/cli-bundle/sdk-query.js +1 -1
  85. package/dist/cli-bundle/sdk-runtime.js +1 -1
  86. package/dist/cli-bundle/sdk-testing.js +1 -1
  87. package/dist/cli-bundle/sdk.js +9 -9
  88. package/dist/core/config/positional-value.d.ts +6 -0
  89. package/dist/core/config/positional-value.js +1 -1
  90. package/dist/core/item/literal-mutation-input.d.ts +17 -0
  91. package/dist/core/item/literal-mutation-input.js +1 -1
  92. package/dist/core/item/parent-reference-policy.d.ts +8 -4
  93. package/dist/core/item/parent-reference-policy.js +1 -1
  94. package/dist/core/item/sprint-release-format.d.ts +2 -1
  95. package/dist/core/item/sprint-release-format.js +1 -1
  96. package/dist/core/output/mutation-projection.js +1 -1
  97. package/dist/core/store/item-mutation-precondition.d.ts +3 -1
  98. package/dist/core/store/item-mutation-precondition.js +1 -1
  99. package/dist/core/store/item-store.js +1 -1
  100. package/dist/core/store/settings.d.ts +14 -0
  101. package/dist/core/store/settings.js +5 -4
  102. package/dist/core/telemetry/policy.d.ts +27 -1
  103. package/dist/core/telemetry/policy.js +1 -1
  104. package/dist/core/telemetry/runtime.d.ts +18 -7
  105. package/dist/core/telemetry/runtime.js +4 -4
  106. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +8 -5
  107. package/dist/sdk/cli-contracts.d.ts +1 -1
  108. package/dist/sdk/cli-contracts.js +1 -1
  109. package/dist/sdk/config.d.ts +2 -2
  110. package/dist/sdk/config.js +1 -1
  111. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  112. package/dist/sdk/governance/health.d.ts +2 -2
  113. package/dist/sdk/governance/health.js +2 -2
  114. package/dist/sdk/index.d.ts +4 -2
  115. package/dist/sdk/index.js +1 -1
  116. package/dist/sdk/init.d.ts +4 -4
  117. package/dist/sdk/init.js +8 -8
  118. package/dist/sdk/lifecycle/claim.d.ts +4 -0
  119. package/dist/sdk/lifecycle/claim.js +1 -1
  120. package/dist/sdk/lifecycle/close.d.ts +10 -0
  121. package/dist/sdk/lifecycle/close.js +1 -1
  122. package/dist/sdk/lifecycle/create.d.ts +7 -5
  123. package/dist/sdk/lifecycle/create.js +1 -1
  124. package/dist/sdk/lifecycle/shared-unset-fields.d.ts +628 -4
  125. package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
  126. package/dist/sdk/lifecycle/update.d.ts +5 -4
  127. package/dist/sdk/lifecycle/update.js +2 -2
  128. package/dist/sdk/public-surface.json +1 -1
  129. package/dist/sdk/runtime/actions.js +1 -1
  130. package/dist/sdk/runtime/mutation-value-validation.js +1 -1
  131. package/dist/sdk/runtime-input.js +1 -1
  132. package/dist/sdk/runtime-primitives.d.ts +1 -0
  133. package/dist/sdk/runtime-primitives.js +1 -1
  134. package/dist/sdk/telemetry.d.ts +1 -1
  135. package/dist/sdk/telemetry.js +2 -2
  136. package/docs/AGENT_GUIDE.md +48 -48
  137. package/docs/AGENT_OUTPUT_ENCODINGS.md +20 -20
  138. package/docs/ASSURANCE.md +10 -10
  139. package/docs/BOUNDED_CONTEXT_READS.md +3 -3
  140. package/docs/CLAUDE_CODE_PLUGIN.md +1 -1
  141. package/docs/CLI_GRAMMAR.md +2 -2
  142. package/docs/COMMANDS.md +56 -35
  143. package/docs/COMMAND_NAMESPACES.md +1 -1
  144. package/docs/CONFIGURATION.md +82 -71
  145. package/docs/CONTEXT_ALGORITHM_PORTFOLIO.md +2 -2
  146. package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +5 -5
  147. package/docs/CORPUS_SHAPES.md +1 -1
  148. package/docs/DEPENDENCY_KIND_CONTRACT.md +6 -6
  149. package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +5 -5
  150. package/docs/ECOSYSTEM_PLANNING_REVIEW.md +3 -3
  151. package/docs/EXTENSION_AUTHOR_CONTRACTS.md +4 -4
  152. package/docs/HISTORY_ATTESTATION.md +1 -1
  153. package/docs/HISTORY_MAINTENANCE.md +1 -1
  154. package/docs/LIFECYCLE_COMMANDS.md +1 -1
  155. package/docs/MCP_2026_07_28.md +16 -16
  156. package/docs/MCP_2026_07_28_CONFORMANCE.md +19 -19
  157. package/docs/MCP_REMOTE_TRANSPORT_SECURITY.md +22 -22
  158. package/docs/MCP_SKILLS_AND_APPS.md +1 -1
  159. package/docs/MERGE_SAFETY.md +6 -6
  160. package/docs/MUTATION_INTEGRITY.md +5 -5
  161. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +14 -14
  162. package/docs/PACKED_FIRST_RUN.md +1 -1
  163. package/docs/QUICKSTART.md +10 -10
  164. package/docs/README.md +21 -21
  165. package/docs/READ_OUTPUT_CONTRACTS.md +9 -9
  166. package/docs/RECURRENCE_RECOVERY_CONTRACTS.md +1 -1
  167. package/docs/RELEASING.md +19 -10
  168. package/docs/SCRIPTING.md +10 -10
  169. package/docs/SDK.md +74 -38
  170. package/docs/SDK_ARTIFACT_OUTPUT.md +1 -1
  171. package/docs/SDK_PRIMITIVE_INVENTORY.md +2 -2
  172. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +7 -7
  173. package/docs/TESTING.md +1 -1
  174. package/docs/WORKFLOW_POLICIES.md +2 -2
  175. package/docs/WORKSPACE_POSITION_AND_LIFECYCLE.md +8 -8
  176. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
  177. package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -1
  178. package/docs/generated/FLAG_LEXICON_BUDGETS.md +1 -1
  179. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +1 -1
  180. package/docs/performance/cli-transport-overhead.md +7 -7
  181. package/marketplace.json +1 -1
  182. package/package.json +1 -1
  183. package/packages/pm-beads/package.json +1 -1
  184. package/packages/pm-calendar/package.json +1 -1
  185. package/packages/pm-command-kit/README.md +5 -5
  186. package/packages/pm-command-kit/package.json +1 -1
  187. package/packages/pm-digital-twin/GAP_REPORT.md +16 -16
  188. package/packages/pm-digital-twin/package.json +1 -1
  189. package/packages/pm-governance-audit/package.json +1 -1
  190. package/packages/pm-guide-shell/package.json +1 -1
  191. package/packages/pm-kanban/README.md +1 -1
  192. package/packages/pm-kanban/package.json +1 -1
  193. package/packages/pm-lifecycle-hooks/package.json +1 -1
  194. package/packages/pm-linked-test-adapters/package.json +1 -1
  195. package/packages/pm-search-advanced/package.json +1 -1
  196. package/packages/pm-templates/package.json +1 -1
  197. package/packages/pm-todos/package.json +1 -1
  198. package/packages/pm-vcs/GAP_REPORT.md +1 -1
  199. package/packages/pm-vcs/package.json +1 -1
  200. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  201. package/plugins/pm-claude/README.md +6 -6
  202. package/plugins/pm-claude/package.json +1 -1
  203. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  204. package/plugins/pm-codex/package.json +1 -1
  205. package/plugins/pm-codex/plugin.json +1 -1
  206. package/runtime-dependencies.json +1 -1
  207. package/dist/cli-bundle/chunks/chunk-5Z6LWFDL.js +0 -31
  208. package/dist/cli-bundle/chunks/chunk-DSCFJTHB.js +0 -122
  209. package/dist/cli-bundle/chunks/chunk-QQHMNUZT.js +0 -2
  210. package/dist/cli-bundle/chunks/chunk-TX2W6G37.js +0 -3
  211. package/dist/cli-bundle/chunks/item-transaction-N5F4LXYV.js +0 -2
  212. package/dist/cli-bundle/chunks/register-setup-ZZRHJ4IS.js +0 -2
  213. package/dist/cli-bundle/focused-chunks/chunk-5NGNO54M.js +0 -44
  214. package/dist/cli-bundle/focused-chunks/chunk-B6U44WPW.js +0 -2
  215. package/dist/cli-bundle/focused-chunks/chunk-BAW3DGQO.js +0 -91
  216. package/dist/cli-bundle/focused-chunks/chunk-BHNY3KPJ.js +0 -2
  217. package/dist/cli-bundle/focused-chunks/chunk-CBG67HUP.js +0 -23
  218. package/dist/cli-bundle/focused-chunks/chunk-FEPE2CE4.js +0 -2
  219. package/dist/cli-bundle/focused-chunks/chunk-PMKR4MJI.js +0 -2
@@ -1,4 +1,4 @@
1
- import{a as Ai,b as Ri,c as Di,d as T,e as Ni,f as L,g as Li,h as Fi,i as qi,j as zi,k as Ui,l as Hi,m as Gi,n as Vi,o as F,p as Bi,q,u as z,v as Ji,w as Ki,x as U,y as Yi,z as Wi}from"./focused-chunks/chunk-FEPE2CE4.js";import{a as Xi}from"./focused-chunks/chunk-SVOOGGAK.js";import{a as Ii}from"./focused-chunks/chunk-Q4OIRSKL.js";import{$ as Mi,A as bo,N as mi,O as gi,P as yi,Q as bi,R as hi,S as wi,T as xi,U as Ti,V as Ci,W as Pi,X as vi,Z as ki,_ as Ei,a as Ke,aa as Oi,b as Ye,ba as $i,c as We,ca as Si,d as Xe,da as ji,e as Qe,f as Ze,g as et,h as tt,i as rt,j as eo,k as to,l as ro,m as oo,n as io,o as no,p as so,q as ao,r as co,s as lo,t as po,u as uo,v as _o,w as fo,x as mo,y as go,z as yo}from"./focused-chunks/chunk-W3CSX6GI.js";import{$ as tr,$a as A,A as Ot,Aa as Mr,B as $t,Ba as Or,C as St,Ca as $r,D as jt,Da as Sr,E as It,Ea as jr,F as At,Fa as Ir,Ga as Ar,H as Rt,Ha as Rr,I as Dt,Ia as Dr,J as Nt,Ja as Nr,K as Lt,Ka as Lr,L as Ft,La as Fr,M as qt,Ma as qr,N as zt,Na as zr,O as Ut,Oa as Ur,P as Ht,Pa as Hr,Q as Gt,Qa as Gr,R as Vt,Ra as Vr,S as Bt,Sa as Br,T as Jt,Ta as Jr,U as Kt,Ua as Kr,V as Yt,Va as Yr,W as Wt,Wa as Wr,X as Xt,Xa as Xr,Y as Qt,Z as Zt,Za as Qr,_ as er,aa as rr,ab as R,b as it,ba as or,bb as Zr,c as nt,ca as ir,d as st,da as nr,e as at,ea as sr,f as dt,fa as ar,g as ct,ga as dr,h as lt,ha as cr,i as pt,ia as lr,j as ut,ja as pr,k as _t,ka as ur,l as ft,la as _r,m as mt,ma as fr,n as gt,na as mr,o as yt,oa as gr,p as bt,pa as yr,q as ht,qa as br,r as wt,ra as hr,s as xt,sa as wr,t as Tt,ta as xr,u as Ct,ua as Tr,v as Pt,va as Cr,w as vt,wa as Pr,x as kt,xa as vr,y as Et,ya as kr,z as Mt,za as Er}from"./focused-chunks/chunk-QEVJ3Y67.js";import{a as Qi,b as Zi,c as en,d as tn,e as rn,f as on,g as nn,h as sn}from"./focused-chunks/chunk-4PW5XWVI.js";import{a as ot}from"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{$a as f,$b as S,$c as Mo,Ab as Be,Ad as Xo,Ae as ui,Bd as Qo,Be as _i,Cb as Je,Cd as Zo,Dd as ei,Ed as ti,Fd as ri,He as fi,Mc as D,Nc as N,Ob as Q,Sc as ho,Tc as wo,Uc as xo,Va as ye,Vc as To,Wa as be,Wc as Co,Xa as he,Xc as Po,Ya as we,Yc as vo,Za as M,Zc as ko,_a as xe,_b as $,_c as Eo,ab as O,ad as Oo,bb as Te,bd as $o,cb as Ce,cd as So,db as Pe,dc as j,dd as jo,eb as ve,ed as Io,fb as ke,fc as I,fd as Ao,gb as Ee,gd as Ro,hb as Me,hd as Do,ib as Oe,id as No,jb as $e,jd as Lo,kb as Se,lb as je,nb as Ie,ob as Ae,od as Fo,pb as Re,pd as qo,qb as De,qd as zo,qe as oi,rb as Ne,rd as Uo,re as x,sb as Le,sd as Ho,se as ii,tb as Fe,td as Go,te as ni,ub as qe,ud as Vo,ue as si,vb as ze,vd as Bo,ve as ai,wb as Ue,wd as Jo,we as di,xb as He,xd as Ko,xe as ci,yb as Ge,yd as Yo,ye as li,zb as Ve,zd as Wo,ze as pi}from"./focused-chunks/chunk-MEJKELWC.js";import{z as w}from"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var Z="2026-07-28",H=["2025-11-25","2025-06-18"],G=[Z];(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var ee=new Set(["--help","-h","--version","-V"]);function te(e,t){let o=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&o.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),o.push("",`MCP protocol: ${G.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${H.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${t}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${t} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),o.join(`
1
+ import{a as Ai,b as Ri,c as Di,d as T,e as Ni,f as L,g as Li,h as Fi,i as qi,j as zi,k as Ui,l as Hi,m as Gi,n as Vi,o as F,p as Bi,q,u as z,v as Ji,w as Ki,x as U,y as Yi,z as Wi}from"./focused-chunks/chunk-CZM75DE3.js";import{a as Xi}from"./focused-chunks/chunk-SVOOGGAK.js";import{a as Ii}from"./focused-chunks/chunk-CPMSL4HS.js";import{$ as Mi,A as bo,N as mi,O as gi,P as yi,Q as bi,R as hi,S as wi,T as xi,U as Ti,V as Ci,W as Pi,X as vi,Z as ki,_ as Ei,a as Ke,aa as Oi,b as Ye,ba as $i,c as We,ca as Si,d as Xe,da as ji,e as Qe,f as Ze,g as et,h as tt,i as rt,j as eo,k as to,l as ro,m as oo,n as io,o as no,p as so,q as ao,r as co,s as lo,t as po,u as uo,v as _o,w as fo,x as mo,y as go,z as yo}from"./focused-chunks/chunk-LW64TINU.js";import{$ as tr,$a as A,A as Ot,Aa as Mr,B as $t,Ba as Or,C as St,Ca as $r,D as jt,Da as Sr,E as It,Ea as jr,F as At,Fa as Ir,Ga as Ar,H as Rt,Ha as Rr,I as Dt,Ia as Dr,J as Nt,Ja as Nr,K as Lt,Ka as Lr,L as Ft,La as Fr,M as qt,Ma as qr,N as zt,Na as zr,O as Ut,Oa as Ur,P as Ht,Pa as Hr,Q as Gt,Qa as Gr,R as Vt,Ra as Vr,S as Bt,Sa as Br,T as Jt,Ta as Jr,U as Kt,Ua as Kr,V as Yt,Va as Yr,W as Wt,Wa as Wr,X as Xt,Xa as Xr,Y as Qt,Z as Zt,Za as Qr,_ as er,aa as rr,ab as R,b as it,ba as or,bb as Zr,c as nt,ca as ir,d as st,da as nr,e as at,ea as sr,f as dt,fa as ar,g as ct,ga as dr,h as lt,ha as cr,i as pt,ia as lr,j as ut,ja as pr,k as _t,ka as ur,l as ft,la as _r,m as mt,ma as fr,n as gt,na as mr,o as yt,oa as gr,p as bt,pa as yr,q as ht,qa as br,r as wt,ra as hr,s as xt,sa as wr,t as Tt,ta as xr,u as Ct,ua as Tr,v as Pt,va as Cr,w as vt,wa as Pr,x as kt,xa as vr,y as Et,ya as kr,z as Mt,za as Er}from"./focused-chunks/chunk-MK4HV4JO.js";import{a as Qi,b as Zi,c as en,d as tn,e as rn,f as on,g as nn,h as sn}from"./focused-chunks/chunk-4PW5XWVI.js";import{a as ot}from"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{$a as f,$b as $,$c as Eo,Ab as Be,Ad as Wo,Ae as pi,Bd as Xo,Be as ui,Cb as Je,Cd as Qo,Ce as _i,Dd as Zo,Ed as ei,Fd as ti,Gd as ri,Ie as fi,Nc as D,Ob as Q,Oc as N,Tc as ho,Uc as wo,Va as ye,Vc as xo,Wa as be,Wc as To,Xa as he,Xc as Co,Ya as we,Yc as Po,Za as M,Zc as vo,_a as xe,_c as ko,ab as O,ac as S,ad as Mo,bb as Te,bd as Oo,cb as Ce,cd as $o,db as Pe,dd as So,eb as ve,ec as j,ed as jo,fb as ke,fd as Io,gb as Ee,gc as I,gd as Ao,hb as Me,hd as Ro,ib as Oe,id as Do,jb as $e,jd as No,kb as Se,kd as Lo,lb as je,nb as Ie,ob as Ae,pb as Re,pd as Fo,qb as De,qd as qo,rb as Ne,rd as zo,re as oi,sb as Le,sd as Uo,se as x,tb as Fe,td as Ho,te as ii,ub as qe,ud as Go,ue as ni,vb as ze,vd as Vo,ve as si,wb as Ue,wd as Bo,we as ai,xb as He,xd as Jo,xe as di,yb as Ge,yd as Ko,ye as ci,zb as Ve,zd as Yo,ze as li}from"./focused-chunks/chunk-M6V7UMWL.js";import{z as w}from"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var Z="2026-07-28",H=["2025-11-25","2025-06-18"],G=[Z];(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var ee=new Set(["--help","-h","--version","-V"]);function te(e,t){let o=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&o.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),o.push("",`MCP protocol: ${G.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${H.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${t}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${t} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),o.join(`
2
2
  `)}function cn(e,t,o){if(e.length===0)return{kind:"serve"};let i=e.find(r=>!ee.has(r));if(i!==void 0){let r=t==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(i)}. Run ${r} --help.
3
3
  `}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?te(t,o):`${o}
4
4
  `,stderr:""}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="29c6ca01-4b1b-56fb-9bcc-5e1c26f17aff")}catch{}})();var m,re=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function oe(e,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let o=re[f(e)];if(o===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return o}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(f(e))?"linked-file-path":["comments","notes","learnings"].includes(f(e))?"entry-file-input":"plan-definition-file"}function g(){if(m!==void 0)return m;let e=q.filter(({command:r})=>A(r)).flatMap(({command:r,family:n})=>F(r,R(r)).map(s=>({command:r,family:n,concept:oe(r,s.flag),flag:s.flag,aliases:Object.freeze([...s.aliases??[]]),value_kind:s.repeatable?"list":s.flag==="--limit"?"number":s.value_type}))),t=new Set(e.flatMap(r=>r.aliases.map(n=>`${r.command}:${n}`))),o=e.filter(r=>!t.has(`${r.command}:${r.flag}`)),i=new Map;for(let r of o){let n=i.get(r.concept)??new Set;n.add(r.value_kind),i.set(r.concept,n)}return m=Object.freeze(o.map(r=>Object.freeze({...r,concept:i.get(r.concept)?.size===1?r.concept:`${r.concept}@${r.command}`}))),m}function mn(){return Object.freeze(g().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var V=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:102,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:36,events:34,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:29,schema:43,profile:22,activity:36,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:111,test:56,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:25,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),ie=1,B=Object.freeze(Object.fromEntries(Object.entries({...V,...Object.fromEntries(M.flatMap(({alias:e,canonical:t})=>{let o=V[e];return o===void 0?[]:[[t,o]]}))}).map(([e,t])=>[e,t+ie])));function J(){let e=new Map(Object.keys(B).map(t=>[t,0]));for(let{command:t}of g())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(B).map(([t,o])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:o})))}function ne(e,t,o){for(let i of e)for(let r of i.aliases){let n=t.get(`${i.command}:${r}`);n===void 0||n.flag===i.flag||o.push({code:"alias_collision",command:i.command,detail:`${r} aliases ${i.flag} but is canonical for ${n.flag}.`})}}function se(e,t,o){let i=new Set(t.map(({command:r})=>r));for(let r of e.keys())i.has(r)||o.push({code:"missing_budget",command:r,detail:`${r} has canonical flags but no persisted budget.`});for(let r of t){let n=e.get(r.command)??0;n===0&&o.push({code:"stale_budget",command:r.command,detail:`${r.command} has a persisted budget but no canonical flags.`}),!(n<=r.maximum)&&o.push({code:"budget_exceeded",command:r.command,detail:`${n} canonical flags exceed the ratcheted maximum ${r.maximum}.`})}}function ae(e,t,o){let i=new Map(e.map(r=>[`${r.command}:${r.flag}`,r]));for(let r of t){let n=`${r.command}:${r.canonical_flag}`,s=i.get(n);if(!s){o.push({code:"removed_canonical_spelling",command:r.command,detail:`${r.canonical_flag} disappeared from the executable spelling inventory.`});continue}let d=new Set([s.flag,...s.aliases]);for(let a of r.accepted_spellings)d.has(a)||o.push({code:"removed_compatibility_spelling",command:r.command,detail:`${a} no longer resolves to ${r.canonical_flag}.`})}}function gn(e=g(),t=J(),o=[]){let i=[],r=new Map,n=new Map,s=new Map,d=new Map;for(let a of e){let c=`${a.command}:${a.flag}`;r.has(c)?i.push({code:"duplicate_canonical_flag",command:a.command,detail:`${a.flag} has more than one canonical row.`}):r.set(c,a),d.set(a.command,(d.get(a.command)??0)+1);let l=n.get(a.concept);l!==void 0&&l!==a.value_kind?i.push({code:"inconsistent_concept_kind",command:a.command,detail:`${a.concept} uses both ${l} and ${a.value_kind}.`}):n.set(a.concept,a.value_kind);let p=s.get(a.concept);p!==void 0&&p!==a.flag?i.push({code:"semantic_spelling_collision",command:a.command,detail:`${a.concept} is canonicalized by both ${p} and ${a.flag}.`}):s.set(a.concept,a.flag)}return ne(e,r,i),se(d,t,i),ae(e,o,i),i.sort((a,c)=>a.command.localeCompare(c.command)||a.code.localeCompare(c.code)||a.detail.localeCompare(c.detail)),{ok:i.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:a})=>a)).size,baseline_entry_count:o.length,findings:i}}function yn(){let e=g(),t=J(),o=new Map(t.map(({command:i})=>[i,"unknown"]));for(let{command:i,family:r}of e)o.set(i,r);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:i,current:r,maximum:n})=>{let s=o.get(i);return`| \`${i}\` | ${s} | ${r} | ${n} |`}),""].join(`
@@ -1,2 +1,2 @@
1
- import{A as Ye,B as Xe,C as Ke,D as je,E as qe,F as Je,G as Qe,H as Ze,I as $e,J as et,K as tt,L as ot,N as rt,b as Se,c as Te,d as ye,e as Re,f as Oe,g as be,h as De,i as Ce,j as Ne,k as Pe,l as ve,m as Ue,n as Le,o as he,p as Me,q as we,r as xe,s as Ve,t as Fe,u as ze,v as ke,w as Be,x as He,y as Ge,z as We}from"./focused-chunks/chunk-5NGNO54M.js";import"./focused-chunks/chunk-J6FDCAMH.js";import"./focused-chunks/chunk-FEPE2CE4.js";import{ka as pe,la as ce}from"./focused-chunks/chunk-A2246ZM7.js";import"./focused-chunks/chunk-PNPYQDHU.js";import"./focused-chunks/chunk-Y5GOUUYJ.js";import"./focused-chunks/chunk-IDAYTYNN.js";import"./focused-chunks/chunk-PMKR4MJI.js";import"./focused-chunks/chunk-FXFDVM5O.js";import"./focused-chunks/chunk-SVOOGGAK.js";import{a as L}from"./focused-chunks/chunk-Q4OIRSKL.js";import"./focused-chunks/chunk-W3CSX6GI.js";import"./focused-chunks/chunk-CXTDEQ3N.js";import"./focused-chunks/chunk-C7UX2ZI3.js";import{k as Ee,l as fe,m as Ie,n as _e,o as Ae,p as ge}from"./focused-chunks/chunk-JQS7TYQ6.js";import"./focused-chunks/chunk-J7M52SCZ.js";import"./focused-chunks/chunk-B6U44WPW.js";import"./focused-chunks/chunk-CBG67HUP.js";import"./focused-chunks/chunk-CO2DNPH7.js";import"./focused-chunks/chunk-QEVJ3Y67.js";import"./focused-chunks/chunk-BHNY3KPJ.js";import"./focused-chunks/chunk-TFYTTDAK.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{$ as le,Y as ae,Z as de,_ as ue,aa as me,f as se}from"./focused-chunks/chunk-BAW3DGQO.js";import{$ as te,C as z,D as k,E as B,F as H,G,H as W,R as Y,S as X,T as K,U as j,V as q,W as J,X as Q,Y as Z,Z as $,_ as ee,aa as oe,ba as re,ca as ne,da as ie,o as h,p as M,r as w,s as x,t as V,v as F}from"./focused-chunks/chunk-J3YOATXR.js";import"./focused-chunks/chunk-FFO7RBLN.js";import"./focused-chunks/chunk-SDLIUZEL.js";import"./focused-chunks/chunk-4PW5XWVI.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ad as S,Bd as T,Ce as b,De as D,Ed as y,Fd as R,Je as C,Le as N,Me as P,Ne as v,Oe as U,Qd as O,g as r,h as n,i,n as s,od as p,p as a,pd as c,q as d,qd as E,r as u,rd as f,sd as I,td as _,xd as A,zd as g}from"./focused-chunks/chunk-MEJKELWC.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-FOA7XKWP.js";import{A as m,z as l}from"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1b7735e8-a1a3-59bb-a89f-d014b70c34ec")}catch{}})();export{Y as AGENT_PROVENANCE_DIMENSIONS,h as BASELINE_ITEM_FORMAT_VERSION,K as BUILTIN_AGENT_PROVENANCE_ADAPTERS,X as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,r as BUILTIN_ITEM_TYPE_VALUES,u as CONFIDENCE_TEXT_VALUES,M as CURRENT_ITEM_FORMAT_VERSION,s as DEPENDENCY_KIND_VALUES,l as EXIT_CODE,d as ISSUE_SEVERITY_VALUES,n as ITEM_TYPE_VALUES,de as PM_CLI_EXPECTED_ERROR_NAME,E as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,p as PM_READ_OUTPUT_DIMENSIONS,c as PM_READ_OUTPUT_OPTION_FLAGS,f as PM_READ_OUTPUT_SURFACE_CONTRACTS,m as PmCliError,Pe as PmClient,a as RISK_VALUES,Ae as SEMANTIC_ATTRIBUTION_LIMITS,i as STATUS_VALUES,W as agentSessionEnvironment,xe as aggregate,ye as analyzeAgentProvenanceDescriptorCoverage,L as analyzeSdkCliParameterCompleteness,Ye as append,g as applyReadOutputDimensions,P as applyReadOutputSessionReferences,D as assertWellFormedOutputText,v as attachReadOutputSessionReceipt,B as boundAgentEpisodeIdentity,k as canonicalDocument,Je as claim,Qe as claimNext,V as classifyItemFormatVersion,qe as close,Ve as comments,ve as context,$e as copy,Xe as create,le as createPmCliExpectedError,R as decodeReadOutputContinuationCursor,et as deleteItem,Ge as deps,ee as detectAgentIdentity,ne as detectHarnessIdentity,te as diagnoseAgentIdentity,He as docs,w as effectiveItemFormatVersion,Ne as emptyImportedDocument,y as encodeReadOutputContinuationCursor,be as evaluateSemanticAttributionCoverage,ce as explainSourceTraceability,ke as files,Be as filesDiscover,ot as focus,Me as get,We as graph,De as groupHistoryByEpisode,Se as isAlreadyClaimedError,ue as isItemAlreadyExistsError,me as isPmCliExpectedError,ae as isPmTokenBudgetRecovery,S as isReadOutputBudgetExceeded,C as isReadOutputSessionReference,ze as learnings,Ue as list,q as listAgentProvenanceAdapters,Le as listAllComplete,we as next,Q as normalizeAgentProvenanceAdapterValue,x as normalizeItemFormatVersion,se as normalizeItemId,F as normalizeStatusInput,Fe as notes,O as nowIso,N as parseReadOutputSession,pe as parseSourceLineRange,oe as readAuthorEnvironment,U as readOutputSessionRemainingTokens,fe as recordClaimSemanticAttribution,_e as recordFocusSemanticAttribution,Ie as recordReleaseSemanticAttribution,J as registerAgentProvenanceAdapters,j as registerHarnessSignalDescriptors,Ze as release,je as reopen,H as resolveAgentSessionContextFromSignals,ie as resolveAuthorIdentity,Te as resolveHistoryEpisodeGroupIdentity,A as resolveReadOutputDimensions,T as resolveReadOutputEncoding,I as resolveReadOutputSurface,Ee as resolveSemanticLineageIds,tt as restore,rt as runAction,G as runWithAgentSessionContext,Z as runWithHarnessDetectionSignals,$ as runWithWorkspaceHarnessSignalDescriptors,he as search,ge as semanticAttributionAffinity,z as serializeItemDocument,Re as summarizeAgentModelProvenance,Oe as summarizeAgentProvenance,b as toWellFormedText,Ke as update,Ce as updateLinkedTest,_ as validateReadOutputOptions,re as writeAuthorEnvironment};
1
+ import{A as Ye,B as Xe,C as Ke,D as je,E as qe,F as Je,G as Qe,H as Ze,I as $e,J as et,K as tt,L as ot,N as rt,b as Se,c as Te,d as ye,e as Re,f as Oe,g as be,h as De,i as Ce,j as Ne,k as Pe,l as ve,m as Ue,n as Le,o as he,p as Me,q as we,r as xe,s as Ve,t as Fe,u as ze,v as ke,w as Be,x as He,y as Ge,z as We}from"./focused-chunks/chunk-5PMJOJCZ.js";import"./focused-chunks/chunk-XHOBYCVE.js";import"./focused-chunks/chunk-CZM75DE3.js";import{ka as pe,la as ce}from"./focused-chunks/chunk-NQ7GYFOX.js";import"./focused-chunks/chunk-SNOXXRSJ.js";import"./focused-chunks/chunk-AHWJPZSJ.js";import"./focused-chunks/chunk-IDAYTYNN.js";import"./focused-chunks/chunk-MG7C3JUY.js";import"./focused-chunks/chunk-F62XGAAY.js";import"./focused-chunks/chunk-SVOOGGAK.js";import{a as L}from"./focused-chunks/chunk-CPMSL4HS.js";import"./focused-chunks/chunk-LW64TINU.js";import"./focused-chunks/chunk-MC7IE7D7.js";import"./focused-chunks/chunk-C6P6HPCX.js";import{k as Ee,l as fe,m as Ie,n as _e,o as Ae,p as ge}from"./focused-chunks/chunk-UPJUTP2V.js";import"./focused-chunks/chunk-G5PJCR7R.js";import"./focused-chunks/chunk-E56OXRYH.js";import"./focused-chunks/chunk-GS3JC5UU.js";import"./focused-chunks/chunk-D2TBEBNW.js";import"./focused-chunks/chunk-MK4HV4JO.js";import"./focused-chunks/chunk-G4QP365K.js";import"./focused-chunks/chunk-7KK66ISG.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{$ as ue,Z as ae,_ as de,aa as le,ba as me,f as se}from"./focused-chunks/chunk-O7EI33NP.js";import{$ as te,C as z,D as k,E as B,F as H,G,H as W,R as Y,S as X,T as K,U as j,V as q,W as J,X as Q,Y as Z,Z as $,_ as ee,aa as oe,ba as re,ca as ne,da as ie,o as h,p as M,r as w,s as x,t as V,v as F}from"./focused-chunks/chunk-YMGB2O4E.js";import"./focused-chunks/chunk-RFTJZ5VB.js";import"./focused-chunks/chunk-VWWTIX5L.js";import"./focused-chunks/chunk-4PW5XWVI.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ad as g,Bd as S,Cd as T,De as b,Ee as D,Fd as y,Gd as R,Ke as C,Me as N,Ne as P,Oe as v,Pe as U,Rd as O,g as r,h as n,i,n as s,p as a,pd as p,q as d,qd as c,r as u,rd as E,sd as f,td as I,ud as _,yd as A}from"./focused-chunks/chunk-M6V7UMWL.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-FOA7XKWP.js";import{A as m,z as l}from"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1b7735e8-a1a3-59bb-a89f-d014b70c34ec")}catch{}})();export{Y as AGENT_PROVENANCE_DIMENSIONS,h as BASELINE_ITEM_FORMAT_VERSION,K as BUILTIN_AGENT_PROVENANCE_ADAPTERS,X as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,r as BUILTIN_ITEM_TYPE_VALUES,u as CONFIDENCE_TEXT_VALUES,M as CURRENT_ITEM_FORMAT_VERSION,s as DEPENDENCY_KIND_VALUES,l as EXIT_CODE,d as ISSUE_SEVERITY_VALUES,n as ITEM_TYPE_VALUES,de as PM_CLI_EXPECTED_ERROR_NAME,E as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,p as PM_READ_OUTPUT_DIMENSIONS,c as PM_READ_OUTPUT_OPTION_FLAGS,f as PM_READ_OUTPUT_SURFACE_CONTRACTS,m as PmCliError,Pe as PmClient,a as RISK_VALUES,Ae as SEMANTIC_ATTRIBUTION_LIMITS,i as STATUS_VALUES,W as agentSessionEnvironment,xe as aggregate,ye as analyzeAgentProvenanceDescriptorCoverage,L as analyzeSdkCliParameterCompleteness,Ye as append,g as applyReadOutputDimensions,P as applyReadOutputSessionReferences,D as assertWellFormedOutputText,v as attachReadOutputSessionReceipt,B as boundAgentEpisodeIdentity,k as canonicalDocument,Je as claim,Qe as claimNext,V as classifyItemFormatVersion,qe as close,Ve as comments,ve as context,$e as copy,Xe as create,le as createPmCliExpectedError,R as decodeReadOutputContinuationCursor,et as deleteItem,Ge as deps,ee as detectAgentIdentity,ne as detectHarnessIdentity,te as diagnoseAgentIdentity,He as docs,w as effectiveItemFormatVersion,Ne as emptyImportedDocument,y as encodeReadOutputContinuationCursor,be as evaluateSemanticAttributionCoverage,ce as explainSourceTraceability,ke as files,Be as filesDiscover,ot as focus,Me as get,We as graph,De as groupHistoryByEpisode,Se as isAlreadyClaimedError,ue as isItemAlreadyExistsError,me as isPmCliExpectedError,ae as isPmTokenBudgetRecovery,S as isReadOutputBudgetExceeded,C as isReadOutputSessionReference,ze as learnings,Ue as list,q as listAgentProvenanceAdapters,Le as listAllComplete,we as next,Q as normalizeAgentProvenanceAdapterValue,x as normalizeItemFormatVersion,se as normalizeItemId,F as normalizeStatusInput,Fe as notes,O as nowIso,N as parseReadOutputSession,pe as parseSourceLineRange,oe as readAuthorEnvironment,U as readOutputSessionRemainingTokens,fe as recordClaimSemanticAttribution,_e as recordFocusSemanticAttribution,Ie as recordReleaseSemanticAttribution,J as registerAgentProvenanceAdapters,j as registerHarnessSignalDescriptors,Ze as release,je as reopen,H as resolveAgentSessionContextFromSignals,ie as resolveAuthorIdentity,Te as resolveHistoryEpisodeGroupIdentity,A as resolveReadOutputDimensions,T as resolveReadOutputEncoding,I as resolveReadOutputSurface,Ee as resolveSemanticLineageIds,tt as restore,rt as runAction,G as runWithAgentSessionContext,Z as runWithHarnessDetectionSignals,$ as runWithWorkspaceHarnessSignalDescriptors,he as search,ge as semanticAttributionAffinity,z as serializeItemDocument,Re as summarizeAgentModelProvenance,Oe as summarizeAgentProvenance,b as toWellFormedText,Ke as update,Ce as updateLinkedTest,_ as validateReadOutputOptions,re as writeAuthorEnvironment};
2
2
  //# sourceMappingURL=sdk-core.js.map
@@ -1,2 +1,2 @@
1
- import{$a as kt,Ab as At,Bb as Dt,Cb as Rt,D as Pe,Db as Ot,E as Fe,Eb as $t,F as Je,Fb as Nt,G as We,Gb as Bt,H as Me,Hb as Ct,Ib as zt,Jb as h,Kb as jt,Lb as qt,Mb as Ut,Nb as Pt,Ob as Ft,Pb as Jt,Qa as gt,Qb as Wt,Rb as v,Ua as yt,Va as wt,Wa as ht,Xa as vt,Ya as bt,Za as xt,_a as Et,a as ge,aa as Ze,ab as Tt,b as ye,ba as Ge,c as we,ca as He,d as he,da as Ve,e as ve,ea as Ye,f as be,fa as Ke,g as xe,ga as Le,h as Ee,ha as Xe,i as ke,ia as Qe,j as Te,k as Ie,l as Se,m as Ae,n as De,o as Re,p as Oe,pa as at,q as $e,qa as dt,r as Ne,ra as st,s as Be,sa as ft,t as Ce,ta as ut,u as ze,ua as ct,v as je,va as pt,w as qe,wa as lt,x as Ue,xa as mt,ya as _t,yb as It,zb as St}from"./focused-chunks/chunk-A2246ZM7.js";import"./focused-chunks/chunk-PNPYQDHU.js";import"./focused-chunks/chunk-Y5GOUUYJ.js";import"./focused-chunks/chunk-IDAYTYNN.js";import"./focused-chunks/chunk-PMKR4MJI.js";import"./focused-chunks/chunk-FXFDVM5O.js";import{a as K}from"./focused-chunks/chunk-SVOOGGAK.js";import"./focused-chunks/chunk-Q4OIRSKL.js";import{E as J,F as W,G as M,H as Z,I as G,J as H,K as V,L as Y}from"./focused-chunks/chunk-W3CSX6GI.js";import"./focused-chunks/chunk-C7UX2ZI3.js";import{A as et,B as tt,C as it,D as rt,E as nt,F as ot}from"./focused-chunks/chunk-J7M52SCZ.js";import"./focused-chunks/chunk-B6U44WPW.js";import{Ia as re,Ja as ne,Ka as oe,La as ae,Ma as de,Na as se,Oa as fe,Pa as ue,Qa as ce,Ra as pe,Sa as le,Ta as me,Ua as _e}from"./focused-chunks/chunk-CBG67HUP.js";import"./focused-chunks/chunk-CO2DNPH7.js";import"./focused-chunks/chunk-QEVJ3Y67.js";import"./focused-chunks/chunk-BHNY3KPJ.js";import"./focused-chunks/chunk-TFYTTDAK.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{o as ie}from"./focused-chunks/chunk-BAW3DGQO.js";import{a as L,b as X,c as Q,d as ee,e as te}from"./focused-chunks/chunk-J3YOATXR.js";import"./focused-chunks/chunk-FFO7RBLN.js";import"./focused-chunks/chunk-SDLIUZEL.js";import"./focused-chunks/chunk-4PW5XWVI.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ka as R,La as O,Ma as $,Na as N,Oa as B,Pa as C,Qa as z,Qb as F,Ra as j,Sa as q,Sd as y,Ta as U,Ua as P}from"./focused-chunks/chunk-MEJKELWC.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-FOA7XKWP.js";import"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var b=["captured_redacted","captured_verbatim"],x=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function c(e){return typeof e=="string"&&e.trim().length>0}function E(e,i){if(typeof i!="object"||i===null||Array.isArray(i))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let t=i,r=[];t.boundary_id!==e.id&&r.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(t.boundary_id)} instead of ${e.id}.`}),(t.version!==1||!b.includes(t.capture_source)||!c(t.capture_provenance)||!Array.isArray(t.redactions)||!t.redactions.every(c)||!("input"in t)||!("observed"in t))&&r.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let o=JSON.stringify(i);for(let u of x)u.pattern.test(o)&&r.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${u.label}.`});return r}function k(e,i){let t=Date.parse(e.waiver_expires_at),r=c(e.waiver_reason)&&c(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&y(e.waiver_expires_at)&&Number.isFinite(t);return{captured:0,waived:r&&t>=i?1:0,findings:r?t<i?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function T(e,i,t){if(!c(e.id)||!c(e.producer)||!c(e.consumer)||!c(e.format))return{captured:0,waived:0,findings:[{boundary_id:c(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let r=i[e.fixture_path],o=c(e.fixture_path)&&e.fixture_path in i?E(e,r):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:o.length===0?1:0,waived:0,findings:o}}return k(e,t)}function Zt(e,i,t=new Date){let r=[];if(e.version!==1||!c(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let o=new Set,u=0,n=0;for(let d of e.boundaries){if(typeof d!="object"||d===null||Array.isArray(d)){r.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let s=d,a=c(s.id)?s.id:void 0;if(a!==void 0&&o.has(a)){r.push({boundary_id:a,kind:"duplicate_boundary",detail:`Boundary ${a} is inventoried more than once.`});continue}a!==void 0&&o.add(a);let p=T(s,i,t.getTime());u+=p.captured,n+=p.waived,r.push(...p.findings)}return r.sort((d,s)=>d.boundary_id!==s.boundary_id?d.boundary_id.localeCompare(s.boundary_id):d.kind.localeCompare(s.kind)),{ok:r.length===0,boundary_count:e.boundaries.length,captured_count:u,waived_count:n,findings:r}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function l(e){if(typeof e!="string"||!y(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function I(e){let i=l(e.window_start),t=l(e.window_end);if(i>=t||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(r=>typeof r!="string"||r.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:i,end:t}}function S(e,i,t,r){let o=new Map(i.map(n=>[n,[]])),u=new Set;for(let n of e){if(typeof n.id!="string"||n.id.trim().length===0||u.has(n.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");u.add(n.id);let d=o.get(n.family);if(!d||!["success","failure","pending"].includes(n.outcome)||n.cause!==void 0&&(!["product","infrastructure","unknown"].includes(n.cause)||n.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let s=l(n.started_at);if(n.repaired_at!==void 0&&(l(n.repaired_at)<s||n.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");s>=t&&s<r&&d.push(n)}return o}function Vt(e,i){let{start:t,end:r}=I(i),o=[...S(e,i.families,t,r)].map(([u,n])=>{let d=n.filter(f=>f.outcome==="failure"),s=n.filter(f=>f.outcome!=="pending").length,a=s===0?null:d.length/s,p=d.filter(f=>f.repaired_at!==void 0&&l(f.repaired_at)<r),m={product:0,infrastructure:0,unknown:0};for(let f of d)m[f.cause??"unknown"]+=1;let _=[];return s<i.min_completed_attempts&&_.push("insufficient_completed_attempts"),a!==null&&a>i.max_failure_rate&&_.push("failure_rate"),{family:u,attempts:n.length,completed:s,failed:d.length,pending:n.length-s,failure_rate:a,affected_days:[...new Set(d.map(f=>new Date(l(f.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:p.map(f=>(l(f.repaired_at)-l(f.started_at))/6e4).sort((f,w)=>f-w),unresolved:d.length-p.length,causes:m,violations:_,ok:_.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(r).toISOString(),ok:o.every(u=>u.ok),families:o}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function g(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function A(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let i=new Map;for(let t of e){if(t===null||typeof t!="object"||!g(t.name)||i.has(t.name)||t.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(t.identities))throw new TypeError("Invalid or duplicate artifact identity.");let r=new Set(t.identities);if(r.size!==t.identities.length||[...r].some(o=>!g(o)))throw new TypeError("Invalid or duplicate artifact identity.");i.set(t.name,r)}if([...i.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return i}function D(e,i){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!g(r.identity)||t.has(r.identity)||!g(r.reason)||!g(r.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let o=r.missing_from;if(!Array.isArray(o)||o.length===0||o.length>=i.length||new Set(o).size!==o.length||[...o].some(u=>!i.includes(u)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(r.identity,r)}return t}function Kt(e,i=[]){let t=A(e),r=[...t.keys()].sort(),o=D(i,r),u=[...new Set([...t.values()].flatMap(a=>[...a]))].sort(),n=[],d=new Set;for(let a of u){let p=r.filter(f=>!t.get(f).has(a));if(p.length===0)continue;let m=o.get(a),_=m!==void 0&&JSON.stringify([...m.missing_from].sort())===JSON.stringify(p);_&&d.add(a),n.push({identity:a,present_in:r.filter(f=>t.get(f).has(a)),missing_from:p,disposition:_?{reason:m.reason,evidence:m.evidence}:null})}let s=[...o.keys()].filter(a=>!d.has(a)).sort();return{schema:"pm-artifact-ledgers/1",ok:n.every(a=>a.disposition!==null)&&s.length===0,counts:Object.fromEntries(r.map(a=>[a,t.get(a).size])),findings:n,stale_exceptions:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();export{$t as ASSURANCE_ACTIONS,Nt as ASSURANCE_DECLARATION_KINDS,be as ASSURANCE_DOCUMENT_VERSION,xe as ASSURANCE_GATE_TRIGGERS,Ee as ASSURANCE_MEASUREMENT_SOURCE_KINDS,at as ASSURANCE_PRESET_IDS,ye as AssuranceEvaluationRefusalError,ge as AssuranceMutationRefusalError,we as AssuranceSourceResolutionError,b as BOUNDARY_FIXTURE_CAPTURE_SOURCES,Q as CURRENT_HISTORY_HASH_ALGORITHM,J as DEFECT_ESCAPE_CLASSES,W as DEFECT_GATE_EVIDENCE_DISPOSITIONS,H as DefectRecurrencePolicyParseError,Ze as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,L as HISTORY_HASH_ALGORITHMS,X as LEGACY_HISTORY_HASH_ALGORITHM,O as MAX_WORKFLOW_POLICIES,$ as MAX_WORKFLOW_POLICY_TERMS,K as PM_HISTORY_ATTESTATION_CONTRACT,re as PM_MUTATION_ACTION_CONTRACTS,R as WORKFLOW_POLICY_ACTIONS,Fe as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Pe as WORKFLOW_POLICY_SCHEMA,vt as _testOnlyHealthCommand,tt as _testOnlySimilarity,St as _testOnlyValidateCommand,Wt as _testOnlyWorkspacePosition,ut as acceptAssuranceProposals,Qe as acknowledgeUnknownAuthorHistoryEvents,Xe as acknowledgeUnknownAuthorHistoryEventsFromTransport,Z as analyzeDefectChangeRisk,Ot as analyzeDefectRecurrenceCoverage,rt as analyzeDuplicateItems,st as applyAssurancePreset,Et as applyClosureTimestampFix,ke as assuranceAssertionUpdateIsLoosening,M as buildDefectRecurrenceIndex,kt as buildLinkedFileRepairReport,wt as buildStatusRoleWarnings,Je as buildWorkflowCompletenessCheck,Ge as classifyHistoryAuthorEvent,dt as createAssurancePreset,Dt as createAssuranceWorkspaceContext,De as createEmptyAssuranceDocument,We as createLifecycleCompletenessPolicies,P as createWorkflowPolicyEvaluator,ft as deriveAssuranceProposals,bt as deriveClosureTimestamp,Oe as evaluateAssuranceAssertion,$e as evaluateAssuranceGate,Zt as evaluateBoundaryFixtures,G as evaluateDefectGateEvidence,Re as evaluateMeasurement,oe as evaluateMutationGuard,Vt as evaluateReliabilityWindow,ot as evaluateSimilarityGovernance,U as evaluateWorkflowPolicies,qt as exportAttestation,nt as findDuplicateClusters,it as findSimilarItems,Jt as formatWorkspacePositionHuman,Be as getAssuranceDeclaration,se as getMutationActionContract,te as historyDigest,He as inspectHistoryAuthorStream,me as inspectStaleInProgressItems,yt as inspectStatusRoleAssignments,ae as isMutationAction,F as jaccardSimilarity,Ne as listAssuranceDeclarations,Ue as listAssuranceVerdicts,mt as listInvalidProvenanceHistoryStreamIds,de as listMutationActions,ve as normalizeAssuranceEvaluation,he as normalizeAssuranceMutation,lt as normalizeInvalidHistoryProvenance,fe as normalizeSimilarityText,Y as parseDefectChangeRiskRequest,Rt as parseDefectRecurrenceCoverageRequest,V as parseDefectRecurrencePolicy,jt as parseHistoryAttestation,Le as parseUnknownAuthorHistoryEventCoordinates,N as parseWorkflowPolicy,B as parseWorkflowPolicyDocument,Ye as planUnknownAuthorHistoryAcknowledgment,ce as prepareSimilarityText,It as projectValidateCounts,ct as promoteAssuranceAssertion,Ce as putAssuranceDeclaration,ze as putAssuranceDeclarationBundle,ie as readWorkflowPolicies,C as readWorkflowPolicyField,Ft as readWorkspacePosition,Kt as reconcileArtifactLedgers,qe as recordAssuranceVerdict,je as removeAssuranceDeclaration,ee as resolveHistoryHashAlgorithm,Ke as resolveUnknownAuthorAcknowledgmentSelector,Bt as runAssuranceAction,Ct as runAssuranceDispatch,zt as runGc,ht as runHealth,Pt as runHistoryAttest,gt as runHistoryMaintenance,v as runReindex,h as runUpgrade,At as runValidate,Me as runWorkflowPolicyAction,xt as scanClosureTimestamps,pt as scanExtensionHostVersions,Ve as scanHistoryAuthorAttribution,ne as scanMutationSecrets,_t as scanProvenanceResolverHealth,_e as scanStaleInProgressItems,Tt as scanStorageIntegrity,pe as scoreItemSimilarity,le as scorePreparedItemSimilarity,et as similarityAdvisoryWarnings,ue as tokenizeSimilarityText,Ie as validateAssertionDefinition,Ae as validateAssuranceDocument,Se as validateGateDefinition,Te as validateMeasurementDefinition,Ut as verifyAttestation,j as workflowApprovalFingerprint,q as workflowPolicyApplies,z as workflowPolicyFingerprint};
1
+ import{$a as kt,Ab as At,Bb as Dt,Cb as Rt,D as Pe,Db as Ot,E as Fe,Eb as $t,F as Je,Fb as Nt,G as We,Gb as Bt,H as Me,Hb as Ct,Ib as zt,Jb as h,Kb as jt,Lb as qt,Mb as Ut,Nb as Pt,Ob as Ft,Pb as Jt,Qa as gt,Qb as Wt,Rb as v,Ua as yt,Va as wt,Wa as ht,Xa as vt,Ya as bt,Za as xt,_a as Et,a as ge,aa as Ze,ab as Tt,b as ye,ba as Ge,c as we,ca as He,d as he,da as Ve,e as ve,ea as Ye,f as be,fa as Ke,g as xe,ga as Le,h as Ee,ha as Xe,i as ke,ia as Qe,j as Te,k as Ie,l as Se,m as Ae,n as De,o as Re,p as Oe,pa as at,q as $e,qa as dt,r as Ne,ra as st,s as Be,sa as ft,t as Ce,ta as ut,u as ze,ua as ct,v as je,va as pt,w as qe,wa as lt,x as Ue,xa as mt,ya as _t,yb as It,zb as St}from"./focused-chunks/chunk-NQ7GYFOX.js";import"./focused-chunks/chunk-SNOXXRSJ.js";import"./focused-chunks/chunk-AHWJPZSJ.js";import"./focused-chunks/chunk-IDAYTYNN.js";import"./focused-chunks/chunk-MG7C3JUY.js";import"./focused-chunks/chunk-F62XGAAY.js";import{a as K}from"./focused-chunks/chunk-SVOOGGAK.js";import"./focused-chunks/chunk-CPMSL4HS.js";import{E as J,F as W,G as M,H as Z,I as G,J as H,K as V,L as Y}from"./focused-chunks/chunk-LW64TINU.js";import"./focused-chunks/chunk-C6P6HPCX.js";import{A as et,B as tt,C as it,D as rt,E as nt,F as ot}from"./focused-chunks/chunk-G5PJCR7R.js";import"./focused-chunks/chunk-E56OXRYH.js";import{$a as le,Ra as re,Sa as ne,Ta as oe,Ua as ae,Va as de,Wa as se,Xa as fe,Ya as ue,Za as ce,_a as pe,ab as me,bb as _e}from"./focused-chunks/chunk-GS3JC5UU.js";import"./focused-chunks/chunk-D2TBEBNW.js";import"./focused-chunks/chunk-MK4HV4JO.js";import"./focused-chunks/chunk-G4QP365K.js";import"./focused-chunks/chunk-7KK66ISG.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{o as ie}from"./focused-chunks/chunk-O7EI33NP.js";import{a as L,b as X,c as Q,d as ee,e as te}from"./focused-chunks/chunk-YMGB2O4E.js";import"./focused-chunks/chunk-RFTJZ5VB.js";import"./focused-chunks/chunk-VWWTIX5L.js";import"./focused-chunks/chunk-4PW5XWVI.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ka as R,La as O,Ma as $,Na as N,Oa as B,Pa as C,Qa as z,Ra as j,Rb as F,Sa as q,Ta as U,Td as y,Ua as P}from"./focused-chunks/chunk-M6V7UMWL.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-FOA7XKWP.js";import"./focused-chunks/chunk-G6ERMFJ5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var b=["captured_redacted","captured_verbatim"],x=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function c(e){return typeof e=="string"&&e.trim().length>0}function E(e,i){if(typeof i!="object"||i===null||Array.isArray(i))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let t=i,r=[];t.boundary_id!==e.id&&r.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(t.boundary_id)} instead of ${e.id}.`}),(t.version!==1||!b.includes(t.capture_source)||!c(t.capture_provenance)||!Array.isArray(t.redactions)||!t.redactions.every(c)||!("input"in t)||!("observed"in t))&&r.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let o=JSON.stringify(i);for(let u of x)u.pattern.test(o)&&r.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${u.label}.`});return r}function k(e,i){let t=Date.parse(e.waiver_expires_at),r=c(e.waiver_reason)&&c(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&y(e.waiver_expires_at)&&Number.isFinite(t);return{captured:0,waived:r&&t>=i?1:0,findings:r?t<i?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function T(e,i,t){if(!c(e.id)||!c(e.producer)||!c(e.consumer)||!c(e.format))return{captured:0,waived:0,findings:[{boundary_id:c(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let r=i[e.fixture_path],o=c(e.fixture_path)&&e.fixture_path in i?E(e,r):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:o.length===0?1:0,waived:0,findings:o}}return k(e,t)}function Zt(e,i,t=new Date){let r=[];if(e.version!==1||!c(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let o=new Set,u=0,n=0;for(let d of e.boundaries){if(typeof d!="object"||d===null||Array.isArray(d)){r.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let s=d,a=c(s.id)?s.id:void 0;if(a!==void 0&&o.has(a)){r.push({boundary_id:a,kind:"duplicate_boundary",detail:`Boundary ${a} is inventoried more than once.`});continue}a!==void 0&&o.add(a);let p=T(s,i,t.getTime());u+=p.captured,n+=p.waived,r.push(...p.findings)}return r.sort((d,s)=>d.boundary_id!==s.boundary_id?d.boundary_id.localeCompare(s.boundary_id):d.kind.localeCompare(s.kind)),{ok:r.length===0,boundary_count:e.boundaries.length,captured_count:u,waived_count:n,findings:r}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function l(e){if(typeof e!="string"||!y(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function I(e){let i=l(e.window_start),t=l(e.window_end);if(i>=t||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(r=>typeof r!="string"||r.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:i,end:t}}function S(e,i,t,r){let o=new Map(i.map(n=>[n,[]])),u=new Set;for(let n of e){if(typeof n.id!="string"||n.id.trim().length===0||u.has(n.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");u.add(n.id);let d=o.get(n.family);if(!d||!["success","failure","pending"].includes(n.outcome)||n.cause!==void 0&&(!["product","infrastructure","unknown"].includes(n.cause)||n.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let s=l(n.started_at);if(n.repaired_at!==void 0&&(l(n.repaired_at)<s||n.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");s>=t&&s<r&&d.push(n)}return o}function Vt(e,i){let{start:t,end:r}=I(i),o=[...S(e,i.families,t,r)].map(([u,n])=>{let d=n.filter(f=>f.outcome==="failure"),s=n.filter(f=>f.outcome!=="pending").length,a=s===0?null:d.length/s,p=d.filter(f=>f.repaired_at!==void 0&&l(f.repaired_at)<r),m={product:0,infrastructure:0,unknown:0};for(let f of d)m[f.cause??"unknown"]+=1;let _=[];return s<i.min_completed_attempts&&_.push("insufficient_completed_attempts"),a!==null&&a>i.max_failure_rate&&_.push("failure_rate"),{family:u,attempts:n.length,completed:s,failed:d.length,pending:n.length-s,failure_rate:a,affected_days:[...new Set(d.map(f=>new Date(l(f.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:p.map(f=>(l(f.repaired_at)-l(f.started_at))/6e4).sort((f,w)=>f-w),unresolved:d.length-p.length,causes:m,violations:_,ok:_.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(r).toISOString(),ok:o.every(u=>u.ok),families:o}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function g(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function A(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let i=new Map;for(let t of e){if(t===null||typeof t!="object"||!g(t.name)||i.has(t.name)||t.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(t.identities))throw new TypeError("Invalid or duplicate artifact identity.");let r=new Set(t.identities);if(r.size!==t.identities.length||[...r].some(o=>!g(o)))throw new TypeError("Invalid or duplicate artifact identity.");i.set(t.name,r)}if([...i.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return i}function D(e,i){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!g(r.identity)||t.has(r.identity)||!g(r.reason)||!g(r.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let o=r.missing_from;if(!Array.isArray(o)||o.length===0||o.length>=i.length||new Set(o).size!==o.length||[...o].some(u=>!i.includes(u)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(r.identity,r)}return t}function Kt(e,i=[]){let t=A(e),r=[...t.keys()].sort(),o=D(i,r),u=[...new Set([...t.values()].flatMap(a=>[...a]))].sort(),n=[],d=new Set;for(let a of u){let p=r.filter(f=>!t.get(f).has(a));if(p.length===0)continue;let m=o.get(a),_=m!==void 0&&JSON.stringify([...m.missing_from].sort())===JSON.stringify(p);_&&d.add(a),n.push({identity:a,present_in:r.filter(f=>t.get(f).has(a)),missing_from:p,disposition:_?{reason:m.reason,evidence:m.evidence}:null})}let s=[...o.keys()].filter(a=>!d.has(a)).sort();return{schema:"pm-artifact-ledgers/1",ok:n.every(a=>a.disposition!==null)&&s.length===0,counts:Object.fromEntries(r.map(a=>[a,t.get(a).size])),findings:n,stale_exceptions:s}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();export{$t as ASSURANCE_ACTIONS,Nt as ASSURANCE_DECLARATION_KINDS,be as ASSURANCE_DOCUMENT_VERSION,xe as ASSURANCE_GATE_TRIGGERS,Ee as ASSURANCE_MEASUREMENT_SOURCE_KINDS,at as ASSURANCE_PRESET_IDS,ye as AssuranceEvaluationRefusalError,ge as AssuranceMutationRefusalError,we as AssuranceSourceResolutionError,b as BOUNDARY_FIXTURE_CAPTURE_SOURCES,Q as CURRENT_HISTORY_HASH_ALGORITHM,J as DEFECT_ESCAPE_CLASSES,W as DEFECT_GATE_EVIDENCE_DISPOSITIONS,H as DefectRecurrencePolicyParseError,Ze as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,L as HISTORY_HASH_ALGORITHMS,X as LEGACY_HISTORY_HASH_ALGORITHM,O as MAX_WORKFLOW_POLICIES,$ as MAX_WORKFLOW_POLICY_TERMS,K as PM_HISTORY_ATTESTATION_CONTRACT,re as PM_MUTATION_ACTION_CONTRACTS,R as WORKFLOW_POLICY_ACTIONS,Fe as WORKFLOW_POLICY_DOCUMENT_SCHEMA,Pe as WORKFLOW_POLICY_SCHEMA,vt as _testOnlyHealthCommand,tt as _testOnlySimilarity,St as _testOnlyValidateCommand,Wt as _testOnlyWorkspacePosition,ut as acceptAssuranceProposals,Qe as acknowledgeUnknownAuthorHistoryEvents,Xe as acknowledgeUnknownAuthorHistoryEventsFromTransport,Z as analyzeDefectChangeRisk,Ot as analyzeDefectRecurrenceCoverage,rt as analyzeDuplicateItems,st as applyAssurancePreset,Et as applyClosureTimestampFix,ke as assuranceAssertionUpdateIsLoosening,M as buildDefectRecurrenceIndex,kt as buildLinkedFileRepairReport,wt as buildStatusRoleWarnings,Je as buildWorkflowCompletenessCheck,Ge as classifyHistoryAuthorEvent,dt as createAssurancePreset,Dt as createAssuranceWorkspaceContext,De as createEmptyAssuranceDocument,We as createLifecycleCompletenessPolicies,P as createWorkflowPolicyEvaluator,ft as deriveAssuranceProposals,bt as deriveClosureTimestamp,Oe as evaluateAssuranceAssertion,$e as evaluateAssuranceGate,Zt as evaluateBoundaryFixtures,G as evaluateDefectGateEvidence,Re as evaluateMeasurement,oe as evaluateMutationGuard,Vt as evaluateReliabilityWindow,ot as evaluateSimilarityGovernance,U as evaluateWorkflowPolicies,qt as exportAttestation,nt as findDuplicateClusters,it as findSimilarItems,Jt as formatWorkspacePositionHuman,Be as getAssuranceDeclaration,se as getMutationActionContract,te as historyDigest,He as inspectHistoryAuthorStream,me as inspectStaleInProgressItems,yt as inspectStatusRoleAssignments,ae as isMutationAction,F as jaccardSimilarity,Ne as listAssuranceDeclarations,Ue as listAssuranceVerdicts,mt as listInvalidProvenanceHistoryStreamIds,de as listMutationActions,ve as normalizeAssuranceEvaluation,he as normalizeAssuranceMutation,lt as normalizeInvalidHistoryProvenance,fe as normalizeSimilarityText,Y as parseDefectChangeRiskRequest,Rt as parseDefectRecurrenceCoverageRequest,V as parseDefectRecurrencePolicy,jt as parseHistoryAttestation,Le as parseUnknownAuthorHistoryEventCoordinates,N as parseWorkflowPolicy,B as parseWorkflowPolicyDocument,Ye as planUnknownAuthorHistoryAcknowledgment,ce as prepareSimilarityText,It as projectValidateCounts,ct as promoteAssuranceAssertion,Ce as putAssuranceDeclaration,ze as putAssuranceDeclarationBundle,ie as readWorkflowPolicies,C as readWorkflowPolicyField,Ft as readWorkspacePosition,Kt as reconcileArtifactLedgers,qe as recordAssuranceVerdict,je as removeAssuranceDeclaration,ee as resolveHistoryHashAlgorithm,Ke as resolveUnknownAuthorAcknowledgmentSelector,Bt as runAssuranceAction,Ct as runAssuranceDispatch,zt as runGc,ht as runHealth,Pt as runHistoryAttest,gt as runHistoryMaintenance,v as runReindex,h as runUpgrade,At as runValidate,Me as runWorkflowPolicyAction,xt as scanClosureTimestamps,pt as scanExtensionHostVersions,Ve as scanHistoryAuthorAttribution,ne as scanMutationSecrets,_t as scanProvenanceResolverHealth,_e as scanStaleInProgressItems,Tt as scanStorageIntegrity,pe as scoreItemSimilarity,le as scorePreparedItemSimilarity,et as similarityAdvisoryWarnings,ue as tokenizeSimilarityText,Ie as validateAssertionDefinition,Ae as validateAssuranceDocument,Se as validateGateDefinition,Te as validateMeasurementDefinition,Ut as verifyAttestation,j as workflowApprovalFingerprint,q as workflowPolicyApplies,z as workflowPolicyFingerprint};
2
2
  //# sourceMappingURL=sdk-governance.js.map
@@ -1,2 +1,2 @@
1
- import{a as Ze,b as Qe,c as Ie,e as De}from"./focused-chunks/chunk-CXTDEQ3N.js";import{A as me,B as ye,C as we,D as be,E as Re,F as _e,G as ke,H as Ae,I as Ge,J as Se,K as Ee,a as Xe,b as Ye,c as er,d as rr,e as q,f as J,g as Z,h as Q,i as X,j as Y,k as ee,l as re,m as te,n as ne,o as ie,p as ae,q as oe,r as se,s as pe,t as de,u as ce,v as le,w as he,x as fe,y as ge,z as ue}from"./focused-chunks/chunk-C7UX2ZI3.js";import{d as $,e as H,f as v,g as M,h as N,i as P,j as B,k as z,l as W,m as j,n as F,p as _,q as U,r as L,s as V,t as K,u as tr,v as nr}from"./focused-chunks/chunk-BHNY3KPJ.js";import{a as We,b as je,c as Fe,d as Ue,e as Le,f as Ve,g as Ke,h as qe,i as Je}from"./focused-chunks/chunk-TFYTTDAK.js";import"./focused-chunks/chunk-GHQVM6K6.js";import"./focused-chunks/chunk-BAW3DGQO.js";import"./focused-chunks/chunk-J3YOATXR.js";import"./focused-chunks/chunk-FFO7RBLN.js";import"./focused-chunks/chunk-SDLIUZEL.js";import"./focused-chunks/chunk-4PW5XWVI.js";import{a as ze}from"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ga as w,Q as He,R,S,T as ve,U as Me,V as Ne,W as Pe,X as f,Y as Be,mb as O}from"./focused-chunks/chunk-MEJKELWC.js";import"./focused-chunks/chunk-G6ERMFJ5.js";import{createHash as Te}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var k=1;function g(e){e?.throwIfAborted()}function l(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${r} must be non-empty`);return e.trim()}function u(e,r,t={}){let n=Date.parse(t.createdAt??new Date().toISOString());if(!Number.isFinite(n))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let i=e.nodes(),s=e.edges(),a=r.list();return Object.freeze({version:k,fingerprint:Te("sha256").update(w({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Ce(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Ce(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==k)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(i=>typeof i!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let r=new R([]);for(let i of e.kinds)r.register(i);let t=new f(e.nodes,e.edges,r),n=u(t,r,{createdAt:e.created_at});if(n.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:n,registry:r,graph:t}}async function c(e,r){l(e.name,"adapter name");let t=l(r.workspace,"workspace");g(r.signal);let n=await e.read({...r,workspace:t});return g(r.signal),n===null?null:y(n)}async function b(e,r){let t=l(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await c(e,{workspace:t,signal:r.signal});if(i?.snapshot.fingerprint===n.fingerprint)return{adapter:e.name,workspace:t,disposition:"current",fingerprint:n.fingerprint,previous_fingerprint:i.snapshot.fingerprint,node_count:n.nodes.length,edge_count:n.edges.length};if(g(r.signal),await e.replace({workspace:t,signal:r.signal,snapshot:n,expected_fingerprint:i?.snapshot.fingerprint??null}),(await c(e,{workspace:t,signal:r.signal}))?.snapshot.fingerprint!==n.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:t,disposition:"written",fingerprint:n.fingerprint,...i?{previous_fingerprint:i.snapshot.fingerprint}:{},node_count:n.nodes.length,edge_count:n.edges.length}}function xe(e,r={}){let t=e.map(y),n=new Map;for(let a of t)for(let o of a.snapshot.kinds){let d=n.get(o.kind);if(d&&w(d)!==w(o))throw new TypeError(`Conflicting federated relationship kind: ${o.kind}`);n.set(o.kind,o)}let i=new R([...n.values()].sort((a,o)=>a.kind.localeCompare(o.kind))),s=new f(new Set(t.flatMap(a=>[...a.snapshot.nodes])),t.flatMap(a=>[...a.snapshot.edges]),i);return u(s,i,r)}var m=class{name;#e=new Map;constructor(r="memory"){this.name=l(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(l(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=l(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.set(t,structuredClone(y(r.snapshot).snapshot))}async clear(r){g(r.signal);let t=l(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.delete(t)}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function E(e,r){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${r} must be a positive integer`);return e}function Oe(e){let r=E(e.nodeCount,"nodeCount"),t=E(e.edgeStride??1,"edgeStride"),n=e.topology??"chain";if(!["chain","star","disconnected"].includes(n))throw new TypeError(`Unsupported relationship graph topology: ${n}`);let i=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!i||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let a=n==="disconnected"?0:Math.floor((r-1)/t);return{node_count:r,edge_count:a,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let o=0;o<r;o+=1)yield`${s}-${o}`}},edges:{*[Symbol.iterator](){if(n!=="disconnected")for(let o=t;o<r;o+=t)yield{source:`${s}-${n==="star"?0:o-t}`,target:`${s}-${o}`,kind:i}}}}}function h(e,r){if(!e)throw new Error(`Relationship graph adapter conformance: ${r}`)}async function I(e,r={}){let t=r.workspace?.trim()||"pm-graph-conformance",n=S(),i=u(new f(["a","b"],[{source:"a",target:"b",kind:"related"}],n),n,{createdAt:"2026-01-01T00:00:00.000Z"}),s=u(new f(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],n),n,{createdAt:"2026-01-02T00:00:00.000Z"}),a=[];h(await c(e,{workspace:t})===null,"workspace must start empty"),a.push({name:"empty-read",passed:!0});let o=await b(e,{workspace:t,snapshot:i});h(o.disposition==="written","first sync must write"),a.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:t})).nodes.push("mutated-reader-copy"),h((await c(e,{workspace:t}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),a.push({name:"read-isolation",passed:!0}),h((await b(e,{workspace:t,snapshot:i})).disposition==="current","identical sync must be idempotent"),a.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:t,snapshot:s,expected_fingerprint:i.fingerprint}),h((await c(e,{workspace:t}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),a.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:t,snapshot:i,expected_fingerprint:i.fingerprint})}catch{d=!0}return h(d,"stale compare-and-swap must fail"),a.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:t,expected_fingerprint:s.fingerprint}),h(await c(e,{workspace:t})===null,"clear must remove the workspace"),a.push({name:"clear",passed:!0})),{adapter:e.name,workspace:t,cases:Object.freeze(a),clear_supported:e.clear!==void 0}}function $e(e){return I(new m,e?{workspace:e}:{})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="58736688-35d0-545d-892e-e0ede7fedc1a")}catch{}})();import{createHash as D}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function T(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${r} must be non-empty`);return e.trim()}function xr(e,r){let t=T(r.migrationId,"migrationId"),n=T(r.author,"author"),i=Date.parse(r.timestamp);if(!Number.isFinite(i))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(i).toISOString(),a=_(e,void 0,r.registry),o=a.graph.nodes(),d=a.graph.edges().map(p=>{let G=D("sha256").update(JSON.stringify([t,p.kind,p.source,p.target,p.createdAt??null,p.author??null,p.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${t}:${G}`,relationshipId:`migration:${t}:${G}`,action:"add",edge:p,author:n,timestamp:s,reason:`Backfill ${t} from legacy item metadata`})}),C=D("sha256").update(JSON.stringify({migrationId:t,nodes:o,events:d})).digest("hex"),x=new Set([...r.existingEventIds??[]].filter(p=>typeof p=="string").map(p=>p.trim()).filter(Boolean)),A=d.filter(p=>!x.has(p.eventId));return Object.freeze({migration_id:t,fingerprint:C,nodes:o,events:Object.freeze(A),edge_count:d.length,skipped_existing_count:d.length-A.length,duplicate_dependency_rows:a.duplicateRows.length,dangling_reference_count:a.dangling.active.length+a.dangling.legacy_terminal.length})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3160880c-9d85-52c5-ae1d-ada213f56ce6")}catch{}})();export{je as ACTIONABILITY_ORDERING_KINDS,He as BUILTIN_RELATIONSHIP_KINDS,tr as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,ge as GRAPH_DURABLE_CACHE_MIN_ITEMS,fe as GRAPH_DURABLE_CACHE_VERSION,ze as GRAPH_QUERY_DEFAULTS,O as GRAPH_SUBCOMMAND_VALUES,m as MemoryRelationshipGraphAdapter,k as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ze as RelationshipEventLog,Qe as RelationshipEventStore,f as RelationshipGraph,R as RelationshipKindRegistry,L as WorkspaceGraphCache,Ye as analyzeGraphImpact,v as analyzeHierarchyIntegrity,er as analyzeKnowledgeGraph,Xe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,_ as assembleWorkspaceRelationshipGraph,P as assertHierarchyMutationAllowed,$e as assertMemoryRelationshipGraphAdapterConformance,De as assertNonHierarchyCardinalityMutationAllowed,Pe as assertRelationshipEdgeAllowed,I as assertRelationshipGraphAdapterConformance,le as auditWorkspaceRelationshipGraph,nr as buildRelationshipContext,ve as canonicalizeRelationshipKind,be as clearDurableGraphCache,Fe as collectBlockedByIds,Le as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ke as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,ce as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ie as collectNewOrderingCycleWarnings,se as collectOrderingCycles,W as collectOrderingStorageContradictions,rr as compareRelationshipSnapshots,Je as computeActionabilityReport,ne as computeRelationshipCentrality,te as computeRelationshipDominators,U as computeWorkspaceGraphFingerprint,Oe as createRelationshipGraphScaleFixture,u as createRelationshipGraphSnapshot,S as createRelationshipKindRegistry,Be as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,he as diffRelationshipAuditSnapshots,ue as durableGraphCachePath,Re as durableGraphCacheStatus,X as enumerateRelationshipPaths,xe as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,de as formatDuplicateEdgeGroup,M as formatHierarchyRelation,pe as formatOrderingStorageContradiction,me as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Ue as indexBlockedByIds,N as indexHierarchyRelations,Ne as isOrderingRelationshipKind,ke as loadGraphAuditBaseline,c as loadRelationshipGraphAdapter,B as normalizeDependencyGraphTarget,ye as openDurableGraphCache,Z as orderingPredecessors,Q as orderingSuccessors,Se as parseGraphSubcommand,y as parseRelationshipGraphSnapshot,we as persistDurableGraphResult,xr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,Me as resolveCanonicalRelationshipKind,Ve as resolveItemBlockers,We as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,Ee as runGraph,Ae as saveGraphAuditBaseline,qe as selectActionableEntries,_e as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
1
+ import{a as Ze,b as Qe,c as Ie,e as De}from"./focused-chunks/chunk-MC7IE7D7.js";import{A as me,B as ye,C as we,D as be,E as Re,F as _e,G as ke,H as Ae,I as Ge,J as Se,K as Ee,a as Xe,b as Ye,c as er,d as rr,e as q,f as J,g as Z,h as Q,i as X,j as Y,k as ee,l as re,m as te,n as ne,o as ie,p as ae,q as oe,r as se,s as pe,t as de,u as ce,v as le,w as he,x as fe,y as ge,z as ue}from"./focused-chunks/chunk-C6P6HPCX.js";import{d as $,e as H,f as v,g as M,h as N,i as P,j as B,k as z,l as W,m as j,n as F,p as _,q as U,r as L,s as V,t as K,u as tr,v as nr}from"./focused-chunks/chunk-G4QP365K.js";import{a as We,b as je,c as Fe,d as Ue,e as Le,f as Ve,g as Ke,h as qe,i as Je}from"./focused-chunks/chunk-7KK66ISG.js";import"./focused-chunks/chunk-GHQVM6K6.js";import"./focused-chunks/chunk-O7EI33NP.js";import"./focused-chunks/chunk-YMGB2O4E.js";import"./focused-chunks/chunk-RFTJZ5VB.js";import"./focused-chunks/chunk-VWWTIX5L.js";import"./focused-chunks/chunk-4PW5XWVI.js";import{a as ze}from"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ga as w,Q as He,R,S,T as ve,U as Me,V as Ne,W as Pe,X as f,Y as Be,mb as O}from"./focused-chunks/chunk-M6V7UMWL.js";import"./focused-chunks/chunk-G6ERMFJ5.js";import{createHash as Te}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var k=1;function g(e){e?.throwIfAborted()}function l(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${r} must be non-empty`);return e.trim()}function u(e,r,t={}){let n=Date.parse(t.createdAt??new Date().toISOString());if(!Number.isFinite(n))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let i=e.nodes(),s=e.edges(),a=r.list();return Object.freeze({version:k,fingerprint:Te("sha256").update(w({nodes:i,edges:s,kinds:a})).digest("hex"),created_at:new Date(n).toISOString(),nodes:i,edges:s,kinds:a})}function Ce(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e){if(!Ce(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==k)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(i=>typeof i!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let r=new R([]);for(let i of e.kinds)r.register(i);let t=new f(e.nodes,e.edges,r),n=u(t,r,{createdAt:e.created_at});if(n.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:n,registry:r,graph:t}}async function c(e,r){l(e.name,"adapter name");let t=l(r.workspace,"workspace");g(r.signal);let n=await e.read({...r,workspace:t});return g(r.signal),n===null?null:y(n)}async function b(e,r){let t=l(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await c(e,{workspace:t,signal:r.signal});if(i?.snapshot.fingerprint===n.fingerprint)return{adapter:e.name,workspace:t,disposition:"current",fingerprint:n.fingerprint,previous_fingerprint:i.snapshot.fingerprint,node_count:n.nodes.length,edge_count:n.edges.length};if(g(r.signal),await e.replace({workspace:t,signal:r.signal,snapshot:n,expected_fingerprint:i?.snapshot.fingerprint??null}),(await c(e,{workspace:t,signal:r.signal}))?.snapshot.fingerprint!==n.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:t,disposition:"written",fingerprint:n.fingerprint,...i?{previous_fingerprint:i.snapshot.fingerprint}:{},node_count:n.nodes.length,edge_count:n.edges.length}}function xe(e,r={}){let t=e.map(y),n=new Map;for(let a of t)for(let o of a.snapshot.kinds){let d=n.get(o.kind);if(d&&w(d)!==w(o))throw new TypeError(`Conflicting federated relationship kind: ${o.kind}`);n.set(o.kind,o)}let i=new R([...n.values()].sort((a,o)=>a.kind.localeCompare(o.kind))),s=new f(new Set(t.flatMap(a=>[...a.snapshot.nodes])),t.flatMap(a=>[...a.snapshot.edges]),i);return u(s,i,r)}var m=class{name;#e=new Map;constructor(r="memory"){this.name=l(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(l(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=l(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.set(t,structuredClone(y(r.snapshot).snapshot))}async clear(r){g(r.signal);let t=l(r.workspace,"workspace"),n=this.#e.get(t);if(r.expected_fingerprint!==void 0&&(n?.fingerprint??null)!==r.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${t}`);this.#e.delete(t)}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function E(e,r){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${r} must be a positive integer`);return e}function Oe(e){let r=E(e.nodeCount,"nodeCount"),t=E(e.edgeStride??1,"edgeStride"),n=e.topology??"chain";if(!["chain","star","disconnected"].includes(n))throw new TypeError(`Unsupported relationship graph topology: ${n}`);let i=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!i||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let a=n==="disconnected"?0:Math.floor((r-1)/t);return{node_count:r,edge_count:a,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let o=0;o<r;o+=1)yield`${s}-${o}`}},edges:{*[Symbol.iterator](){if(n!=="disconnected")for(let o=t;o<r;o+=t)yield{source:`${s}-${n==="star"?0:o-t}`,target:`${s}-${o}`,kind:i}}}}}function h(e,r){if(!e)throw new Error(`Relationship graph adapter conformance: ${r}`)}async function I(e,r={}){let t=r.workspace?.trim()||"pm-graph-conformance",n=S(),i=u(new f(["a","b"],[{source:"a",target:"b",kind:"related"}],n),n,{createdAt:"2026-01-01T00:00:00.000Z"}),s=u(new f(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],n),n,{createdAt:"2026-01-02T00:00:00.000Z"}),a=[];h(await c(e,{workspace:t})===null,"workspace must start empty"),a.push({name:"empty-read",passed:!0});let o=await b(e,{workspace:t,snapshot:i});h(o.disposition==="written","first sync must write"),a.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:t})).nodes.push("mutated-reader-copy"),h((await c(e,{workspace:t}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),a.push({name:"read-isolation",passed:!0}),h((await b(e,{workspace:t,snapshot:i})).disposition==="current","identical sync must be idempotent"),a.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:t,snapshot:s,expected_fingerprint:i.fingerprint}),h((await c(e,{workspace:t}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),a.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:t,snapshot:i,expected_fingerprint:i.fingerprint})}catch{d=!0}return h(d,"stale compare-and-swap must fail"),a.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:t,expected_fingerprint:s.fingerprint}),h(await c(e,{workspace:t})===null,"clear must remove the workspace"),a.push({name:"clear",passed:!0})),{adapter:e.name,workspace:t,cases:Object.freeze(a),clear_supported:e.clear!==void 0}}function $e(e){return I(new m,e?{workspace:e}:{})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="58736688-35d0-545d-892e-e0ede7fedc1a")}catch{}})();import{createHash as D}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function T(e,r){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${r} must be non-empty`);return e.trim()}function xr(e,r){let t=T(r.migrationId,"migrationId"),n=T(r.author,"author"),i=Date.parse(r.timestamp);if(!Number.isFinite(i))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(i).toISOString(),a=_(e,void 0,r.registry),o=a.graph.nodes(),d=a.graph.edges().map(p=>{let G=D("sha256").update(JSON.stringify([t,p.kind,p.source,p.target,p.createdAt??null,p.author??null,p.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${t}:${G}`,relationshipId:`migration:${t}:${G}`,action:"add",edge:p,author:n,timestamp:s,reason:`Backfill ${t} from legacy item metadata`})}),C=D("sha256").update(JSON.stringify({migrationId:t,nodes:o,events:d})).digest("hex"),x=new Set([...r.existingEventIds??[]].filter(p=>typeof p=="string").map(p=>p.trim()).filter(Boolean)),A=d.filter(p=>!x.has(p.eventId));return Object.freeze({migration_id:t,fingerprint:C,nodes:o,events:Object.freeze(A),edge_count:d.length,skipped_existing_count:d.length-A.length,duplicate_dependency_rows:a.duplicateRows.length,dangling_reference_count:a.dangling.active.length+a.dangling.legacy_terminal.length})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3160880c-9d85-52c5-ae1d-ada213f56ce6")}catch{}})();export{je as ACTIONABILITY_ORDERING_KINDS,He as BUILTIN_RELATIONSHIP_KINDS,tr as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,ge as GRAPH_DURABLE_CACHE_MIN_ITEMS,fe as GRAPH_DURABLE_CACHE_VERSION,ze as GRAPH_QUERY_DEFAULTS,O as GRAPH_SUBCOMMAND_VALUES,m as MemoryRelationshipGraphAdapter,k as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ze as RelationshipEventLog,Qe as RelationshipEventStore,f as RelationshipGraph,R as RelationshipKindRegistry,L as WorkspaceGraphCache,Ye as analyzeGraphImpact,v as analyzeHierarchyIntegrity,er as analyzeKnowledgeGraph,Xe as analyzeRelationshipExecution,ae as analyzeRelationshipSchedule,_ as assembleWorkspaceRelationshipGraph,P as assertHierarchyMutationAllowed,$e as assertMemoryRelationshipGraphAdapterConformance,De as assertNonHierarchyCardinalityMutationAllowed,Pe as assertRelationshipEdgeAllowed,I as assertRelationshipGraphAdapterConformance,le as auditWorkspaceRelationshipGraph,nr as buildRelationshipContext,ve as canonicalizeRelationshipKind,be as clearDurableGraphCache,Fe as collectBlockedByIds,Le as collectBlockedByIdsFromCorpus,j as collectDanglingDependencyReferences,Ke as collectDependencyBlockedIds,z as collectDuplicateDependencyRows,ce as collectDuplicateRelationshipEdgeGroups,H as collectHierarchyRelations,F as collectMissingDependencyTargetIds,Ie as collectNewOrderingCycleWarnings,se as collectOrderingCycles,W as collectOrderingStorageContradictions,rr as compareRelationshipSnapshots,Je as computeActionabilityReport,ne as computeRelationshipCentrality,te as computeRelationshipDominators,U as computeWorkspaceGraphFingerprint,Oe as createRelationshipGraphScaleFixture,u as createRelationshipGraphSnapshot,S as createRelationshipKindRegistry,Be as dependencyToRelationship,oe as deriveRelationshipDeadlines,ee as detectRelationshipCommunities,he as diffRelationshipAuditSnapshots,ue as durableGraphCachePath,Re as durableGraphCacheStatus,X as enumerateRelationshipPaths,xe as federateRelationshipGraphSnapshots,re as findRedundantRelationshipEdges,ie as findRelationshipCutStructure,Y as forEachMatchedRelationshipEdge,de as formatDuplicateEdgeGroup,M as formatHierarchyRelation,pe as formatOrderingStorageContradiction,me as graphAuditBaselinePath,q as hierarchyAncestors,J as hierarchyDescendants,Ue as indexBlockedByIds,N as indexHierarchyRelations,Ne as isOrderingRelationshipKind,ke as loadGraphAuditBaseline,c as loadRelationshipGraphAdapter,B as normalizeDependencyGraphTarget,ye as openDurableGraphCache,Z as orderingPredecessors,Q as orderingSuccessors,Se as parseGraphSubcommand,y as parseRelationshipGraphSnapshot,we as persistDurableGraphResult,xr as planRelationshipEventBackfill,Ge as planRelationshipRemediation,K as resetWorkspaceGraphCache,Me as resolveCanonicalRelationshipKind,Ve as resolveItemBlockers,We as resolveItemExecutionRole,$ as resolveWorkspaceRelationshipKindRegistry,Ee as runGraph,Ae as saveGraphAuditBaseline,qe as selectActionableEntries,_e as shouldPersistDurableGraphCache,b as syncRelationshipGraphAdapter,V as workspaceGraphCache};
2
2
  //# sourceMappingURL=sdk-graph.js.map