@parmana/shared 0.0.0-stage → 0.1.0

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 (417) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +16 -2
  4. package/dist/.tsbuildinfo +1 -0
  5. package/dist/config/ApiKeyEntry.d.ts +97 -0
  6. package/dist/config/ApiKeyEntry.d.ts.map +1 -0
  7. package/dist/config/ApiKeyEntry.js +2 -0
  8. package/dist/config/ApiKeyEntry.js.map +1 -0
  9. package/dist/config/Config.d.ts +202 -0
  10. package/dist/config/Config.d.ts.map +1 -0
  11. package/dist/config/Config.js +172 -0
  12. package/dist/config/Config.js.map +1 -0
  13. package/dist/config/ConfigLoader.d.ts +5 -0
  14. package/dist/config/ConfigLoader.d.ts.map +1 -0
  15. package/dist/config/ConfigLoader.js +8 -0
  16. package/dist/config/ConfigLoader.js.map +1 -0
  17. package/dist/config/ConfigUtils.d.ts +6 -0
  18. package/dist/config/ConfigUtils.d.ts.map +1 -0
  19. package/dist/config/ConfigUtils.js +8 -0
  20. package/dist/config/ConfigUtils.js.map +1 -0
  21. package/dist/config/ConfigValidation.d.ts +30 -0
  22. package/dist/config/ConfigValidation.d.ts.map +1 -0
  23. package/dist/config/ConfigValidation.js +170 -0
  24. package/dist/config/ConfigValidation.js.map +1 -0
  25. package/dist/config/CryptoAlgorithms.d.ts +42 -0
  26. package/dist/config/CryptoAlgorithms.d.ts.map +1 -0
  27. package/dist/config/CryptoAlgorithms.js +42 -0
  28. package/dist/config/CryptoAlgorithms.js.map +1 -0
  29. package/dist/config/KeyProviders.d.ts +9 -0
  30. package/dist/config/KeyProviders.d.ts.map +1 -0
  31. package/dist/config/KeyProviders.js +8 -0
  32. package/dist/config/KeyProviders.js.map +1 -0
  33. package/dist/config/SecretsProviders.d.ts +6 -0
  34. package/dist/config/SecretsProviders.d.ts.map +1 -0
  35. package/dist/config/SecretsProviders.js +5 -0
  36. package/dist/config/SecretsProviders.js.map +1 -0
  37. package/dist/config/StorageProviders.d.ts +18 -0
  38. package/dist/config/StorageProviders.d.ts.map +1 -0
  39. package/dist/config/StorageProviders.js +20 -0
  40. package/dist/config/StorageProviders.js.map +1 -0
  41. package/dist/config/TrustProfiles.d.ts +5 -0
  42. package/dist/config/TrustProfiles.d.ts.map +1 -0
  43. package/dist/config/TrustProfiles.js +4 -0
  44. package/dist/config/TrustProfiles.js.map +1 -0
  45. package/dist/config/index.d.ts +11 -0
  46. package/dist/config/index.d.ts.map +1 -0
  47. package/dist/config/index.js +11 -0
  48. package/dist/config/index.js.map +1 -0
  49. package/dist/domain/approval-artifact.d.ts +136 -0
  50. package/dist/domain/approval-artifact.d.ts.map +1 -0
  51. package/dist/domain/approval-artifact.js +2 -0
  52. package/dist/domain/approval-artifact.js.map +1 -0
  53. package/dist/domain/approval-issuer.d.ts +52 -0
  54. package/dist/domain/approval-issuer.d.ts.map +1 -0
  55. package/dist/domain/approval-issuer.js +2 -0
  56. package/dist/domain/approval-issuer.js.map +1 -0
  57. package/dist/domain/authority-grant.d.ts +54 -0
  58. package/dist/domain/authority-grant.d.ts.map +1 -0
  59. package/dist/domain/authority-grant.js +2 -0
  60. package/dist/domain/authority-grant.js.map +1 -0
  61. package/dist/domain/authority.d.ts +42 -0
  62. package/dist/domain/authority.d.ts.map +1 -0
  63. package/dist/domain/authority.js +11 -0
  64. package/dist/domain/authority.js.map +1 -0
  65. package/dist/domain/authorization.d.ts +54 -0
  66. package/dist/domain/authorization.d.ts.map +1 -0
  67. package/dist/domain/authorization.js +2 -0
  68. package/dist/domain/authorization.js.map +1 -0
  69. package/dist/domain/business-signal-source.d.ts +52 -0
  70. package/dist/domain/business-signal-source.d.ts.map +1 -0
  71. package/dist/domain/business-signal-source.js +2 -0
  72. package/dist/domain/business-signal-source.js.map +1 -0
  73. package/dist/domain/business-transaction.d.ts +99 -0
  74. package/dist/domain/business-transaction.d.ts.map +1 -0
  75. package/dist/domain/business-transaction.js +16 -0
  76. package/dist/domain/business-transaction.js.map +1 -0
  77. package/dist/domain/business-validation.d.ts +177 -0
  78. package/dist/domain/business-validation.d.ts.map +1 -0
  79. package/dist/domain/business-validation.js +60 -0
  80. package/dist/domain/business-validation.js.map +1 -0
  81. package/dist/domain/challenge-record.d.ts +181 -0
  82. package/dist/domain/challenge-record.d.ts.map +1 -0
  83. package/dist/domain/challenge-record.js +2 -0
  84. package/dist/domain/challenge-record.js.map +1 -0
  85. package/dist/domain/decision.d.ts +89 -0
  86. package/dist/domain/decision.d.ts.map +1 -0
  87. package/dist/domain/decision.js +9 -0
  88. package/dist/domain/decision.js.map +1 -0
  89. package/dist/domain/evidence-anchor.d.ts +54 -0
  90. package/dist/domain/evidence-anchor.d.ts.map +1 -0
  91. package/dist/domain/evidence-anchor.js +2 -0
  92. package/dist/domain/evidence-anchor.js.map +1 -0
  93. package/dist/domain/executable-content.d.ts +45 -0
  94. package/dist/domain/executable-content.d.ts.map +1 -0
  95. package/dist/domain/executable-content.js +39 -0
  96. package/dist/domain/executable-content.js.map +1 -0
  97. package/dist/domain/execution-audit-event.d.ts +65 -0
  98. package/dist/domain/execution-audit-event.d.ts.map +1 -0
  99. package/dist/domain/execution-audit-event.js +2 -0
  100. package/dist/domain/execution-audit-event.js.map +1 -0
  101. package/dist/domain/execution-authorization.d.ts +224 -0
  102. package/dist/domain/execution-authorization.d.ts.map +1 -0
  103. package/dist/domain/execution-authorization.js +2 -0
  104. package/dist/domain/execution-authorization.js.map +1 -0
  105. package/dist/domain/execution-evidence.d.ts +38 -0
  106. package/dist/domain/execution-evidence.d.ts.map +1 -0
  107. package/dist/domain/execution-evidence.js +2 -0
  108. package/dist/domain/execution-evidence.js.map +1 -0
  109. package/dist/domain/execution-intent.d.ts +92 -0
  110. package/dist/domain/execution-intent.d.ts.map +1 -0
  111. package/dist/domain/execution-intent.js +2 -0
  112. package/dist/domain/execution-intent.js.map +1 -0
  113. package/dist/domain/execution-metadata.d.ts +8 -0
  114. package/dist/domain/execution-metadata.d.ts.map +1 -0
  115. package/dist/domain/execution-metadata.js +2 -0
  116. package/dist/domain/execution-metadata.js.map +1 -0
  117. package/dist/domain/execution-outcome-store.d.ts +49 -0
  118. package/dist/domain/execution-outcome-store.d.ts.map +1 -0
  119. package/dist/domain/execution-outcome-store.js +10 -0
  120. package/dist/domain/execution-outcome-store.js.map +1 -0
  121. package/dist/domain/execution-result.d.ts +49 -0
  122. package/dist/domain/execution-result.d.ts.map +1 -0
  123. package/dist/domain/execution-result.js +2 -0
  124. package/dist/domain/execution-result.js.map +1 -0
  125. package/dist/domain/execution-trust-record.d.ts +142 -0
  126. package/dist/domain/execution-trust-record.d.ts.map +1 -0
  127. package/dist/domain/execution-trust-record.js +2 -0
  128. package/dist/domain/execution-trust-record.js.map +1 -0
  129. package/dist/domain/execution.d.ts +108 -0
  130. package/dist/domain/execution.d.ts.map +1 -0
  131. package/dist/domain/execution.js +18 -0
  132. package/dist/domain/execution.js.map +1 -0
  133. package/dist/domain/external-connector.d.ts +68 -0
  134. package/dist/domain/external-connector.d.ts.map +1 -0
  135. package/dist/domain/external-connector.js +2 -0
  136. package/dist/domain/external-connector.js.map +1 -0
  137. package/dist/domain/index.d.ts +37 -0
  138. package/dist/domain/index.d.ts.map +1 -0
  139. package/dist/domain/index.js +37 -0
  140. package/dist/domain/index.js.map +1 -0
  141. package/dist/domain/intent.d.ts +66 -0
  142. package/dist/domain/intent.d.ts.map +1 -0
  143. package/dist/domain/intent.js +2 -0
  144. package/dist/domain/intent.js.map +1 -0
  145. package/dist/domain/metadata.d.ts +53 -0
  146. package/dist/domain/metadata.d.ts.map +1 -0
  147. package/dist/domain/metadata.js +11 -0
  148. package/dist/domain/metadata.js.map +1 -0
  149. package/dist/domain/override.d.ts +39 -0
  150. package/dist/domain/override.d.ts.map +1 -0
  151. package/dist/domain/override.js +2 -0
  152. package/dist/domain/override.js.map +1 -0
  153. package/dist/domain/pending-policy-change.d.ts +109 -0
  154. package/dist/domain/pending-policy-change.d.ts.map +1 -0
  155. package/dist/domain/pending-policy-change.js +12 -0
  156. package/dist/domain/pending-policy-change.js.map +1 -0
  157. package/dist/domain/policy-change-approval-record.d.ts +81 -0
  158. package/dist/domain/policy-change-approval-record.d.ts.map +1 -0
  159. package/dist/domain/policy-change-approval-record.js +2 -0
  160. package/dist/domain/policy-change-approval-record.js.map +1 -0
  161. package/dist/domain/policy-change-step-up-authorization.d.ts +97 -0
  162. package/dist/domain/policy-change-step-up-authorization.d.ts.map +1 -0
  163. package/dist/domain/policy-change-step-up-authorization.js +2 -0
  164. package/dist/domain/policy-change-step-up-authorization.js.map +1 -0
  165. package/dist/domain/policy-reference.d.ts +58 -0
  166. package/dist/domain/policy-reference.d.ts.map +1 -0
  167. package/dist/domain/policy-reference.js +2 -0
  168. package/dist/domain/policy-reference.js.map +1 -0
  169. package/dist/domain/receipt.d.ts +72 -0
  170. package/dist/domain/receipt.d.ts.map +1 -0
  171. package/dist/domain/receipt.js +2 -0
  172. package/dist/domain/receipt.js.map +1 -0
  173. package/dist/domain/refusal-record.d.ts +110 -0
  174. package/dist/domain/refusal-record.d.ts.map +1 -0
  175. package/dist/domain/refusal-record.js +2 -0
  176. package/dist/domain/refusal-record.js.map +1 -0
  177. package/dist/domain/release-approval.d.ts +14 -0
  178. package/dist/domain/release-approval.d.ts.map +1 -0
  179. package/dist/domain/release-approval.js +2 -0
  180. package/dist/domain/release-approval.js.map +1 -0
  181. package/dist/domain/signals.d.ts +10 -0
  182. package/dist/domain/signals.d.ts.map +1 -0
  183. package/dist/domain/signals.js +2 -0
  184. package/dist/domain/signals.js.map +1 -0
  185. package/dist/domain/signature-entry.d.ts +23 -0
  186. package/dist/domain/signature-entry.d.ts.map +1 -0
  187. package/dist/domain/signature-entry.js +2 -0
  188. package/dist/domain/signature-entry.js.map +1 -0
  189. package/dist/domain/signature.d.ts +26 -0
  190. package/dist/domain/signature.d.ts.map +1 -0
  191. package/dist/domain/signature.js +2 -0
  192. package/dist/domain/signature.js.map +1 -0
  193. package/dist/domain/unsigned-execution-trust-record.d.ts +7 -0
  194. package/dist/domain/unsigned-execution-trust-record.d.ts.map +1 -0
  195. package/dist/domain/unsigned-execution-trust-record.js +2 -0
  196. package/dist/domain/unsigned-execution-trust-record.js.map +1 -0
  197. package/dist/domain/verification.d.ts +48 -0
  198. package/dist/domain/verification.d.ts.map +1 -0
  199. package/dist/domain/verification.js +9 -0
  200. package/dist/domain/verification.js.map +1 -0
  201. package/dist/errors/approval-issuer-change-not-found-error.d.ts +9 -0
  202. package/dist/errors/approval-issuer-change-not-found-error.d.ts.map +1 -0
  203. package/dist/errors/approval-issuer-change-not-found-error.js +11 -0
  204. package/dist/errors/approval-issuer-change-not-found-error.js.map +1 -0
  205. package/dist/errors/authority-grant-change-not-found-error.d.ts +9 -0
  206. package/dist/errors/authority-grant-change-not-found-error.d.ts.map +1 -0
  207. package/dist/errors/authority-grant-change-not-found-error.js +11 -0
  208. package/dist/errors/authority-grant-change-not-found-error.js.map +1 -0
  209. package/dist/errors/authority-required-error.d.ts +5 -0
  210. package/dist/errors/authority-required-error.d.ts.map +1 -0
  211. package/dist/errors/authority-required-error.js +7 -0
  212. package/dist/errors/authority-required-error.js.map +1 -0
  213. package/dist/errors/authorization-no-longer-valid-error.d.ts +19 -0
  214. package/dist/errors/authorization-no-longer-valid-error.d.ts.map +1 -0
  215. package/dist/errors/authorization-no-longer-valid-error.js +23 -0
  216. package/dist/errors/authorization-no-longer-valid-error.js.map +1 -0
  217. package/dist/errors/authorization-required-error.d.ts +5 -0
  218. package/dist/errors/authorization-required-error.d.ts.map +1 -0
  219. package/dist/errors/authorization-required-error.js +7 -0
  220. package/dist/errors/authorization-required-error.js.map +1 -0
  221. package/dist/errors/business-signal-source-change-not-found-error.d.ts +9 -0
  222. package/dist/errors/business-signal-source-change-not-found-error.d.ts.map +1 -0
  223. package/dist/errors/business-signal-source-change-not-found-error.js +11 -0
  224. package/dist/errors/business-signal-source-change-not-found-error.js.map +1 -0
  225. package/dist/errors/business-transaction-not-found-error.d.ts +5 -0
  226. package/dist/errors/business-transaction-not-found-error.d.ts.map +1 -0
  227. package/dist/errors/business-transaction-not-found-error.js +7 -0
  228. package/dist/errors/business-transaction-not-found-error.js.map +1 -0
  229. package/dist/errors/challenge-record-not-found-error.d.ts +9 -0
  230. package/dist/errors/challenge-record-not-found-error.d.ts.map +1 -0
  231. package/dist/errors/challenge-record-not-found-error.js +11 -0
  232. package/dist/errors/challenge-record-not-found-error.js.map +1 -0
  233. package/dist/errors/conflict-error.d.ts +5 -0
  234. package/dist/errors/conflict-error.d.ts.map +1 -0
  235. package/dist/errors/conflict-error.js +7 -0
  236. package/dist/errors/conflict-error.js.map +1 -0
  237. package/dist/errors/connector-not-registered-error.d.ts +21 -0
  238. package/dist/errors/connector-not-registered-error.d.ts.map +1 -0
  239. package/dist/errors/connector-not-registered-error.js +24 -0
  240. package/dist/errors/connector-not-registered-error.js.map +1 -0
  241. package/dist/errors/decision-not-approved-error.d.ts +5 -0
  242. package/dist/errors/decision-not-approved-error.d.ts.map +1 -0
  243. package/dist/errors/decision-not-approved-error.js +7 -0
  244. package/dist/errors/decision-not-approved-error.js.map +1 -0
  245. package/dist/errors/duplicate-business-transaction-error.d.ts +26 -0
  246. package/dist/errors/duplicate-business-transaction-error.d.ts.map +1 -0
  247. package/dist/errors/duplicate-business-transaction-error.js +28 -0
  248. package/dist/errors/duplicate-business-transaction-error.js.map +1 -0
  249. package/dist/errors/external-connector-change-not-found-error.d.ts +9 -0
  250. package/dist/errors/external-connector-change-not-found-error.d.ts.map +1 -0
  251. package/dist/errors/external-connector-change-not-found-error.js +11 -0
  252. package/dist/errors/external-connector-change-not-found-error.js.map +1 -0
  253. package/dist/errors/forbidden-error.d.ts +5 -0
  254. package/dist/errors/forbidden-error.d.ts.map +1 -0
  255. package/dist/errors/forbidden-error.js +7 -0
  256. package/dist/errors/forbidden-error.js.map +1 -0
  257. package/dist/errors/index.d.ts +30 -0
  258. package/dist/errors/index.d.ts.map +1 -0
  259. package/dist/errors/index.js +30 -0
  260. package/dist/errors/index.js.map +1 -0
  261. package/dist/errors/intent-required-error.d.ts +5 -0
  262. package/dist/errors/intent-required-error.d.ts.map +1 -0
  263. package/dist/errors/intent-required-error.js +7 -0
  264. package/dist/errors/intent-required-error.js.map +1 -0
  265. package/dist/errors/non-human-caller-denied-error.d.ts +10 -0
  266. package/dist/errors/non-human-caller-denied-error.d.ts.map +1 -0
  267. package/dist/errors/non-human-caller-denied-error.js +12 -0
  268. package/dist/errors/non-human-caller-denied-error.js.map +1 -0
  269. package/dist/errors/nonce-already-consumed-error.d.ts +26 -0
  270. package/dist/errors/nonce-already-consumed-error.d.ts.map +1 -0
  271. package/dist/errors/nonce-already-consumed-error.js +29 -0
  272. package/dist/errors/nonce-already-consumed-error.js.map +1 -0
  273. package/dist/errors/outcome-unknown-error.d.ts +15 -0
  274. package/dist/errors/outcome-unknown-error.d.ts.map +1 -0
  275. package/dist/errors/outcome-unknown-error.js +19 -0
  276. package/dist/errors/outcome-unknown-error.js.map +1 -0
  277. package/dist/errors/override-not-allowed-error.d.ts +5 -0
  278. package/dist/errors/override-not-allowed-error.d.ts.map +1 -0
  279. package/dist/errors/override-not-allowed-error.js +7 -0
  280. package/dist/errors/override-not-allowed-error.js.map +1 -0
  281. package/dist/errors/parmana-error.d.ts +15 -0
  282. package/dist/errors/parmana-error.d.ts.map +1 -0
  283. package/dist/errors/parmana-error.js +21 -0
  284. package/dist/errors/parmana-error.js.map +1 -0
  285. package/dist/errors/pending-policy-change-not-found-error.d.ts +9 -0
  286. package/dist/errors/pending-policy-change-not-found-error.d.ts.map +1 -0
  287. package/dist/errors/pending-policy-change-not-found-error.js +11 -0
  288. package/dist/errors/pending-policy-change-not-found-error.js.map +1 -0
  289. package/dist/errors/policy-not-found-error.d.ts +5 -0
  290. package/dist/errors/policy-not-found-error.d.ts.map +1 -0
  291. package/dist/errors/policy-not-found-error.js +7 -0
  292. package/dist/errors/policy-not-found-error.js.map +1 -0
  293. package/dist/errors/receipt-generation-error.d.ts +5 -0
  294. package/dist/errors/receipt-generation-error.d.ts.map +1 -0
  295. package/dist/errors/receipt-generation-error.js +7 -0
  296. package/dist/errors/receipt-generation-error.js.map +1 -0
  297. package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts +12 -0
  298. package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts.map +1 -0
  299. package/dist/errors/same-actor-cannot-approve-own-change-error.js +15 -0
  300. package/dist/errors/same-actor-cannot-approve-own-change-error.js.map +1 -0
  301. package/dist/errors/step-up-authorization-invalid-error.d.ts +25 -0
  302. package/dist/errors/step-up-authorization-invalid-error.d.ts.map +1 -0
  303. package/dist/errors/step-up-authorization-invalid-error.js +28 -0
  304. package/dist/errors/step-up-authorization-invalid-error.js.map +1 -0
  305. package/dist/errors/trust-chain-validation-error.d.ts +5 -0
  306. package/dist/errors/trust-chain-validation-error.d.ts.map +1 -0
  307. package/dist/errors/trust-chain-validation-error.js +7 -0
  308. package/dist/errors/trust-chain-validation-error.js.map +1 -0
  309. package/dist/errors/unauthorized-error.d.ts +5 -0
  310. package/dist/errors/unauthorized-error.d.ts.map +1 -0
  311. package/dist/errors/unauthorized-error.js +7 -0
  312. package/dist/errors/unauthorized-error.js.map +1 -0
  313. package/dist/errors/validation-error.d.ts +5 -0
  314. package/dist/errors/validation-error.d.ts.map +1 -0
  315. package/dist/errors/validation-error.js +7 -0
  316. package/dist/errors/validation-error.js.map +1 -0
  317. package/dist/errors/verification-failed-error.d.ts +5 -0
  318. package/dist/errors/verification-failed-error.d.ts.map +1 -0
  319. package/dist/errors/verification-failed-error.js +7 -0
  320. package/dist/errors/verification-failed-error.js.map +1 -0
  321. package/dist/gateway/GatewayAuthentication.d.ts +8 -0
  322. package/dist/gateway/GatewayAuthentication.d.ts.map +1 -0
  323. package/dist/gateway/GatewayAuthentication.js +2 -0
  324. package/dist/gateway/GatewayAuthentication.js.map +1 -0
  325. package/dist/gateway/GatewayAuthenticationClaims.d.ts +10 -0
  326. package/dist/gateway/GatewayAuthenticationClaims.d.ts.map +1 -0
  327. package/dist/gateway/GatewayAuthenticationClaims.js +2 -0
  328. package/dist/gateway/GatewayAuthenticationClaims.js.map +1 -0
  329. package/dist/gateway/GatewayAuthenticationPayload.d.ts +15 -0
  330. package/dist/gateway/GatewayAuthenticationPayload.d.ts.map +1 -0
  331. package/dist/gateway/GatewayAuthenticationPayload.js +2 -0
  332. package/dist/gateway/GatewayAuthenticationPayload.js.map +1 -0
  333. package/dist/gateway/SignedGatewayAuthentication.d.ts +9 -0
  334. package/dist/gateway/SignedGatewayAuthentication.d.ts.map +1 -0
  335. package/dist/gateway/SignedGatewayAuthentication.js +2 -0
  336. package/dist/gateway/SignedGatewayAuthentication.js.map +1 -0
  337. package/dist/gateway/index.d.ts +4 -0
  338. package/dist/gateway/index.d.ts.map +1 -0
  339. package/dist/gateway/index.js +4 -0
  340. package/dist/gateway/index.js.map +1 -0
  341. package/dist/index.d.ts +19 -0
  342. package/dist/index.d.ts.map +1 -0
  343. package/dist/index.js +19 -0
  344. package/dist/index.js.map +1 -0
  345. package/dist/logging/Logger.d.ts +65 -0
  346. package/dist/logging/Logger.d.ts.map +1 -0
  347. package/dist/logging/Logger.js +97 -0
  348. package/dist/logging/Logger.js.map +1 -0
  349. package/dist/network/externalEndpointAddress.d.ts +48 -0
  350. package/dist/network/externalEndpointAddress.d.ts.map +1 -0
  351. package/dist/network/externalEndpointAddress.js +147 -0
  352. package/dist/network/externalEndpointAddress.js.map +1 -0
  353. package/dist/repositories/approval-issuer-repository.d.ts +31 -0
  354. package/dist/repositories/approval-issuer-repository.d.ts.map +1 -0
  355. package/dist/repositories/approval-issuer-repository.js +2 -0
  356. package/dist/repositories/approval-issuer-repository.js.map +1 -0
  357. package/dist/repositories/authority-grant-repository.d.ts +22 -0
  358. package/dist/repositories/authority-grant-repository.d.ts.map +1 -0
  359. package/dist/repositories/authority-grant-repository.js +2 -0
  360. package/dist/repositories/authority-grant-repository.js.map +1 -0
  361. package/dist/repositories/business-signal-source-repository.d.ts +17 -0
  362. package/dist/repositories/business-signal-source-repository.d.ts.map +1 -0
  363. package/dist/repositories/business-signal-source-repository.js +2 -0
  364. package/dist/repositories/business-signal-source-repository.js.map +1 -0
  365. package/dist/repositories/business-transaction-repository.d.ts +34 -0
  366. package/dist/repositories/business-transaction-repository.d.ts.map +1 -0
  367. package/dist/repositories/business-transaction-repository.js +2 -0
  368. package/dist/repositories/business-transaction-repository.js.map +1 -0
  369. package/dist/repositories/challenge-record-repository.d.ts +67 -0
  370. package/dist/repositories/challenge-record-repository.d.ts.map +1 -0
  371. package/dist/repositories/challenge-record-repository.js +76 -0
  372. package/dist/repositories/challenge-record-repository.js.map +1 -0
  373. package/dist/repositories/execution-intent-repository.d.ts +38 -0
  374. package/dist/repositories/execution-intent-repository.d.ts.map +1 -0
  375. package/dist/repositories/execution-intent-repository.js +2 -0
  376. package/dist/repositories/execution-intent-repository.js.map +1 -0
  377. package/dist/repositories/execution-trust-record-repository.d.ts +62 -0
  378. package/dist/repositories/execution-trust-record-repository.d.ts.map +1 -0
  379. package/dist/repositories/execution-trust-record-repository.js +2 -0
  380. package/dist/repositories/execution-trust-record-repository.js.map +1 -0
  381. package/dist/repositories/external-connector-repository.d.ts +37 -0
  382. package/dist/repositories/external-connector-repository.d.ts.map +1 -0
  383. package/dist/repositories/external-connector-repository.js +2 -0
  384. package/dist/repositories/external-connector-repository.js.map +1 -0
  385. package/dist/repositories/handbook-download-lead-repository.d.ts +18 -0
  386. package/dist/repositories/handbook-download-lead-repository.d.ts.map +1 -0
  387. package/dist/repositories/handbook-download-lead-repository.js +2 -0
  388. package/dist/repositories/handbook-download-lead-repository.js.map +1 -0
  389. package/dist/repositories/index.d.ts +14 -0
  390. package/dist/repositories/index.d.ts.map +1 -0
  391. package/dist/repositories/index.js +14 -0
  392. package/dist/repositories/index.js.map +1 -0
  393. package/dist/repositories/pending-policy-change-repository.d.ts +72 -0
  394. package/dist/repositories/pending-policy-change-repository.d.ts.map +1 -0
  395. package/dist/repositories/pending-policy-change-repository.js +46 -0
  396. package/dist/repositories/pending-policy-change-repository.js.map +1 -0
  397. package/dist/repositories/policy-change-approval-record-repository.d.ts +39 -0
  398. package/dist/repositories/policy-change-approval-record-repository.d.ts.map +1 -0
  399. package/dist/repositories/policy-change-approval-record-repository.js +2 -0
  400. package/dist/repositories/policy-change-approval-record-repository.js.map +1 -0
  401. package/dist/repositories/policy-repository.d.ts +15 -0
  402. package/dist/repositories/policy-repository.d.ts.map +1 -0
  403. package/dist/repositories/policy-repository.js +2 -0
  404. package/dist/repositories/policy-repository.js.map +1 -0
  405. package/dist/repositories/refusal-record-repository.d.ts +13 -0
  406. package/dist/repositories/refusal-record-repository.d.ts.map +1 -0
  407. package/dist/repositories/refusal-record-repository.js +2 -0
  408. package/dist/repositories/refusal-record-repository.js.map +1 -0
  409. package/dist/types/Json.d.ts +7 -0
  410. package/dist/types/Json.d.ts.map +1 -0
  411. package/dist/types/Json.js +2 -0
  412. package/dist/types/Json.js.map +1 -0
  413. package/dist/utils/normalize-policy.d.ts +16 -0
  414. package/dist/utils/normalize-policy.d.ts.map +1 -0
  415. package/dist/utils/normalize-policy.js +10 -0
  416. package/dist/utils/normalize-policy.js.map +1 -0
  417. package/package.json +39 -4
@@ -0,0 +1,37 @@
1
+ export * from "./policy-reference.js";
2
+ export * from "./signals.js";
3
+ export * from "./decision.js";
4
+ export * from "./business-validation.js";
5
+ export * from "./business-transaction.js";
6
+ export * from "./execution.js";
7
+ export * from "./execution-outcome-store.js";
8
+ export * from "./execution-result.js";
9
+ export * from "./execution-evidence.js";
10
+ export * from "./metadata.js";
11
+ export * from "./override.js";
12
+ export * from "./verification.js";
13
+ export * from "./receipt.js";
14
+ export * from "./execution-trust-record.js";
15
+ export * from "./evidence-anchor.js";
16
+ export * from "./execution-intent.js";
17
+ export * from "./refusal-record.js";
18
+ export * from "./challenge-record.js";
19
+ export * from "./authority.js";
20
+ export * from "./authorization.js";
21
+ export * from "./execution-authorization.js";
22
+ export * from "./approval-artifact.js";
23
+ export * from "./release-approval.js";
24
+ export * from "./executable-content.js";
25
+ export * from "./intent.js";
26
+ export * from "./signature.js";
27
+ export * from "./signature-entry.js";
28
+ export * from "./unsigned-execution-trust-record.js";
29
+ export * from "./pending-policy-change.js";
30
+ export * from "./approval-issuer.js";
31
+ export * from "./external-connector.js";
32
+ export * from "./business-signal-source.js";
33
+ export * from "./authority-grant.js";
34
+ export * from "./policy-change-approval-record.js";
35
+ export * from "./policy-change-step-up-authorization.js";
36
+ export * from "./execution-audit-event.js";
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,37 @@
1
+ export * from "./policy-reference.js";
2
+ export * from "./signals.js";
3
+ export * from "./decision.js";
4
+ export * from "./business-validation.js";
5
+ export * from "./business-transaction.js";
6
+ export * from "./execution.js";
7
+ export * from "./execution-outcome-store.js";
8
+ export * from "./execution-result.js";
9
+ export * from "./execution-evidence.js";
10
+ export * from "./metadata.js";
11
+ export * from "./override.js";
12
+ export * from "./verification.js";
13
+ export * from "./receipt.js";
14
+ export * from "./execution-trust-record.js";
15
+ export * from "./evidence-anchor.js";
16
+ export * from "./execution-intent.js";
17
+ export * from "./refusal-record.js";
18
+ export * from "./challenge-record.js";
19
+ export * from "./authority.js";
20
+ export * from "./authorization.js";
21
+ export * from "./execution-authorization.js";
22
+ export * from "./approval-artifact.js";
23
+ export * from "./release-approval.js";
24
+ export * from "./executable-content.js";
25
+ export * from "./intent.js";
26
+ export * from "./signature.js";
27
+ export * from "./signature-entry.js";
28
+ export * from "./unsigned-execution-trust-record.js";
29
+ export * from "./pending-policy-change.js";
30
+ export * from "./approval-issuer.js";
31
+ export * from "./external-connector.js";
32
+ export * from "./business-signal-source.js";
33
+ export * from "./authority-grant.js";
34
+ export * from "./policy-change-approval-record.js";
35
+ export * from "./policy-change-step-up-authorization.js";
36
+ export * from "./execution-audit-event.js";
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Parmana Trust Core
3
+ *
4
+ * Intent
5
+ *
6
+ * Immutable declaration of the action that an
7
+ * Authority intends to be executed under an
8
+ * Authorization.
9
+ *
10
+ * Intent is evaluated by Policy but is never
11
+ * modified by Policy.
12
+ *
13
+ * Trust Chain:
14
+ *
15
+ * Authority
16
+ * ↓
17
+ * Authorization
18
+ * ↓
19
+ * Intent
20
+ * ↓
21
+ * Policy
22
+ * ↓
23
+ * Decision
24
+ * ↓
25
+ * Execution
26
+ */
27
+ export interface Intent {
28
+ /**
29
+ * Unique Intent identifier.
30
+ */
31
+ readonly intentId: string;
32
+ /**
33
+ * Authorization under which this
34
+ * Intent was created.
35
+ */
36
+ readonly authorizationId: string;
37
+ /**
38
+ * Business action being requested.
39
+ *
40
+ * Examples:
41
+ * - TransferFunds
42
+ * - ApproveInvoice
43
+ * - DeployApplication
44
+ */
45
+ readonly action: string;
46
+ /**
47
+ * Target of the intended action.
48
+ *
49
+ * Examples:
50
+ * - account/12345
51
+ * - invoice/INV-1001
52
+ * - service/payment-api
53
+ */
54
+ readonly target: string;
55
+ /**
56
+ * Immutable business parameters
57
+ * describing the intended action.
58
+ */
59
+ readonly parameters: Readonly<Record<string, unknown>>;
60
+ /**
61
+ * UTC timestamp when the Intent
62
+ * was created.
63
+ */
64
+ readonly createdAt: Date;
65
+ }
66
+ //# sourceMappingURL=intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../src/domain/intent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvD;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=intent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent.js","sourceRoot":"","sources":["../../src/domain/intent.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Parmana Trust Core
3
+ *
4
+ * Canonical Transaction Metadata
5
+ *
6
+ * Immutable metadata supplied by the calling application.
7
+ * Metadata identifies the Business Transaction but is never
8
+ * evaluated by Policy.
9
+ */
10
+ export interface TransactionMetadata {
11
+ /**
12
+ * Unique Business Transaction identifier.
13
+ *
14
+ * Serves as:
15
+ * - Primary business identifier
16
+ * - Idempotency key
17
+ * - Root identifier for the Execution Trust Record
18
+ */
19
+ readonly businessTransactionId: string;
20
+ /**
21
+ * Optional correlation identifier.
22
+ *
23
+ * Used to correlate requests across distributed systems.
24
+ */
25
+ readonly correlationId?: string;
26
+ /**
27
+ * Optional tenant identifier.
28
+ */
29
+ readonly tenantId?: string;
30
+ /**
31
+ * Originating application or service.
32
+ */
33
+ readonly sourceSystem?: string;
34
+ /**
35
+ * Identity of the authenticated caller.
36
+ */
37
+ readonly submittedBy?: string;
38
+ /**
39
+ * The capability (Business Transaction intent.action) that
40
+ * isCapabilityAllowed() confirmed submittedBy was permitted to
41
+ * invoke, server-set the same way submittedBy is -- never trusted
42
+ * from the client. Present only when caller-auth was enabled for
43
+ * this request; see ExecutionAuthorizationPayload.grantedCapability,
44
+ * which this value is signed into.
45
+ */
46
+ readonly grantedCapability?: string;
47
+ /**
48
+ * UTC timestamp when the Business Transaction
49
+ * was submitted.
50
+ */
51
+ readonly submittedAt?: Date;
52
+ }
53
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/domain/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;OAOG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC;CAC7B"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Parmana Trust Core
3
+ *
4
+ * Canonical Transaction Metadata
5
+ *
6
+ * Immutable metadata supplied by the calling application.
7
+ * Metadata identifies the Business Transaction but is never
8
+ * evaluated by Policy.
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/domain/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Parmana Trust Core
3
+ *
4
+ * Override
5
+ *
6
+ * Records an authorized human override for a
7
+ * Business Transaction.
8
+ *
9
+ * Overrides are immutable and become part of the
10
+ * Execution Trust Record.
11
+ */
12
+ export interface Override {
13
+ /**
14
+ * Unique Override identifier.
15
+ */
16
+ readonly overrideId: string;
17
+ /**
18
+ * Business Transaction to which this Override belongs.
19
+ */
20
+ readonly businessTransactionId: string;
21
+ /**
22
+ * Authorized user or system that approved
23
+ * the Override.
24
+ */
25
+ readonly approvedBy: string;
26
+ /**
27
+ * Human-readable reason for the Override.
28
+ */
29
+ readonly reason: string;
30
+ /**
31
+ * Optional business justification.
32
+ */
33
+ readonly justification?: string;
34
+ /**
35
+ * UTC timestamp when the Override was approved.
36
+ */
37
+ readonly approvedAt: Date;
38
+ }
39
+ //# sourceMappingURL=override.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"override.d.ts","sourceRoot":"","sources":["../../src/domain/override.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=override.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"override.js","sourceRoot":"","sources":["../../src/domain/override.ts"],"names":[],"mappings":""}
@@ -0,0 +1,109 @@
1
+ import type { JsonValue } from "../types/Json.js";
2
+ /**
3
+ * Pending Policy Change (Policy Governance, maker-checker).
4
+ *
5
+ * Parmana previously took no position on who may author or change a
6
+ * policy document -- the early design documents (removed 2026-09-28)
7
+ * all named policy authoring as external to Parmana's scope. This
8
+ * type is the first artifact of that scope changing: a proposed
9
+ * change to an existing policy's content, held in a durable pending
10
+ * state until a second, distinct human explicitly approves or
11
+ * rejects it. Nothing in this file writes to `policies/` directly --
12
+ * see PendingPolicyChangeRepository and the service that resolves an
13
+ * approval into a filesystem write and a signed
14
+ * PolicyChangeApprovalRecord.
15
+ *
16
+ * `proposedContent` is deliberately typed as JsonValue, not
17
+ * `@parmana/policy`'s `Policy` type: `@parmana/shared` sits below
18
+ * `@parmana/policy` in the dependency graph (policy depends on
19
+ * shared, never the reverse), so this package cannot reference that
20
+ * type without an import cycle. Structural validation against the
21
+ * Policy schema (PolicyValidator) happens one layer up, before a
22
+ * PendingPolicyChange is ever created -- this type only guarantees
23
+ * "some JSON was proposed," never "the JSON is a valid policy."
24
+ */
25
+ export interface PendingPolicyChange {
26
+ /**
27
+ * Unique Pending Policy Change identifier.
28
+ */
29
+ readonly pendingPolicyChangeId: string;
30
+ /**
31
+ * The policy this proposal targets -- same identifier as
32
+ * `Policy.policyId` / `PolicyReference.name`.
33
+ */
34
+ readonly policyName: string;
35
+ /**
36
+ * The existing version this proposal is a change against ("the
37
+ * version being replaced"). Not necessarily distinct from
38
+ * `proposedContent`'s own declared version: an in-place content
39
+ * patch to an existing version number, and a proposal that
40
+ * introduces a new version number, are both legitimate --
41
+ * VERIFICATION-GAPS.md's G-24 entry records an in-place patch to an
42
+ * existing policy version as accepted precedent elsewhere in this
43
+ * codebase. The resolving service derives the actual write target
44
+ * from `proposedContent.policyVersion`, not from this field.
45
+ */
46
+ readonly policyVersion: string;
47
+ /**
48
+ * The full proposed policy.json content, in its entirety -- not a
49
+ * diff or patch. Compared against the current file's content (by
50
+ * the resolving service, via GET .../pending-changes' diff view and
51
+ * PolicyChangeApprovalRecord.contentHashBefore/After) rather than
52
+ * modeled as an edit script here.
53
+ */
54
+ readonly proposedContent: JsonValue;
55
+ /**
56
+ * Identity of the proposer (maker). Must be a human-authenticated
57
+ * (AuthorityType.USER) caller -- enforced at the API layer, before
58
+ * a PendingPolicyChange is ever constructed; this type has no way
59
+ * to verify that claim on its own.
60
+ */
61
+ readonly proposedBy: string;
62
+ /**
63
+ * UTC timestamp when the change was proposed.
64
+ */
65
+ readonly proposedAt: Date;
66
+ /**
67
+ * Lifecycle status. Only ever moves from PENDING_APPROVAL to
68
+ * APPROVED or REJECTED, exactly once -- never back to
69
+ * PENDING_APPROVAL, never from one terminal state to the other. See
70
+ * PendingPolicyChangeRepository.resolve, which enforces this.
71
+ */
72
+ readonly status: PendingPolicyChangeStatus;
73
+ /**
74
+ * Free-text justification from the proposer. Required at creation
75
+ * -- a policy change with no stated reason gives a checker nothing
76
+ * to evaluate.
77
+ */
78
+ readonly reason: string;
79
+ /**
80
+ * Identity of the resolver (checker). Absent while PENDING_APPROVAL.
81
+ * MUST NOT equal `proposedBy` -- enforced at the API layer
82
+ * (SameActorCannotApproveOwnChangeError), not by this type or its
83
+ * repository, since only the caller-auth layer knows the resolving
84
+ * caller's verified identity.
85
+ */
86
+ readonly resolvedBy?: string;
87
+ /**
88
+ * UTC timestamp when the change was approved or rejected. Absent
89
+ * while PENDING_APPROVAL.
90
+ */
91
+ readonly resolvedAt?: Date;
92
+ /**
93
+ * Required free-text reason when status is REJECTED. Absent
94
+ * otherwise -- approval needs no rejection reason, and a rejection
95
+ * with no stated reason gives the proposer nothing to act on.
96
+ */
97
+ readonly rejectionReason?: string;
98
+ }
99
+ /**
100
+ * Fixed lifecycle vocabulary, matching the SCREAMING_SNAKE style
101
+ * already used by this codebase's other enum-like domain fields
102
+ * (AuthorityType, DecisionOutcome).
103
+ */
104
+ export declare enum PendingPolicyChangeStatus {
105
+ PENDING_APPROVAL = "PENDING_APPROVAL",
106
+ APPROVED = "APPROVED",
107
+ REJECTED = "REJECTED"
108
+ }
109
+ //# sourceMappingURL=pending-policy-change.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-policy-change.d.ts","sourceRoot":"","sources":["../../src/domain/pending-policy-change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,CAAC;IAEpC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAE3C;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACnC,gBAAgB,qBAAqB;IAErC,QAAQ,aAAa;IAErB,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Fixed lifecycle vocabulary, matching the SCREAMING_SNAKE style
3
+ * already used by this codebase's other enum-like domain fields
4
+ * (AuthorityType, DecisionOutcome).
5
+ */
6
+ export var PendingPolicyChangeStatus;
7
+ (function (PendingPolicyChangeStatus) {
8
+ PendingPolicyChangeStatus["PENDING_APPROVAL"] = "PENDING_APPROVAL";
9
+ PendingPolicyChangeStatus["APPROVED"] = "APPROVED";
10
+ PendingPolicyChangeStatus["REJECTED"] = "REJECTED";
11
+ })(PendingPolicyChangeStatus || (PendingPolicyChangeStatus = {}));
12
+ //# sourceMappingURL=pending-policy-change.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-policy-change.js","sourceRoot":"","sources":["../../src/domain/pending-policy-change.ts"],"names":[],"mappings":"AA8GA;;;;GAIG;AACH,MAAM,CAAN,IAAY,yBAMX;AAND,WAAY,yBAAyB;IACnC,kEAAqC,CAAA;IAErC,kDAAqB,CAAA;IAErB,kDAAqB,CAAA;AACvB,CAAC,EANW,yBAAyB,KAAzB,yBAAyB,QAMpC"}
@@ -0,0 +1,81 @@
1
+ import type { Signature } from "./signature.js";
2
+ /**
3
+ * Policy Change Approval Record (Policy Governance, maker-checker).
4
+ *
5
+ * Durable, signed, permanent evidence that a specific human (checker)
6
+ * approved a specific human's (maker) proposed change to a specific
7
+ * policy's content -- created exactly once, at the moment a
8
+ * PendingPolicyChange is approved. Rejections produce no record of
9
+ * this type; a rejected PendingPolicyChange (with its
10
+ * rejectionReason) is itself the evidence a rejection leaves behind.
11
+ *
12
+ * Signed with the same signing mechanism, key, and canonicalization
13
+ * as ExecutionTrustRecord (see PolicyChangeCrypto in @parmana/crypto,
14
+ * which reuses VerificationCrypto's own CryptoBootstrap/
15
+ * FileKeyProvider/ArtifactSigner rather than a separate signer) --
16
+ * this is deliberately the same trust root, not a parallel one.
17
+ *
18
+ * `contentHashBefore`/`contentHashAfter` are sha256 hashes (via the
19
+ * same CanonicalSerializer + SHA256HashProvider pair every other hash
20
+ * in this codebase uses) of the canonicalized policy JSON immediately
21
+ * before and after this approval -- the G-24 remediation's content-
22
+ * addressed evidence, so a later audit can confirm exactly what
23
+ * content this approval covered, not merely which version string.
24
+ */
25
+ export interface PolicyChangeApprovalRecord {
26
+ /**
27
+ * Unique Policy Change Approval Record identifier.
28
+ */
29
+ readonly policyChangeApprovalRecordId: string;
30
+ /**
31
+ * The PendingPolicyChange this record resolves.
32
+ */
33
+ readonly pendingPolicyChangeId: string;
34
+ readonly policyName: string;
35
+ /**
36
+ * The version this approval put into force -- the write target
37
+ * derived from the approved proposal's own
38
+ * `proposedContent.policyVersion`, which may or may not equal the
39
+ * PendingPolicyChange's `policyVersion` ("the version being
40
+ * replaced"). See PendingPolicyChange's own doc comment.
41
+ */
42
+ readonly policyVersion: string;
43
+ readonly proposedBy: string;
44
+ readonly approvedBy: string;
45
+ readonly proposedAt: Date;
46
+ readonly approvedAt: Date;
47
+ /**
48
+ * sha256 of the canonicalized content at the write target path
49
+ * immediately before this approval was applied. Absent (rather
50
+ * than a sentinel value) only for a proposal whose target path had
51
+ * no existing file -- a genuinely new version, not a replacement.
52
+ */
53
+ readonly contentHashBefore?: string;
54
+ /**
55
+ * sha256 of the canonicalized `proposedContent` that was written.
56
+ * Always present -- an approval always has content it approved.
57
+ */
58
+ readonly contentHashAfter: string;
59
+ /**
60
+ * sha256 of the canonicalized *prior* approval record for this same
61
+ * (policyName, policyVersion) -- i.e. of the full record returned
62
+ * by PolicyChangeApprovalRecordRepository.findMostRecentFor at the
63
+ * moment this record was created, computed the same way
64
+ * contentHashAfter is (PolicyChangeCrypto.hashPolicyContent).
65
+ * Absent only for the first approval ever recorded for this
66
+ * (policyName, policyVersion) pair. Included in this record's own
67
+ * signed payload (see PolicyChangeCrypto.canonicalRecord), so a
68
+ * later attempt to delete, reorder, or substitute a record in the
69
+ * approval-record store -- as opposed to editing the live
70
+ * policy.json, which contentHashAfter alone already detects -- is
71
+ * independently detectable by re-deriving the chain.
72
+ */
73
+ readonly previousRecordHash?: string;
74
+ /**
75
+ * Signature over the canonical serialization of this record (every
76
+ * field above, excluding this field itself) -- see
77
+ * PolicyChangeCrypto.
78
+ */
79
+ readonly signature: Signature;
80
+ }
81
+ //# sourceMappingURL=policy-change-approval-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-change-approval-record.d.ts","sourceRoot":"","sources":["../../src/domain/policy-change-approval-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,QAAQ,CAAC,4BAA4B,EAAE,MAAM,CAAC;IAE9C;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAE1B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAElC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAErC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=policy-change-approval-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-change-approval-record.js","sourceRoot":"","sources":["../../src/domain/policy-change-approval-record.ts"],"names":[],"mappings":""}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Policy Change Step-Up Authorization (Policy Governance, maker-checker).
3
+ *
4
+ * A second, independent proof of intent a human checker presents on
5
+ * POST /policies/pending-changes/:id/approve and .../reject, on top of
6
+ * (never instead of) their bearer-token identity and isHumanCaller.ts.
7
+ * Signed by the checker's own Ed25519 keypair -- provisioned once by
8
+ * generate-api-key.ts, held only by the checker, never derived from or
9
+ * stored alongside their bearer token -- so a leaked bearer token alone
10
+ * is not sufficient to approve or reject a policy change.
11
+ *
12
+ * Deliberately shaped like SignedExecutionAuthorization (payload +
13
+ * flat base64 signature + keyId + algorithm), not like the Signature
14
+ * object type PolicyChangeApprovalRecord.signature uses: this is a
15
+ * caller-issued envelope crossing the wire, the same category of
16
+ * artifact SignedExecutionAuthorization is, not a self-issued Parmana
17
+ * signature over a durable record.
18
+ *
19
+ * Deliberately its own type, not a reuse of SignedApproval
20
+ * (@parmana/approval): SignedApproval's capability/resourceId/scope
21
+ * fields model a bounded business-transaction value approval (e.g. "an
22
+ * amount <= 5000"), evaluated as PolicySignals evidence. A policy
23
+ * governance approve/reject is a plain yes/no action with no bounded
24
+ * value to check -- forcing it through SignedApproval's scope shape
25
+ * would mean inventing a meaningless always-true scope just to satisfy
26
+ * the type. The verification *pattern* (signed payload, replay-checked
27
+ * nonce, checks-then-nonce-last ordering) is reused; the artifact type
28
+ * is not.
29
+ */
30
+ export interface PolicyChangeStepUpAuthorizationPayload {
31
+ /**
32
+ * Payload format version. Verifiers MUST reject any other value
33
+ * (including a missing field) before attempting signature
34
+ * verification -- mirrors ExecutionAuthorizationPayload.version.
35
+ */
36
+ readonly version: 1;
37
+ /**
38
+ * Single-use nonce. Verifiers MUST reject a payload whose nonce has
39
+ * been seen before (see PolicyChangeStepUpVerifier, backed by its
40
+ * own dedicated NonceStore/table, a distinct trust domain from both
41
+ * ExecutionGateway's consumed_nonces and Approval Artifact's
42
+ * consumed_approval_nonces).
43
+ */
44
+ readonly nonce: string;
45
+ /**
46
+ * The specific PendingPolicyChange this envelope authorizes. A
47
+ * signed envelope for one pending change must never be accepted for
48
+ * a different one, even if otherwise valid.
49
+ */
50
+ readonly pendingPolicyChangeId: string;
51
+ /**
52
+ * The specific action this envelope authorizes. A signed "approve"
53
+ * envelope must never be accepted for a reject request, or vice
54
+ * versa, even if otherwise valid.
55
+ */
56
+ readonly action: "approve" | "reject";
57
+ /**
58
+ * ISO-8601 UTC time the envelope was signed.
59
+ */
60
+ readonly authorizedAt: string;
61
+ /**
62
+ * ISO-8601 UTC expiry. REQUIRED. Verifiers MUST reject an envelope
63
+ * past this time, and MUST reject a TTL (expiresAt - authorizedAt)
64
+ * exceeding server policy, so a compromised signer cannot mint
65
+ * long-lived envelopes.
66
+ */
67
+ readonly expiresAt: string;
68
+ }
69
+ /**
70
+ * The complete envelope crossing the wire in an approve/reject request
71
+ * body.
72
+ */
73
+ export interface PolicyChangeStepUpAuthorization {
74
+ readonly payload: PolicyChangeStepUpAuthorizationPayload;
75
+ /**
76
+ * Base64-encoded signature over the canonical serialization of
77
+ * payload.
78
+ */
79
+ readonly signature: string;
80
+ /**
81
+ * Identifier of the signing key, for operator-facing diagnostics
82
+ * (key rotation, audit) -- not used to select a verification key:
83
+ * the checker's public key is resolved from their own ApiKeyEntry
84
+ * (req.callerStepUpPublicKey), never from a caller-supplied field.
85
+ */
86
+ readonly keyId: string;
87
+ /**
88
+ * Signature algorithm identifier. Always "ed25519" today -- step-up
89
+ * keys are generated exclusively as Ed25519 by generate-api-key.ts,
90
+ * independent of the server's own configured SIGNATURE_PROVIDER
91
+ * (that setting governs Parmana's own runtime signing key, never an
92
+ * operator-held step-up key). Carried on the envelope for forward
93
+ * compatibility and diagnostics, not read to select the verifier.
94
+ */
95
+ readonly algorithm: string;
96
+ }
97
+ //# sourceMappingURL=policy-change-step-up-authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-change-step-up-authorization.d.ts","sourceRoot":"","sources":["../../src/domain/policy-change-step-up-authorization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,sCAAsC;IACrD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IAEpB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,sCAAsC,CAAC;IAEzD;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=policy-change-step-up-authorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-change-step-up-authorization.js","sourceRoot":"","sources":["../../src/domain/policy-change-step-up-authorization.ts"],"names":[],"mappings":""}