@unbrained/pm-cli 2026.11.21 → 2026.11.22

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 (203) hide show
  1. package/.agents/skills/pm-developer/SKILL.md +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/dist/cli/register-history-maintenance.js +2 -2
  4. package/dist/cli-bundle/bundle-manifest.json +1 -1
  5. package/dist/cli-bundle/chunks/chunk-3W47ZZ5T.js +9 -0
  6. package/dist/cli-bundle/chunks/{chunk-PJXKA4QU.js → chunk-4TB5D6HL.js} +37 -37
  7. package/dist/cli-bundle/chunks/{chunk-WELSVDPU.js → chunk-5ZMVLWE3.js} +2 -2
  8. package/dist/cli-bundle/chunks/chunk-6BBDEIKC.js +33 -0
  9. package/dist/cli-bundle/chunks/{chunk-JVGRFU5H.js → chunk-AR4NP5HI.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-XHJ3H5PL.js → chunk-B4PPFOPY.js} +3 -3
  11. package/dist/cli-bundle/chunks/{chunk-5647LU3A.js → chunk-B76TFRO2.js} +47 -45
  12. package/dist/cli-bundle/chunks/{chunk-YJEBK7HU.js → chunk-CAR2L5NW.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-D6ILFXZY.js → chunk-EIGUKEV6.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-XWHJIRNV.js → chunk-GTPCAJMZ.js} +2 -2
  15. package/dist/cli-bundle/chunks/chunk-GYP24M7W.js +2 -0
  16. package/dist/cli-bundle/chunks/{chunk-CASX6SFI.js → chunk-HC2OPETM.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-NCFCBKIP.js → chunk-HKUV74K3.js} +2 -2
  18. package/dist/cli-bundle/chunks/chunk-HXHYDO2R.js +115 -0
  19. package/dist/cli-bundle/chunks/{chunk-S6HB3WL2.js → chunk-J2LABXBL.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-BKSVHOWI.js → chunk-J52BEBSS.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-NT5AKFE5.js → chunk-OJTMGDON.js} +31 -31
  22. package/dist/cli-bundle/chunks/{chunk-SRVTCYAU.js → chunk-TC6XLIYO.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-AHQB7W2H.js → chunk-U7EL3AYA.js} +2 -2
  24. package/dist/cli-bundle/chunks/chunk-VQFWW4EF.js +6 -0
  25. package/dist/cli-bundle/chunks/{chunk-CIKGG34F.js → chunk-X6MIWTTT.js} +2 -2
  26. package/dist/cli-bundle/chunks/chunk-XC5Q2ZV7.js +2 -0
  27. package/dist/cli-bundle/chunks/{chunk-RMIRNYRG.js → chunk-XFHPKXAE.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-6QLEXRUG.js → chunk-YHVLVSEZ.js} +2 -2
  29. package/dist/cli-bundle/chunks/{item-revision-R5SZPJZ5.js → item-revision-4QBMZXKX.js} +2 -2
  30. package/dist/cli-bundle/chunks/item-transaction-QY3PUHEI.js +2 -0
  31. package/dist/cli-bundle/chunks/{mutation-actor-3TG636XG.js → mutation-actor-FWLYWJ37.js} +2 -2
  32. package/dist/cli-bundle/chunks/{mutation-admission-LICSDNNO.js → mutation-admission-7ZDCK3G2.js} +2 -2
  33. package/dist/cli-bundle/chunks/{register-list-query-SPGPS3OS.js → register-list-query-RR5KACJ3.js} +2 -2
  34. package/dist/cli-bundle/chunks/{register-mutation-WWVECKFQ.js → register-mutation-57AJQWFV.js} +2 -2
  35. package/dist/cli-bundle/chunks/{register-operations-L6HFJNWD.js → register-operations-RKWST7CU.js} +2 -2
  36. package/dist/cli-bundle/chunks/{register-setup-K7UFG5TD.js → register-setup-CMI23PC5.js} +2 -2
  37. package/dist/cli-bundle/chunks/{stage-57KH3KAC.js → stage-4KDVXC5Z.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-YOAYY3HE.js → chunk-2ZD7275J.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-532WZV65.js → chunk-324AHXJO.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/chunk-3XSWH6QC.js +91 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-QGKLRXP7.js → chunk-4JZITIJB.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{chunk-CU2BRAOX.js → chunk-4KTFKSS3.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-5C5TK3ET.js +78 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-AKJYOZZP.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-MKM5NKD7.js → chunk-BRZV7BFV.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-RPE6IX26.js → chunk-HDEKFSOK.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/{chunk-LNHUE4VV.js → chunk-IWOXAUDU.js} +2 -2
  48. package/dist/cli-bundle/focused-chunks/{chunk-J63D6QST.js → chunk-ML3JHCC6.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-JMQJBZQ5.js → chunk-OPGOOP25.js} +2 -2
  50. package/dist/cli-bundle/focused-chunks/{chunk-XCJSHNXK.js → chunk-RE7ZWT7D.js} +3 -3
  51. package/dist/cli-bundle/focused-chunks/chunk-RKQNVYGF.js +3 -0
  52. package/dist/cli-bundle/focused-chunks/{chunk-WXMI4AV5.js → chunk-RQ252B6V.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/{chunk-7A4QWNZX.js → chunk-URGHTTT3.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-IQK5NPMG.js → chunk-USPYKWQG.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/chunk-UWS3FC4D.js +102 -0
  56. package/dist/cli-bundle/focused-chunks/chunk-UXQGFGAT.js +44 -0
  57. package/dist/cli-bundle/focused-chunks/{chunk-UOC6257J.js → chunk-WZWXGDYY.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{chunk-NP72ZDXE.js → chunk-YKSLZPLT.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/chunk-ZWJTY4ID.js +2 -0
  60. package/dist/cli-bundle/focused-chunks/{item-revision-3V3UIP5X.js → item-revision-2O6MLPEX.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/item-transaction-GLACUTPL.js +2 -0
  62. package/dist/cli-bundle/focused-chunks/{mutation-actor-62HKR5IO.js → mutation-actor-TCYDPUGG.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/{mutation-admission-X4PF2SG3.js → mutation-admission-LY73EJWM.js} +2 -2
  64. package/dist/cli-bundle/focused-chunks/{stage-O7T7CXBB.js → stage-DQ7RQQ52.js} +2 -2
  65. package/dist/cli-bundle/main.js +2 -2
  66. package/dist/cli-bundle/sdk-authoring.js +1 -1
  67. package/dist/cli-bundle/sdk-contracts.js +2 -2
  68. package/dist/cli-bundle/sdk-core.js +1 -1
  69. package/dist/cli-bundle/sdk-governance.js +1 -1
  70. package/dist/cli-bundle/sdk-graph.js +1 -1
  71. package/dist/cli-bundle/sdk-merge.js +70 -58
  72. package/dist/cli-bundle/sdk-query.js +1 -1
  73. package/dist/cli-bundle/sdk-runtime.js +1 -1
  74. package/dist/cli-bundle/sdk-testing.js +1 -1
  75. package/dist/cli-bundle/sdk.js +11 -11
  76. package/dist/core/diagnostics/remediation.js +1 -1
  77. package/dist/core/fs/atomic-create.js +1 -1
  78. package/dist/core/fs/file-glob.js +1 -1
  79. package/dist/core/history/bridge.js +2 -0
  80. package/dist/core/history/drift-scan.js +1 -1
  81. package/dist/core/history/history-rewrite.js +1 -1
  82. package/dist/core/history/history.d.ts +12 -0
  83. package/dist/core/history/history.js +2 -2
  84. package/dist/core/history/projection.js +1 -1
  85. package/dist/core/history/read.d.ts +9 -0
  86. package/dist/core/history/read.js +1 -1
  87. package/dist/core/history/replay.d.ts +46 -5
  88. package/dist/core/history/replay.js +2 -2
  89. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  90. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
  91. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
  92. package/dist/sdk/cli-contracts/tool-schema.js +1 -1
  93. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +2 -2
  94. package/dist/sdk/completion/fish.js +3 -2
  95. package/dist/sdk/completion/zsh.js +3 -2
  96. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  97. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  98. package/dist/sdk/governance/health/history-drift-remedies.js +2 -0
  99. package/dist/sdk/governance/health.js +2 -2
  100. package/dist/sdk/history/append-only-repair.d.ts +30 -0
  101. package/dist/sdk/history/append-only-repair.js +6 -0
  102. package/dist/sdk/history/maintenance.d.ts +8 -2
  103. package/dist/sdk/history/maintenance.js +1 -1
  104. package/dist/sdk/history/reanchor-refusal.js +2 -0
  105. package/dist/sdk/history/reseed.d.ts +15 -0
  106. package/dist/sdk/history/reseed.js +2 -0
  107. package/dist/sdk/history/salvage.d.ts +19 -8
  108. package/dist/sdk/history/salvage.js +5 -3
  109. package/dist/sdk/history-compact.js +1 -1
  110. package/dist/sdk/history-redact.js +1 -1
  111. package/dist/sdk/history-repair.d.ts +8 -2
  112. package/dist/sdk/history-repair.js +1 -1
  113. package/dist/sdk/index.d.ts +1 -1
  114. package/dist/sdk/item-transaction.d.ts +33 -1
  115. package/dist/sdk/item-transaction.js +1 -1
  116. package/dist/sdk/lifecycle/restore.js +1 -1
  117. package/dist/sdk/merge/three-way.d.ts +22 -3
  118. package/dist/sdk/merge/three-way.js +8 -2
  119. package/dist/sdk/public-surface.json +1 -1
  120. package/dist/sdk/runtime/actions.js +1 -1
  121. package/dist/sdk/runtime-input.d.ts +6 -2
  122. package/dist/sdk/runtime-input.js +1 -1
  123. package/dist/sdk/runtime-primitives.d.ts +1 -1
  124. package/dist/sdk/runtime-primitives.js +1 -1
  125. package/dist/sdk/runtime.d.ts +7 -0
  126. package/dist/sdk/runtime.js +1 -1
  127. package/dist/sdk/structured-mutations.d.ts +5 -5
  128. package/dist/sdk/structured-mutations.js +1 -1
  129. package/dist/sdk/transactions/item-finalization.js +2 -0
  130. package/dist/types.d.ts +20 -0
  131. package/dist/types.js +1 -1
  132. package/docs/AGENT_GUIDE.md +1 -1
  133. package/docs/AGENT_RUNTIME_PRIMITIVES.md +1 -1
  134. package/docs/COMMANDS.md +6 -2
  135. package/docs/HISTORY_RECOVERY.md +229 -5
  136. package/docs/README.md +2 -2
  137. package/docs/SDK.md +103 -4
  138. package/docs/SDK_CONTEXT_COORDINATION.md +3 -2
  139. package/marketplace.json +1 -1
  140. package/node_modules/tar/package.json +2 -3
  141. package/package.json +30 -2
  142. package/packages/pm-beads/package.json +1 -1
  143. package/packages/pm-calendar/package.json +1 -1
  144. package/packages/pm-command-kit/package.json +1 -1
  145. package/packages/pm-digital-twin/package.json +1 -1
  146. package/packages/pm-governance-audit/package.json +1 -1
  147. package/packages/pm-guide-shell/package.json +1 -1
  148. package/packages/pm-kanban/package.json +1 -1
  149. package/packages/pm-lifecycle-hooks/package.json +1 -1
  150. package/packages/pm-linked-test-adapters/package.json +1 -1
  151. package/packages/pm-search-advanced/package.json +1 -1
  152. package/packages/pm-templates/package.json +1 -1
  153. package/packages/pm-todos/package.json +1 -1
  154. package/packages/pm-vcs/package.json +1 -1
  155. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  156. package/plugins/pm-claude/package.json +1 -1
  157. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  158. package/plugins/pm-codex/package.json +1 -1
  159. package/plugins/pm-codex/plugin.json +1 -1
  160. package/runtime-dependencies.json +1 -1
  161. package/dist/cli-bundle/chunks/chunk-2DXRTIC6.js +0 -21
  162. package/dist/cli-bundle/chunks/chunk-IUIOTAF6.js +0 -9
  163. package/dist/cli-bundle/chunks/chunk-KVBIMFUG.js +0 -6
  164. package/dist/cli-bundle/chunks/chunk-RULHZRFN.js +0 -2
  165. package/dist/cli-bundle/chunks/chunk-SA4BNP3Q.js +0 -2
  166. package/dist/cli-bundle/chunks/chunk-YKJKQ7DM.js +0 -115
  167. package/dist/cli-bundle/chunks/item-transaction-7DFCG73I.js +0 -2
  168. package/dist/cli-bundle/focused-chunks/chunk-CWWKRI5P.js +0 -2
  169. package/dist/cli-bundle/focused-chunks/chunk-HGFNL5XI.js +0 -2
  170. package/dist/cli-bundle/focused-chunks/chunk-OSLQD5VH.js +0 -102
  171. package/dist/cli-bundle/focused-chunks/chunk-QSJW6NSQ.js +0 -66
  172. package/dist/cli-bundle/focused-chunks/chunk-SRDQSA6M.js +0 -91
  173. package/dist/cli-bundle/focused-chunks/chunk-URJ2E6AS.js +0 -3
  174. package/dist/cli-bundle/focused-chunks/chunk-XQQSSKJI.js +0 -44
  175. package/dist/cli-bundle/focused-chunks/item-transaction-HLBW7B3J.js +0 -2
  176. package/dist/sdk/agent/refusal-closure.js +0 -2
  177. package/dist/sdk/agent/refusal-reachability.js +0 -4
  178. package/dist/sdk/agent/task-transcript-contracts.js +0 -2
  179. package/dist/sdk/agent/tracker-preflight-contracts.js +0 -2
  180. package/dist/sdk/authoring.js +0 -2
  181. package/dist/sdk/compose.js +0 -2
  182. package/dist/sdk/contracts.js +0 -2
  183. package/dist/sdk/core-governance.js +0 -2
  184. package/dist/sdk/core.js +0 -2
  185. package/dist/sdk/corpus-shape.js +0 -2
  186. package/dist/sdk/define.js +0 -2
  187. package/dist/sdk/environment/agent-environment.js +0 -2
  188. package/dist/sdk/governance/artifact-ledgers.js +0 -2
  189. package/dist/sdk/governance/coverage-assurance.js +0 -2
  190. package/dist/sdk/governance/reliability.js +0 -2
  191. package/dist/sdk/governance.js +0 -2
  192. package/dist/sdk/graph/adapter.js +0 -2
  193. package/dist/sdk/graph/conformance.js +0 -2
  194. package/dist/sdk/graph/index.js +0 -2
  195. package/dist/sdk/graph.js +0 -2
  196. package/dist/sdk/index.js +0 -2
  197. package/dist/sdk/query.js +0 -2
  198. package/dist/sdk/relationship-migration.js +0 -2
  199. package/dist/sdk/testing.js +0 -8
  200. package/dist/sdk/workspace-recipe.js +0 -2
  201. package/docs/AGENT_PROVENANCE_ADR.md +0 -206
  202. package/docs/DEFECT_RECURRENCE.md +0 -257
  203. package/docs/PERFORMANCE.md +0 -204
@@ -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-XQQSSKJI.js";import"./focused-chunks/chunk-UOC6257J.js";import"./focused-chunks/chunk-CWWKRI5P.js";import{oa as pe,pa as ce}from"./focused-chunks/chunk-QSJW6NSQ.js";import"./focused-chunks/chunk-LNHUE4VV.js";import"./focused-chunks/chunk-WXMI4AV5.js";import"./focused-chunks/chunk-3V53UBHN.js";import"./focused-chunks/chunk-532WZV65.js";import"./focused-chunks/chunk-J63D6QST.js";import"./focused-chunks/chunk-SVOOGGAK.js";import{a as me}from"./focused-chunks/chunk-NP72ZDXE.js";import"./focused-chunks/chunk-URJ2E6AS.js";import"./focused-chunks/chunk-7A4QWNZX.js";import"./focused-chunks/chunk-YOAYY3HE.js";import{k as Ee,l as fe,m as Ie,n as _e,o as Ae,p as ge}from"./focused-chunks/chunk-IQK5NPMG.js";import"./focused-chunks/chunk-CU2BRAOX.js";import"./focused-chunks/chunk-JMQJBZQ5.js";import"./focused-chunks/chunk-XCJSHNXK.js";import"./focused-chunks/chunk-HGFNL5XI.js";import"./focused-chunks/chunk-RPE6IX26.js";import"./focused-chunks/chunk-QGKLRXP7.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{U as se,V as ae,W as de,X as ue,Y as le,j as ie}from"./focused-chunks/chunk-SRDQSA6M.js";import"./focused-chunks/chunk-MKM5NKD7.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{$d as P,Bd as g,Cd as S,Cg as k,Dd as T,Dg as B,Dh as Z,Ec as p,Ed as y,Eg as H,Eh as $,Fd as R,Fg as G,Gd as O,Gg as W,Jg as Y,Jh as ee,Lh as te,Mh as oe,Ng as X,Nh as re,Oh as ne,Pg as K,Rg as j,Sg as q,Vg as J,Wg as Q,Xd as b,Yd as D,Zd as C,_d as N,ae as v,be as U,ce as L,de as h,ed as c,ee as M,fd as E,fe as w,g as r,ge as x,h as n,hd as f,he as V,i,id as I,ie as F,jd as _,je as z,ld as A,n as s,p as a,q as d,r as u}from"./focused-chunks/chunk-OSLQD5VH.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-CR7CGEB2.js";import{A as m,z as l}from"./focused-chunks/chunk-3IRCYJI5.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]="da93cfe5-b451-50d5-b763-a303bf1f19cc")}catch{}})();export{b as AGENT_PROVENANCE_DIMENSIONS,c as BASELINE_ITEM_FORMAT_VERSION,C as BUILTIN_AGENT_PROVENANCE_ADAPTERS,D as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,r as BUILTIN_ITEM_TYPE_VALUES,u as CONFIDENCE_TEXT_VALUES,E as CURRENT_ITEM_FORMAT_VERSION,s as DEPENDENCY_KIND_VALUES,l as EXIT_CODE,d as ISSUE_SEVERITY_VALUES,n as ITEM_TYPE_VALUES,ae as PM_CLI_EXPECTED_ERROR_NAME,H as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,k as PM_READ_OUTPUT_DIMENSIONS,B as PM_READ_OUTPUT_OPTION_FLAGS,G 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,O as agentSessionEnvironment,xe as aggregate,ye as analyzeAgentProvenanceDescriptorCoverage,me as analyzeSdkCliParameterCompleteness,Ye as append,K as applyReadOutputDimensions,oe as applyReadOutputSessionReferences,$ as assertWellFormedOutputText,re as attachReadOutputSessionReceipt,T as boundAgentEpisodeIdentity,S as canonicalDocument,Je as claim,Qe as claimNext,_ as classifyItemFormatVersion,qe as close,Ve as comments,ve as context,$e as copy,Xe as create,ue as createPmCliExpectedError,Q as decodeReadOutputContinuationCursor,et as deleteItem,Ge as deps,M as detectAgentIdentity,F as detectHarnessIdentity,w as diagnoseAgentIdentity,He as docs,f as effectiveItemFormatVersion,Ne as emptyImportedDocument,J 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,de as isItemAlreadyExistsError,le as isPmCliExpectedError,se as isPmTokenBudgetRecovery,j as isReadOutputBudgetExceeded,ee as isReadOutputSessionReference,ze as learnings,Ue as list,P as listAgentProvenanceAdapters,Le as listAllComplete,we as next,U as normalizeAgentProvenanceAdapterValue,I as normalizeItemFormatVersion,ie as normalizeItemId,A as normalizeStatusInput,Fe as notes,p as nowIso,te as parseReadOutputSession,pe as parseSourceLineRange,x as readAuthorEnvironment,ne as readOutputSessionRemainingTokens,fe as recordClaimSemanticAttribution,_e as recordFocusSemanticAttribution,Ie as recordReleaseSemanticAttribution,v as registerAgentProvenanceAdapters,N as registerHarnessSignalDescriptors,Ze as release,je as reopen,y as resolveAgentSessionContextFromSignals,z as resolveAuthorIdentity,Te as resolveHistoryEpisodeGroupIdentity,X as resolveReadOutputDimensions,q as resolveReadOutputEncoding,W as resolveReadOutputSurface,Ee as resolveSemanticLineageIds,tt as restore,rt as runAction,R as runWithAgentSessionContext,L as runWithHarnessDetectionSignals,h as runWithWorkspaceHarnessSignalDescriptors,he as search,ge as semanticAttributionAffinity,g as serializeItemDocument,Re as summarizeAgentModelProvenance,Oe as summarizeAgentProvenance,Z as toWellFormedText,Ke as update,Ce as updateLinkedTest,Y as validateReadOutputOptions,V 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,O 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-UXQGFGAT.js";import"./focused-chunks/chunk-WZWXGDYY.js";import"./focused-chunks/chunk-AKJYOZZP.js";import{oa as pe,pa as ce}from"./focused-chunks/chunk-5C5TK3ET.js";import"./focused-chunks/chunk-IWOXAUDU.js";import"./focused-chunks/chunk-RQ252B6V.js";import"./focused-chunks/chunk-3V53UBHN.js";import"./focused-chunks/chunk-324AHXJO.js";import"./focused-chunks/chunk-ML3JHCC6.js";import"./focused-chunks/chunk-SVOOGGAK.js";import{a as me}from"./focused-chunks/chunk-YKSLZPLT.js";import"./focused-chunks/chunk-RKQNVYGF.js";import"./focused-chunks/chunk-URGHTTT3.js";import"./focused-chunks/chunk-2ZD7275J.js";import{k as Ee,l as fe,m as Ie,n as _e,o as Ae,p as ge}from"./focused-chunks/chunk-USPYKWQG.js";import"./focused-chunks/chunk-4KTFKSS3.js";import"./focused-chunks/chunk-OPGOOP25.js";import"./focused-chunks/chunk-RE7ZWT7D.js";import"./focused-chunks/chunk-ZWJTY4ID.js";import"./focused-chunks/chunk-HDEKFSOK.js";import"./focused-chunks/chunk-4JZITIJB.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{U as se,V as ae,W as de,X as ue,Y as le,j as ie}from"./focused-chunks/chunk-3XSWH6QC.js";import"./focused-chunks/chunk-BRZV7BFV.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{$d as N,$g as K,Cd as g,Dd as S,Ed as T,Fc as p,Fd as y,Gd as R,Hd as O,Og as k,Pg as B,Ph as Z,Qg as H,Qh as $,Rg as G,Sg as W,Vg as Y,Vh as ee,Xh as te,Yd as b,Yh as oe,Zd as D,Zg as X,Zh as re,_d as C,_h as ne,ae as P,be as v,bh as j,ce as U,ch as q,de as L,ee as h,fd as c,fe as M,fh as J,g as r,gd as E,ge as w,gh as Q,h as n,he as x,i,id as f,ie as V,jd as I,je as F,kd as _,ke as z,md as A,n as s,p as a,q as d,r as u}from"./focused-chunks/chunk-UWS3FC4D.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-CR7CGEB2.js";import{A as m,z as l}from"./focused-chunks/chunk-3IRCYJI5.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]="da93cfe5-b451-50d5-b763-a303bf1f19cc")}catch{}})();export{b as AGENT_PROVENANCE_DIMENSIONS,c as BASELINE_ITEM_FORMAT_VERSION,C as BUILTIN_AGENT_PROVENANCE_ADAPTERS,D as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,r as BUILTIN_ITEM_TYPE_VALUES,u as CONFIDENCE_TEXT_VALUES,E as CURRENT_ITEM_FORMAT_VERSION,s as DEPENDENCY_KIND_VALUES,l as EXIT_CODE,d as ISSUE_SEVERITY_VALUES,n as ITEM_TYPE_VALUES,ae as PM_CLI_EXPECTED_ERROR_NAME,H as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,k as PM_READ_OUTPUT_DIMENSIONS,B as PM_READ_OUTPUT_OPTION_FLAGS,G 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,O as agentSessionEnvironment,xe as aggregate,ye as analyzeAgentProvenanceDescriptorCoverage,me as analyzeSdkCliParameterCompleteness,Ye as append,K as applyReadOutputDimensions,oe as applyReadOutputSessionReferences,$ as assertWellFormedOutputText,re as attachReadOutputSessionReceipt,T as boundAgentEpisodeIdentity,S as canonicalDocument,Je as claim,Qe as claimNext,_ as classifyItemFormatVersion,qe as close,Ve as comments,ve as context,$e as copy,Xe as create,ue as createPmCliExpectedError,Q as decodeReadOutputContinuationCursor,et as deleteItem,Ge as deps,M as detectAgentIdentity,F as detectHarnessIdentity,w as diagnoseAgentIdentity,He as docs,f as effectiveItemFormatVersion,Ne as emptyImportedDocument,J 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,de as isItemAlreadyExistsError,le as isPmCliExpectedError,se as isPmTokenBudgetRecovery,j as isReadOutputBudgetExceeded,ee as isReadOutputSessionReference,ze as learnings,Ue as list,P as listAgentProvenanceAdapters,Le as listAllComplete,we as next,U as normalizeAgentProvenanceAdapterValue,I as normalizeItemFormatVersion,ie as normalizeItemId,A as normalizeStatusInput,Fe as notes,p as nowIso,te as parseReadOutputSession,pe as parseSourceLineRange,x as readAuthorEnvironment,ne as readOutputSessionRemainingTokens,fe as recordClaimSemanticAttribution,_e as recordFocusSemanticAttribution,Ie as recordReleaseSemanticAttribution,v as registerAgentProvenanceAdapters,N as registerHarnessSignalDescriptors,Ze as release,je as reopen,y as resolveAgentSessionContextFromSignals,z as resolveAuthorIdentity,Te as resolveHistoryEpisodeGroupIdentity,X as resolveReadOutputDimensions,q as resolveReadOutputEncoding,W as resolveReadOutputSurface,Ee as resolveSemanticLineageIds,tt as restore,rt as runAction,R as runWithAgentSessionContext,L as runWithHarnessDetectionSignals,h as runWithWorkspaceHarnessSignalDescriptors,he as search,ge as semanticAttributionAffinity,g as serializeItemDocument,Re as summarizeAgentModelProvenance,Oe as summarizeAgentProvenance,Z as toWellFormedText,Ke as update,Ce as updateLinkedTest,Y as validateReadOutputOptions,V as writeAuthorEnvironment};
2
2
  //# sourceMappingURL=sdk-core.js.map
@@ -1,2 +1,2 @@
1
- import{$a as Ft,Aa as zt,Ba as qt,Ca as Mt,Da as Nt,E as nt,Ea as jt,F as ot,Fa as Rt,Fb as Kt,G as at,Gb as Qt,H as st,Hb as Vt,I as ft,Ib as Xt,Jb as Yt,Kb as Zt,Lb as $t,Mb as er,Nb as tr,Ob as rr,Pb as ir,Qb as h,Rb as nr,Sb as or,Tb as ar,Ub as sr,Vb as fr,Wb as dr,Xa as Jt,Xb as lr,Yb as x,a as Ne,ab as Lt,b as je,ba as dt,bb as Pt,c as Re,ca as lt,cb as Ut,d as Je,da as pt,db as Wt,e as Fe,ea as ct,eb as Bt,f as Le,fa as mt,fb as Ct,g as Pe,ga as ut,gb as Gt,h as Ue,ha as gt,hb as Ht,i as We,ia as yt,j as Be,ja as wt,k as Ce,l as Ge,m as He,n as Ke,o as Qe,p as Ve,q as Xe,r as Ye,s as Ze,t as $e,ta as It,u as et,ua as Tt,v as tt,va as St,w as rt,wa as kt,x as it,xa as Dt,ya as At,za as Ot}from"./focused-chunks/chunk-QSJW6NSQ.js";import"./focused-chunks/chunk-LNHUE4VV.js";import"./focused-chunks/chunk-WXMI4AV5.js";import"./focused-chunks/chunk-3V53UBHN.js";import"./focused-chunks/chunk-532WZV65.js";import"./focused-chunks/chunk-J63D6QST.js";import{a as Me}from"./focused-chunks/chunk-SVOOGGAK.js";import"./focused-chunks/chunk-NP72ZDXE.js";import{B as U,C as W,D as B,E as C,F as G,G as H,K,L as Q,M as V,N as X,O as Y,P as Z,Q as $,R as ee}from"./focused-chunks/chunk-URJ2E6AS.js";import"./focused-chunks/chunk-YOAYY3HE.js";import{A as ht,B as xt,C as _t,D as bt,E as vt,F as Et}from"./focused-chunks/chunk-CU2BRAOX.js";import"./focused-chunks/chunk-JMQJBZQ5.js";import{Ab as Ie,Bb as Te,Cb as Se,Db as ke,Eb as De,Fb as Ae,Gb as Oe,Hb as ze,Ib as qe,db as re,eb as ie,fb as ne,gb as oe,hb as ae,ib as se,jb as fe,kb as de,lb as le,mb as pe,nb as ce,ob as me,pb as ue,qb as ge,sb as ye,tb as we,ub as he,vb as xe,wb as _e,xb as be,yb as ve,zb as Ee}from"./focused-chunks/chunk-XCJSHNXK.js";import"./focused-chunks/chunk-HGFNL5XI.js";import"./focused-chunks/chunk-RPE6IX26.js";import"./focused-chunks/chunk-QGKLRXP7.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{s as te}from"./focused-chunks/chunk-SRDQSA6M.js";import"./focused-chunks/chunk-MKM5NKD7.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ac as F,Bc as L,Cc as P,Gc as y,Ka as I,La as T,Ma as S,Na as k,Oa as D,Pa as A,Qa as O,Ra as z,Sa as q,Ta as M,Ua as N,Vb as j,yc as R,zc as J}from"./focused-chunks/chunk-OSLQD5VH.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-CR7CGEB2.js";import"./focused-chunks/chunk-3IRCYJI5.js";(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]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function p(e){if(typeof e!="string"||!y(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function _(e){let r=p(e.window_start),t=p(e.window_end);if(r>=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(i=>typeof i!="string"||i.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:r,end:t}}function b(e,r,t,i){let s=new Map(r.map(n=>[n,[]])),l=new Set;for(let n of e){if(typeof n.id!="string"||n.id.trim().length===0||l.has(n.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");l.add(n.id);let f=s.get(n.family);if(!f||!["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 d=p(n.started_at);if(n.repaired_at!==void 0&&(p(n.repaired_at)<d||n.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");d>=t&&d<i&&f.push(n)}return s}function cr(e,r){let{start:t,end:i}=_(r),s=[...b(e,r.families,t,i)].map(([l,n])=>{let f=n.filter(o=>o.outcome==="failure"),d=n.filter(o=>o.outcome!=="pending").length,a=d===0?null:f.length/d,u=f.filter(o=>o.repaired_at!==void 0&&p(o.repaired_at)<i),c={product:0,infrastructure:0,unknown:0};for(let o of f)c[o.cause??"unknown"]+=1;let m=[];return d<r.min_completed_attempts&&m.push("insufficient_completed_attempts"),a!==null&&a>r.max_failure_rate&&m.push("failure_rate"),{family:l,attempts:n.length,completed:d,failed:f.length,pending:n.length-d,failure_rate:a,affected_days:[...new Set(f.map(o=>new Date(p(o.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:u.map(o=>(p(o.repaired_at)-p(o.started_at))/6e4).sort((o,w)=>o-w),unresolved:f.length-u.length,causes:c,violations:m,ok:m.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(i).toISOString(),ok:s.every(l=>l.ok),families:s}}(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]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function g(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function v(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let r=new Map;for(let t of e){if(t===null||typeof t!="object"||!g(t.name)||r.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 i=new Set(t.identities);if(i.size!==t.identities.length||[...i].some(s=>!g(s)))throw new TypeError("Invalid or duplicate artifact identity.");r.set(t.name,i)}if([...r.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return r}function E(e,r){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let t=new Map;for(let i of e){if(i===null||typeof i!="object"||!g(i.identity)||t.has(i.identity)||!g(i.reason)||!g(i.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let s=i.missing_from;if(!Array.isArray(s)||s.length===0||s.length>=r.length||new Set(s).size!==s.length||[...s].some(l=>!r.includes(l)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(i.identity,i)}return t}function ur(e,r=[]){let t=v(e),i=[...t.keys()].sort(),s=E(r,i),l=[...new Set([...t.values()].flatMap(a=>[...a]))].sort(),n=[],f=new Set;for(let a of l){let u=i.filter(o=>!t.get(o).has(a));if(u.length===0)continue;let c=s.get(a),m=c!==void 0&&JSON.stringify([...c.missing_from].sort())===JSON.stringify(u);m&&f.add(a),n.push({identity:a,present_in:i.filter(o=>t.get(o).has(a)),missing_from:u,disposition:m?{reason:c.reason,evidence:c.evidence}:null})}let d=[...s.keys()].filter(a=>!f.has(a)).sort();return{schema:"pm-artifact-ledgers/1",ok:n.every(a=>a.disposition!==null)&&d.length===0,counts:Object.fromEntries(i.map(a=>[a,t.get(a).size])),findings:n,stale_exceptions:d}}(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]="14b66b71-90c1-5a6b-96cc-af2694079048")}catch{}})();export{$t as ASSURANCE_ACTIONS,er as ASSURANCE_DECLARATION_KINDS,Le as ASSURANCE_DOCUMENT_VERSION,Pe as ASSURANCE_GATE_TRIGGERS,Ue as ASSURANCE_MEASUREMENT_SOURCE_KINDS,It as ASSURANCE_PRESET_IDS,je as AssuranceEvaluationRefusalError,Ne as AssuranceMutationRefusalError,Re as AssuranceSourceResolutionError,U as BOUNDARY_FIXTURE_CAPTURE_SOURCES,F as CURRENT_HISTORY_HASH_ALGORITHM,K as DEFECT_ESCAPE_CLASSES,Q as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Z as DefectRecurrencePolicyParseError,dt as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,R as HISTORY_HASH_ALGORITHMS,Nt as IN_PROGRESS_WORK_DETAIL_LIMIT,J as LEGACY_HISTORY_HASH_ALGORITHM,W as MAX_WAIVER_NOTICE_DAYS,T as MAX_WORKFLOW_POLICIES,S as MAX_WORKFLOW_POLICY_TERMS,Me as PM_HISTORY_ATTESTATION_CONTRACT,re as PM_MUTATION_ACTION_CONTRACTS,oe as SECRET_GUARD_RULE_CATEGORIES,ye as STALE_WORK_THRESHOLD_SETTING,we as UNPROVEN_ACTIVITY_REASONS,I as WORKFLOW_POLICY_ACTIONS,ot as WORKFLOW_POLICY_DOCUMENT_SCHEMA,nt as WORKFLOW_POLICY_SCHEMA,Ut as _testOnlyHealthCommand,xt as _testOnlySimilarity,Qt as _testOnlyValidateCommand,lr as _testOnlyWorkspacePosition,Dt as acceptAssuranceProposals,wt as acknowledgeUnknownAuthorHistoryEvents,yt as acknowledgeUnknownAuthorHistoryEventsFromTransport,X as analyzeDefectChangeRisk,Zt as analyzeDefectRecurrenceCoverage,bt as analyzeDuplicateItems,St as applyAssurancePreset,Ct as applyClosureTimestampFix,We as assuranceAssertionUpdateIsLoosening,V as buildDefectRecurrenceIndex,jt as buildInProgressSweepCommands,Rt as buildInProgressWorkHealthSummary,Gt as buildLinkedFileRepairReport,Lt as buildStatusRoleWarnings,at as buildWorkflowCompletenessCheck,lt as classifyHistoryAuthorEvent,Tt as createAssurancePreset,Xt as createAssuranceWorkspaceContext,Ke as createEmptyAssuranceDocument,st as createLifecycleCompletenessPolicies,N as createWorkflowPolicyEvaluator,se as decideSecretGuardFinding,kt as deriveAssuranceProposals,Wt as deriveClosureTimestamp,Ve as evaluateAssuranceAssertion,Xe as evaluateAssuranceGate,H as evaluateBoundaryFixtures,Y as evaluateDefectGateEvidence,Qe as evaluateMeasurement,ne as evaluateMutationGuard,cr as evaluateReliabilityWindow,Et as evaluateSimilarityGovernance,M as evaluateWorkflowPolicies,or as exportAttestation,vt as findDuplicateClusters,_t as findSimilarItems,dr as formatWorkspacePositionHuman,Ze as getAssuranceDeclaration,le as getMutationActionContract,P as historyDigest,pt as inspectHistoryAuthorStream,ve as inspectInProgressWork,Ee as inspectStaleInProgressItems,Ft as inspectStatusRoleAssignments,Te as isJudgeableHistoryRecord,fe as isMutationAction,B as isWaiverNoticeDays,Ie as isWellFormedHistoryRecord,j as jaccardSimilarity,De as latestHistoryTimestamp,Ye as listAssuranceDeclarations,it as listAssuranceVerdicts,qt as listInvalidProvenanceHistoryStreamIds,de as listMutationActions,Fe as normalizeAssuranceEvaluation,Je as normalizeAssuranceMutation,zt as normalizeInvalidHistoryProvenance,pe as normalizeSimilarityText,he as normalizeStaleWorkThresholdHours,ee as parseDefectChangeRiskRequest,Yt as parseDefectRecurrenceCoverageRequest,$ as parseDefectRecurrencePolicy,nr as parseHistoryAttestation,gt as parseUnknownAuthorHistoryEventCoordinates,k as parseWorkflowPolicy,D as parseWorkflowPolicyDocument,mt as planUnknownAuthorHistoryAcknowledgment,me as prepareSimilarityText,Kt as projectValidateCounts,At as promoteAssuranceAssertion,$e as putAssuranceDeclaration,et as putAssuranceDeclarationBundle,Oe as readLatestHistoryActivity,te as readWorkflowPolicies,A as readWorkflowPolicyField,fr as readWorkspacePosition,ur as reconcileArtifactLedgers,rt as recordAssuranceVerdict,ke as recordedBaselineActivity,Ae as recordedPrefixActivity,tt as removeAssuranceDeclaration,L as resolveHistoryHashAlgorithm,xe as resolveLastActivityAt,ut as resolveUnknownAuthorAcknowledgmentSelector,tr as runAssuranceAction,rr as runAssuranceDispatch,ir as runGc,Pt as runHealth,sr as runHistoryAttest,Jt as runHistoryMaintenance,x as runReindex,h as runUpgrade,Vt as runValidate,ft as runWorkflowPolicyAction,Bt as scanClosureTimestamps,Ot as scanExtensionHostVersions,ct as scanHistoryAuthorAttribution,ze as scanInProgressWork,ie as scanMutationSecrets,Mt as scanProvenanceResolverHealth,qe as scanStaleInProgressItems,Ht as scanStorageIntegrity,ue as scoreItemSimilarity,ge as scorePreparedItemSimilarity,ae as secretGuardRuleCategory,ht as similarityAdvisoryWarnings,G as sortWaiverNotices,be as staleEligibleAt,ce as tokenizeSimilarityText,Se as unprovenClaimActivity,Ce as validateAssertionDefinition,He as validateAssuranceDocument,Ge as validateGateDefinition,Be as validateMeasurementDefinition,ar as verifyAttestation,C as waiverNoticeFor,_e as wholeHoursSince,z as workflowApprovalFingerprint,q as workflowPolicyApplies,O as workflowPolicyFingerprint};
1
+ import{$a as Ft,Aa as zt,Ba as qt,Ca as Mt,Da as Nt,E as nt,Ea as jt,F as ot,Fa as Rt,Fb as Kt,G as at,Gb as Qt,H as st,Hb as Vt,I as ft,Ib as Xt,Jb as Yt,Kb as Zt,Lb as $t,Mb as er,Nb as tr,Ob as rr,Pb as ir,Qb as h,Rb as nr,Sb as or,Tb as ar,Ub as sr,Vb as fr,Wb as dr,Xa as Jt,Xb as lr,Yb as x,a as Ne,ab as Lt,b as je,ba as dt,bb as Pt,c as Re,ca as lt,cb as Ut,d as Je,da as pt,db as Wt,e as Fe,ea as ct,eb as Bt,f as Le,fa as mt,fb as Ct,g as Pe,ga as ut,gb as Gt,h as Ue,ha as gt,hb as Ht,i as We,ia as yt,j as Be,ja as wt,k as Ce,l as Ge,m as He,n as Ke,o as Qe,p as Ve,q as Xe,r as Ye,s as Ze,t as $e,ta as It,u as et,ua as Tt,v as tt,va as St,w as rt,wa as kt,x as it,xa as Dt,ya as At,za as Ot}from"./focused-chunks/chunk-5C5TK3ET.js";import"./focused-chunks/chunk-IWOXAUDU.js";import"./focused-chunks/chunk-RQ252B6V.js";import"./focused-chunks/chunk-3V53UBHN.js";import"./focused-chunks/chunk-324AHXJO.js";import"./focused-chunks/chunk-ML3JHCC6.js";import{a as Me}from"./focused-chunks/chunk-SVOOGGAK.js";import"./focused-chunks/chunk-YKSLZPLT.js";import{B as U,C as W,D as B,E as C,F as G,G as H,K,L as Q,M as V,N as X,O as Y,P as Z,Q as $,R as ee}from"./focused-chunks/chunk-RKQNVYGF.js";import"./focused-chunks/chunk-2ZD7275J.js";import{A as ht,B as xt,C as _t,D as bt,E as vt,F as Et}from"./focused-chunks/chunk-4KTFKSS3.js";import"./focused-chunks/chunk-OPGOOP25.js";import{Ab as Ie,Bb as Te,Cb as Se,Db as ke,Eb as De,Fb as Ae,Gb as Oe,Hb as ze,Ib as qe,db as re,eb as ie,fb as ne,gb as oe,hb as ae,ib as se,jb as fe,kb as de,lb as le,mb as pe,nb as ce,ob as me,pb as ue,qb as ge,sb as ye,tb as we,ub as he,vb as xe,wb as _e,xb as be,yb as ve,zb as Ee}from"./focused-chunks/chunk-RE7ZWT7D.js";import"./focused-chunks/chunk-ZWJTY4ID.js";import"./focused-chunks/chunk-HDEKFSOK.js";import"./focused-chunks/chunk-4JZITIJB.js";import"./focused-chunks/chunk-GHQVM6K6.js";import{s as te}from"./focused-chunks/chunk-3XSWH6QC.js";import"./focused-chunks/chunk-BRZV7BFV.js";import"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ac as J,Bc as F,Cc as L,Dc as P,Hc as y,Ka as I,La as T,Ma as S,Na as k,Oa as D,Pa as A,Qa as O,Ra as z,Sa as q,Ta as M,Ua as N,Vb as j,zc as R}from"./focused-chunks/chunk-UWS3FC4D.js";import"./focused-chunks/chunk-EGN2HFRU.js";import"./focused-chunks/chunk-CR7CGEB2.js";import"./focused-chunks/chunk-3IRCYJI5.js";(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]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function p(e){if(typeof e!="string"||!y(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function _(e){let r=p(e.window_start),t=p(e.window_end);if(r>=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(i=>typeof i!="string"||i.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:r,end:t}}function b(e,r,t,i){let s=new Map(r.map(n=>[n,[]])),l=new Set;for(let n of e){if(typeof n.id!="string"||n.id.trim().length===0||l.has(n.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");l.add(n.id);let f=s.get(n.family);if(!f||!["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 d=p(n.started_at);if(n.repaired_at!==void 0&&(p(n.repaired_at)<d||n.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");d>=t&&d<i&&f.push(n)}return s}function cr(e,r){let{start:t,end:i}=_(r),s=[...b(e,r.families,t,i)].map(([l,n])=>{let f=n.filter(o=>o.outcome==="failure"),d=n.filter(o=>o.outcome!=="pending").length,a=d===0?null:f.length/d,u=f.filter(o=>o.repaired_at!==void 0&&p(o.repaired_at)<i),c={product:0,infrastructure:0,unknown:0};for(let o of f)c[o.cause??"unknown"]+=1;let m=[];return d<r.min_completed_attempts&&m.push("insufficient_completed_attempts"),a!==null&&a>r.max_failure_rate&&m.push("failure_rate"),{family:l,attempts:n.length,completed:d,failed:f.length,pending:n.length-d,failure_rate:a,affected_days:[...new Set(f.map(o=>new Date(p(o.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:u.map(o=>(p(o.repaired_at)-p(o.started_at))/6e4).sort((o,w)=>o-w),unresolved:f.length-u.length,causes:c,violations:m,ok:m.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(t).toISOString(),window_end:new Date(i).toISOString(),ok:s.every(l=>l.ok),families:s}}(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]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function g(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function v(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let r=new Map;for(let t of e){if(t===null||typeof t!="object"||!g(t.name)||r.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 i=new Set(t.identities);if(i.size!==t.identities.length||[...i].some(s=>!g(s)))throw new TypeError("Invalid or duplicate artifact identity.");r.set(t.name,i)}if([...r.values()].every(t=>t.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return r}function E(e,r){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let t=new Map;for(let i of e){if(i===null||typeof i!="object"||!g(i.identity)||t.has(i.identity)||!g(i.reason)||!g(i.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let s=i.missing_from;if(!Array.isArray(s)||s.length===0||s.length>=r.length||new Set(s).size!==s.length||[...s].some(l=>!r.includes(l)))throw new TypeError("Invalid artifact exception ledger signature.");t.set(i.identity,i)}return t}function ur(e,r=[]){let t=v(e),i=[...t.keys()].sort(),s=E(r,i),l=[...new Set([...t.values()].flatMap(a=>[...a]))].sort(),n=[],f=new Set;for(let a of l){let u=i.filter(o=>!t.get(o).has(a));if(u.length===0)continue;let c=s.get(a),m=c!==void 0&&JSON.stringify([...c.missing_from].sort())===JSON.stringify(u);m&&f.add(a),n.push({identity:a,present_in:i.filter(o=>t.get(o).has(a)),missing_from:u,disposition:m?{reason:c.reason,evidence:c.evidence}:null})}let d=[...s.keys()].filter(a=>!f.has(a)).sort();return{schema:"pm-artifact-ledgers/1",ok:n.every(a=>a.disposition!==null)&&d.length===0,counts:Object.fromEntries(i.map(a=>[a,t.get(a).size])),findings:n,stale_exceptions:d}}(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]="14b66b71-90c1-5a6b-96cc-af2694079048")}catch{}})();export{$t as ASSURANCE_ACTIONS,er as ASSURANCE_DECLARATION_KINDS,Le as ASSURANCE_DOCUMENT_VERSION,Pe as ASSURANCE_GATE_TRIGGERS,Ue as ASSURANCE_MEASUREMENT_SOURCE_KINDS,It as ASSURANCE_PRESET_IDS,je as AssuranceEvaluationRefusalError,Ne as AssuranceMutationRefusalError,Re as AssuranceSourceResolutionError,U as BOUNDARY_FIXTURE_CAPTURE_SOURCES,F as CURRENT_HISTORY_HASH_ALGORITHM,K as DEFECT_ESCAPE_CLASSES,Q as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Z as DefectRecurrencePolicyParseError,dt as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,R as HISTORY_HASH_ALGORITHMS,Nt as IN_PROGRESS_WORK_DETAIL_LIMIT,J as LEGACY_HISTORY_HASH_ALGORITHM,W as MAX_WAIVER_NOTICE_DAYS,T as MAX_WORKFLOW_POLICIES,S as MAX_WORKFLOW_POLICY_TERMS,Me as PM_HISTORY_ATTESTATION_CONTRACT,re as PM_MUTATION_ACTION_CONTRACTS,oe as SECRET_GUARD_RULE_CATEGORIES,ye as STALE_WORK_THRESHOLD_SETTING,we as UNPROVEN_ACTIVITY_REASONS,I as WORKFLOW_POLICY_ACTIONS,ot as WORKFLOW_POLICY_DOCUMENT_SCHEMA,nt as WORKFLOW_POLICY_SCHEMA,Ut as _testOnlyHealthCommand,xt as _testOnlySimilarity,Qt as _testOnlyValidateCommand,lr as _testOnlyWorkspacePosition,Dt as acceptAssuranceProposals,wt as acknowledgeUnknownAuthorHistoryEvents,yt as acknowledgeUnknownAuthorHistoryEventsFromTransport,X as analyzeDefectChangeRisk,Zt as analyzeDefectRecurrenceCoverage,bt as analyzeDuplicateItems,St as applyAssurancePreset,Ct as applyClosureTimestampFix,We as assuranceAssertionUpdateIsLoosening,V as buildDefectRecurrenceIndex,jt as buildInProgressSweepCommands,Rt as buildInProgressWorkHealthSummary,Gt as buildLinkedFileRepairReport,Lt as buildStatusRoleWarnings,at as buildWorkflowCompletenessCheck,lt as classifyHistoryAuthorEvent,Tt as createAssurancePreset,Xt as createAssuranceWorkspaceContext,Ke as createEmptyAssuranceDocument,st as createLifecycleCompletenessPolicies,N as createWorkflowPolicyEvaluator,se as decideSecretGuardFinding,kt as deriveAssuranceProposals,Wt as deriveClosureTimestamp,Ve as evaluateAssuranceAssertion,Xe as evaluateAssuranceGate,H as evaluateBoundaryFixtures,Y as evaluateDefectGateEvidence,Qe as evaluateMeasurement,ne as evaluateMutationGuard,cr as evaluateReliabilityWindow,Et as evaluateSimilarityGovernance,M as evaluateWorkflowPolicies,or as exportAttestation,vt as findDuplicateClusters,_t as findSimilarItems,dr as formatWorkspacePositionHuman,Ze as getAssuranceDeclaration,le as getMutationActionContract,P as historyDigest,pt as inspectHistoryAuthorStream,ve as inspectInProgressWork,Ee as inspectStaleInProgressItems,Ft as inspectStatusRoleAssignments,Te as isJudgeableHistoryRecord,fe as isMutationAction,B as isWaiverNoticeDays,Ie as isWellFormedHistoryRecord,j as jaccardSimilarity,De as latestHistoryTimestamp,Ye as listAssuranceDeclarations,it as listAssuranceVerdicts,qt as listInvalidProvenanceHistoryStreamIds,de as listMutationActions,Fe as normalizeAssuranceEvaluation,Je as normalizeAssuranceMutation,zt as normalizeInvalidHistoryProvenance,pe as normalizeSimilarityText,he as normalizeStaleWorkThresholdHours,ee as parseDefectChangeRiskRequest,Yt as parseDefectRecurrenceCoverageRequest,$ as parseDefectRecurrencePolicy,nr as parseHistoryAttestation,gt as parseUnknownAuthorHistoryEventCoordinates,k as parseWorkflowPolicy,D as parseWorkflowPolicyDocument,mt as planUnknownAuthorHistoryAcknowledgment,me as prepareSimilarityText,Kt as projectValidateCounts,At as promoteAssuranceAssertion,$e as putAssuranceDeclaration,et as putAssuranceDeclarationBundle,Oe as readLatestHistoryActivity,te as readWorkflowPolicies,A as readWorkflowPolicyField,fr as readWorkspacePosition,ur as reconcileArtifactLedgers,rt as recordAssuranceVerdict,ke as recordedBaselineActivity,Ae as recordedPrefixActivity,tt as removeAssuranceDeclaration,L as resolveHistoryHashAlgorithm,xe as resolveLastActivityAt,ut as resolveUnknownAuthorAcknowledgmentSelector,tr as runAssuranceAction,rr as runAssuranceDispatch,ir as runGc,Pt as runHealth,sr as runHistoryAttest,Jt as runHistoryMaintenance,x as runReindex,h as runUpgrade,Vt as runValidate,ft as runWorkflowPolicyAction,Bt as scanClosureTimestamps,Ot as scanExtensionHostVersions,ct as scanHistoryAuthorAttribution,ze as scanInProgressWork,ie as scanMutationSecrets,Mt as scanProvenanceResolverHealth,qe as scanStaleInProgressItems,Ht as scanStorageIntegrity,ue as scoreItemSimilarity,ge as scorePreparedItemSimilarity,ae as secretGuardRuleCategory,ht as similarityAdvisoryWarnings,G as sortWaiverNotices,be as staleEligibleAt,ce as tokenizeSimilarityText,Se as unprovenClaimActivity,Ce as validateAssertionDefinition,He as validateAssuranceDocument,Ge as validateGateDefinition,Be as validateMeasurementDefinition,ar as verifyAttestation,C as waiverNoticeFor,_e as wholeHoursSince,z as workflowApprovalFingerprint,q as workflowPolicyApplies,O 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-7A4QWNZX.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 le,v as ce,w as he,x as fe,y as ge,z as ue}from"./focused-chunks/chunk-YOAYY3HE.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-RPE6IX26.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-QGKLRXP7.js";import"./focused-chunks/chunk-GHQVM6K6.js";import"./focused-chunks/chunk-SRDQSA6M.js";import"./focused-chunks/chunk-MKM5NKD7.js";import{a as ze}from"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ga as w,R as He,S as R,T as S,U as ve,V as Me,W as Ne,X as Pe,Y as f,Z as Be,mb as O}from"./focused-chunks/chunk-OSLQD5VH.js";import"./focused-chunks/chunk-3IRCYJI5.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 c(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 l(e,r){c(e.name,"adapter name");let t=c(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=c(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await l(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 l(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=c(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(c(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=c(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=c(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 l(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 l(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 l(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 l(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]="54beb96f-a26d-513d-b849-8d319661eb12")}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,ce 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,le 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,l 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-URGHTTT3.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 le,v as ce,w as he,x as fe,y as ge,z as ue}from"./focused-chunks/chunk-2ZD7275J.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-HDEKFSOK.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-4JZITIJB.js";import"./focused-chunks/chunk-GHQVM6K6.js";import"./focused-chunks/chunk-3XSWH6QC.js";import"./focused-chunks/chunk-BRZV7BFV.js";import{a as ze}from"./focused-chunks/chunk-I5LGPUWH.js";import"./focused-chunks/chunk-C3O6JJPO.js";import{Ga as w,R as He,S as R,T as S,U as ve,V as Me,W as Ne,X as Pe,Y as f,Z as Be,mb as O}from"./focused-chunks/chunk-UWS3FC4D.js";import"./focused-chunks/chunk-3IRCYJI5.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 c(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 l(e,r){c(e.name,"adapter name");let t=c(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=c(r.workspace,"workspace"),n=y(r.snapshot).snapshot,i=await l(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 l(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=c(r,"adapter name")}async read(r){g(r.signal);let t=this.#e.get(c(r.workspace,"workspace"));return t?structuredClone(t):null}async replace(r){g(r.signal);let t=c(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=c(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 l(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 l(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 l(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 l(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]="54beb96f-a26d-513d-b849-8d319661eb12")}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,ce 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,le 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,l 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