@decionis/agentsafe 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 +4 -0
- package/README.md +909 -0
- package/dist/Cli.d.ts +3 -0
- package/dist/Cli.d.ts.map +1 -0
- package/dist/Cli.js +150 -0
- package/dist/Cli.js.map +1 -0
- package/dist/Index.d.ts +104 -0
- package/dist/Index.d.ts.map +1 -0
- package/dist/Index.js +102 -0
- package/dist/Index.js.map +1 -0
- package/dist/Serve.d.ts +26 -0
- package/dist/Serve.d.ts.map +1 -0
- package/dist/Serve.js +143 -0
- package/dist/Serve.js.map +1 -0
- package/dist/TrustedExecutor.d.ts +66 -0
- package/dist/TrustedExecutor.d.ts.map +1 -0
- package/dist/TrustedExecutor.js +170 -0
- package/dist/TrustedExecutor.js.map +1 -0
- package/dist/Version.d.ts +6 -0
- package/dist/Version.d.ts.map +1 -0
- package/dist/Version.js +21 -0
- package/dist/Version.js.map +1 -0
- package/dist/adapters/AdapterActionHandler.d.ts +48 -0
- package/dist/adapters/AdapterActionHandler.d.ts.map +1 -0
- package/dist/adapters/AdapterActionHandler.js +148 -0
- package/dist/adapters/AdapterActionHandler.js.map +1 -0
- package/dist/adapters/EffectAdapter.d.ts +96 -0
- package/dist/adapters/EffectAdapter.d.ts.map +1 -0
- package/dist/adapters/EffectAdapter.js +16 -0
- package/dist/adapters/EffectAdapter.js.map +1 -0
- package/dist/adapters/EffectAwareGrantVerifier.d.ts +30 -0
- package/dist/adapters/EffectAwareGrantVerifier.d.ts.map +1 -0
- package/dist/adapters/EffectAwareGrantVerifier.js +38 -0
- package/dist/adapters/EffectAwareGrantVerifier.js.map +1 -0
- package/dist/adapters/EffectComparison.d.ts +20 -0
- package/dist/adapters/EffectComparison.d.ts.map +1 -0
- package/dist/adapters/EffectComparison.js +48 -0
- package/dist/adapters/EffectComparison.js.map +1 -0
- package/dist/adapters/EffectEvidenceBuilder.d.ts +60 -0
- package/dist/adapters/EffectEvidenceBuilder.d.ts.map +1 -0
- package/dist/adapters/EffectEvidenceBuilder.js +127 -0
- package/dist/adapters/EffectEvidenceBuilder.js.map +1 -0
- package/dist/adapters/EffectEvidenceRegister.d.ts +31 -0
- package/dist/adapters/EffectEvidenceRegister.d.ts.map +1 -0
- package/dist/adapters/EffectEvidenceRegister.js +21 -0
- package/dist/adapters/EffectEvidenceRegister.js.map +1 -0
- package/dist/adapters/JcsDigest.d.ts +43 -0
- package/dist/adapters/JcsDigest.d.ts.map +1 -0
- package/dist/adapters/JcsDigest.js +86 -0
- package/dist/adapters/JcsDigest.js.map +1 -0
- package/dist/adapters/banking/BankingAction.d.ts +146 -0
- package/dist/adapters/banking/BankingAction.d.ts.map +1 -0
- package/dist/adapters/banking/BankingAction.js +102 -0
- package/dist/adapters/banking/BankingAction.js.map +1 -0
- package/dist/adapters/banking/BankingAdapter.d.ts +60 -0
- package/dist/adapters/banking/BankingAdapter.d.ts.map +1 -0
- package/dist/adapters/banking/BankingAdapter.js +107 -0
- package/dist/adapters/banking/BankingAdapter.js.map +1 -0
- package/dist/adapters/banking/BankingHandlers.d.ts +24 -0
- package/dist/adapters/banking/BankingHandlers.d.ts.map +1 -0
- package/dist/adapters/banking/BankingHandlers.js +47 -0
- package/dist/adapters/banking/BankingHandlers.js.map +1 -0
- package/dist/adapters/banking/BankingIntentBinder.d.ts +47 -0
- package/dist/adapters/banking/BankingIntentBinder.d.ts.map +1 -0
- package/dist/adapters/banking/BankingIntentBinder.js +64 -0
- package/dist/adapters/banking/BankingIntentBinder.js.map +1 -0
- package/dist/adapters/banking/CoreBankingHttpAdapter.d.ts +55 -0
- package/dist/adapters/banking/CoreBankingHttpAdapter.d.ts.map +1 -0
- package/dist/adapters/banking/CoreBankingHttpAdapter.js +248 -0
- package/dist/adapters/banking/CoreBankingHttpAdapter.js.map +1 -0
- package/dist/adapters/banking/Currency.d.ts +10 -0
- package/dist/adapters/banking/Currency.d.ts.map +1 -0
- package/dist/adapters/banking/Currency.js +91 -0
- package/dist/adapters/banking/Currency.js.map +1 -0
- package/dist/adapters/banking/EffectProjections.d.ts +52 -0
- package/dist/adapters/banking/EffectProjections.d.ts.map +1 -0
- package/dist/adapters/banking/EffectProjections.js +140 -0
- package/dist/adapters/banking/EffectProjections.js.map +1 -0
- package/dist/adapters/banking/Iban.d.ts +18 -0
- package/dist/adapters/banking/Iban.d.ts.map +1 -0
- package/dist/adapters/banking/Iban.js +38 -0
- package/dist/adapters/banking/Iban.js.map +1 -0
- package/dist/adapters/banking/Money.d.ts +32 -0
- package/dist/adapters/banking/Money.d.ts.map +1 -0
- package/dist/adapters/banking/Money.js +81 -0
- package/dist/adapters/banking/Money.js.map +1 -0
- package/dist/adapters/banking/ReasonCodes.d.ts +19 -0
- package/dist/adapters/banking/ReasonCodes.d.ts.map +1 -0
- package/dist/adapters/banking/ReasonCodes.js +35 -0
- package/dist/adapters/banking/ReasonCodes.js.map +1 -0
- package/dist/audit/ChainJournal.d.ts +38 -0
- package/dist/audit/ChainJournal.d.ts.map +1 -0
- package/dist/audit/ChainJournal.js +97 -0
- package/dist/audit/ChainJournal.js.map +1 -0
- package/dist/audit/HashChain.d.ts +39 -0
- package/dist/audit/HashChain.d.ts.map +1 -0
- package/dist/audit/HashChain.js +63 -0
- package/dist/audit/HashChain.js.map +1 -0
- package/dist/audit/HashChainedAuditSink.d.ts +22 -0
- package/dist/audit/HashChainedAuditSink.d.ts.map +1 -0
- package/dist/audit/HashChainedAuditSink.js +26 -0
- package/dist/audit/HashChainedAuditSink.js.map +1 -0
- package/dist/audit/LineAuditSink.d.ts +19 -0
- package/dist/audit/LineAuditSink.d.ts.map +1 -0
- package/dist/audit/LineAuditSink.js +35 -0
- package/dist/audit/LineAuditSink.js.map +1 -0
- package/dist/cli/Arguments.d.ts +26 -0
- package/dist/cli/Arguments.d.ts.map +1 -0
- package/dist/cli/Arguments.js +66 -0
- package/dist/cli/Arguments.js.map +1 -0
- package/dist/cli/CliProcess.d.ts +29 -0
- package/dist/cli/CliProcess.d.ts.map +1 -0
- package/dist/cli/CliProcess.js +78 -0
- package/dist/cli/CliProcess.js.map +1 -0
- package/dist/cli/Commands.d.ts +8 -0
- package/dist/cli/Commands.d.ts.map +1 -0
- package/dist/cli/Commands.js +67 -0
- package/dist/cli/Commands.js.map +1 -0
- package/dist/cli/ConfigCommand.d.ts +7 -0
- package/dist/cli/ConfigCommand.d.ts.map +1 -0
- package/dist/cli/ConfigCommand.js +77 -0
- package/dist/cli/ConfigCommand.js.map +1 -0
- package/dist/cli/ConfigFile.d.ts +21 -0
- package/dist/cli/ConfigFile.d.ts.map +1 -0
- package/dist/cli/ConfigFile.js +57 -0
- package/dist/cli/ConfigFile.js.map +1 -0
- package/dist/cli/Credentials.d.ts +15 -0
- package/dist/cli/Credentials.d.ts.map +1 -0
- package/dist/cli/Credentials.js +51 -0
- package/dist/cli/Credentials.js.map +1 -0
- package/dist/cli/Doctor.d.ts +25 -0
- package/dist/cli/Doctor.d.ts.map +1 -0
- package/dist/cli/Doctor.js +211 -0
- package/dist/cli/Doctor.js.map +1 -0
- package/dist/cli/Help.d.ts +3 -0
- package/dist/cli/Help.d.ts.map +1 -0
- package/dist/cli/Help.js +38 -0
- package/dist/cli/Help.js.map +1 -0
- package/dist/cli/Init.d.ts +32 -0
- package/dist/cli/Init.d.ts.map +1 -0
- package/dist/cli/Init.js +163 -0
- package/dist/cli/Init.js.map +1 -0
- package/dist/cli/Login.d.ts +16 -0
- package/dist/cli/Login.d.ts.map +1 -0
- package/dist/cli/Login.js +74 -0
- package/dist/cli/Login.js.map +1 -0
- package/dist/cli/Proxy.d.ts +41 -0
- package/dist/cli/Proxy.d.ts.map +1 -0
- package/dist/cli/Proxy.js +161 -0
- package/dist/cli/Proxy.js.map +1 -0
- package/dist/cli/Status.d.ts +7 -0
- package/dist/cli/Status.d.ts.map +1 -0
- package/dist/cli/Status.js +64 -0
- package/dist/cli/Status.js.map +1 -0
- package/dist/cli/TestCommand.d.ts +36 -0
- package/dist/cli/TestCommand.d.ts.map +1 -0
- package/dist/cli/TestCommand.js +173 -0
- package/dist/cli/TestCommand.js.map +1 -0
- package/dist/config/ConfigKeys.d.ts +10 -0
- package/dist/config/ConfigKeys.d.ts.map +1 -0
- package/dist/config/ConfigKeys.js +105 -0
- package/dist/config/ConfigKeys.js.map +1 -0
- package/dist/config/ExecutorConfig.d.ts +254 -0
- package/dist/config/ExecutorConfig.d.ts.map +1 -0
- package/dist/config/ExecutorConfig.js +637 -0
- package/dist/config/ExecutorConfig.js.map +1 -0
- package/dist/containment/ContainmentProbe.d.ts +87 -0
- package/dist/containment/ContainmentProbe.d.ts.map +1 -0
- package/dist/containment/ContainmentProbe.js +103 -0
- package/dist/containment/ContainmentProbe.js.map +1 -0
- package/dist/credential/CredentialError.d.ts +6 -0
- package/dist/credential/CredentialError.d.ts.map +1 -0
- package/dist/credential/CredentialError.js +10 -0
- package/dist/credential/CredentialError.js.map +1 -0
- package/dist/credential/DownstreamCredential.d.ts +38 -0
- package/dist/credential/DownstreamCredential.d.ts.map +1 -0
- package/dist/credential/DownstreamCredential.js +2 -0
- package/dist/credential/DownstreamCredential.js.map +1 -0
- package/dist/credential/GrantOf.d.ts +10 -0
- package/dist/credential/GrantOf.d.ts.map +1 -0
- package/dist/credential/GrantOf.js +16 -0
- package/dist/credential/GrantOf.js.map +1 -0
- package/dist/credential/PrivateKeyJwtCredential.d.ts +43 -0
- package/dist/credential/PrivateKeyJwtCredential.d.ts.map +1 -0
- package/dist/credential/PrivateKeyJwtCredential.js +126 -0
- package/dist/credential/PrivateKeyJwtCredential.js.map +1 -0
- package/dist/credential/SignedRequestCredential.d.ts +112 -0
- package/dist/credential/SignedRequestCredential.d.ts.map +1 -0
- package/dist/credential/SignedRequestCredential.js +255 -0
- package/dist/credential/SignedRequestCredential.js.map +1 -0
- package/dist/credential/StaticHeaderCredential.d.ts +16 -0
- package/dist/credential/StaticHeaderCredential.d.ts.map +1 -0
- package/dist/credential/StaticHeaderCredential.js +21 -0
- package/dist/credential/StaticHeaderCredential.js.map +1 -0
- package/dist/egress/EgressError.d.ts +13 -0
- package/dist/egress/EgressError.d.ts.map +1 -0
- package/dist/egress/EgressError.js +16 -0
- package/dist/egress/EgressError.js.map +1 -0
- package/dist/egress/EgressPolicy.d.ts +55 -0
- package/dist/egress/EgressPolicy.d.ts.map +1 -0
- package/dist/egress/EgressPolicy.js +137 -0
- package/dist/egress/EgressPolicy.js.map +1 -0
- package/dist/egress/GlobalFetchLock.d.ts +16 -0
- package/dist/egress/GlobalFetchLock.d.ts.map +1 -0
- package/dist/egress/GlobalFetchLock.js +34 -0
- package/dist/egress/GlobalFetchLock.js.map +1 -0
- package/dist/egress/GuardedFetch.d.ts +56 -0
- package/dist/egress/GuardedFetch.d.ts.map +1 -0
- package/dist/egress/GuardedFetch.js +300 -0
- package/dist/egress/GuardedFetch.js.map +1 -0
- package/dist/egress/TcpProbe.d.ts +35 -0
- package/dist/egress/TcpProbe.d.ts.map +1 -0
- package/dist/egress/TcpProbe.js +45 -0
- package/dist/egress/TcpProbe.js.map +1 -0
- package/dist/gateway/Activation.d.ts +39 -0
- package/dist/gateway/Activation.d.ts.map +1 -0
- package/dist/gateway/Activation.js +61 -0
- package/dist/gateway/Activation.js.map +1 -0
- package/dist/gateway/BoundaryTest.d.ts +92 -0
- package/dist/gateway/BoundaryTest.d.ts.map +1 -0
- package/dist/gateway/BoundaryTest.js +349 -0
- package/dist/gateway/BoundaryTest.js.map +1 -0
- package/dist/gateway/DemoAuthority.d.ts +41 -0
- package/dist/gateway/DemoAuthority.d.ts.map +1 -0
- package/dist/gateway/DemoAuthority.js +66 -0
- package/dist/gateway/DemoAuthority.js.map +1 -0
- package/dist/gateway/ForwardHandler.d.ts +56 -0
- package/dist/gateway/ForwardHandler.d.ts.map +1 -0
- package/dist/gateway/ForwardHandler.js +111 -0
- package/dist/gateway/ForwardHandler.js.map +1 -0
- package/dist/gateway/Gateway.d.ts +142 -0
- package/dist/gateway/Gateway.d.ts.map +1 -0
- package/dist/gateway/Gateway.js +819 -0
- package/dist/gateway/Gateway.js.map +1 -0
- package/dist/gateway/GatewayConfig.d.ts +237 -0
- package/dist/gateway/GatewayConfig.d.ts.map +1 -0
- package/dist/gateway/GatewayConfig.js +706 -0
- package/dist/gateway/GatewayConfig.js.map +1 -0
- package/dist/gateway/GatewayMetrics.d.ts +26 -0
- package/dist/gateway/GatewayMetrics.d.ts.map +1 -0
- package/dist/gateway/GatewayMetrics.js +28 -0
- package/dist/gateway/GatewayMetrics.js.map +1 -0
- package/dist/gateway/GatewayReport.d.ts +74 -0
- package/dist/gateway/GatewayReport.d.ts.map +1 -0
- package/dist/gateway/GatewayReport.js +109 -0
- package/dist/gateway/GatewayReport.js.map +1 -0
- package/dist/gateway/InterceptedRequest.d.ts +53 -0
- package/dist/gateway/InterceptedRequest.d.ts.map +1 -0
- package/dist/gateway/InterceptedRequest.js +80 -0
- package/dist/gateway/InterceptedRequest.js.map +1 -0
- package/dist/gateway/RouteTable.d.ts +28 -0
- package/dist/gateway/RouteTable.d.ts.map +1 -0
- package/dist/gateway/RouteTable.js +72 -0
- package/dist/gateway/RouteTable.js.map +1 -0
- package/dist/gateway/Upstream.d.ts +46 -0
- package/dist/gateway/Upstream.d.ts.map +1 -0
- package/dist/gateway/Upstream.js +158 -0
- package/dist/gateway/Upstream.js.map +1 -0
- package/dist/handlers/ForwardRequestHandler.d.ts +26 -0
- package/dist/handlers/ForwardRequestHandler.d.ts.map +1 -0
- package/dist/handlers/ForwardRequestHandler.js +98 -0
- package/dist/handlers/ForwardRequestHandler.js.map +1 -0
- package/dist/handlers/HandlerRegistration.d.ts +37 -0
- package/dist/handlers/HandlerRegistration.d.ts.map +1 -0
- package/dist/handlers/HandlerRegistration.js +2 -0
- package/dist/handlers/HandlerRegistration.js.map +1 -0
- package/dist/handlers/JournaledActionHandler.d.ts +31 -0
- package/dist/handlers/JournaledActionHandler.d.ts.map +1 -0
- package/dist/handlers/JournaledActionHandler.js +63 -0
- package/dist/handlers/JournaledActionHandler.js.map +1 -0
- package/dist/http/ExecutorHttpServer.d.ts +33 -0
- package/dist/http/ExecutorHttpServer.d.ts.map +1 -0
- package/dist/http/ExecutorHttpServer.js +176 -0
- package/dist/http/ExecutorHttpServer.js.map +1 -0
- package/dist/http/GatewayHttpServer.d.ts +42 -0
- package/dist/http/GatewayHttpServer.d.ts.map +1 -0
- package/dist/http/GatewayHttpServer.js +195 -0
- package/dist/http/GatewayHttpServer.js.map +1 -0
- package/dist/http/RecordingTarget.d.ts +18 -0
- package/dist/http/RecordingTarget.d.ts.map +1 -0
- package/dist/http/RecordingTarget.js +71 -0
- package/dist/http/RecordingTarget.js.map +1 -0
- package/dist/http/RequestContext.d.ts +17 -0
- package/dist/http/RequestContext.d.ts.map +1 -0
- package/dist/http/RequestContext.js +19 -0
- package/dist/http/RequestContext.js.map +1 -0
- package/dist/http/Routes.d.ts +93 -0
- package/dist/http/Routes.d.ts.map +1 -0
- package/dist/http/Routes.js +46 -0
- package/dist/http/Routes.js.map +1 -0
- package/dist/http/TlsListener.d.ts +38 -0
- package/dist/http/TlsListener.d.ts.map +1 -0
- package/dist/http/TlsListener.js +52 -0
- package/dist/http/TlsListener.js.map +1 -0
- package/dist/identity/Authenticator.d.ts +58 -0
- package/dist/identity/Authenticator.d.ts.map +1 -0
- package/dist/identity/Authenticator.js +170 -0
- package/dist/identity/Authenticator.js.map +1 -0
- package/dist/identity/PeerIdentity.d.ts +24 -0
- package/dist/identity/PeerIdentity.d.ts.map +1 -0
- package/dist/identity/PeerIdentity.js +29 -0
- package/dist/identity/PeerIdentity.js.map +1 -0
- package/dist/identity/PrincipalRegistry.d.ts +102 -0
- package/dist/identity/PrincipalRegistry.d.ts.map +1 -0
- package/dist/identity/PrincipalRegistry.js +191 -0
- package/dist/identity/PrincipalRegistry.js.map +1 -0
- package/dist/identity/PrincipalsFile.d.ts +152 -0
- package/dist/identity/PrincipalsFile.d.ts.map +1 -0
- package/dist/identity/PrincipalsFile.js +125 -0
- package/dist/identity/PrincipalsFile.js.map +1 -0
- package/dist/identity/RateLimiter.d.ts +43 -0
- package/dist/identity/RateLimiter.d.ts.map +1 -0
- package/dist/identity/RateLimiter.js +84 -0
- package/dist/identity/RateLimiter.js.map +1 -0
- package/dist/identity/SeparationOfDuties.d.ts +11 -0
- package/dist/identity/SeparationOfDuties.d.ts.map +1 -0
- package/dist/identity/SeparationOfDuties.js +25 -0
- package/dist/identity/SeparationOfDuties.js.map +1 -0
- package/dist/identity/WorkloadJwtVerifier.d.ts +57 -0
- package/dist/identity/WorkloadJwtVerifier.d.ts.map +1 -0
- package/dist/identity/WorkloadJwtVerifier.js +145 -0
- package/dist/identity/WorkloadJwtVerifier.js.map +1 -0
- package/dist/incident/EvidenceExport.d.ts +128 -0
- package/dist/incident/EvidenceExport.d.ts.map +1 -0
- package/dist/incident/EvidenceExport.js +187 -0
- package/dist/incident/EvidenceExport.js.map +1 -0
- package/dist/incident/FileProbe.d.ts +22 -0
- package/dist/incident/FileProbe.d.ts.map +1 -0
- package/dist/incident/FileProbe.js +31 -0
- package/dist/incident/FileProbe.js.map +1 -0
- package/dist/incident/HaltSwitch.d.ts +95 -0
- package/dist/incident/HaltSwitch.d.ts.map +1 -0
- package/dist/incident/HaltSwitch.js +171 -0
- package/dist/incident/HaltSwitch.js.map +1 -0
- package/dist/incident/Metrics.d.ts +71 -0
- package/dist/incident/Metrics.d.ts.map +1 -0
- package/dist/incident/Metrics.js +146 -0
- package/dist/incident/Metrics.js.map +1 -0
- package/dist/incident/SecurityEvents.d.ts +182 -0
- package/dist/incident/SecurityEvents.d.ts.map +1 -0
- package/dist/incident/SecurityEvents.js +167 -0
- package/dist/incident/SecurityEvents.js.map +1 -0
- package/dist/journal/ExecutionJournal.d.ts +96 -0
- package/dist/journal/ExecutionJournal.d.ts.map +1 -0
- package/dist/journal/ExecutionJournal.js +100 -0
- package/dist/journal/ExecutionJournal.js.map +1 -0
- package/dist/journal/FileExecutionJournal.d.ts +38 -0
- package/dist/journal/FileExecutionJournal.d.ts.map +1 -0
- package/dist/journal/FileExecutionJournal.js +137 -0
- package/dist/journal/FileExecutionJournal.js.map +1 -0
- package/dist/journal/InMemoryExecutionJournal.d.ts +23 -0
- package/dist/journal/InMemoryExecutionJournal.d.ts.map +1 -0
- package/dist/journal/InMemoryExecutionJournal.js +47 -0
- package/dist/journal/InMemoryExecutionJournal.js.map +1 -0
- package/dist/journal/StartupReconciler.d.ts +47 -0
- package/dist/journal/StartupReconciler.d.ts.map +1 -0
- package/dist/journal/StartupReconciler.js +89 -0
- package/dist/journal/StartupReconciler.js.map +1 -0
- package/dist/limits/HardLimits.d.ts +63 -0
- package/dist/limits/HardLimits.d.ts.map +1 -0
- package/dist/limits/HardLimits.js +120 -0
- package/dist/limits/HardLimits.js.map +1 -0
- package/dist/logging/LineEmitter.d.ts +26 -0
- package/dist/logging/LineEmitter.d.ts.map +1 -0
- package/dist/logging/LineEmitter.js +36 -0
- package/dist/logging/LineEmitter.js.map +1 -0
- package/dist/posture/HostPosture.d.ts +60 -0
- package/dist/posture/HostPosture.d.ts.map +1 -0
- package/dist/posture/HostPosture.js +104 -0
- package/dist/posture/HostPosture.js.map +1 -0
- package/dist/posture/PostureChecks.d.ts +52 -0
- package/dist/posture/PostureChecks.d.ts.map +1 -0
- package/dist/posture/PostureChecks.js +172 -0
- package/dist/posture/PostureChecks.js.map +1 -0
- package/dist/secrets/CompositeSecretStore.d.ts +37 -0
- package/dist/secrets/CompositeSecretStore.d.ts.map +1 -0
- package/dist/secrets/CompositeSecretStore.js +99 -0
- package/dist/secrets/CompositeSecretStore.js.map +1 -0
- package/dist/secrets/EnvSecretStore.d.ts +18 -0
- package/dist/secrets/EnvSecretStore.d.ts.map +1 -0
- package/dist/secrets/EnvSecretStore.js +46 -0
- package/dist/secrets/EnvSecretStore.js.map +1 -0
- package/dist/secrets/FileSecretStore.d.ts +60 -0
- package/dist/secrets/FileSecretStore.d.ts.map +1 -0
- package/dist/secrets/FileSecretStore.js +180 -0
- package/dist/secrets/FileSecretStore.js.map +1 -0
- package/dist/secrets/Redactor.d.ts +32 -0
- package/dist/secrets/Redactor.d.ts.map +1 -0
- package/dist/secrets/Redactor.js +108 -0
- package/dist/secrets/Redactor.js.map +1 -0
- package/dist/secrets/SecretHandle.d.ts +34 -0
- package/dist/secrets/SecretHandle.d.ts.map +1 -0
- package/dist/secrets/SecretHandle.js +71 -0
- package/dist/secrets/SecretHandle.js.map +1 -0
- package/dist/secrets/SecretStore.d.ts +37 -0
- package/dist/secrets/SecretStore.d.ts.map +1 -0
- package/dist/secrets/SecretStore.js +12 -0
- package/dist/secrets/SecretStore.js.map +1 -0
- package/dist/service/AuthorityClients.d.ts +50 -0
- package/dist/service/AuthorityClients.d.ts.map +1 -0
- package/dist/service/AuthorityClients.js +83 -0
- package/dist/service/AuthorityClients.js.map +1 -0
- package/dist/service/EscalationResolver.d.ts +97 -0
- package/dist/service/EscalationResolver.d.ts.map +1 -0
- package/dist/service/EscalationResolver.js +196 -0
- package/dist/service/EscalationResolver.js.map +1 -0
- package/dist/service/Requests.d.ts +99 -0
- package/dist/service/Requests.d.ts.map +1 -0
- package/dist/service/Requests.js +42 -0
- package/dist/service/Requests.js.map +1 -0
- package/dist/service/ServiceError.d.ts +20 -0
- package/dist/service/ServiceError.d.ts.map +1 -0
- package/dist/service/ServiceError.js +25 -0
- package/dist/service/ServiceError.js.map +1 -0
- package/dist/service/TrustedExecutorService.d.ts +221 -0
- package/dist/service/TrustedExecutorService.d.ts.map +1 -0
- package/dist/service/TrustedExecutorService.js +1066 -0
- package/dist/service/TrustedExecutorService.js.map +1 -0
- package/dist/time/ClockSkewGuard.d.ts +25 -0
- package/dist/time/ClockSkewGuard.d.ts.map +1 -0
- package/dist/time/ClockSkewGuard.js +35 -0
- package/dist/time/ClockSkewGuard.js.map +1 -0
- package/dist/time/MonotonicClock.d.ts +35 -0
- package/dist/time/MonotonicClock.d.ts.map +1 -0
- package/dist/time/MonotonicClock.js +52 -0
- package/dist/time/MonotonicClock.js.map +1 -0
- package/dist/verify/VerifyAuditChain.d.ts +36 -0
- package/dist/verify/VerifyAuditChain.d.ts.map +1 -0
- package/dist/verify/VerifyAuditChain.js +109 -0
- package/dist/verify/VerifyAuditChain.js.map +1 -0
- package/dist/verify/VerifyEvidenceBundle.d.ts +50 -0
- package/dist/verify/VerifyEvidenceBundle.d.ts.map +1 -0
- package/dist/verify/VerifyEvidenceBundle.js +157 -0
- package/dist/verify/VerifyEvidenceBundle.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { JsonValue } from "@decionis/agent-safe-pipeline";
|
|
2
|
+
/** A running demo authority: where it listens, the key it accepts, and how to stop it. */
|
|
3
|
+
export interface DemoAuthorityHandle {
|
|
4
|
+
readonly baseUrl: string;
|
|
5
|
+
readonly apiKey: string;
|
|
6
|
+
stop(): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/** The synthetic policy's two ceilings, in minor units. */
|
|
9
|
+
export declare const DEMO_AUTONOMOUS_LIMIT_MINOR = 10000;
|
|
10
|
+
export declare const DEMO_HUMAN_LIMIT_MINOR = 100000;
|
|
11
|
+
/** The request shape the policy reads; the double validates the whole contract before it is called. */
|
|
12
|
+
export interface DemoPolicyRequest {
|
|
13
|
+
readonly action: {
|
|
14
|
+
readonly type: string;
|
|
15
|
+
readonly parameters: Readonly<Record<string, unknown>>;
|
|
16
|
+
};
|
|
17
|
+
readonly context: Readonly<Record<string, unknown>>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The amount an HTTP body names, in minor units, or null when it names none.
|
|
21
|
+
* `amountMinor` and `amount_minor` are integers already; `amount` is in major
|
|
22
|
+
* units and is read to two places without floating arithmetic.
|
|
23
|
+
*/
|
|
24
|
+
export declare function amountMinorOf(body: JsonValue | undefined): number | null;
|
|
25
|
+
/**
|
|
26
|
+
* The demo policy: what the local authority decides. It is synthetic and
|
|
27
|
+
* says nothing about any real policy. A body the gateway could not read is
|
|
28
|
+
* escalated, because a policy cannot allow what it cannot see; a `DELETE`
|
|
29
|
+
* is escalated as destructive; an amount above the autonomous ceiling is
|
|
30
|
+
* escalated and one above the human ceiling is blocked; anything else is
|
|
31
|
+
* allowed.
|
|
32
|
+
*/
|
|
33
|
+
export declare function demoPolicy(request: DemoPolicyRequest): "ALLOW" | "ESCALATE" | "BLOCK";
|
|
34
|
+
/**
|
|
35
|
+
* Starts the loopback double of the Decionis routes with the demo policy.
|
|
36
|
+
* The double is the pipeline's testing entry and is loaded only here, only
|
|
37
|
+
* when the demo authority was chosen, so a production process never loads
|
|
38
|
+
* it; the configuration refuses the choice in production before this runs.
|
|
39
|
+
*/
|
|
40
|
+
export declare function startDemoAuthority(): Promise<DemoAuthorityHandle>;
|
|
41
|
+
//# sourceMappingURL=DemoAuthority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoAuthority.d.ts","sourceRoot":"","sources":["../../src/gateway/DemoAuthority.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED,2DAA2D;AAC3D,eAAO,MAAM,2BAA2B,QAAS,CAAC;AAClD,eAAO,MAAM,sBAAsB,SAAU,CAAC;AAE9C,uGAAuG;AACvG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KACxD,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAexE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAWrF;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CASvE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** The synthetic policy's two ceilings, in minor units. */
|
|
2
|
+
export const DEMO_AUTONOMOUS_LIMIT_MINOR = 10_000;
|
|
3
|
+
export const DEMO_HUMAN_LIMIT_MINOR = 100_000;
|
|
4
|
+
/**
|
|
5
|
+
* The amount an HTTP body names, in minor units, or null when it names none.
|
|
6
|
+
* `amountMinor` and `amount_minor` are integers already; `amount` is in major
|
|
7
|
+
* units and is read to two places without floating arithmetic.
|
|
8
|
+
*/
|
|
9
|
+
export function amountMinorOf(body) {
|
|
10
|
+
if (body === undefined || body === null || typeof body !== "object" || Array.isArray(body)) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const record = body;
|
|
14
|
+
for (const key of ["amountMinor", "amount_minor"]) {
|
|
15
|
+
const value = record[key];
|
|
16
|
+
if (typeof value === "number" && Number.isInteger(value) && value >= 0)
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
const amount = record["amount"];
|
|
20
|
+
const text = typeof amount === "number" ? String(amount) : typeof amount === "string" ? amount.trim() : null;
|
|
21
|
+
if (text === null || !/^\d{1,15}(?:\.\d{1,2})?$/.test(text))
|
|
22
|
+
return null;
|
|
23
|
+
const [whole = "0", fraction = ""] = text.split(".");
|
|
24
|
+
return Number(whole) * 100 + Number(fraction.padEnd(2, "0"));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The demo policy: what the local authority decides. It is synthetic and
|
|
28
|
+
* says nothing about any real policy. A body the gateway could not read is
|
|
29
|
+
* escalated, because a policy cannot allow what it cannot see; a `DELETE`
|
|
30
|
+
* is escalated as destructive; an amount above the autonomous ceiling is
|
|
31
|
+
* escalated and one above the human ceiling is blocked; anything else is
|
|
32
|
+
* allowed.
|
|
33
|
+
*/
|
|
34
|
+
export function demoPolicy(request) {
|
|
35
|
+
const parameters = request.action.parameters;
|
|
36
|
+
if (request.context["body_embedded"] === false && request.context["body_bytes"] !== 0) {
|
|
37
|
+
return "ESCALATE";
|
|
38
|
+
}
|
|
39
|
+
if (parameters["method"] === "DELETE")
|
|
40
|
+
return "ESCALATE";
|
|
41
|
+
const amount = amountMinorOf(parameters["body"]);
|
|
42
|
+
if (amount === null)
|
|
43
|
+
return "ALLOW";
|
|
44
|
+
if (amount > DEMO_HUMAN_LIMIT_MINOR)
|
|
45
|
+
return "BLOCK";
|
|
46
|
+
if (amount > DEMO_AUTONOMOUS_LIMIT_MINOR)
|
|
47
|
+
return "ESCALATE";
|
|
48
|
+
return "ALLOW";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Starts the loopback double of the Decionis routes with the demo policy.
|
|
52
|
+
* The double is the pipeline's testing entry and is loaded only here, only
|
|
53
|
+
* when the demo authority was chosen, so a production process never loads
|
|
54
|
+
* it; the configuration refuses the choice in production before this runs.
|
|
55
|
+
*/
|
|
56
|
+
export async function startDemoAuthority() {
|
|
57
|
+
const testing = await import("@decionis/agent-safe-pipeline/testing");
|
|
58
|
+
const authority = new testing.LocalAuthority({ policy: demoPolicy });
|
|
59
|
+
await authority.start();
|
|
60
|
+
return {
|
|
61
|
+
baseUrl: authority.baseUrl,
|
|
62
|
+
apiKey: testing.LOCAL_AUTHORITY_API_KEY,
|
|
63
|
+
stop: () => authority.stop(),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=DemoAuthority.js.map
|
|
@@ -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|
+
import { z } from "zod";
|
|
2
|
+
import { type ActionHandler, type ActionRegistry } from "@decionis/agent-safe-pipeline";
|
|
3
|
+
import { type HttpActionParameters, type InterceptedRequest } from "./InterceptedRequest.js";
|
|
4
|
+
import type { Upstream, UpstreamResult } from "./Upstream.js";
|
|
5
|
+
/** The parameters an HTTP action carries; anything else the registry refuses before a grant is spent. */
|
|
6
|
+
export declare const HttpActionParametersSchema: z.ZodObject<{
|
|
7
|
+
method: z.ZodEnum<{
|
|
8
|
+
POST: "POST";
|
|
9
|
+
PUT: "PUT";
|
|
10
|
+
PATCH: "PATCH";
|
|
11
|
+
DELETE: "DELETE";
|
|
12
|
+
}>;
|
|
13
|
+
path: z.ZodString;
|
|
14
|
+
query: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
15
|
+
body: z.ZodOptional<z.ZodType<import("@decionis/agent-safe-pipeline").JsonValue, unknown, z.core.$ZodTypeInternals<import("@decionis/agent-safe-pipeline").JsonValue, unknown>>>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
/** What the handler leaves behind for the relay, whichever way the attempt ended. */
|
|
18
|
+
export interface ForwardOutcome {
|
|
19
|
+
readonly response: UpstreamResult | null;
|
|
20
|
+
/** Why the upstream's answer was not a commit, when it was not. */
|
|
21
|
+
readonly failure: "UPSTREAM_REFUSED" | "UPSTREAM_ERROR" | "TRANSPORT" | "RESPONSE_TOO_LARGE" | null;
|
|
22
|
+
}
|
|
23
|
+
interface Held {
|
|
24
|
+
readonly request: InterceptedRequest;
|
|
25
|
+
readonly extraHeaders: Readonly<Record<string, string>>;
|
|
26
|
+
outcome: ForwardOutcome;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The bytes and headers of each request in flight, keyed by intent id. The
|
|
30
|
+
* intent carries the digest of the bytes and never the bytes, so the handler
|
|
31
|
+
* looks them up here; nothing about a request outlives its run.
|
|
32
|
+
*/
|
|
33
|
+
export declare class RequestHolder {
|
|
34
|
+
private readonly held;
|
|
35
|
+
hold(intentId: string, request: InterceptedRequest, extraHeaders: Readonly<Record<string, string>>): void;
|
|
36
|
+
/** @internal */
|
|
37
|
+
get(intentId: string): Held | undefined;
|
|
38
|
+
/** The outcome the handler recorded, and the end of the hold. */
|
|
39
|
+
release(intentId: string): ForwardOutcome;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The one handler every HTTP action runs through. It runs only behind a
|
|
43
|
+
* claimed single-use grant, with the parameters the authority evaluated.
|
|
44
|
+
* Before the point of no return it recomputes the digest of the bytes it is
|
|
45
|
+
* about to send and refuses if they are not the bytes the intent bound; the
|
|
46
|
+
* request forwarded is therefore the request authorized, and a payload that
|
|
47
|
+
* changed between the two is a failure before dispatch, not an execution.
|
|
48
|
+
* The upstream's status is the attempt's outcome: `2xx` and `3xx` commit,
|
|
49
|
+
* `4xx` is the provider's own refusal, `5xx` and a lost connection are
|
|
50
|
+
* unknown.
|
|
51
|
+
*/
|
|
52
|
+
export declare function httpForwardHandler(upstream: Upstream, holder: RequestHolder): ActionHandler<HttpActionParameters, UpstreamResult>;
|
|
53
|
+
/** Registers the one handler under every name the route table can produce, then seals. */
|
|
54
|
+
export declare function registerHttpActions(registry: ActionRegistry, actions: readonly string[], handler: ActionHandler<HttpActionParameters, UpstreamResult>): ActionRegistry;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=ForwardHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForwardHandler.d.ts","sourceRoot":"","sources":["../../src/gateway/ForwardHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,K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
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { JsonValueSchema, ProviderRefusal, } from "@decionis/agent-safe-pipeline";
|
|
3
|
+
import { dispatchBudgetMs, MonotonicDeadline } from "../time/MonotonicClock.js";
|
|
4
|
+
import { CONSEQUENTIAL_METHODS } from "./GatewayConfig.js";
|
|
5
|
+
import { bodyDigest, } from "./InterceptedRequest.js";
|
|
6
|
+
/** The parameters an HTTP action carries; anything else the registry refuses before a grant is spent. */
|
|
7
|
+
export const HttpActionParametersSchema = z.strictObject({
|
|
8
|
+
method: z.enum(CONSEQUENTIAL_METHODS),
|
|
9
|
+
path: z.string().min(1).max(500),
|
|
10
|
+
query: z.record(z.string(), z.union([z.string(), z.array(z.string())])),
|
|
11
|
+
body: JsonValueSchema.optional(),
|
|
12
|
+
});
|
|
13
|
+
/** Thrown after dispatch when the upstream answered with a server error: the effect is unknown. */
|
|
14
|
+
class UpstreamIndeterminate extends Error {
|
|
15
|
+
constructor() {
|
|
16
|
+
super("UPSTREAM_STATUS_5XX");
|
|
17
|
+
this.name = "UpstreamIndeterminate";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The bytes and headers of each request in flight, keyed by intent id. The
|
|
22
|
+
* intent carries the digest of the bytes and never the bytes, so the handler
|
|
23
|
+
* looks them up here; nothing about a request outlives its run.
|
|
24
|
+
*/
|
|
25
|
+
export class RequestHolder {
|
|
26
|
+
held = new Map();
|
|
27
|
+
hold(intentId, request, extraHeaders) {
|
|
28
|
+
this.held.set(intentId, { request, extraHeaders, outcome: { response: null, failure: null } });
|
|
29
|
+
}
|
|
30
|
+
/** @internal */
|
|
31
|
+
get(intentId) {
|
|
32
|
+
return this.held.get(intentId);
|
|
33
|
+
}
|
|
34
|
+
/** The outcome the handler recorded, and the end of the hold. */
|
|
35
|
+
release(intentId) {
|
|
36
|
+
const held = this.held.get(intentId);
|
|
37
|
+
this.held.delete(intentId);
|
|
38
|
+
return held?.outcome ?? { response: null, failure: null };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The one handler every HTTP action runs through. It runs only behind a
|
|
43
|
+
* claimed single-use grant, with the parameters the authority evaluated.
|
|
44
|
+
* Before the point of no return it recomputes the digest of the bytes it is
|
|
45
|
+
* about to send and refuses if they are not the bytes the intent bound; the
|
|
46
|
+
* request forwarded is therefore the request authorized, and a payload that
|
|
47
|
+
* changed between the two is a failure before dispatch, not an execution.
|
|
48
|
+
* The upstream's status is the attempt's outcome: `2xx` and `3xx` commit,
|
|
49
|
+
* `4xx` is the provider's own refusal, `5xx` and a lost connection are
|
|
50
|
+
* unknown.
|
|
51
|
+
*/
|
|
52
|
+
export function httpForwardHandler(upstream, holder) {
|
|
53
|
+
return {
|
|
54
|
+
parametersSchema: HttpActionParametersSchema,
|
|
55
|
+
execute: async ({ intent, parameters, authorization, dispatch }) => {
|
|
56
|
+
const held = holder.get(intent.intent.intentId);
|
|
57
|
+
if (held === undefined)
|
|
58
|
+
throw new Error("REQUEST_NOT_HELD");
|
|
59
|
+
const request = held.request;
|
|
60
|
+
const context = intent.intent.context;
|
|
61
|
+
if (request.method.toUpperCase() !== parameters.method ||
|
|
62
|
+
request.path !== parameters.path ||
|
|
63
|
+
context["body_bytes"] !== request.body.length ||
|
|
64
|
+
context["body_sha256"] !== bodyDigest(request.body)) {
|
|
65
|
+
throw new Error("PAYLOAD_BINDING_MISMATCH");
|
|
66
|
+
}
|
|
67
|
+
const headers = upstream.headersFor(request, {
|
|
68
|
+
...held.extraHeaders,
|
|
69
|
+
"x-agent-safe-intent-hash": intent.intentHash,
|
|
70
|
+
"x-agent-safe-decision-id": authorization.decisionId,
|
|
71
|
+
"x-agent-safe-dossier-id": authorization.dossierId,
|
|
72
|
+
});
|
|
73
|
+
// The upstream is never given more time than the authorization has
|
|
74
|
+
// left, and the budget is monotonic, so a clock change cannot extend it.
|
|
75
|
+
const deadline = MonotonicDeadline.after(dispatchBudgetMs(upstream.timeoutMs, authorization));
|
|
76
|
+
return await dispatch.run(async () => {
|
|
77
|
+
// Everything after this line is the point of no return.
|
|
78
|
+
let response;
|
|
79
|
+
try {
|
|
80
|
+
response = await upstream.send(parameters.method, parameters.path, request.search, headers, request.body, upstream.signal(deadline.remainingMs));
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
held.outcome = {
|
|
84
|
+
response: null,
|
|
85
|
+
failure: error instanceof Error && error.name === "UpstreamResponseTooLarge"
|
|
86
|
+
? "RESPONSE_TOO_LARGE"
|
|
87
|
+
: "TRANSPORT",
|
|
88
|
+
};
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
if (response.status >= 500) {
|
|
92
|
+
held.outcome = { response, failure: "UPSTREAM_ERROR" };
|
|
93
|
+
throw new UpstreamIndeterminate();
|
|
94
|
+
}
|
|
95
|
+
if (response.status >= 400) {
|
|
96
|
+
held.outcome = { response, failure: "UPSTREAM_REFUSED" };
|
|
97
|
+
throw new ProviderRefusal(`UPSTREAM_STATUS_${response.status}`);
|
|
98
|
+
}
|
|
99
|
+
held.outcome = { response, failure: null };
|
|
100
|
+
return response;
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** Registers the one handler under every name the route table can produce, then seals. */
|
|
106
|
+
export function registerHttpActions(registry, actions, handler) {
|
|
107
|
+
for (const action of actions)
|
|
108
|
+
registry.register(action, handler);
|
|
109
|
+
return registry.seal();
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=ForwardHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForwardHandler.js","sourceRoot":"","sources":["../../src/gateway/ForwardHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,eAAe,GAGhB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,g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AAC;oBACzD,MAAM,IAAI,eAAe,CAAC,mBAAmB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClE,CAAC;gBACD,IAAI,CAAC,OAAO,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gBAC3C,OAAO,QAAQ,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,mBAAmB,CACjC,QAAwB,EACxB,OAA0B,EAC1B,OAA4D;IAE5D,KAAK,MAAM,MAAM,IAAI,OAAO;QAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjE,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { FetchLike } from "../handlers/HandlerRegistration.js";
|
|
2
|
+
import type { SecretStore } from "../secrets/SecretStore.js";
|
|
3
|
+
import { type ActivationMilestone } from "./Activation.js";
|
|
4
|
+
import { type DemoAuthorityHandle } from "./DemoAuthority.js";
|
|
5
|
+
import type { GatewayConfig } from "./GatewayConfig.js";
|
|
6
|
+
import { type InterceptedRequest } from "./InterceptedRequest.js";
|
|
7
|
+
import { type RoutePlan } from "./RouteTable.js";
|
|
8
|
+
/** The gateway's own evidence stream: what it did that the pipeline's audit contract has no event for. */
|
|
9
|
+
export declare const GATEWAY_STREAM = "agent-safe.gateway-events/1";
|
|
10
|
+
/** Every path under it belongs to the gateway and is never forwarded. */
|
|
11
|
+
export declare const GATEWAY_PREFIX = "/_agentsafe";
|
|
12
|
+
/** The version of the wire shape the gateway answers with on its own responses. */
|
|
13
|
+
export declare const GATEWAY_RESPONSE_VERSION = "agent-safe.gateway/1";
|
|
14
|
+
export interface GatewayResponse {
|
|
15
|
+
readonly status: number;
|
|
16
|
+
readonly headers: readonly (readonly [string, string])[];
|
|
17
|
+
readonly body: Buffer;
|
|
18
|
+
}
|
|
19
|
+
export interface GatewayIo {
|
|
20
|
+
readonly stdout: (line: string) => void;
|
|
21
|
+
readonly stderr: (line: string) => void;
|
|
22
|
+
readonly color: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface GatewayDependencies {
|
|
25
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
26
|
+
readonly io?: GatewayIo;
|
|
27
|
+
/** The transport under the guard for the authority and Presence; `node:https` when absent. */
|
|
28
|
+
readonly authorityFetch?: FetchLike;
|
|
29
|
+
/** The transport to the upstream; the global fetch when absent. */
|
|
30
|
+
readonly upstreamFetch?: FetchLike;
|
|
31
|
+
readonly secrets?: SecretStore;
|
|
32
|
+
readonly demoAuthority?: () => Promise<DemoAuthorityHandle>;
|
|
33
|
+
readonly clock?: () => number;
|
|
34
|
+
readonly version?: string;
|
|
35
|
+
}
|
|
36
|
+
/** What `/_agentsafe/status` reports: identifiers and counts, never a value. */
|
|
37
|
+
export interface GatewayStatus {
|
|
38
|
+
readonly status: "ready";
|
|
39
|
+
readonly version: string;
|
|
40
|
+
readonly mode: "SHADOW" | "ENFORCEMENT";
|
|
41
|
+
readonly authority: string;
|
|
42
|
+
readonly failure_policy: "FAIL_CLOSED" | "FAIL_OPEN";
|
|
43
|
+
readonly upstream: string;
|
|
44
|
+
readonly routes: number;
|
|
45
|
+
readonly held: number;
|
|
46
|
+
readonly counts: Readonly<Record<string, number>>;
|
|
47
|
+
readonly evidence: {
|
|
48
|
+
readonly seq: number;
|
|
49
|
+
readonly hash: string;
|
|
50
|
+
};
|
|
51
|
+
/** The adoption milestones this process has reached, with when; never a payload. */
|
|
52
|
+
readonly activation: Readonly<Record<ActivationMilestone, string | null>>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The HTTP-interception ingress over the unchanged lifecycle. A request the
|
|
56
|
+
* route table calls consequential becomes a captured intent; the authority
|
|
57
|
+
* decides; on `ALLOW` the executor claims the grant and the forwarding
|
|
58
|
+
* handler sends the exact bytes the intent bound; the outcome is finalized
|
|
59
|
+
* and every step is chained evidence. In shadow the request goes through
|
|
60
|
+
* unchanged while the authority is asked what it would have decided.
|
|
61
|
+
* Nothing here decides ALLOW, BLOCK or ESCALATE; it asks, enforces and records.
|
|
62
|
+
*/
|
|
63
|
+
export declare class Gateway {
|
|
64
|
+
readonly config: GatewayConfig;
|
|
65
|
+
private readonly upstream;
|
|
66
|
+
private readonly routes;
|
|
67
|
+
private readonly metrics;
|
|
68
|
+
private readonly emitLine;
|
|
69
|
+
private readonly io;
|
|
70
|
+
private readonly secrets;
|
|
71
|
+
private readonly demo;
|
|
72
|
+
private readonly evidence;
|
|
73
|
+
private readonly chain;
|
|
74
|
+
private readonly clock;
|
|
75
|
+
private readonly version;
|
|
76
|
+
private readonly held;
|
|
77
|
+
private readonly holder;
|
|
78
|
+
private readonly capture;
|
|
79
|
+
private readonly executor;
|
|
80
|
+
private readonly shadow;
|
|
81
|
+
private readonly resolver;
|
|
82
|
+
private readonly stopFollowing;
|
|
83
|
+
private readonly counts;
|
|
84
|
+
private readonly activation;
|
|
85
|
+
private constructor();
|
|
86
|
+
/**
|
|
87
|
+
* Assembles the gateway: the secrets it needs opened, the demo authority
|
|
88
|
+
* started when chosen, the guarded egress sealed to the authority, the
|
|
89
|
+
* pipeline objects built over it, the evidence chains restored. Nothing
|
|
90
|
+
* listens; the listener is the caller's.
|
|
91
|
+
*/
|
|
92
|
+
static create(config: GatewayConfig, dependencies?: GatewayDependencies): Promise<Gateway>;
|
|
93
|
+
get authorityLabel(): string;
|
|
94
|
+
get evidenceLabel(): string;
|
|
95
|
+
/** The banner, once the listener is bound. */
|
|
96
|
+
started(gatewayUrl: string): void;
|
|
97
|
+
stopped(signal: string): void;
|
|
98
|
+
plan(method: string, path: string): RoutePlan;
|
|
99
|
+
readiness(): {
|
|
100
|
+
readonly ready: boolean;
|
|
101
|
+
readonly body: Record<string, unknown>;
|
|
102
|
+
};
|
|
103
|
+
status(): GatewayStatus;
|
|
104
|
+
metricsText(): string;
|
|
105
|
+
/** A request that is not consequential: forwarded unchanged, counted, not evaluated. */
|
|
106
|
+
passthrough(request: InterceptedRequest): Promise<GatewayResponse>;
|
|
107
|
+
/** A consequential request, through the whole lifecycle. */
|
|
108
|
+
govern(request: InterceptedRequest, action: string): Promise<GatewayResponse>;
|
|
109
|
+
/** What a held escalation looks like from outside; null when nothing is held under the id. */
|
|
110
|
+
escalation(intentId: string): Record<string, unknown> | null;
|
|
111
|
+
/**
|
|
112
|
+
* Asks the authority again about a held intent. Only a fresh `ALLOW` with
|
|
113
|
+
* a grant executes, once; anything else is still held or refused. The
|
|
114
|
+
* gateway never turns the hold into permission on its own.
|
|
115
|
+
*/
|
|
116
|
+
resume(intentId: string): Promise<GatewayResponse>;
|
|
117
|
+
close(): Promise<void>;
|
|
118
|
+
private captureIntent;
|
|
119
|
+
private principalOf;
|
|
120
|
+
private observe;
|
|
121
|
+
private enforce;
|
|
122
|
+
/** The authority could not be asked: its own state, and never a policy BLOCK. */
|
|
123
|
+
private unavailable;
|
|
124
|
+
/** An ALLOW: the grant claimed, the exact request sent once, the outcome finalized and relayed. */
|
|
125
|
+
private execute;
|
|
126
|
+
private hold;
|
|
127
|
+
private release;
|
|
128
|
+
private expireHeld;
|
|
129
|
+
private holdBody;
|
|
130
|
+
/** The handoff without the intent, which the gateway holds itself. */
|
|
131
|
+
private handoffBody;
|
|
132
|
+
private interception;
|
|
133
|
+
private relay;
|
|
134
|
+
private upstreamFailure;
|
|
135
|
+
/** A response the gateway itself makes: JSON, protective headers, the wire version. */
|
|
136
|
+
private own;
|
|
137
|
+
private report;
|
|
138
|
+
/** One chained line on the gateway's own stream. */
|
|
139
|
+
private link;
|
|
140
|
+
private count;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=Gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gateway.d.ts","sourceRoot":"","sources":["../../src/gateway/Gateway.ts"],"names":[],"mappings":"AAuBA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