@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.
- package/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +16 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/config/ApiKeyEntry.d.ts +97 -0
- package/dist/config/ApiKeyEntry.d.ts.map +1 -0
- package/dist/config/ApiKeyEntry.js +2 -0
- package/dist/config/ApiKeyEntry.js.map +1 -0
- package/dist/config/Config.d.ts +202 -0
- package/dist/config/Config.d.ts.map +1 -0
- package/dist/config/Config.js +172 -0
- package/dist/config/Config.js.map +1 -0
- package/dist/config/ConfigLoader.d.ts +5 -0
- package/dist/config/ConfigLoader.d.ts.map +1 -0
- package/dist/config/ConfigLoader.js +8 -0
- package/dist/config/ConfigLoader.js.map +1 -0
- package/dist/config/ConfigUtils.d.ts +6 -0
- package/dist/config/ConfigUtils.d.ts.map +1 -0
- package/dist/config/ConfigUtils.js +8 -0
- package/dist/config/ConfigUtils.js.map +1 -0
- package/dist/config/ConfigValidation.d.ts +30 -0
- package/dist/config/ConfigValidation.d.ts.map +1 -0
- package/dist/config/ConfigValidation.js +170 -0
- package/dist/config/ConfigValidation.js.map +1 -0
- package/dist/config/CryptoAlgorithms.d.ts +42 -0
- package/dist/config/CryptoAlgorithms.d.ts.map +1 -0
- package/dist/config/CryptoAlgorithms.js +42 -0
- package/dist/config/CryptoAlgorithms.js.map +1 -0
- package/dist/config/KeyProviders.d.ts +9 -0
- package/dist/config/KeyProviders.d.ts.map +1 -0
- package/dist/config/KeyProviders.js +8 -0
- package/dist/config/KeyProviders.js.map +1 -0
- package/dist/config/SecretsProviders.d.ts +6 -0
- package/dist/config/SecretsProviders.d.ts.map +1 -0
- package/dist/config/SecretsProviders.js +5 -0
- package/dist/config/SecretsProviders.js.map +1 -0
- package/dist/config/StorageProviders.d.ts +18 -0
- package/dist/config/StorageProviders.d.ts.map +1 -0
- package/dist/config/StorageProviders.js +20 -0
- package/dist/config/StorageProviders.js.map +1 -0
- package/dist/config/TrustProfiles.d.ts +5 -0
- package/dist/config/TrustProfiles.d.ts.map +1 -0
- package/dist/config/TrustProfiles.js +4 -0
- package/dist/config/TrustProfiles.js.map +1 -0
- package/dist/config/index.d.ts +11 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +11 -0
- package/dist/config/index.js.map +1 -0
- package/dist/domain/approval-artifact.d.ts +136 -0
- package/dist/domain/approval-artifact.d.ts.map +1 -0
- package/dist/domain/approval-artifact.js +2 -0
- package/dist/domain/approval-artifact.js.map +1 -0
- package/dist/domain/approval-issuer.d.ts +52 -0
- package/dist/domain/approval-issuer.d.ts.map +1 -0
- package/dist/domain/approval-issuer.js +2 -0
- package/dist/domain/approval-issuer.js.map +1 -0
- package/dist/domain/authority-grant.d.ts +54 -0
- package/dist/domain/authority-grant.d.ts.map +1 -0
- package/dist/domain/authority-grant.js +2 -0
- package/dist/domain/authority-grant.js.map +1 -0
- package/dist/domain/authority.d.ts +42 -0
- package/dist/domain/authority.d.ts.map +1 -0
- package/dist/domain/authority.js +11 -0
- package/dist/domain/authority.js.map +1 -0
- package/dist/domain/authorization.d.ts +54 -0
- package/dist/domain/authorization.d.ts.map +1 -0
- package/dist/domain/authorization.js +2 -0
- package/dist/domain/authorization.js.map +1 -0
- package/dist/domain/business-signal-source.d.ts +52 -0
- package/dist/domain/business-signal-source.d.ts.map +1 -0
- package/dist/domain/business-signal-source.js +2 -0
- package/dist/domain/business-signal-source.js.map +1 -0
- package/dist/domain/business-transaction.d.ts +99 -0
- package/dist/domain/business-transaction.d.ts.map +1 -0
- package/dist/domain/business-transaction.js +16 -0
- package/dist/domain/business-transaction.js.map +1 -0
- package/dist/domain/business-validation.d.ts +177 -0
- package/dist/domain/business-validation.d.ts.map +1 -0
- package/dist/domain/business-validation.js +60 -0
- package/dist/domain/business-validation.js.map +1 -0
- package/dist/domain/challenge-record.d.ts +181 -0
- package/dist/domain/challenge-record.d.ts.map +1 -0
- package/dist/domain/challenge-record.js +2 -0
- package/dist/domain/challenge-record.js.map +1 -0
- package/dist/domain/decision.d.ts +89 -0
- package/dist/domain/decision.d.ts.map +1 -0
- package/dist/domain/decision.js +9 -0
- package/dist/domain/decision.js.map +1 -0
- package/dist/domain/evidence-anchor.d.ts +54 -0
- package/dist/domain/evidence-anchor.d.ts.map +1 -0
- package/dist/domain/evidence-anchor.js +2 -0
- package/dist/domain/evidence-anchor.js.map +1 -0
- package/dist/domain/executable-content.d.ts +45 -0
- package/dist/domain/executable-content.d.ts.map +1 -0
- package/dist/domain/executable-content.js +39 -0
- package/dist/domain/executable-content.js.map +1 -0
- package/dist/domain/execution-audit-event.d.ts +65 -0
- package/dist/domain/execution-audit-event.d.ts.map +1 -0
- package/dist/domain/execution-audit-event.js +2 -0
- package/dist/domain/execution-audit-event.js.map +1 -0
- package/dist/domain/execution-authorization.d.ts +224 -0
- package/dist/domain/execution-authorization.d.ts.map +1 -0
- package/dist/domain/execution-authorization.js +2 -0
- package/dist/domain/execution-authorization.js.map +1 -0
- package/dist/domain/execution-evidence.d.ts +38 -0
- package/dist/domain/execution-evidence.d.ts.map +1 -0
- package/dist/domain/execution-evidence.js +2 -0
- package/dist/domain/execution-evidence.js.map +1 -0
- package/dist/domain/execution-intent.d.ts +92 -0
- package/dist/domain/execution-intent.d.ts.map +1 -0
- package/dist/domain/execution-intent.js +2 -0
- package/dist/domain/execution-intent.js.map +1 -0
- package/dist/domain/execution-metadata.d.ts +8 -0
- package/dist/domain/execution-metadata.d.ts.map +1 -0
- package/dist/domain/execution-metadata.js +2 -0
- package/dist/domain/execution-metadata.js.map +1 -0
- package/dist/domain/execution-outcome-store.d.ts +49 -0
- package/dist/domain/execution-outcome-store.d.ts.map +1 -0
- package/dist/domain/execution-outcome-store.js +10 -0
- package/dist/domain/execution-outcome-store.js.map +1 -0
- package/dist/domain/execution-result.d.ts +49 -0
- package/dist/domain/execution-result.d.ts.map +1 -0
- package/dist/domain/execution-result.js +2 -0
- package/dist/domain/execution-result.js.map +1 -0
- package/dist/domain/execution-trust-record.d.ts +142 -0
- package/dist/domain/execution-trust-record.d.ts.map +1 -0
- package/dist/domain/execution-trust-record.js +2 -0
- package/dist/domain/execution-trust-record.js.map +1 -0
- package/dist/domain/execution.d.ts +108 -0
- package/dist/domain/execution.d.ts.map +1 -0
- package/dist/domain/execution.js +18 -0
- package/dist/domain/execution.js.map +1 -0
- package/dist/domain/external-connector.d.ts +68 -0
- package/dist/domain/external-connector.d.ts.map +1 -0
- package/dist/domain/external-connector.js +2 -0
- package/dist/domain/external-connector.js.map +1 -0
- package/dist/domain/index.d.ts +37 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +37 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/intent.d.ts +66 -0
- package/dist/domain/intent.d.ts.map +1 -0
- package/dist/domain/intent.js +2 -0
- package/dist/domain/intent.js.map +1 -0
- package/dist/domain/metadata.d.ts +53 -0
- package/dist/domain/metadata.d.ts.map +1 -0
- package/dist/domain/metadata.js +11 -0
- package/dist/domain/metadata.js.map +1 -0
- package/dist/domain/override.d.ts +39 -0
- package/dist/domain/override.d.ts.map +1 -0
- package/dist/domain/override.js +2 -0
- package/dist/domain/override.js.map +1 -0
- package/dist/domain/pending-policy-change.d.ts +109 -0
- package/dist/domain/pending-policy-change.d.ts.map +1 -0
- package/dist/domain/pending-policy-change.js +12 -0
- package/dist/domain/pending-policy-change.js.map +1 -0
- package/dist/domain/policy-change-approval-record.d.ts +81 -0
- package/dist/domain/policy-change-approval-record.d.ts.map +1 -0
- package/dist/domain/policy-change-approval-record.js +2 -0
- package/dist/domain/policy-change-approval-record.js.map +1 -0
- package/dist/domain/policy-change-step-up-authorization.d.ts +97 -0
- package/dist/domain/policy-change-step-up-authorization.d.ts.map +1 -0
- package/dist/domain/policy-change-step-up-authorization.js +2 -0
- package/dist/domain/policy-change-step-up-authorization.js.map +1 -0
- package/dist/domain/policy-reference.d.ts +58 -0
- package/dist/domain/policy-reference.d.ts.map +1 -0
- package/dist/domain/policy-reference.js +2 -0
- package/dist/domain/policy-reference.js.map +1 -0
- package/dist/domain/receipt.d.ts +72 -0
- package/dist/domain/receipt.d.ts.map +1 -0
- package/dist/domain/receipt.js +2 -0
- package/dist/domain/receipt.js.map +1 -0
- package/dist/domain/refusal-record.d.ts +110 -0
- package/dist/domain/refusal-record.d.ts.map +1 -0
- package/dist/domain/refusal-record.js +2 -0
- package/dist/domain/refusal-record.js.map +1 -0
- package/dist/domain/release-approval.d.ts +14 -0
- package/dist/domain/release-approval.d.ts.map +1 -0
- package/dist/domain/release-approval.js +2 -0
- package/dist/domain/release-approval.js.map +1 -0
- package/dist/domain/signals.d.ts +10 -0
- package/dist/domain/signals.d.ts.map +1 -0
- package/dist/domain/signals.js +2 -0
- package/dist/domain/signals.js.map +1 -0
- package/dist/domain/signature-entry.d.ts +23 -0
- package/dist/domain/signature-entry.d.ts.map +1 -0
- package/dist/domain/signature-entry.js +2 -0
- package/dist/domain/signature-entry.js.map +1 -0
- package/dist/domain/signature.d.ts +26 -0
- package/dist/domain/signature.d.ts.map +1 -0
- package/dist/domain/signature.js +2 -0
- package/dist/domain/signature.js.map +1 -0
- package/dist/domain/unsigned-execution-trust-record.d.ts +7 -0
- package/dist/domain/unsigned-execution-trust-record.d.ts.map +1 -0
- package/dist/domain/unsigned-execution-trust-record.js +2 -0
- package/dist/domain/unsigned-execution-trust-record.js.map +1 -0
- package/dist/domain/verification.d.ts +48 -0
- package/dist/domain/verification.d.ts.map +1 -0
- package/dist/domain/verification.js +9 -0
- package/dist/domain/verification.js.map +1 -0
- package/dist/errors/approval-issuer-change-not-found-error.d.ts +9 -0
- package/dist/errors/approval-issuer-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/approval-issuer-change-not-found-error.js +11 -0
- package/dist/errors/approval-issuer-change-not-found-error.js.map +1 -0
- package/dist/errors/authority-grant-change-not-found-error.d.ts +9 -0
- package/dist/errors/authority-grant-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/authority-grant-change-not-found-error.js +11 -0
- package/dist/errors/authority-grant-change-not-found-error.js.map +1 -0
- package/dist/errors/authority-required-error.d.ts +5 -0
- package/dist/errors/authority-required-error.d.ts.map +1 -0
- package/dist/errors/authority-required-error.js +7 -0
- package/dist/errors/authority-required-error.js.map +1 -0
- package/dist/errors/authorization-no-longer-valid-error.d.ts +19 -0
- package/dist/errors/authorization-no-longer-valid-error.d.ts.map +1 -0
- package/dist/errors/authorization-no-longer-valid-error.js +23 -0
- package/dist/errors/authorization-no-longer-valid-error.js.map +1 -0
- package/dist/errors/authorization-required-error.d.ts +5 -0
- package/dist/errors/authorization-required-error.d.ts.map +1 -0
- package/dist/errors/authorization-required-error.js +7 -0
- package/dist/errors/authorization-required-error.js.map +1 -0
- package/dist/errors/business-signal-source-change-not-found-error.d.ts +9 -0
- package/dist/errors/business-signal-source-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/business-signal-source-change-not-found-error.js +11 -0
- package/dist/errors/business-signal-source-change-not-found-error.js.map +1 -0
- package/dist/errors/business-transaction-not-found-error.d.ts +5 -0
- package/dist/errors/business-transaction-not-found-error.d.ts.map +1 -0
- package/dist/errors/business-transaction-not-found-error.js +7 -0
- package/dist/errors/business-transaction-not-found-error.js.map +1 -0
- package/dist/errors/challenge-record-not-found-error.d.ts +9 -0
- package/dist/errors/challenge-record-not-found-error.d.ts.map +1 -0
- package/dist/errors/challenge-record-not-found-error.js +11 -0
- package/dist/errors/challenge-record-not-found-error.js.map +1 -0
- package/dist/errors/conflict-error.d.ts +5 -0
- package/dist/errors/conflict-error.d.ts.map +1 -0
- package/dist/errors/conflict-error.js +7 -0
- package/dist/errors/conflict-error.js.map +1 -0
- package/dist/errors/connector-not-registered-error.d.ts +21 -0
- package/dist/errors/connector-not-registered-error.d.ts.map +1 -0
- package/dist/errors/connector-not-registered-error.js +24 -0
- package/dist/errors/connector-not-registered-error.js.map +1 -0
- package/dist/errors/decision-not-approved-error.d.ts +5 -0
- package/dist/errors/decision-not-approved-error.d.ts.map +1 -0
- package/dist/errors/decision-not-approved-error.js +7 -0
- package/dist/errors/decision-not-approved-error.js.map +1 -0
- package/dist/errors/duplicate-business-transaction-error.d.ts +26 -0
- package/dist/errors/duplicate-business-transaction-error.d.ts.map +1 -0
- package/dist/errors/duplicate-business-transaction-error.js +28 -0
- package/dist/errors/duplicate-business-transaction-error.js.map +1 -0
- package/dist/errors/external-connector-change-not-found-error.d.ts +9 -0
- package/dist/errors/external-connector-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/external-connector-change-not-found-error.js +11 -0
- package/dist/errors/external-connector-change-not-found-error.js.map +1 -0
- package/dist/errors/forbidden-error.d.ts +5 -0
- package/dist/errors/forbidden-error.d.ts.map +1 -0
- package/dist/errors/forbidden-error.js +7 -0
- package/dist/errors/forbidden-error.js.map +1 -0
- package/dist/errors/index.d.ts +30 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +30 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/intent-required-error.d.ts +5 -0
- package/dist/errors/intent-required-error.d.ts.map +1 -0
- package/dist/errors/intent-required-error.js +7 -0
- package/dist/errors/intent-required-error.js.map +1 -0
- package/dist/errors/non-human-caller-denied-error.d.ts +10 -0
- package/dist/errors/non-human-caller-denied-error.d.ts.map +1 -0
- package/dist/errors/non-human-caller-denied-error.js +12 -0
- package/dist/errors/non-human-caller-denied-error.js.map +1 -0
- package/dist/errors/nonce-already-consumed-error.d.ts +26 -0
- package/dist/errors/nonce-already-consumed-error.d.ts.map +1 -0
- package/dist/errors/nonce-already-consumed-error.js +29 -0
- package/dist/errors/nonce-already-consumed-error.js.map +1 -0
- package/dist/errors/outcome-unknown-error.d.ts +15 -0
- package/dist/errors/outcome-unknown-error.d.ts.map +1 -0
- package/dist/errors/outcome-unknown-error.js +19 -0
- package/dist/errors/outcome-unknown-error.js.map +1 -0
- package/dist/errors/override-not-allowed-error.d.ts +5 -0
- package/dist/errors/override-not-allowed-error.d.ts.map +1 -0
- package/dist/errors/override-not-allowed-error.js +7 -0
- package/dist/errors/override-not-allowed-error.js.map +1 -0
- package/dist/errors/parmana-error.d.ts +15 -0
- package/dist/errors/parmana-error.d.ts.map +1 -0
- package/dist/errors/parmana-error.js +21 -0
- package/dist/errors/parmana-error.js.map +1 -0
- package/dist/errors/pending-policy-change-not-found-error.d.ts +9 -0
- package/dist/errors/pending-policy-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/pending-policy-change-not-found-error.js +11 -0
- package/dist/errors/pending-policy-change-not-found-error.js.map +1 -0
- package/dist/errors/policy-not-found-error.d.ts +5 -0
- package/dist/errors/policy-not-found-error.d.ts.map +1 -0
- package/dist/errors/policy-not-found-error.js +7 -0
- package/dist/errors/policy-not-found-error.js.map +1 -0
- package/dist/errors/receipt-generation-error.d.ts +5 -0
- package/dist/errors/receipt-generation-error.d.ts.map +1 -0
- package/dist/errors/receipt-generation-error.js +7 -0
- package/dist/errors/receipt-generation-error.js.map +1 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts +12 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts.map +1 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.js +15 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.js.map +1 -0
- package/dist/errors/step-up-authorization-invalid-error.d.ts +25 -0
- package/dist/errors/step-up-authorization-invalid-error.d.ts.map +1 -0
- package/dist/errors/step-up-authorization-invalid-error.js +28 -0
- package/dist/errors/step-up-authorization-invalid-error.js.map +1 -0
- package/dist/errors/trust-chain-validation-error.d.ts +5 -0
- package/dist/errors/trust-chain-validation-error.d.ts.map +1 -0
- package/dist/errors/trust-chain-validation-error.js +7 -0
- package/dist/errors/trust-chain-validation-error.js.map +1 -0
- package/dist/errors/unauthorized-error.d.ts +5 -0
- package/dist/errors/unauthorized-error.d.ts.map +1 -0
- package/dist/errors/unauthorized-error.js +7 -0
- package/dist/errors/unauthorized-error.js.map +1 -0
- package/dist/errors/validation-error.d.ts +5 -0
- package/dist/errors/validation-error.d.ts.map +1 -0
- package/dist/errors/validation-error.js +7 -0
- package/dist/errors/validation-error.js.map +1 -0
- package/dist/errors/verification-failed-error.d.ts +5 -0
- package/dist/errors/verification-failed-error.d.ts.map +1 -0
- package/dist/errors/verification-failed-error.js +7 -0
- package/dist/errors/verification-failed-error.js.map +1 -0
- package/dist/gateway/GatewayAuthentication.d.ts +8 -0
- package/dist/gateway/GatewayAuthentication.d.ts.map +1 -0
- package/dist/gateway/GatewayAuthentication.js +2 -0
- package/dist/gateway/GatewayAuthentication.js.map +1 -0
- package/dist/gateway/GatewayAuthenticationClaims.d.ts +10 -0
- package/dist/gateway/GatewayAuthenticationClaims.d.ts.map +1 -0
- package/dist/gateway/GatewayAuthenticationClaims.js +2 -0
- package/dist/gateway/GatewayAuthenticationClaims.js.map +1 -0
- package/dist/gateway/GatewayAuthenticationPayload.d.ts +15 -0
- package/dist/gateway/GatewayAuthenticationPayload.d.ts.map +1 -0
- package/dist/gateway/GatewayAuthenticationPayload.js +2 -0
- package/dist/gateway/GatewayAuthenticationPayload.js.map +1 -0
- package/dist/gateway/SignedGatewayAuthentication.d.ts +9 -0
- package/dist/gateway/SignedGatewayAuthentication.d.ts.map +1 -0
- package/dist/gateway/SignedGatewayAuthentication.js +2 -0
- package/dist/gateway/SignedGatewayAuthentication.js.map +1 -0
- package/dist/gateway/index.d.ts +4 -0
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +4 -0
- package/dist/gateway/index.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/Logger.d.ts +65 -0
- package/dist/logging/Logger.d.ts.map +1 -0
- package/dist/logging/Logger.js +97 -0
- package/dist/logging/Logger.js.map +1 -0
- package/dist/network/externalEndpointAddress.d.ts +48 -0
- package/dist/network/externalEndpointAddress.d.ts.map +1 -0
- package/dist/network/externalEndpointAddress.js +147 -0
- package/dist/network/externalEndpointAddress.js.map +1 -0
- package/dist/repositories/approval-issuer-repository.d.ts +31 -0
- package/dist/repositories/approval-issuer-repository.d.ts.map +1 -0
- package/dist/repositories/approval-issuer-repository.js +2 -0
- package/dist/repositories/approval-issuer-repository.js.map +1 -0
- package/dist/repositories/authority-grant-repository.d.ts +22 -0
- package/dist/repositories/authority-grant-repository.d.ts.map +1 -0
- package/dist/repositories/authority-grant-repository.js +2 -0
- package/dist/repositories/authority-grant-repository.js.map +1 -0
- package/dist/repositories/business-signal-source-repository.d.ts +17 -0
- package/dist/repositories/business-signal-source-repository.d.ts.map +1 -0
- package/dist/repositories/business-signal-source-repository.js +2 -0
- package/dist/repositories/business-signal-source-repository.js.map +1 -0
- package/dist/repositories/business-transaction-repository.d.ts +34 -0
- package/dist/repositories/business-transaction-repository.d.ts.map +1 -0
- package/dist/repositories/business-transaction-repository.js +2 -0
- package/dist/repositories/business-transaction-repository.js.map +1 -0
- package/dist/repositories/challenge-record-repository.d.ts +67 -0
- package/dist/repositories/challenge-record-repository.d.ts.map +1 -0
- package/dist/repositories/challenge-record-repository.js +76 -0
- package/dist/repositories/challenge-record-repository.js.map +1 -0
- package/dist/repositories/execution-intent-repository.d.ts +38 -0
- package/dist/repositories/execution-intent-repository.d.ts.map +1 -0
- package/dist/repositories/execution-intent-repository.js +2 -0
- package/dist/repositories/execution-intent-repository.js.map +1 -0
- package/dist/repositories/execution-trust-record-repository.d.ts +62 -0
- package/dist/repositories/execution-trust-record-repository.d.ts.map +1 -0
- package/dist/repositories/execution-trust-record-repository.js +2 -0
- package/dist/repositories/execution-trust-record-repository.js.map +1 -0
- package/dist/repositories/external-connector-repository.d.ts +37 -0
- package/dist/repositories/external-connector-repository.d.ts.map +1 -0
- package/dist/repositories/external-connector-repository.js +2 -0
- package/dist/repositories/external-connector-repository.js.map +1 -0
- package/dist/repositories/handbook-download-lead-repository.d.ts +18 -0
- package/dist/repositories/handbook-download-lead-repository.d.ts.map +1 -0
- package/dist/repositories/handbook-download-lead-repository.js +2 -0
- package/dist/repositories/handbook-download-lead-repository.js.map +1 -0
- package/dist/repositories/index.d.ts +14 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +14 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/pending-policy-change-repository.d.ts +72 -0
- package/dist/repositories/pending-policy-change-repository.d.ts.map +1 -0
- package/dist/repositories/pending-policy-change-repository.js +46 -0
- package/dist/repositories/pending-policy-change-repository.js.map +1 -0
- package/dist/repositories/policy-change-approval-record-repository.d.ts +39 -0
- package/dist/repositories/policy-change-approval-record-repository.d.ts.map +1 -0
- package/dist/repositories/policy-change-approval-record-repository.js +2 -0
- package/dist/repositories/policy-change-approval-record-repository.js.map +1 -0
- package/dist/repositories/policy-repository.d.ts +15 -0
- package/dist/repositories/policy-repository.d.ts.map +1 -0
- package/dist/repositories/policy-repository.js +2 -0
- package/dist/repositories/policy-repository.js.map +1 -0
- package/dist/repositories/refusal-record-repository.d.ts +13 -0
- package/dist/repositories/refusal-record-repository.d.ts.map +1 -0
- package/dist/repositories/refusal-record-repository.js +2 -0
- package/dist/repositories/refusal-record-repository.js.map +1 -0
- package/dist/types/Json.d.ts +7 -0
- package/dist/types/Json.d.ts.map +1 -0
- package/dist/types/Json.js +2 -0
- package/dist/types/Json.js.map +1 -0
- package/dist/utils/normalize-policy.d.ts +16 -0
- package/dist/utils/normalize-policy.d.ts.map +1 -0
- package/dist/utils/normalize-policy.js +10 -0
- package/dist/utils/normalize-policy.js.map +1 -0
- package/package.json +39 -4
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { PolicyReference } from "./policy-reference.js";
|
|
2
|
+
import type { JsonValue } from "../types/Json.js";
|
|
3
|
+
import type { DecisionAssessment } from "./business-validation.js";
|
|
4
|
+
/**
|
|
5
|
+
* Parmana Trust Core
|
|
6
|
+
*
|
|
7
|
+
* Decision
|
|
8
|
+
*
|
|
9
|
+
* Immutable result produced by evaluating an
|
|
10
|
+
* Intent against a Policy.
|
|
11
|
+
*
|
|
12
|
+
* Decision does not create authority.
|
|
13
|
+
* Decision does not grant authorization.
|
|
14
|
+
* Decision does not modify intent.
|
|
15
|
+
*
|
|
16
|
+
* Decision records only the outcome of
|
|
17
|
+
* deterministic Policy evaluation.
|
|
18
|
+
*/
|
|
19
|
+
export interface Decision {
|
|
20
|
+
/**
|
|
21
|
+
* Unique Decision identifier.
|
|
22
|
+
*/
|
|
23
|
+
readonly decisionId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Intent evaluated by this Decision.
|
|
26
|
+
*/
|
|
27
|
+
readonly intentId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Exact Policy used.
|
|
30
|
+
*/
|
|
31
|
+
readonly policy: PolicyReference;
|
|
32
|
+
/**
|
|
33
|
+
* Runtime signals evaluated by the policy.
|
|
34
|
+
*
|
|
35
|
+
* These are captured to support deterministic
|
|
36
|
+
* replay and independent verification.
|
|
37
|
+
*/
|
|
38
|
+
readonly signals: Record<string, JsonValue>;
|
|
39
|
+
/**
|
|
40
|
+
* Policy evaluation outcome.
|
|
41
|
+
*/
|
|
42
|
+
readonly outcome: DecisionOutcome;
|
|
43
|
+
/**
|
|
44
|
+
* Optional explanation.
|
|
45
|
+
*/
|
|
46
|
+
readonly reason?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Identifier of the Policy rule that matched, or "none" when no rule
|
|
49
|
+
* matched. Optional and caller-unsettable, the same pattern as
|
|
50
|
+
* PolicyReference.contentHash (G-24): a request-supplied Decision
|
|
51
|
+
* never carries this -- it is copied verbatim from
|
|
52
|
+
* PolicyEngine.evaluate()'s PolicyDecision by DecisionBuilder, never
|
|
53
|
+
* computed here. Absent only on a Decision built before this field
|
|
54
|
+
* existed (docs/VERIFICATION-GAPS.md G-44); every Decision built
|
|
55
|
+
* going forward carries it.
|
|
56
|
+
*/
|
|
57
|
+
readonly matchedRuleId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Number of rules PolicyEngine evaluated before reaching a match (or
|
|
60
|
+
* exhausting the rule list). Same provenance and optionality as
|
|
61
|
+
* matchedRuleId above.
|
|
62
|
+
*/
|
|
63
|
+
readonly evaluatedRules?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Ordered rule-id trace PolicyEngine walked to reach matchedRuleId --
|
|
66
|
+
* lets an auditor independently reconstruct exactly how this
|
|
67
|
+
* Decision was reached, not merely which rule ultimately matched.
|
|
68
|
+
* Same provenance and optionality as matchedRuleId above.
|
|
69
|
+
*/
|
|
70
|
+
readonly matchedPath?: readonly string[];
|
|
71
|
+
/**
|
|
72
|
+
* UTC timestamp when evaluation completed.
|
|
73
|
+
*/
|
|
74
|
+
readonly evaluatedAt: Date;
|
|
75
|
+
/**
|
|
76
|
+
* Authority, business validation and, for a refusal, execution, each
|
|
77
|
+
* as its own status (RFC-0023). Absent on decisions made before it
|
|
78
|
+
* existed; those records still verify.
|
|
79
|
+
*/
|
|
80
|
+
readonly assessment?: DecisionAssessment;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Canonical Decision outcomes.
|
|
84
|
+
*/
|
|
85
|
+
export declare enum DecisionOutcome {
|
|
86
|
+
APPROVED = "APPROVED",
|
|
87
|
+
REJECTED = "REJECTED"
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=decision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision.d.ts","sourceRoot":"","sources":["../../src/domain/decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IAEjC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB,QAAQ,aAAa;IAErB,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Decision outcomes.
|
|
3
|
+
*/
|
|
4
|
+
export var DecisionOutcome;
|
|
5
|
+
(function (DecisionOutcome) {
|
|
6
|
+
DecisionOutcome["APPROVED"] = "APPROVED";
|
|
7
|
+
DecisionOutcome["REJECTED"] = "REJECTED";
|
|
8
|
+
})(DecisionOutcome || (DecisionOutcome = {}));
|
|
9
|
+
//# sourceMappingURL=decision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision.js","sourceRoot":"","sources":["../../src/domain/decision.ts"],"names":[],"mappings":"AA8FA;;GAEG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IAErB,wCAAqB,CAAA;AACvB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { PolicyGovernanceAnchorStatus } from "./policy-reference.js";
|
|
2
|
+
/**
|
|
3
|
+
* The binding artifact the 2026-09-15 evidence anchor audit's
|
|
4
|
+
* GAP-4 finding named as missing, closing its residual "Record 3 is
|
|
5
|
+
* outside all three [policy-governance] mechanisms" gap
|
|
6
|
+
* (docs/VERIFICATION-GAPS.md G-45's "Remaining, not attempted this
|
|
7
|
+
* session" note).
|
|
8
|
+
*
|
|
9
|
+
* Not a NEW cryptographic guarantee -- policyContentHash,
|
|
10
|
+
* governanceAnchor, and connector evidence were already bound together
|
|
11
|
+
* implicitly, since all three sit inside the same ExecutionTrustRecord
|
|
12
|
+
* that trustRecordHash/signature already cover in full. What this adds
|
|
13
|
+
* is a single, explicitly-named, independently-computed pointer an
|
|
14
|
+
* auditor can check WITHOUT already knowing to reach into
|
|
15
|
+
* transaction.policy and executions[].evidence.attributes.connector
|
|
16
|
+
* separately and reconstruct the binding themselves -- the exact
|
|
17
|
+
* "here's proof they're linked" artifact the originating gap audit
|
|
18
|
+
* asked whether one existed.
|
|
19
|
+
*
|
|
20
|
+
* Absent when there is nothing to anchor at all (no policyContentHash,
|
|
21
|
+
* no governanceAnchor, no connectorEvidenceHash -- should not occur for
|
|
22
|
+
* any real ExecutionTrustRecord, since G-24 always stamps
|
|
23
|
+
* policyContentHash, but the type stays honest rather than assuming).
|
|
24
|
+
*/
|
|
25
|
+
export interface EvidenceAnchor {
|
|
26
|
+
/**
|
|
27
|
+
* Copied from transaction.policy.contentHash (G-24). Present on
|
|
28
|
+
* every real ExecutionTrustRecord.
|
|
29
|
+
*/
|
|
30
|
+
readonly policyContentHash?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Copied from transaction.policy.governanceAnchor.status (G-45).
|
|
33
|
+
* Absent only when no PolicyGovernanceAnchorResolver was configured
|
|
34
|
+
* for this deployment -- not the same as NO_APPROVAL_RECORD, which
|
|
35
|
+
* is a real, present status meaning the resolver ran and found
|
|
36
|
+
* nothing.
|
|
37
|
+
*/
|
|
38
|
+
readonly governanceAnchorStatus?: PolicyGovernanceAnchorStatus;
|
|
39
|
+
/**
|
|
40
|
+
* Copied from executions[0].evidence.attributes.connector.connectorEvidenceHash,
|
|
41
|
+
* when a real connector executed. Absent for a policy with no
|
|
42
|
+
* connector registered, or when Execution never reached the point of
|
|
43
|
+
* attaching connector evidence.
|
|
44
|
+
*/
|
|
45
|
+
readonly connectorEvidenceHash?: string;
|
|
46
|
+
/**
|
|
47
|
+
* sha256 of the canonicalized {policyContentHash, governanceAnchorStatus,
|
|
48
|
+
* connectorEvidenceHash} above -- the explicit binding value. Computed
|
|
49
|
+
* with the same TrustRecordHasher every other artifact hash in this
|
|
50
|
+
* codebase uses.
|
|
51
|
+
*/
|
|
52
|
+
readonly anchorHash: string;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=evidence-anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-anchor.d.ts","sourceRoot":"","sources":["../../src/domain/evidence-anchor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;;;OAMG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,4BAA4B,CAAC;IAE/D;;;;;OAKG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAExC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-anchor.js","sourceRoot":"","sources":["../../src/domain/evidence-anchor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Executable Content.
|
|
3
|
+
*
|
|
4
|
+
* The exact content that crosses the execution boundary to an
|
|
5
|
+
* external Execution System: the action, target, and parameters
|
|
6
|
+
* approved for a specific Business Transaction.
|
|
7
|
+
*
|
|
8
|
+
* This is the content bound by
|
|
9
|
+
* ExecutionAuthorizationPayload.businessTransactionHash. Internal
|
|
10
|
+
* trust-chain fields (authority, policy, signals, metadata, status,
|
|
11
|
+
* createdAt) are intentionally out of scope: they never cross the
|
|
12
|
+
* execution boundary and are not part of what an execution system
|
|
13
|
+
* actually executes. Binding the hash to this narrower shape also
|
|
14
|
+
* avoids depending on BusinessTransaction fields that are not stable
|
|
15
|
+
* across the signing/verification boundary (for example, status may
|
|
16
|
+
* be defaulted after signing but before other artifacts are built).
|
|
17
|
+
*/
|
|
18
|
+
export interface ExecutableContent {
|
|
19
|
+
/**
|
|
20
|
+
* Business Transaction identifier.
|
|
21
|
+
*/
|
|
22
|
+
readonly businessTransactionId: string;
|
|
23
|
+
/**
|
|
24
|
+
* Approved action.
|
|
25
|
+
*/
|
|
26
|
+
readonly action: string;
|
|
27
|
+
/**
|
|
28
|
+
* Approved target.
|
|
29
|
+
*/
|
|
30
|
+
readonly target: string;
|
|
31
|
+
/**
|
|
32
|
+
* Approved parameters.
|
|
33
|
+
*/
|
|
34
|
+
readonly parameters: Readonly<Record<string, unknown>>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Derives ExecutableContent from any source carrying the same
|
|
38
|
+
* four fields (a BusinessTransaction's id plus its intent, or an
|
|
39
|
+
* ExecutionRequest, etc.). The single point where the field list
|
|
40
|
+
* is enumerated, so every call site stays in lockstep with the
|
|
41
|
+
* ExecutableContent shape above instead of re-listing the fields
|
|
42
|
+
* itself.
|
|
43
|
+
*/
|
|
44
|
+
export declare function toExecutableContent(input: Pick<ExecutableContent, "businessTransactionId" | "action" | "target" | "parameters">): ExecutableContent;
|
|
45
|
+
//# sourceMappingURL=executable-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executable-content.d.ts","sourceRoot":"","sources":["../../src/domain/executable-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,IAAI,CACT,iBAAiB,EACjB,uBAAuB,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAC7D,GACA,iBAAiB,CAanB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Executable Content.
|
|
3
|
+
*
|
|
4
|
+
* The exact content that crosses the execution boundary to an
|
|
5
|
+
* external Execution System: the action, target, and parameters
|
|
6
|
+
* approved for a specific Business Transaction.
|
|
7
|
+
*
|
|
8
|
+
* This is the content bound by
|
|
9
|
+
* ExecutionAuthorizationPayload.businessTransactionHash. Internal
|
|
10
|
+
* trust-chain fields (authority, policy, signals, metadata, status,
|
|
11
|
+
* createdAt) are intentionally out of scope: they never cross the
|
|
12
|
+
* execution boundary and are not part of what an execution system
|
|
13
|
+
* actually executes. Binding the hash to this narrower shape also
|
|
14
|
+
* avoids depending on BusinessTransaction fields that are not stable
|
|
15
|
+
* across the signing/verification boundary (for example, status may
|
|
16
|
+
* be defaulted after signing but before other artifacts are built).
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Derives ExecutableContent from any source carrying the same
|
|
20
|
+
* four fields (a BusinessTransaction's id plus its intent, or an
|
|
21
|
+
* ExecutionRequest, etc.). The single point where the field list
|
|
22
|
+
* is enumerated, so every call site stays in lockstep with the
|
|
23
|
+
* ExecutableContent shape above instead of re-listing the fields
|
|
24
|
+
* itself.
|
|
25
|
+
*/
|
|
26
|
+
export function toExecutableContent(input) {
|
|
27
|
+
if (typeof input.target !== "string" || input.target.trim().length === 0) {
|
|
28
|
+
throw new Error("ExecutableContent.target must be a non-empty string.");
|
|
29
|
+
}
|
|
30
|
+
return Object.freeze({
|
|
31
|
+
businessTransactionId: input.businessTransactionId,
|
|
32
|
+
action: input.action,
|
|
33
|
+
target: input.target,
|
|
34
|
+
parameters: Object.freeze({
|
|
35
|
+
...input.parameters,
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=executable-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executable-content.js","sourceRoot":"","sources":["../../src/domain/executable-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAwBH;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAGC;IAED,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzE,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;QAClD,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC;YACxB,GAAG,KAAK,CAAC,UAAU;SACpB,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution-audit event.
|
|
3
|
+
*
|
|
4
|
+
* Defined in `@parmana/shared`, not `@parmana/execution-control` (where
|
|
5
|
+
* `ExecutionControlService` actually produces these), because
|
|
6
|
+
* `packages/storage`'s `SupabaseExecutionAuditSink` also needs this
|
|
7
|
+
* shape and `tests/architecture/execution-boundary.test.ts` enforces a
|
|
8
|
+
* closed dependent set for `@parmana/execution-control` imports
|
|
9
|
+
* (`execution-control`, `execution-gateway`, and `api` only) —
|
|
10
|
+
* `storage` is not on that list, deliberately, and importing this type
|
|
11
|
+
* through `@parmana/shared` instead (which every package may depend
|
|
12
|
+
* on) keeps that boundary intact rather than widening it.
|
|
13
|
+
* `@parmana/execution-control` re-exports this same type from its own
|
|
14
|
+
* `types.ts`, so every existing consumer there is unaffected.
|
|
15
|
+
*/
|
|
16
|
+
export interface ExecutionAuditEvent {
|
|
17
|
+
/**
|
|
18
|
+
* "authorization.verified" is never emitted by
|
|
19
|
+
* `ExecutionControlService` itself — Parmana's own envelope/gateway
|
|
20
|
+
* verification is already durably recorded via the
|
|
21
|
+
* `ExecutionGateway.verify()` call that must pass before
|
|
22
|
+
* `ExecutionControlService.execute()` is ever reached at all, so a
|
|
23
|
+
* separate "verified" event on this side would be redundant. It
|
|
24
|
+
* exists in this union solely so a reader of
|
|
25
|
+
* `SupabaseExecutionAuditSink.query()` has a fully-typed result for
|
|
26
|
+
* rows a different writer sharing this table records — see
|
|
27
|
+
* `parmana-paytm-agent`'s own audit writer (`src/parmana/audit.ts`
|
|
28
|
+
* in that repository), which records it right after independently
|
|
29
|
+
* verifying the Ed25519 authorization signature this service
|
|
30
|
+
* forwarded to it, before calling Paytm.
|
|
31
|
+
*/
|
|
32
|
+
readonly type: "session.created" | "execution.rejected" | "execution.completed" | "authorization.verified";
|
|
33
|
+
readonly occurredAt: string;
|
|
34
|
+
readonly connectorId: string;
|
|
35
|
+
readonly authorizationId: string;
|
|
36
|
+
readonly sessionId: string;
|
|
37
|
+
readonly reason?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The ExecutableContent.businessTransactionId this event concerns
|
|
40
|
+
* (GAP-3, GAPS.md 2026-09-14). Optional — recorded from
|
|
41
|
+
* release.executableContent.businessTransactionId by
|
|
42
|
+
* ExecutionControlService, but absent from events recorded by any
|
|
43
|
+
* other writer to this same durable store that has no
|
|
44
|
+
* ExecutionRelease to read it from. This is the one correlation key
|
|
45
|
+
* a remote, out-of-process connector service (e.g.
|
|
46
|
+
* parmana-paytm-agent) can actually supply on its own audit writes —
|
|
47
|
+
* unlike authorizationId, which is Parmana's own internal
|
|
48
|
+
* authorization identity and never forwarded across that trust
|
|
49
|
+
* boundary (see GatewayPaytmAdapter's own wire contract). Querying
|
|
50
|
+
* SupabaseExecutionAuditSink by businessTransactionId is therefore
|
|
51
|
+
* the way to retrieve one refund's complete story across both
|
|
52
|
+
* services, not authorizationId, which only chains events written
|
|
53
|
+
* on this side.
|
|
54
|
+
*/
|
|
55
|
+
readonly businessTransactionId?: string;
|
|
56
|
+
/** Metadata only — never the credential's secret value. */
|
|
57
|
+
readonly credentialId?: string;
|
|
58
|
+
readonly gatewayId?: string;
|
|
59
|
+
/** ExecutableContent.action this event concerns — the capability granted or rejected. */
|
|
60
|
+
readonly action?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ExecutionAuditSink {
|
|
63
|
+
record(event: ExecutionAuditEvent): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=execution-audit-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-audit-event.d.ts","sourceRoot":"","sources":["../../src/domain/execution-audit-event.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,IAAI,EACT,iBAAiB,GACjB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAExC,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,yFAAyF;IACzF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-audit-event.js","sourceRoot":"","sources":["../../src/domain/execution-audit-event.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import type { JsonValue } from "../types/Json.js";
|
|
2
|
+
/**
|
|
3
|
+
* Execution Authorization
|
|
4
|
+
*
|
|
5
|
+
* Proof that Parmana authorized a specific
|
|
6
|
+
* execution request.
|
|
7
|
+
*
|
|
8
|
+
* Enterprise systems should execute only
|
|
9
|
+
* requests carrying a valid, verified
|
|
10
|
+
* SignedExecutionAuthorization.
|
|
11
|
+
*
|
|
12
|
+
* All timestamps are ISO-8601 UTC strings so the
|
|
13
|
+
* artifact serializes identically before signing
|
|
14
|
+
* (Parmana side) and after JSON transport
|
|
15
|
+
* (receiving side). Never use Date objects here.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The signed payload.
|
|
19
|
+
*
|
|
20
|
+
* Every field participates in the signature.
|
|
21
|
+
*/
|
|
22
|
+
export interface ExecutionAuthorizationPayload {
|
|
23
|
+
/**
|
|
24
|
+
* Payload format version.
|
|
25
|
+
*
|
|
26
|
+
* Verifiers MUST reject any value other than 1
|
|
27
|
+
* (including a missing field) before attempting
|
|
28
|
+
* signature verification. There are no external
|
|
29
|
+
* consumers of the prior unversioned format, so
|
|
30
|
+
* this is a breaking change made once, not a
|
|
31
|
+
* migrated one — see docs/CLAIMS.md.
|
|
32
|
+
*/
|
|
33
|
+
readonly version: 1;
|
|
34
|
+
/**
|
|
35
|
+
* Unique authorization identifier.
|
|
36
|
+
*/
|
|
37
|
+
readonly authorizationId: string;
|
|
38
|
+
/**
|
|
39
|
+
* Single-use nonce.
|
|
40
|
+
*
|
|
41
|
+
* Receiving systems MUST reject an
|
|
42
|
+
* authorization whose nonce has been
|
|
43
|
+
* seen before.
|
|
44
|
+
*/
|
|
45
|
+
readonly nonce: string;
|
|
46
|
+
/**
|
|
47
|
+
* Approved Decision.
|
|
48
|
+
*/
|
|
49
|
+
readonly decisionId: string;
|
|
50
|
+
/**
|
|
51
|
+
* Outcome of the decision this authorization was issued for. Signed
|
|
52
|
+
* with the rest of the payload. ExecutionGateway releases only
|
|
53
|
+
* "APPROVED"; it refuses an authorization with any other value or
|
|
54
|
+
* with none, so a signature alone never releases an action.
|
|
55
|
+
*/
|
|
56
|
+
readonly decisionOutcome?: "APPROVED";
|
|
57
|
+
/**
|
|
58
|
+
* Business Transaction.
|
|
59
|
+
*/
|
|
60
|
+
readonly businessTransactionId: string;
|
|
61
|
+
/**
|
|
62
|
+
* Policy that produced the decision.
|
|
63
|
+
*/
|
|
64
|
+
readonly policyName: string;
|
|
65
|
+
/**
|
|
66
|
+
* Policy version that produced the decision.
|
|
67
|
+
*/
|
|
68
|
+
readonly policyVersion: string;
|
|
69
|
+
/**
|
|
70
|
+
* ISO-8601 UTC time the authorization
|
|
71
|
+
* was issued.
|
|
72
|
+
*/
|
|
73
|
+
readonly authorizedAt: string;
|
|
74
|
+
/**
|
|
75
|
+
* ISO-8601 UTC expiry. REQUIRED.
|
|
76
|
+
*
|
|
77
|
+
* Receiving systems MUST reject an
|
|
78
|
+
* authorization past this time.
|
|
79
|
+
*/
|
|
80
|
+
readonly expiresAt: string;
|
|
81
|
+
/**
|
|
82
|
+
* Canonical content hash of the ExecutableContent
|
|
83
|
+
* (businessTransactionId, action, target,
|
|
84
|
+
* parameters) approved for execution.
|
|
85
|
+
*
|
|
86
|
+
* Computed identically by the signing side (from
|
|
87
|
+
* the runtime's in-memory transaction) and the
|
|
88
|
+
* verifying side (from the JSON-parsed request) via
|
|
89
|
+
* the same ExecutableContentHasher, so a receiving
|
|
90
|
+
* gateway can recompute this hash from the exact
|
|
91
|
+
* content it is about to forward and reject any
|
|
92
|
+
* mismatch — closing the gap where a valid envelope
|
|
93
|
+
* could accompany a modified payload carrying the
|
|
94
|
+
* same businessTransactionId.
|
|
95
|
+
*/
|
|
96
|
+
readonly businessTransactionHash: string;
|
|
97
|
+
/**
|
|
98
|
+
* Canonical content hash (G-24) of the exact Policy document that
|
|
99
|
+
* produced this authorization's Decision -- proves which policy
|
|
100
|
+
* *content*, not merely which version string, was in force. Policy
|
|
101
|
+
* governance (see PendingPolicyChange) permits in-place content
|
|
102
|
+
* edits to an existing version string, so a version-string
|
|
103
|
+
* comparison alone cannot detect every real policy change; a
|
|
104
|
+
* receiving gateway with access to the current policy content can
|
|
105
|
+
* recompute this hash and reject execution if the policy has
|
|
106
|
+
* changed since authorization.
|
|
107
|
+
*
|
|
108
|
+
* Optional so every pre-existing construction site and already-
|
|
109
|
+
* issued authorization (signed before this field existed) keeps
|
|
110
|
+
* compiling and verifying unchanged -- an absent value means "not
|
|
111
|
+
* covered by the policy-freshness check," not "policy is stale."
|
|
112
|
+
*/
|
|
113
|
+
readonly policyContentHash?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Canonical content hash of the runtime PolicySignals evaluated to
|
|
116
|
+
* produce this authorization's Decision -- proves what real-world
|
|
117
|
+
* conditions (vendor status, risk exposure, market state, etc.)
|
|
118
|
+
* justified the decision, distinct from businessTransactionHash
|
|
119
|
+
* (which covers only action/target/parameters) and policyContentHash
|
|
120
|
+
* (which covers only the policy rules). A receiving gateway with
|
|
121
|
+
* access to the exact signals this authorization was signed under,
|
|
122
|
+
* and a capability-scoped SignalStateVerifier, can recompute this
|
|
123
|
+
* hash and independently re-derive current signal state, rejecting
|
|
124
|
+
* execution if either has drifted since authorization.
|
|
125
|
+
*
|
|
126
|
+
* Optional so every pre-existing construction site and already-
|
|
127
|
+
* issued authorization (signed before this field existed) keeps
|
|
128
|
+
* compiling and verifying unchanged -- an absent value means "not
|
|
129
|
+
* covered by the signal-freshness check," not "signals are stale."
|
|
130
|
+
*/
|
|
131
|
+
readonly signalsHash?: string;
|
|
132
|
+
/**
|
|
133
|
+
* The authenticated caller (the same identity already threaded into
|
|
134
|
+
* BusinessTransaction.metadata.submittedBy) that this authorization
|
|
135
|
+
* was issued for, when caller-auth was enabled for the request.
|
|
136
|
+
*
|
|
137
|
+
* Optional for the same reason policyContentHash/signalsHash are:
|
|
138
|
+
* every pre-existing construction site and already-issued
|
|
139
|
+
* authorization keeps compiling and verifying unchanged. Absent
|
|
140
|
+
* means "issued with caller-auth disabled or no caller identified,"
|
|
141
|
+
* not "no caller exists."
|
|
142
|
+
*/
|
|
143
|
+
readonly submittedBy?: string;
|
|
144
|
+
/**
|
|
145
|
+
* The capability (Business Transaction intent.action) that
|
|
146
|
+
* isCapabilityAllowed() confirmed this caller was permitted to
|
|
147
|
+
* invoke, at the moment it confirmed it -- i.e. what the API-edge
|
|
148
|
+
* caller-to-capability check actually cleared, carried forward as a
|
|
149
|
+
* signed fact rather than discarded once the request passes.
|
|
150
|
+
*
|
|
151
|
+
* A receiving system with access to this authorization can confirm
|
|
152
|
+
* this equals the executed content's own action, catching any
|
|
153
|
+
* divergence between what a caller was cleared to invoke and what
|
|
154
|
+
* is actually presented for execution, without needing its own
|
|
155
|
+
* access to the live caller/capability configuration.
|
|
156
|
+
*
|
|
157
|
+
* Optional for the same reason submittedBy is: absent means "no
|
|
158
|
+
* caller-capability check ran for this authorization" (caller-auth
|
|
159
|
+
* disabled), not "any capability is granted."
|
|
160
|
+
*/
|
|
161
|
+
readonly grantedCapability?: string;
|
|
162
|
+
/**
|
|
163
|
+
* The business facts this authorization rests on (RFC-0023 phase 4):
|
|
164
|
+
* each Trusted Signal the decision established, with the value its
|
|
165
|
+
* source gave and until when it holds. Present only when the policy
|
|
166
|
+
* sourced facts. Signed, so a gateway can refuse to release once any
|
|
167
|
+
* is past its validUntil, and an endpoint can execute only if each
|
|
168
|
+
* still holds in its own records.
|
|
169
|
+
*/
|
|
170
|
+
readonly businessConditions?: readonly AuthorizationBusinessCondition[];
|
|
171
|
+
/**
|
|
172
|
+
* The authority grant this authorization rests on (RFC-0023 phase 3),
|
|
173
|
+
* when the policy required one. Signed, so a gateway can refuse to
|
|
174
|
+
* release once the grant has expired or been revoked.
|
|
175
|
+
*/
|
|
176
|
+
readonly authorityGrant?: AuthorizationGrantBound;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* One Trusted Signal, as the authorization carries it.
|
|
180
|
+
*/
|
|
181
|
+
export interface AuthorizationBusinessCondition {
|
|
182
|
+
readonly signalId: string;
|
|
183
|
+
readonly signalKey: string;
|
|
184
|
+
readonly source: string;
|
|
185
|
+
readonly claim: string;
|
|
186
|
+
readonly subject: string;
|
|
187
|
+
readonly value: JsonValue;
|
|
188
|
+
/** ISO-8601 UTC. After this, the fact may no longer hold. */
|
|
189
|
+
readonly validUntil: string;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The grant an authorization rests on, as the authorization carries it.
|
|
193
|
+
*/
|
|
194
|
+
export interface AuthorizationGrantBound {
|
|
195
|
+
readonly grantId: string;
|
|
196
|
+
/** ISO-8601 UTC. After this, the grant no longer holds. */
|
|
197
|
+
readonly validUntil: string;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* The complete envelope crossing the
|
|
201
|
+
* execution boundary.
|
|
202
|
+
*/
|
|
203
|
+
export interface SignedExecutionAuthorization {
|
|
204
|
+
/**
|
|
205
|
+
* The signed payload.
|
|
206
|
+
*/
|
|
207
|
+
readonly payload: ExecutionAuthorizationPayload;
|
|
208
|
+
/**
|
|
209
|
+
* Signature over the canonical
|
|
210
|
+
* serialization of the payload.
|
|
211
|
+
*/
|
|
212
|
+
readonly signature: string;
|
|
213
|
+
/**
|
|
214
|
+
* Identifier of the signing key, so the
|
|
215
|
+
* verifier can select the correct
|
|
216
|
+
* public key.
|
|
217
|
+
*/
|
|
218
|
+
readonly keyId: string;
|
|
219
|
+
/**
|
|
220
|
+
* Signature algorithm identifier.
|
|
221
|
+
*/
|
|
222
|
+
readonly algorithm: string;
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=execution-authorization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-authorization.d.ts","sourceRoot":"","sources":["../../src/domain/execution-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IAEzC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;;;;OAOG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,8BAA8B,EAAE,CAAC;IAExE;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,uBAAuB,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAEhD;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-authorization.js","sourceRoot":"","sources":["../../src/domain/execution-authorization.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical execution evidence.
|
|
3
|
+
*
|
|
4
|
+
* Evidence returned by the enterprise execution
|
|
5
|
+
* system after executing a Parmana-approved
|
|
6
|
+
* BusinessTransaction.
|
|
7
|
+
*/
|
|
8
|
+
export interface ExecutionEvidence {
|
|
9
|
+
/**
|
|
10
|
+
* BusinessTransaction this evidence belongs to.
|
|
11
|
+
*/
|
|
12
|
+
readonly businessTransactionId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Action actually executed.
|
|
15
|
+
*/
|
|
16
|
+
readonly action: string;
|
|
17
|
+
/**
|
|
18
|
+
* Target actually executed.
|
|
19
|
+
*/
|
|
20
|
+
readonly target: string;
|
|
21
|
+
/**
|
|
22
|
+
* Parameters actually used.
|
|
23
|
+
*/
|
|
24
|
+
readonly parameters: Readonly<Record<string, unknown>>;
|
|
25
|
+
/**
|
|
26
|
+
* Whether execution succeeded.
|
|
27
|
+
*/
|
|
28
|
+
readonly success: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* UTC execution timestamp.
|
|
31
|
+
*/
|
|
32
|
+
readonly executedAt: Date;
|
|
33
|
+
/**
|
|
34
|
+
* Optional execution-system-specific evidence.
|
|
35
|
+
*/
|
|
36
|
+
readonly attributes?: Readonly<Record<string, unknown>>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=execution-evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-evidence.d.ts","sourceRoot":"","sources":["../../src/domain/execution-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvD;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-evidence.js","sourceRoot":"","sources":["../../src/domain/execution-evidence.ts"],"names":[],"mappings":""}
|