@eloxiv/testing 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 +21 -0
- package/README.md +6 -2
- package/dist/Admin.d.ts +20 -0
- package/dist/Admin.d.ts.map +1 -0
- package/dist/Admin.js +61 -0
- package/dist/Admin.js.map +1 -0
- package/dist/Agent.d.ts +97 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +210 -0
- package/dist/Agent.js.map +1 -0
- package/dist/AgentSurface.d.ts +20 -0
- package/dist/AgentSurface.d.ts.map +1 -0
- package/dist/AgentSurface.js +36 -0
- package/dist/AgentSurface.js.map +1 -0
- package/dist/Embedder.d.ts +21 -0
- package/dist/Embedder.d.ts.map +1 -0
- package/dist/Embedder.js +54 -0
- package/dist/Embedder.js.map +1 -0
- package/dist/EvalMain.d.ts +2 -0
- package/dist/EvalMain.d.ts.map +1 -0
- package/dist/EvalMain.js +80 -0
- package/dist/EvalMain.js.map +1 -0
- package/dist/Evals.d.ts +95 -0
- package/dist/Evals.d.ts.map +1 -0
- package/dist/Evals.js +389 -0
- package/dist/Evals.js.map +1 -0
- package/dist/Kernel.d.ts +88 -0
- package/dist/Kernel.d.ts.map +1 -0
- package/dist/Kernel.js +108 -0
- package/dist/Kernel.js.map +1 -0
- package/dist/Launch.d.ts +86 -0
- package/dist/Launch.d.ts.map +1 -0
- package/dist/Launch.js +370 -0
- package/dist/Launch.js.map +1 -0
- package/dist/Locks.d.ts +39 -0
- package/dist/Locks.d.ts.map +1 -0
- package/dist/Locks.js +94 -0
- package/dist/Locks.js.map +1 -0
- package/dist/Routes.d.ts +19 -0
- package/dist/Routes.d.ts.map +1 -0
- package/dist/Routes.js +38 -0
- package/dist/Routes.js.map +1 -0
- package/dist/ScriptedChatModel.d.ts +51 -0
- package/dist/ScriptedChatModel.d.ts.map +1 -0
- package/dist/ScriptedChatModel.js +135 -0
- package/dist/ScriptedChatModel.js.map +1 -0
- package/dist/SmtpSink.d.ts +36 -0
- package/dist/SmtpSink.d.ts.map +1 -0
- package/dist/SmtpSink.js +185 -0
- package/dist/SmtpSink.js.map +1 -0
- package/dist/System.d.ts +271 -0
- package/dist/System.d.ts.map +1 -0
- package/dist/System.js +905 -0
- package/dist/System.js.map +1 -0
- package/dist/TcpProxy.d.ts +17 -0
- package/dist/TcpProxy.d.ts.map +1 -0
- package/dist/TcpProxy.js +100 -0
- package/dist/TcpProxy.js.map +1 -0
- package/dist/auth/TrustedProxyAuth.d.ts +28 -0
- package/dist/auth/TrustedProxyAuth.d.ts.map +1 -0
- package/dist/auth/TrustedProxyAuth.js +128 -0
- package/dist/auth/TrustedProxyAuth.js.map +1 -0
- package/dist/conformance/ActionConsent.d.ts +3 -0
- package/dist/conformance/ActionConsent.d.ts.map +1 -0
- package/dist/conformance/ActionConsent.js +347 -0
- package/dist/conformance/ActionConsent.js.map +1 -0
- package/dist/conformance/ActionRegistry.d.ts +64 -0
- package/dist/conformance/ActionRegistry.d.ts.map +1 -0
- package/dist/conformance/ActionRegistry.js +136 -0
- package/dist/conformance/ActionRegistry.js.map +1 -0
- package/dist/conformance/Actor.d.ts +43 -0
- package/dist/conformance/Actor.d.ts.map +1 -0
- package/dist/conformance/Actor.js +171 -0
- package/dist/conformance/Actor.js.map +1 -0
- package/dist/conformance/AgentReference.d.ts +30 -0
- package/dist/conformance/AgentReference.d.ts.map +1 -0
- package/dist/conformance/AgentReference.js +137 -0
- package/dist/conformance/AgentReference.js.map +1 -0
- package/dist/conformance/AgentResources.d.ts +3 -0
- package/dist/conformance/AgentResources.d.ts.map +1 -0
- package/dist/conformance/AgentResources.js +454 -0
- package/dist/conformance/AgentResources.js.map +1 -0
- package/dist/conformance/AgentRuntime.d.ts +3 -0
- package/dist/conformance/AgentRuntime.d.ts.map +1 -0
- package/dist/conformance/AgentRuntime.js +302 -0
- package/dist/conformance/AgentRuntime.js.map +1 -0
- package/dist/conformance/AgentSubject.d.ts +87 -0
- package/dist/conformance/AgentSubject.d.ts.map +1 -0
- package/dist/conformance/AgentSubject.js +18 -0
- package/dist/conformance/AgentSubject.js.map +1 -0
- package/dist/conformance/Approvals.d.ts +3 -0
- package/dist/conformance/Approvals.d.ts.map +1 -0
- package/dist/conformance/Approvals.js +258 -0
- package/dist/conformance/Approvals.js.map +1 -0
- package/dist/conformance/Audit.d.ts +3 -0
- package/dist/conformance/Audit.d.ts.map +1 -0
- package/dist/conformance/Audit.js +221 -0
- package/dist/conformance/Audit.js.map +1 -0
- package/dist/conformance/CalendarProvider.d.ts +4 -0
- package/dist/conformance/CalendarProvider.d.ts.map +1 -0
- package/dist/conformance/CalendarProvider.js +108 -0
- package/dist/conformance/CalendarProvider.js.map +1 -0
- package/dist/conformance/CapabilityKit.d.ts +191 -0
- package/dist/conformance/CapabilityKit.d.ts.map +1 -0
- package/dist/conformance/CapabilityKit.js +375 -0
- package/dist/conformance/CapabilityKit.js.map +1 -0
- package/dist/conformance/ClientSDK.d.ts +78 -0
- package/dist/conformance/ClientSDK.d.ts.map +1 -0
- package/dist/conformance/ClientSDK.js +163 -0
- package/dist/conformance/ClientSDK.js.map +1 -0
- package/dist/conformance/CollabDocument.d.ts +3 -0
- package/dist/conformance/CollabDocument.d.ts.map +1 -0
- package/dist/conformance/CollabDocument.js +934 -0
- package/dist/conformance/CollabDocument.js.map +1 -0
- package/dist/conformance/CollabReference.d.ts +8 -0
- package/dist/conformance/CollabReference.d.ts.map +1 -0
- package/dist/conformance/CollabReference.js +138 -0
- package/dist/conformance/CollabReference.js.map +1 -0
- package/dist/conformance/CollabSubject.d.ts +68 -0
- package/dist/conformance/CollabSubject.d.ts.map +1 -0
- package/dist/conformance/CollabSubject.js +2 -0
- package/dist/conformance/CollabSubject.js.map +1 -0
- package/dist/conformance/Command.d.ts +3 -0
- package/dist/conformance/Command.d.ts.map +1 -0
- package/dist/conformance/Command.js +73 -0
- package/dist/conformance/Command.js.map +1 -0
- package/dist/conformance/Connections.d.ts +4 -0
- package/dist/conformance/Connections.d.ts.map +1 -0
- package/dist/conformance/Connections.js +308 -0
- package/dist/conformance/Connections.js.map +1 -0
- package/dist/conformance/ConnectionsReference.d.ts +56 -0
- package/dist/conformance/ConnectionsReference.d.ts.map +1 -0
- package/dist/conformance/ConnectionsReference.js +74 -0
- package/dist/conformance/ConnectionsReference.js.map +1 -0
- package/dist/conformance/ConnectorReference.d.ts +86 -0
- package/dist/conformance/ConnectorReference.d.ts.map +1 -0
- package/dist/conformance/ConnectorReference.js +185 -0
- package/dist/conformance/ConnectorReference.js.map +1 -0
- package/dist/conformance/ContextAccounting.d.ts +8 -0
- package/dist/conformance/ContextAccounting.d.ts.map +1 -0
- package/dist/conformance/ContextAccounting.js +125 -0
- package/dist/conformance/ContextAccounting.js.map +1 -0
- package/dist/conformance/Daemon.d.ts +150 -0
- package/dist/conformance/Daemon.d.ts.map +1 -0
- package/dist/conformance/Daemon.js +718 -0
- package/dist/conformance/Daemon.js.map +1 -0
- package/dist/conformance/DaemonReference.d.ts +15 -0
- package/dist/conformance/DaemonReference.d.ts.map +1 -0
- package/dist/conformance/DaemonReference.js +163 -0
- package/dist/conformance/DaemonReference.js.map +1 -0
- package/dist/conformance/DbTx.d.ts +17 -0
- package/dist/conformance/DbTx.d.ts.map +1 -0
- package/dist/conformance/DbTx.js +184 -0
- package/dist/conformance/DbTx.js.map +1 -0
- package/dist/conformance/DecisionTokens.d.ts +3 -0
- package/dist/conformance/DecisionTokens.d.ts.map +1 -0
- package/dist/conformance/DecisionTokens.js +551 -0
- package/dist/conformance/DecisionTokens.js.map +1 -0
- package/dist/conformance/Delegation.d.ts +3 -0
- package/dist/conformance/Delegation.d.ts.map +1 -0
- package/dist/conformance/Delegation.js +149 -0
- package/dist/conformance/Delegation.js.map +1 -0
- package/dist/conformance/DeskReference.d.ts +21 -0
- package/dist/conformance/DeskReference.d.ts.map +1 -0
- package/dist/conformance/DeskReference.js +47 -0
- package/dist/conformance/DeskReference.js.map +1 -0
- package/dist/conformance/DeviceControl.d.ts +3 -0
- package/dist/conformance/DeviceControl.d.ts.map +1 -0
- package/dist/conformance/DeviceControl.js +579 -0
- package/dist/conformance/DeviceControl.js.map +1 -0
- package/dist/conformance/Directory.d.ts +36 -0
- package/dist/conformance/Directory.d.ts.map +1 -0
- package/dist/conformance/Directory.js +253 -0
- package/dist/conformance/Directory.js.map +1 -0
- package/dist/conformance/DirectoryProvider.d.ts +4 -0
- package/dist/conformance/DirectoryProvider.d.ts.map +1 -0
- package/dist/conformance/DirectoryProvider.js +58 -0
- package/dist/conformance/DirectoryProvider.js.map +1 -0
- package/dist/conformance/DocumentSource.d.ts +4 -0
- package/dist/conformance/DocumentSource.d.ts.map +1 -0
- package/dist/conformance/DocumentSource.js +43 -0
- package/dist/conformance/DocumentSource.js.map +1 -0
- package/dist/conformance/EndpointReference.d.ts +40 -0
- package/dist/conformance/EndpointReference.d.ts.map +1 -0
- package/dist/conformance/EndpointReference.js +67 -0
- package/dist/conformance/EndpointReference.js.map +1 -0
- package/dist/conformance/Files.d.ts +40 -0
- package/dist/conformance/Files.d.ts.map +1 -0
- package/dist/conformance/Files.js +592 -0
- package/dist/conformance/Files.js.map +1 -0
- package/dist/conformance/FilesReference.d.ts +31 -0
- package/dist/conformance/FilesReference.d.ts.map +1 -0
- package/dist/conformance/FilesReference.js +116 -0
- package/dist/conformance/FilesReference.js.map +1 -0
- package/dist/conformance/FilesSubject.d.ts +46 -0
- package/dist/conformance/FilesSubject.d.ts.map +1 -0
- package/dist/conformance/FilesSubject.js +3 -0
- package/dist/conformance/FilesSubject.js.map +1 -0
- package/dist/conformance/Flags.d.ts +3 -0
- package/dist/conformance/Flags.d.ts.map +1 -0
- package/dist/conformance/Flags.js +183 -0
- package/dist/conformance/Flags.js.map +1 -0
- package/dist/conformance/Host.d.ts +64 -0
- package/dist/conformance/Host.d.ts.map +1 -0
- package/dist/conformance/Host.js +152 -0
- package/dist/conformance/Host.js.map +1 -0
- package/dist/conformance/HttpApi.d.ts +5 -0
- package/dist/conformance/HttpApi.d.ts.map +1 -0
- package/dist/conformance/HttpApi.js +131 -0
- package/dist/conformance/HttpApi.js.map +1 -0
- package/dist/conformance/InboxReference.d.ts +28 -0
- package/dist/conformance/InboxReference.d.ts.map +1 -0
- package/dist/conformance/InboxReference.js +331 -0
- package/dist/conformance/InboxReference.js.map +1 -0
- package/dist/conformance/InboxSubject.d.ts +92 -0
- package/dist/conformance/InboxSubject.d.ts.map +1 -0
- package/dist/conformance/InboxSubject.js +16 -0
- package/dist/conformance/InboxSubject.js.map +1 -0
- package/dist/conformance/Ingestion.d.ts +10 -0
- package/dist/conformance/Ingestion.d.ts.map +1 -0
- package/dist/conformance/Ingestion.js +335 -0
- package/dist/conformance/Ingestion.js.map +1 -0
- package/dist/conformance/Ingress.d.ts +62 -0
- package/dist/conformance/Ingress.d.ts.map +1 -0
- package/dist/conformance/Ingress.js +346 -0
- package/dist/conformance/Ingress.js.map +1 -0
- package/dist/conformance/Invocation.d.ts +3 -0
- package/dist/conformance/Invocation.d.ts.map +1 -0
- package/dist/conformance/Invocation.js +665 -0
- package/dist/conformance/Invocation.js.map +1 -0
- package/dist/conformance/IsolationMatrix.d.ts +60 -0
- package/dist/conformance/IsolationMatrix.d.ts.map +1 -0
- package/dist/conformance/IsolationMatrix.js +196 -0
- package/dist/conformance/IsolationMatrix.js.map +1 -0
- package/dist/conformance/LiveConnection.d.ts +72 -0
- package/dist/conformance/LiveConnection.d.ts.map +1 -0
- package/dist/conformance/LiveConnection.js +125 -0
- package/dist/conformance/LiveConnection.js.map +1 -0
- package/dist/conformance/LocalClient.d.ts +62 -0
- package/dist/conformance/LocalClient.d.ts.map +1 -0
- package/dist/conformance/LocalClient.js +526 -0
- package/dist/conformance/LocalClient.js.map +1 -0
- package/dist/conformance/Locale.d.ts +28 -0
- package/dist/conformance/Locale.d.ts.map +1 -0
- package/dist/conformance/Locale.js +115 -0
- package/dist/conformance/Locale.js.map +1 -0
- package/dist/conformance/MachineIdentity.d.ts +39 -0
- package/dist/conformance/MachineIdentity.d.ts.map +1 -0
- package/dist/conformance/MachineIdentity.js +595 -0
- package/dist/conformance/MachineIdentity.js.map +1 -0
- package/dist/conformance/MailProvider.d.ts +4 -0
- package/dist/conformance/MailProvider.d.ts.map +1 -0
- package/dist/conformance/MailProvider.js +167 -0
- package/dist/conformance/MailProvider.js.map +1 -0
- package/dist/conformance/Memory.d.ts +10 -0
- package/dist/conformance/Memory.d.ts.map +1 -0
- package/dist/conformance/Memory.js +179 -0
- package/dist/conformance/Memory.js.map +1 -0
- package/dist/conformance/Messaging.d.ts +49 -0
- package/dist/conformance/Messaging.d.ts.map +1 -0
- package/dist/conformance/Messaging.js +117 -0
- package/dist/conformance/Messaging.js.map +1 -0
- package/dist/conformance/Metering.d.ts +26 -0
- package/dist/conformance/Metering.d.ts.map +1 -0
- package/dist/conformance/Metering.js +236 -0
- package/dist/conformance/Metering.js.map +1 -0
- package/dist/conformance/ModelProvider.d.ts +32 -0
- package/dist/conformance/ModelProvider.d.ts.map +1 -0
- package/dist/conformance/ModelProvider.js +100 -0
- package/dist/conformance/ModelProvider.js.map +1 -0
- package/dist/conformance/ModuleManifest.d.ts +9 -0
- package/dist/conformance/ModuleManifest.d.ts.map +1 -0
- package/dist/conformance/ModuleManifest.js +542 -0
- package/dist/conformance/ModuleManifest.js.map +1 -0
- package/dist/conformance/NotebookAgent.d.ts +32 -0
- package/dist/conformance/NotebookAgent.d.ts.map +1 -0
- package/dist/conformance/NotebookAgent.js +31 -0
- package/dist/conformance/NotebookAgent.js.map +1 -0
- package/dist/conformance/NotificationChannel.d.ts +40 -0
- package/dist/conformance/NotificationChannel.d.ts.map +1 -0
- package/dist/conformance/NotificationChannel.js +78 -0
- package/dist/conformance/NotificationChannel.js.map +1 -0
- package/dist/conformance/Notifications.d.ts +3 -0
- package/dist/conformance/Notifications.d.ts.map +1 -0
- package/dist/conformance/Notifications.js +240 -0
- package/dist/conformance/Notifications.js.map +1 -0
- package/dist/conformance/OAuthClient.d.ts +123 -0
- package/dist/conformance/OAuthClient.d.ts.map +1 -0
- package/dist/conformance/OAuthClient.js +204 -0
- package/dist/conformance/OAuthClient.js.map +1 -0
- package/dist/conformance/Outbox.d.ts +3 -0
- package/dist/conformance/Outbox.d.ts.map +1 -0
- package/dist/conformance/Outbox.js +266 -0
- package/dist/conformance/Outbox.js.map +1 -0
- package/dist/conformance/PlatformReference.d.ts +5 -0
- package/dist/conformance/PlatformReference.d.ts.map +1 -0
- package/dist/conformance/PlatformReference.js +66 -0
- package/dist/conformance/PlatformReference.js.map +1 -0
- package/dist/conformance/PlatformSubject.d.ts +45 -0
- package/dist/conformance/PlatformSubject.d.ts.map +1 -0
- package/dist/conformance/PlatformSubject.js +3 -0
- package/dist/conformance/PlatformSubject.js.map +1 -0
- package/dist/conformance/Privacy.d.ts +3 -0
- package/dist/conformance/Privacy.d.ts.map +1 -0
- package/dist/conformance/Privacy.js +437 -0
- package/dist/conformance/Privacy.js.map +1 -0
- package/dist/conformance/Progress.d.ts +3 -0
- package/dist/conformance/Progress.d.ts.map +1 -0
- package/dist/conformance/Progress.js +153 -0
- package/dist/conformance/Progress.js.map +1 -0
- package/dist/conformance/Push.d.ts +38 -0
- package/dist/conformance/Push.d.ts.map +1 -0
- package/dist/conformance/Push.js +649 -0
- package/dist/conformance/Push.js.map +1 -0
- package/dist/conformance/PushReference.d.ts +3 -0
- package/dist/conformance/PushReference.d.ts.map +1 -0
- package/dist/conformance/PushReference.js +97 -0
- package/dist/conformance/PushReference.js.map +1 -0
- package/dist/conformance/QuerySurface.d.ts +9 -0
- package/dist/conformance/QuerySurface.d.ts.map +1 -0
- package/dist/conformance/QuerySurface.js +349 -0
- package/dist/conformance/QuerySurface.js.map +1 -0
- package/dist/conformance/Readiness.d.ts +23 -0
- package/dist/conformance/Readiness.d.ts.map +1 -0
- package/dist/conformance/Readiness.js +110 -0
- package/dist/conformance/Readiness.js.map +1 -0
- package/dist/conformance/Reference.d.ts +17 -0
- package/dist/conformance/Reference.d.ts.map +1 -0
- package/dist/conformance/Reference.js +246 -0
- package/dist/conformance/Reference.js.map +1 -0
- package/dist/conformance/Release.d.ts +73 -0
- package/dist/conformance/Release.d.ts.map +1 -0
- package/dist/conformance/Release.js +556 -0
- package/dist/conformance/Release.js.map +1 -0
- package/dist/conformance/ReleaseReference.d.ts +5 -0
- package/dist/conformance/ReleaseReference.d.ts.map +1 -0
- package/dist/conformance/ReleaseReference.js +124 -0
- package/dist/conformance/ReleaseReference.js.map +1 -0
- package/dist/conformance/ResultRendering.d.ts +3 -0
- package/dist/conformance/ResultRendering.d.ts.map +1 -0
- package/dist/conformance/ResultRendering.js +120 -0
- package/dist/conformance/ResultRendering.js.map +1 -0
- package/dist/conformance/Sandbox.d.ts +58 -0
- package/dist/conformance/Sandbox.d.ts.map +1 -0
- package/dist/conformance/Sandbox.js +213 -0
- package/dist/conformance/Sandbox.js.map +1 -0
- package/dist/conformance/SandboxReference.d.ts +3 -0
- package/dist/conformance/SandboxReference.d.ts.map +1 -0
- package/dist/conformance/SandboxReference.js +44 -0
- package/dist/conformance/SandboxReference.js.map +1 -0
- package/dist/conformance/Scheduler.d.ts +106 -0
- package/dist/conformance/Scheduler.d.ts.map +1 -0
- package/dist/conformance/Scheduler.js +576 -0
- package/dist/conformance/Scheduler.js.map +1 -0
- package/dist/conformance/ScreenContext.d.ts +84 -0
- package/dist/conformance/ScreenContext.d.ts.map +1 -0
- package/dist/conformance/ScreenContext.js +290 -0
- package/dist/conformance/ScreenContext.js.map +1 -0
- package/dist/conformance/Search.d.ts +3 -0
- package/dist/conformance/Search.d.ts.map +1 -0
- package/dist/conformance/Search.js +333 -0
- package/dist/conformance/Search.js.map +1 -0
- package/dist/conformance/Secrets.d.ts +8 -0
- package/dist/conformance/Secrets.d.ts.map +1 -0
- package/dist/conformance/Secrets.js +231 -0
- package/dist/conformance/Secrets.js.map +1 -0
- package/dist/conformance/SecretsReference.d.ts +44 -0
- package/dist/conformance/SecretsReference.d.ts.map +1 -0
- package/dist/conformance/SecretsReference.js +73 -0
- package/dist/conformance/SecretsReference.js.map +1 -0
- package/dist/conformance/ServicesReference.d.ts +8 -0
- package/dist/conformance/ServicesReference.d.ts.map +1 -0
- package/dist/conformance/ServicesReference.js +273 -0
- package/dist/conformance/ServicesReference.js.map +1 -0
- package/dist/conformance/ServicesSubject.d.ts +104 -0
- package/dist/conformance/ServicesSubject.d.ts.map +1 -0
- package/dist/conformance/ServicesSubject.js +2 -0
- package/dist/conformance/ServicesSubject.js.map +1 -0
- package/dist/conformance/Settings.d.ts +3 -0
- package/dist/conformance/Settings.d.ts.map +1 -0
- package/dist/conformance/Settings.js +177 -0
- package/dist/conformance/Settings.js.map +1 -0
- package/dist/conformance/Sharing.d.ts +3 -0
- package/dist/conformance/Sharing.d.ts.map +1 -0
- package/dist/conformance/Sharing.js +368 -0
- package/dist/conformance/Sharing.js.map +1 -0
- package/dist/conformance/ShellSubject.d.ts +29 -0
- package/dist/conformance/ShellSubject.d.ts.map +1 -0
- package/dist/conformance/ShellSubject.js +13 -0
- package/dist/conformance/ShellSubject.js.map +1 -0
- package/dist/conformance/SignOutRace.d.ts +23 -0
- package/dist/conformance/SignOutRace.d.ts.map +1 -0
- package/dist/conformance/SignOutRace.js +49 -0
- package/dist/conformance/SignOutRace.js.map +1 -0
- package/dist/conformance/Slot.d.ts +3 -0
- package/dist/conformance/Slot.d.ts.map +1 -0
- package/dist/conformance/Slot.js +79 -0
- package/dist/conformance/Slot.js.map +1 -0
- package/dist/conformance/Space.d.ts +63 -0
- package/dist/conformance/Space.d.ts.map +1 -0
- package/dist/conformance/Space.js +294 -0
- package/dist/conformance/Space.js.map +1 -0
- package/dist/conformance/StorageAdapter.d.ts +76 -0
- package/dist/conformance/StorageAdapter.d.ts.map +1 -0
- package/dist/conformance/StorageAdapter.js +181 -0
- package/dist/conformance/StorageAdapter.js.map +1 -0
- package/dist/conformance/StorageBackend.d.ts +23 -0
- package/dist/conformance/StorageBackend.d.ts.map +1 -0
- package/dist/conformance/StorageBackend.js +274 -0
- package/dist/conformance/StorageBackend.js.map +1 -0
- package/dist/conformance/Subject.d.ts +198 -0
- package/dist/conformance/Subject.d.ts.map +1 -0
- package/dist/conformance/Subject.js +26 -0
- package/dist/conformance/Subject.js.map +1 -0
- package/dist/conformance/Sync.d.ts +3 -0
- package/dist/conformance/Sync.d.ts.map +1 -0
- package/dist/conformance/Sync.js +190 -0
- package/dist/conformance/Sync.js.map +1 -0
- package/dist/conformance/Telemetry.d.ts +3 -0
- package/dist/conformance/Telemetry.d.ts.map +1 -0
- package/dist/conformance/Telemetry.js +218 -0
- package/dist/conformance/Telemetry.js.map +1 -0
- package/dist/conformance/ThemeTokens.d.ts +22 -0
- package/dist/conformance/ThemeTokens.d.ts.map +1 -0
- package/dist/conformance/ThemeTokens.js +121 -0
- package/dist/conformance/ThemeTokens.js.map +1 -0
- package/dist/conformance/ToolSource.d.ts +5 -0
- package/dist/conformance/ToolSource.d.ts.map +1 -0
- package/dist/conformance/ToolSource.js +520 -0
- package/dist/conformance/ToolSource.js.map +1 -0
- package/dist/conformance/Versioning.d.ts +3 -0
- package/dist/conformance/Versioning.d.ts.map +1 -0
- package/dist/conformance/Versioning.js +160 -0
- package/dist/conformance/Versioning.js.map +1 -0
- package/dist/conformance/View.d.ts +3 -0
- package/dist/conformance/View.d.ts.map +1 -0
- package/dist/conformance/View.js +121 -0
- package/dist/conformance/View.js.map +1 -0
- package/dist/conformance/WorkItems.d.ts +3 -0
- package/dist/conformance/WorkItems.d.ts.map +1 -0
- package/dist/conformance/WorkItems.js +152 -0
- package/dist/conformance/WorkItems.js.map +1 -0
- package/dist/conformance/Workflow.d.ts +63 -0
- package/dist/conformance/Workflow.d.ts.map +1 -0
- package/dist/conformance/Workflow.js +235 -0
- package/dist/conformance/Workflow.js.map +1 -0
- package/dist/conformance/acme/chatlog.d.ts +591 -0
- package/dist/conformance/acme/chatlog.d.ts.map +1 -0
- package/dist/conformance/acme/chatlog.js +101 -0
- package/dist/conformance/acme/chatlog.js.map +1 -0
- package/dist/conformance/acme/connector.d.ts +12 -0
- package/dist/conformance/acme/connector.d.ts.map +1 -0
- package/dist/conformance/acme/connector.js +123 -0
- package/dist/conformance/acme/connector.js.map +1 -0
- package/dist/conformance/acme/migrations/0000_messages.sql +8 -0
- package/dist/conformance/archive/app.d.ts +728 -0
- package/dist/conformance/archive/app.d.ts.map +1 -0
- package/dist/conformance/archive/app.js +30 -0
- package/dist/conformance/archive/app.js.map +1 -0
- package/dist/conformance/archive/contract.d.ts +467 -0
- package/dist/conformance/archive/contract.d.ts.map +1 -0
- package/dist/conformance/archive/contract.js +187 -0
- package/dist/conformance/archive/contract.js.map +1 -0
- package/dist/conformance/archive/memo.sync.gen.d.ts +148 -0
- package/dist/conformance/archive/memo.sync.gen.d.ts.map +1 -0
- package/dist/conformance/archive/memo.sync.gen.js +23 -0
- package/dist/conformance/archive/memo.sync.gen.js.map +1 -0
- package/dist/conformance/archive/migrations/archive/0000_archive.sql +9 -0
- package/dist/conformance/archive/migrations/memo/0000_memo.sql +6 -0
- package/dist/conformance/archive/schema.d.ts +185 -0
- package/dist/conformance/archive/schema.d.ts.map +1 -0
- package/dist/conformance/archive/schema.js +22 -0
- package/dist/conformance/archive/schema.js.map +1 -0
- package/dist/conformance/archive/server.d.ts +273 -0
- package/dist/conformance/archive/server.d.ts.map +1 -0
- package/dist/conformance/archive/server.js +127 -0
- package/dist/conformance/archive/server.js.map +1 -0
- package/dist/conformance/archive/sync.gen.d.ts +319 -0
- package/dist/conformance/archive/sync.gen.d.ts.map +1 -0
- package/dist/conformance/archive/sync.gen.js +29 -0
- package/dist/conformance/archive/sync.gen.js.map +1 -0
- package/dist/conformance/atlas/app.d.ts +3 -0
- package/dist/conformance/atlas/app.d.ts.map +1 -0
- package/dist/conformance/atlas/app.js +15 -0
- package/dist/conformance/atlas/app.js.map +1 -0
- package/dist/conformance/atlas/contract.d.ts +489 -0
- package/dist/conformance/atlas/contract.d.ts.map +1 -0
- package/dist/conformance/atlas/contract.js +114 -0
- package/dist/conformance/atlas/contract.js.map +1 -0
- package/dist/conformance/crm/app.d.ts +304 -0
- package/dist/conformance/crm/app.d.ts.map +1 -0
- package/dist/conformance/crm/app.js +95 -0
- package/dist/conformance/crm/app.js.map +1 -0
- package/dist/conformance/crm/contract.d.ts +586 -0
- package/dist/conformance/crm/contract.d.ts.map +1 -0
- package/dist/conformance/crm/contract.js +153 -0
- package/dist/conformance/crm/contract.js.map +1 -0
- package/dist/conformance/crm/migrations/crm/0000_crm.sql +18 -0
- package/dist/conformance/crm/migrations/team/0000_team.sql +6 -0
- package/dist/conformance/crm/schema.d.ts +261 -0
- package/dist/conformance/crm/schema.d.ts.map +1 -0
- package/dist/conformance/crm/schema.js +25 -0
- package/dist/conformance/crm/schema.js.map +1 -0
- package/dist/conformance/crm/sync.gen.d.ts +188 -0
- package/dist/conformance/crm/sync.gen.d.ts.map +1 -0
- package/dist/conformance/crm/sync.gen.js +25 -0
- package/dist/conformance/crm/sync.gen.js.map +1 -0
- package/dist/conformance/desk/contract.d.ts +306 -0
- package/dist/conformance/desk/contract.d.ts.map +1 -0
- package/dist/conformance/desk/contract.js +56 -0
- package/dist/conformance/desk/contract.js.map +1 -0
- package/dist/conformance/desk/migrations/0000_notes.sql +7 -0
- package/dist/conformance/desk/server.d.ts +231 -0
- package/dist/conformance/desk/server.d.ts.map +1 -0
- package/dist/conformance/desk/server.js +123 -0
- package/dist/conformance/desk/server.js.map +1 -0
- package/dist/conformance/drafts/migrations/0000_drafts.sql +8 -0
- package/dist/conformance/drafts/module.d.ts +571 -0
- package/dist/conformance/drafts/module.d.ts.map +1 -0
- package/dist/conformance/drafts/module.js +190 -0
- package/dist/conformance/drafts/module.js.map +1 -0
- package/dist/conformance/fixture/app.d.ts +24 -0
- package/dist/conformance/fixture/app.d.ts.map +1 -0
- package/dist/conformance/fixture/app.js +26 -0
- package/dist/conformance/fixture/app.js.map +1 -0
- package/dist/conformance/fixture/docs/bad-sync.d.ts +105 -0
- package/dist/conformance/fixture/docs/bad-sync.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/bad-sync.js +22 -0
- package/dist/conformance/fixture/docs/bad-sync.js.map +1 -0
- package/dist/conformance/fixture/docs/contract.d.ts +1091 -0
- package/dist/conformance/fixture/docs/contract.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/contract.js +277 -0
- package/dist/conformance/fixture/docs/contract.js.map +1 -0
- package/dist/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
- package/dist/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
- package/dist/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
- package/dist/conformance/fixture/docs/policy.cedar +110 -0
- package/dist/conformance/fixture/docs/schema.d.ts +308 -0
- package/dist/conformance/fixture/docs/schema.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/schema.js +36 -0
- package/dist/conformance/fixture/docs/schema.js.map +1 -0
- package/dist/conformance/fixture/docs/server.d.ts +552 -0
- package/dist/conformance/fixture/docs/server.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/server.js +192 -0
- package/dist/conformance/fixture/docs/server.js.map +1 -0
- package/dist/conformance/fixture/docs/sync.d.ts +402 -0
- package/dist/conformance/fixture/docs/sync.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/sync.gen.d.ts +574 -0
- package/dist/conformance/fixture/docs/sync.gen.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/sync.gen.js +48 -0
- package/dist/conformance/fixture/docs/sync.gen.js.map +1 -0
- package/dist/conformance/fixture/docs/sync.js +23 -0
- package/dist/conformance/fixture/docs/sync.js.map +1 -0
- package/dist/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
- package/dist/conformance/fixture/peer/module.d.ts +306 -0
- package/dist/conformance/fixture/peer/module.d.ts.map +1 -0
- package/dist/conformance/fixture/peer/module.js +44 -0
- package/dist/conformance/fixture/peer/module.js.map +1 -0
- package/dist/conformance/fixture/release/blocking/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/blocking/0001_wait.sql +2 -0
- package/dist/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
- package/dist/conformance/fixture/release/broken/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/broken/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/broken/0002_label.sql +3 -0
- package/dist/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
- package/dist/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/escape/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/escape/0001_escape.sql +5 -0
- package/dist/conformance/fixture/release/misnamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
- package/dist/conformance/fixture/release/module.d.ts +1878 -0
- package/dist/conformance/fixture/release/module.d.ts.map +1 -0
- package/dist/conformance/fixture/release/module.js +102 -0
- package/dist/conformance/fixture/release/module.js.map +1 -0
- package/dist/conformance/fixture/release/outside/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/outside/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/outside/0002_index.sql +4 -0
- package/dist/conformance/fixture/release/outside/0003_later.sql +1 -0
- package/dist/conformance/fixture/release/renamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/renamed/0001_misname.sql +10 -0
- package/dist/conformance/fixture/release/renamed/0002_restore.sql +1 -0
- package/dist/conformance/fixture/release/rogue/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/rogue/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/rogue/0002_definer.sql +1 -0
- package/dist/conformance/fixture/release/slow/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/undeclared/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/undeclared/0002_index.sql +1 -0
- package/dist/conformance/fixture/release/v1/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/v2/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/v2/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/v2/0002_label.sql +3 -0
- package/dist/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
- package/dist/conformance/kit-hash.d.ts +8 -0
- package/dist/conformance/kit-hash.d.ts.map +1 -0
- package/dist/conformance/kit-hash.js +20 -0
- package/dist/conformance/kit-hash.js.map +1 -0
- package/dist/conformance/ledger/contract.d.ts +380 -0
- package/dist/conformance/ledger/contract.d.ts.map +1 -0
- package/dist/conformance/ledger/contract.js +81 -0
- package/dist/conformance/ledger/contract.js.map +1 -0
- package/dist/conformance/ledger/migrations/0000_entries.sql +8 -0
- package/dist/conformance/ledger/server.d.ts +312 -0
- package/dist/conformance/ledger/server.d.ts.map +1 -0
- package/dist/conformance/ledger/server.js +152 -0
- package/dist/conformance/ledger/server.js.map +1 -0
- package/dist/conformance/library/app.d.ts +616 -0
- package/dist/conformance/library/app.d.ts.map +1 -0
- package/dist/conformance/library/app.js +35 -0
- package/dist/conformance/library/app.js.map +1 -0
- package/dist/conformance/library/contract.d.ts +377 -0
- package/dist/conformance/library/contract.d.ts.map +1 -0
- package/dist/conformance/library/contract.js +63 -0
- package/dist/conformance/library/contract.js.map +1 -0
- package/dist/conformance/library/migrations/0000_library.sql +14 -0
- package/dist/conformance/library/schema.d.ts +174 -0
- package/dist/conformance/library/schema.d.ts.map +1 -0
- package/dist/conformance/library/schema.js +24 -0
- package/dist/conformance/library/schema.js.map +1 -0
- package/dist/conformance/library/server.d.ts +191 -0
- package/dist/conformance/library/server.d.ts.map +1 -0
- package/dist/conformance/library/server.js +52 -0
- package/dist/conformance/library/server.js.map +1 -0
- package/dist/conformance/library/sync.gen.d.ts +519 -0
- package/dist/conformance/library/sync.gen.d.ts.map +1 -0
- package/dist/conformance/library/sync.gen.js +42 -0
- package/dist/conformance/library/sync.gen.js.map +1 -0
- package/dist/conformance/locale/catalog.d.ts +93 -0
- package/dist/conformance/locale/catalog.d.ts.map +1 -0
- package/dist/conformance/locale/catalog.js +104 -0
- package/dist/conformance/locale/catalog.js.map +1 -0
- package/dist/conformance/notebook/app.d.ts +1039 -0
- package/dist/conformance/notebook/app.d.ts.map +1 -0
- package/dist/conformance/notebook/app.js +88 -0
- package/dist/conformance/notebook/app.js.map +1 -0
- package/dist/conformance/notebook/evals/pages.evals.json +94 -0
- package/dist/conformance/notebook/migrations/0000_notebook.sql +10 -0
- package/dist/conformance/notebook/module.d.ts +717 -0
- package/dist/conformance/notebook/module.d.ts.map +1 -0
- package/dist/conformance/notebook/module.js +188 -0
- package/dist/conformance/notebook/module.js.map +1 -0
- package/dist/conformance/pad/app.d.ts +9 -0
- package/dist/conformance/pad/app.d.ts.map +1 -0
- package/dist/conformance/pad/app.js +13 -0
- package/dist/conformance/pad/app.js.map +1 -0
- package/dist/conformance/pad/contract.d.ts +281 -0
- package/dist/conformance/pad/contract.d.ts.map +1 -0
- package/dist/conformance/pad/contract.js +66 -0
- package/dist/conformance/pad/contract.js.map +1 -0
- package/dist/conformance/pad/migrations/pad/0000_pad.sql +8 -0
- package/dist/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
- package/dist/conformance/pad/schema.d.ts +127 -0
- package/dist/conformance/pad/schema.d.ts.map +1 -0
- package/dist/conformance/pad/schema.js +17 -0
- package/dist/conformance/pad/schema.js.map +1 -0
- package/dist/conformance/pad/server.d.ts +149 -0
- package/dist/conformance/pad/server.d.ts.map +1 -0
- package/dist/conformance/pad/server.js +81 -0
- package/dist/conformance/pad/server.js.map +1 -0
- package/dist/conformance/purchases/app.d.ts +480 -0
- package/dist/conformance/purchases/app.d.ts.map +1 -0
- package/dist/conformance/purchases/app.js +32 -0
- package/dist/conformance/purchases/app.js.map +1 -0
- package/dist/conformance/purchases/contract.d.ts +720 -0
- package/dist/conformance/purchases/contract.d.ts.map +1 -0
- package/dist/conformance/purchases/contract.js +148 -0
- package/dist/conformance/purchases/contract.js.map +1 -0
- package/dist/conformance/purchases/migrations/0000_purchases.sql +17 -0
- package/dist/conformance/purchases/server.d.ts +250 -0
- package/dist/conformance/purchases/server.d.ts.map +1 -0
- package/dist/conformance/purchases/server.js +85 -0
- package/dist/conformance/purchases/server.js.map +1 -0
- package/dist/conformance/studio/app.d.ts +996 -0
- package/dist/conformance/studio/app.d.ts.map +1 -0
- package/dist/conformance/studio/app.js +251 -0
- package/dist/conformance/studio/app.js.map +1 -0
- package/dist/conformance/studio/contract.d.ts +1318 -0
- package/dist/conformance/studio/contract.d.ts.map +1 -0
- package/dist/conformance/studio/contract.js +280 -0
- package/dist/conformance/studio/contract.js.map +1 -0
- package/dist/conformance/studio/migrations/billing/0000_billing.sql +6 -0
- package/dist/conformance/studio/migrations/journal/0000_journal.sql +9 -0
- package/dist/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
- package/dist/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
- package/dist/conformance/workshop/app.d.ts +8 -0
- package/dist/conformance/workshop/app.d.ts.map +1 -0
- package/dist/conformance/workshop/app.js +13 -0
- package/dist/conformance/workshop/app.js.map +1 -0
- package/dist/conformance/workshop/migrations/0000_notes.sql +7 -0
- package/dist/conformance/workshop/module.d.ts +407 -0
- package/dist/conformance/workshop/module.d.ts.map +1 -0
- package/dist/conformance/workshop/module.js +71 -0
- package/dist/conformance/workshop/module.js.map +1 -0
- package/dist/fakes/AcmeFake.d.ts +46 -0
- package/dist/fakes/AcmeFake.d.ts.map +1 -0
- package/dist/fakes/AcmeFake.js +131 -0
- package/dist/fakes/AcmeFake.js.map +1 -0
- package/dist/fakes/ApnsFake.d.ts +79 -0
- package/dist/fakes/ApnsFake.d.ts.map +1 -0
- package/dist/fakes/ApnsFake.js +220 -0
- package/dist/fakes/ApnsFake.js.map +1 -0
- package/dist/fakes/FcmFake.d.ts +46 -0
- package/dist/fakes/FcmFake.d.ts.map +1 -0
- package/dist/fakes/FcmFake.js +185 -0
- package/dist/fakes/FcmFake.js.map +1 -0
- package/dist/fakes/GoogleFake.d.ts +221 -0
- package/dist/fakes/GoogleFake.d.ts.map +1 -0
- package/dist/fakes/GoogleFake.js +1035 -0
- package/dist/fakes/GoogleFake.js.map +1 -0
- package/dist/fakes/HttpApiFake.d.ts +22 -0
- package/dist/fakes/HttpApiFake.d.ts.map +1 -0
- package/dist/fakes/HttpApiFake.js +74 -0
- package/dist/fakes/HttpApiFake.js.map +1 -0
- package/dist/fakes/McpFake.d.ts +80 -0
- package/dist/fakes/McpFake.d.ts.map +1 -0
- package/dist/fakes/McpFake.js +312 -0
- package/dist/fakes/McpFake.js.map +1 -0
- package/dist/fakes/MicrosoftGraphFake.d.ts +254 -0
- package/dist/fakes/MicrosoftGraphFake.d.ts.map +1 -0
- package/dist/fakes/MicrosoftGraphFake.js +850 -0
- package/dist/fakes/MicrosoftGraphFake.js.map +1 -0
- package/dist/fakes/S3Fake.d.ts +29 -0
- package/dist/fakes/S3Fake.d.ts.map +1 -0
- package/dist/fakes/S3Fake.js +347 -0
- package/dist/fakes/S3Fake.js.map +1 -0
- package/dist/fakes/Server.d.ts +137 -0
- package/dist/fakes/Server.d.ts.map +1 -0
- package/dist/fakes/Server.js +357 -0
- package/dist/fakes/Server.js.map +1 -0
- package/dist/fakes/SignInProviderFake.d.ts +21 -0
- package/dist/fakes/SignInProviderFake.d.ts.map +1 -0
- package/dist/fakes/SignInProviderFake.js +56 -0
- package/dist/fakes/SignInProviderFake.js.map +1 -0
- package/dist/fakes/SlackFake.d.ts +136 -0
- package/dist/fakes/SlackFake.d.ts.map +1 -0
- package/dist/fakes/SlackFake.js +787 -0
- package/dist/fakes/SlackFake.js.map +1 -0
- package/dist/fakes/Store.d.ts +40 -0
- package/dist/fakes/Store.d.ts.map +1 -0
- package/dist/fakes/Store.js +82 -0
- package/dist/fakes/Store.js.map +1 -0
- package/dist/fakes/TelemetryFakes.d.ts +77 -0
- package/dist/fakes/TelemetryFakes.d.ts.map +1 -0
- package/dist/fakes/TelemetryFakes.js +121 -0
- package/dist/fakes/TelemetryFakes.js.map +1 -0
- package/dist/fakes/TestCa.d.ts +11 -0
- package/dist/fakes/TestCa.d.ts.map +1 -0
- package/dist/fakes/TestCa.js +115 -0
- package/dist/fakes/TestCa.js.map +1 -0
- package/dist/fakes/WorkOsFake.d.ts +40 -0
- package/dist/fakes/WorkOsFake.d.ts.map +1 -0
- package/dist/fakes/WorkOsFake.js +103 -0
- package/dist/fakes/WorkOsFake.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/make/reference.d.ts +520 -0
- package/dist/make/reference.d.ts.map +1 -0
- package/dist/make/reference.js +182 -0
- package/dist/make/reference.js.map +1 -0
- package/dist/make/sources.d.ts +48 -0
- package/dist/make/sources.d.ts.map +1 -0
- package/dist/make/sources.js +806 -0
- package/dist/make/sources.js.map +1 -0
- package/package.json +77 -3
- package/src/Admin.ts +82 -0
- package/src/Agent.ts +289 -0
- package/src/AgentSurface.ts +51 -0
- package/src/Embedder.ts +69 -0
- package/src/EvalMain.ts +81 -0
- package/src/Evals.ts +490 -0
- package/src/Kernel.ts +228 -0
- package/src/Launch.ts +428 -0
- package/src/Locks.ts +123 -0
- package/src/Routes.ts +65 -0
- package/src/ScriptedChatModel.ts +189 -0
- package/src/SmtpSink.ts +205 -0
- package/src/System.ts +1072 -0
- package/src/TcpProxy.ts +102 -0
- package/src/auth/TrustedProxyAuth.ts +173 -0
- package/src/conformance/ActionConsent.ts +437 -0
- package/src/conformance/ActionRegistry.ts +174 -0
- package/src/conformance/Actor.ts +216 -0
- package/src/conformance/AgentReference.ts +171 -0
- package/src/conformance/AgentResources.ts +548 -0
- package/src/conformance/AgentRuntime.ts +388 -0
- package/src/conformance/AgentSubject.ts +103 -0
- package/src/conformance/Approvals.ts +363 -0
- package/src/conformance/Audit.ts +257 -0
- package/src/conformance/CalendarProvider.ts +156 -0
- package/src/conformance/CapabilityKit.ts +564 -0
- package/src/conformance/ClientSDK.ts +233 -0
- package/src/conformance/CollabDocument.ts +1203 -0
- package/src/conformance/CollabReference.ts +152 -0
- package/src/conformance/CollabSubject.ts +64 -0
- package/src/conformance/Command.ts +75 -0
- package/src/conformance/Connections.ts +357 -0
- package/src/conformance/ConnectionsReference.ts +172 -0
- package/src/conformance/ConnectorReference.ts +280 -0
- package/src/conformance/ContextAccounting.ts +169 -0
- package/src/conformance/Daemon.ts +936 -0
- package/src/conformance/DaemonReference.ts +189 -0
- package/src/conformance/DbTx.ts +253 -0
- package/src/conformance/DecisionTokens.ts +652 -0
- package/src/conformance/Delegation.ts +177 -0
- package/src/conformance/DeskReference.ts +73 -0
- package/src/conformance/DeviceControl.ts +700 -0
- package/src/conformance/Directory.ts +315 -0
- package/src/conformance/DirectoryProvider.ts +72 -0
- package/src/conformance/DocumentSource.ts +62 -0
- package/src/conformance/EndpointReference.ts +117 -0
- package/src/conformance/Files.ts +685 -0
- package/src/conformance/FilesReference.ts +154 -0
- package/src/conformance/FilesSubject.ts +50 -0
- package/src/conformance/Flags.ts +215 -0
- package/src/conformance/Host.ts +197 -0
- package/src/conformance/HttpApi.ts +169 -0
- package/src/conformance/InboxReference.ts +401 -0
- package/src/conformance/InboxSubject.ts +101 -0
- package/src/conformance/Ingestion.ts +425 -0
- package/src/conformance/Ingress.ts +498 -0
- package/src/conformance/Invocation.ts +780 -0
- package/src/conformance/IsolationMatrix.ts +215 -0
- package/src/conformance/LiveConnection.ts +197 -0
- package/src/conformance/LocalClient.ts +651 -0
- package/src/conformance/Locale.ts +141 -0
- package/src/conformance/MachineIdentity.ts +828 -0
- package/src/conformance/MailProvider.ts +217 -0
- package/src/conformance/Memory.ts +223 -0
- package/src/conformance/Messaging.ts +185 -0
- package/src/conformance/Metering.ts +293 -0
- package/src/conformance/ModelProvider.ts +139 -0
- package/src/conformance/ModuleManifest.ts +630 -0
- package/src/conformance/NotebookAgent.ts +41 -0
- package/src/conformance/NotificationChannel.ts +122 -0
- package/src/conformance/Notifications.ts +316 -0
- package/src/conformance/OAuthClient.ts +240 -0
- package/src/conformance/Outbox.ts +342 -0
- package/src/conformance/PlatformReference.ts +73 -0
- package/src/conformance/PlatformSubject.ts +50 -0
- package/src/conformance/Privacy.ts +577 -0
- package/src/conformance/Progress.ts +244 -0
- package/src/conformance/Push.ts +820 -0
- package/src/conformance/PushReference.ts +101 -0
- package/src/conformance/QuerySurface.ts +408 -0
- package/src/conformance/Readiness.ts +157 -0
- package/src/conformance/Reference.ts +326 -0
- package/src/conformance/Release.ts +690 -0
- package/src/conformance/ReleaseReference.ts +179 -0
- package/src/conformance/ResultRendering.ts +149 -0
- package/src/conformance/Sandbox.ts +313 -0
- package/src/conformance/SandboxReference.ts +52 -0
- package/src/conformance/Scheduler.ts +764 -0
- package/src/conformance/ScreenContext.ts +402 -0
- package/src/conformance/Search.ts +419 -0
- package/src/conformance/Secrets.ts +277 -0
- package/src/conformance/SecretsReference.ts +131 -0
- package/src/conformance/ServicesReference.ts +330 -0
- package/src/conformance/ServicesSubject.ts +105 -0
- package/src/conformance/Settings.ts +204 -0
- package/src/conformance/Sharing.ts +486 -0
- package/src/conformance/ShellSubject.ts +47 -0
- package/src/conformance/SignOutRace.ts +77 -0
- package/src/conformance/Slot.ts +84 -0
- package/src/conformance/Space.ts +432 -0
- package/src/conformance/StorageAdapter.ts +253 -0
- package/src/conformance/StorageBackend.ts +327 -0
- package/src/conformance/Subject.ts +208 -0
- package/src/conformance/Sync.ts +215 -0
- package/src/conformance/Telemetry.ts +287 -0
- package/src/conformance/ThemeTokens.ts +163 -0
- package/src/conformance/ToolSource.ts +632 -0
- package/src/conformance/Versioning.ts +199 -0
- package/src/conformance/View.ts +143 -0
- package/src/conformance/WorkItems.ts +186 -0
- package/src/conformance/Workflow.ts +304 -0
- package/src/conformance/acme/chatlog.ts +115 -0
- package/src/conformance/acme/connector.ts +151 -0
- package/src/conformance/acme/migrations/0000_messages.sql +8 -0
- package/src/conformance/archive/app.ts +33 -0
- package/src/conformance/archive/contract.ts +191 -0
- package/src/conformance/archive/memo.sync.gen.ts +25 -0
- package/src/conformance/archive/migrations/archive/0000_archive.sql +9 -0
- package/src/conformance/archive/migrations/memo/0000_memo.sql +6 -0
- package/src/conformance/archive/schema.ts +25 -0
- package/src/conformance/archive/server.ts +146 -0
- package/src/conformance/archive/sync.gen.ts +32 -0
- package/src/conformance/atlas/app.ts +16 -0
- package/src/conformance/atlas/contract.ts +118 -0
- package/src/conformance/crm/app.ts +107 -0
- package/src/conformance/crm/contract.ts +163 -0
- package/src/conformance/crm/migrations/crm/0000_crm.sql +18 -0
- package/src/conformance/crm/migrations/team/0000_team.sql +6 -0
- package/src/conformance/crm/schema.ts +28 -0
- package/src/conformance/crm/sync.gen.ts +27 -0
- package/src/conformance/desk/contract.ts +61 -0
- package/src/conformance/desk/migrations/0000_notes.sql +7 -0
- package/src/conformance/desk/server.ts +131 -0
- package/src/conformance/drafts/migrations/0000_drafts.sql +8 -0
- package/src/conformance/drafts/module.ts +211 -0
- package/src/conformance/fixture/app.ts +37 -0
- package/src/conformance/fixture/docs/bad-sync.ts +34 -0
- package/src/conformance/fixture/docs/contract.ts +297 -0
- package/src/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
- package/src/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
- package/src/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
- package/src/conformance/fixture/docs/policy.cedar +110 -0
- package/src/conformance/fixture/docs/schema.ts +41 -0
- package/src/conformance/fixture/docs/server.ts +292 -0
- package/src/conformance/fixture/docs/sync.gen.ts +54 -0
- package/src/conformance/fixture/docs/sync.ts +24 -0
- package/src/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
- package/src/conformance/fixture/peer/module.ts +51 -0
- package/src/conformance/fixture/release/blocking/0000_item.sql +3 -0
- package/src/conformance/fixture/release/blocking/0001_wait.sql +2 -0
- package/src/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
- package/src/conformance/fixture/release/broken/0000_item.sql +3 -0
- package/src/conformance/fixture/release/broken/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/broken/0002_label.sql +3 -0
- package/src/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
- package/src/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
- package/src/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
- package/src/conformance/fixture/release/escape/0000_item.sql +3 -0
- package/src/conformance/fixture/release/escape/0001_escape.sql +5 -0
- package/src/conformance/fixture/release/misnamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
- package/src/conformance/fixture/release/module.ts +119 -0
- package/src/conformance/fixture/release/outside/0000_item.sql +3 -0
- package/src/conformance/fixture/release/outside/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/outside/0002_index.sql +4 -0
- package/src/conformance/fixture/release/outside/0003_later.sql +1 -0
- package/src/conformance/fixture/release/renamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/renamed/0001_misname.sql +10 -0
- package/src/conformance/fixture/release/renamed/0002_restore.sql +1 -0
- package/src/conformance/fixture/release/rogue/0000_item.sql +3 -0
- package/src/conformance/fixture/release/rogue/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/rogue/0002_definer.sql +1 -0
- package/src/conformance/fixture/release/slow/0000_item.sql +5 -0
- package/src/conformance/fixture/release/undeclared/0000_item.sql +3 -0
- package/src/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/undeclared/0002_index.sql +1 -0
- package/src/conformance/fixture/release/v1/0000_item.sql +3 -0
- package/src/conformance/fixture/release/v2/0000_item.sql +3 -0
- package/src/conformance/fixture/release/v2/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/v2/0002_label.sql +3 -0
- package/src/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
- package/src/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
- package/src/conformance/kit-hash.ts +18 -0
- package/src/conformance/ledger/contract.ts +92 -0
- package/src/conformance/ledger/migrations/0000_entries.sql +8 -0
- package/src/conformance/ledger/server.ts +174 -0
- package/src/conformance/library/app.ts +38 -0
- package/src/conformance/library/contract.ts +66 -0
- package/src/conformance/library/migrations/0000_library.sql +14 -0
- package/src/conformance/library/schema.ts +27 -0
- package/src/conformance/library/server.ts +65 -0
- package/src/conformance/library/sync.gen.ts +47 -0
- package/src/conformance/locale/catalog.ts +111 -0
- package/src/conformance/notebook/app.ts +115 -0
- package/src/conformance/notebook/evals/pages.evals.json +94 -0
- package/src/conformance/notebook/migrations/0000_notebook.sql +10 -0
- package/src/conformance/notebook/module.ts +215 -0
- package/src/conformance/notebook/skills/meeting-notes.md +4 -0
- package/src/conformance/pad/app.ts +21 -0
- package/src/conformance/pad/contract.ts +69 -0
- package/src/conformance/pad/migrations/pad/0000_pad.sql +8 -0
- package/src/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
- package/src/conformance/pad/schema.ts +18 -0
- package/src/conformance/pad/server.ts +102 -0
- package/src/conformance/purchases/app.ts +34 -0
- package/src/conformance/purchases/contract.ts +161 -0
- package/src/conformance/purchases/migrations/0000_purchases.sql +17 -0
- package/src/conformance/purchases/server.ts +95 -0
- package/src/conformance/replica-search.mjs +22 -0
- package/src/conformance/studio/app.ts +298 -0
- package/src/conformance/studio/contract.ts +319 -0
- package/src/conformance/studio/migrations/billing/0000_billing.sql +6 -0
- package/src/conformance/studio/migrations/journal/0000_journal.sql +9 -0
- package/src/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
- package/src/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
- package/src/conformance/workshop/app.ts +14 -0
- package/src/conformance/workshop/migrations/0000_notes.sql +7 -0
- package/src/conformance/workshop/module.ts +79 -0
- package/src/fakes/AcmeFake.ts +182 -0
- package/src/fakes/ApnsFake.ts +245 -0
- package/src/fakes/FcmFake.ts +231 -0
- package/src/fakes/GoogleFake.ts +1346 -0
- package/src/fakes/HttpApiFake.ts +116 -0
- package/src/fakes/McpFake.ts +355 -0
- package/src/fakes/MicrosoftGraphFake.ts +1191 -0
- package/src/fakes/S3Fake.ts +376 -0
- package/src/fakes/Server.ts +445 -0
- package/src/fakes/SignInProviderFake.ts +70 -0
- package/src/fakes/SlackFake.ts +893 -0
- package/src/fakes/Store.ts +96 -0
- package/src/fakes/TelemetryFakes.ts +197 -0
- package/src/fakes/TestCa.ts +166 -0
- package/src/fakes/WorkOsFake.ts +136 -0
- package/src/index.ts +9 -0
- package/src/make/reference.ts +259 -0
- package/src/make/sources.ts +836 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the Privacy contract (docs/contracts/privacy.md) on the platform-services conformance app.
|
|
3
|
+
*
|
|
4
|
+
* Consent: `necessary` always, a choice wins, otherwise the person's region (DE: opt-in, US: opt-out, anyone
|
|
5
|
+
* else: the deployment's opt-in); choices are audited and reach only the person's replica. Data-subject requests,
|
|
6
|
+
* across the four fixture modules (deleted, anonymised, retained, connector data), the kernel's modules
|
|
7
|
+
* (settings, consent, progress), the implementation's own stores (Connections and their sync state and consent
|
|
8
|
+
* flows, the person's secrets, events in flight, audit details, record history) and the further source (files):
|
|
9
|
+
*
|
|
10
|
+
* - an export holds exactly the records about the person in the organisation, compared row for row with the
|
|
11
|
+
* tables they come from, including the history of records since deleted, and nothing about anyone else: no
|
|
12
|
+
* other person's records, no other organisation's, and none of the contents of exports or requests about other
|
|
13
|
+
* people that the person made;
|
|
14
|
+
* - only the requester and the subject read a request; a request about another member needs
|
|
15
|
+
* `eloxiv.privacy.manage`; an agent's erasure request waits for the person's consent;
|
|
16
|
+
* - an erasure deletes, anonymises and retains as each module declares, and afterwards no canary value planted
|
|
17
|
+
* in the person's records, deleted records, settings, events, Connections, flows, sync state, secrets or files
|
|
18
|
+
* is anywhere in the database (a search of every table); a deleted record cannot be restored; two accounts at one
|
|
19
|
+
* provider are both removed; everyone else's canaries, and the person's in another organisation, remain;
|
|
20
|
+
* - requests are reported through Progress, audited per source and cancellable.
|
|
21
|
+
*
|
|
22
|
+
* An app with a user-referencing entity left undeclared is refused.
|
|
23
|
+
*
|
|
24
|
+
* Usage, in a Vitest file: `privacyConformance(() => startMyKernel())`.
|
|
25
|
+
*/
|
|
26
|
+
import { defineModuleContract, type AnyEntity, type AnyModuleContract } from "@eloxiv/contracts"
|
|
27
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest"
|
|
28
|
+
import { until, type InboxOutcome, type InboxSurface, type InboxUser } from "./InboxSubject.ts"
|
|
29
|
+
import type { ServicesSubject, StartServicesSubject } from "./ServicesSubject.ts"
|
|
30
|
+
|
|
31
|
+
const ORG = "acme"
|
|
32
|
+
const OTHER = "globex"
|
|
33
|
+
const RETENTION = "Invoices are kept for ten years under tax law"
|
|
34
|
+
|
|
35
|
+
interface Request {
|
|
36
|
+
readonly id: string
|
|
37
|
+
readonly kind: string
|
|
38
|
+
readonly status: string
|
|
39
|
+
readonly subjectId: string
|
|
40
|
+
readonly requestedBy: string
|
|
41
|
+
readonly taskId: string | null
|
|
42
|
+
readonly sources: ReadonlyArray<{ source: string; records: number; outcome: string; reason: string | null }>
|
|
43
|
+
}
|
|
44
|
+
interface Export {
|
|
45
|
+
readonly subjectId: string
|
|
46
|
+
readonly orgId: string
|
|
47
|
+
readonly sources: ReadonlyArray<{ source: string; records: ReadonlyArray<Record<string, unknown>> }>
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Each module's records about a person in an organisation, read directly: what an export must hold, row for row. */
|
|
51
|
+
const DIRECT: ReadonlyArray<{ readonly source: string; readonly table: string; readonly where: string }> = [
|
|
52
|
+
{ source: "journal.entry", table: "journal.entry", where: "author_id = $2" },
|
|
53
|
+
{ source: "tasks.task", table: "tasks.task", where: "creator_id = $2 OR assignee_id = $2" },
|
|
54
|
+
{ source: "billing.invoice", table: "billing.invoice", where: "customer_id = $2" },
|
|
55
|
+
{ source: "mailbox.message", table: "mailbox.message", where: "owner_id = $2" },
|
|
56
|
+
{ source: "settings.value", table: "eloxiv_settings.value", where: "user_id = $2" },
|
|
57
|
+
{ source: "privacy.consent", table: "eloxiv_privacy.consent", where: "user_id = $2" },
|
|
58
|
+
{ source: "privacy.subject", table: "eloxiv_privacy.subject", where: "user_id = $2" },
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Where a person's id remains after they erased their data in an organisation they are still a member of (in that
|
|
63
|
+
* organisation, and in stores that have none), before they act again, and why: nowhere else.
|
|
64
|
+
*/
|
|
65
|
+
const KEEPS_ID: Readonly<Record<string, string>> = {
|
|
66
|
+
'auth."user"': "The account: deleting it is the operator's, across organisations",
|
|
67
|
+
"auth.account": "The account's sign-in methods",
|
|
68
|
+
"auth.session": "The account's sessions",
|
|
69
|
+
"eloxiv.membership": "Membership: offboarding is the organisation's administrators' decision",
|
|
70
|
+
"eloxiv.membership_role": "Membership: the member's roles",
|
|
71
|
+
"eloxiv.sync_fact": "Membership as sync filters see it",
|
|
72
|
+
"eloxiv_privacy.request": "The request itself: evidence it was made and carried out",
|
|
73
|
+
"eloxiv_progress.task": "The request's task, so the person sees it finish",
|
|
74
|
+
"billing.invoice": "Retained as the module declares (tax law)",
|
|
75
|
+
}
|
|
76
|
+
/** With a sync replica running: zero-cache's log of the changes to those rows (and to the records kept). */
|
|
77
|
+
const SYNC_KEEPS_ID: Readonly<Record<string, string>> = {
|
|
78
|
+
"{sync}.changeLog": "The logged changes of rows that still name the person, as the rows do",
|
|
79
|
+
}
|
|
80
|
+
/** zero-cache's tables under one name, whatever its app id and shard. */
|
|
81
|
+
const syncName = (table: string) => table.replace(/^"?[a-z0-9_]+_\d+\/cdc"?\."changeLog"$/u, "{sync}.changeLog")
|
|
82
|
+
|
|
83
|
+
const canary = (who: string) => `canary-${who}-${crypto.randomUUID().slice(0, 12)}`
|
|
84
|
+
const keyOf = (row: Record<string, unknown>) =>
|
|
85
|
+
JSON.stringify(Object.entries(row).sort(([a], [b]) => a.localeCompare(b)))
|
|
86
|
+
const sorted = (values: ReadonlyArray<unknown>) => values.map(String).sort((a, b) => a.localeCompare(b))
|
|
87
|
+
|
|
88
|
+
export const privacyConformance = (start: StartServicesSubject) =>
|
|
89
|
+
describe("Privacy contract", () => {
|
|
90
|
+
let s: ServicesSubject
|
|
91
|
+
let ada: InboxUser // administrator of acme
|
|
92
|
+
let alice: InboxUser // also a member of globex
|
|
93
|
+
let aliceInOther: InboxUser
|
|
94
|
+
let bob: InboxUser
|
|
95
|
+
let dora: InboxUser
|
|
96
|
+
// Canaries: Alice's in acme (records, a deleted record, settings and events, the kernel's stores, files), her
|
|
97
|
+
// own in globex, and Bob's.
|
|
98
|
+
const A = { record: canary("alice"), deleted: canary("alice-deleted"), kernel: canary("alice-kernel") }
|
|
99
|
+
const A_GLOBEX = canary("alice-globex")
|
|
100
|
+
const B = canary("bob")
|
|
101
|
+
let deletedEntry = ""
|
|
102
|
+
|
|
103
|
+
const call = (who: InboxUser, action: string, input: unknown, surface: InboxSurface = "internal", org?: string) =>
|
|
104
|
+
s.invoke({ action, input, token: who.token, surface, org })
|
|
105
|
+
const ok = (outcome: InboxOutcome) => {
|
|
106
|
+
if (!outcome.ok) throw new Error(`call failed: ${JSON.stringify(outcome)}`)
|
|
107
|
+
return (outcome.result as { output: Record<string, unknown> }).output
|
|
108
|
+
}
|
|
109
|
+
const tagOf = (outcome: InboxOutcome) => (outcome.ok ? "ok" : outcome.error._tag)
|
|
110
|
+
const requestOf = async (who: InboxUser, id: string) =>
|
|
111
|
+
((ok(await call(who, "privacy.requests", {}))["requests"] as ReadonlyArray<Request>) ?? []).find(
|
|
112
|
+
(r) => r.id === id,
|
|
113
|
+
)
|
|
114
|
+
const settled = (who: InboxUser, id: string) =>
|
|
115
|
+
until(
|
|
116
|
+
`request ${id} to settle`,
|
|
117
|
+
() => requestOf(who, id),
|
|
118
|
+
(r) => r !== undefined && ["succeeded", "failed", "cancelled"].includes(r.status),
|
|
119
|
+
90_000,
|
|
120
|
+
) as Promise<Request>
|
|
121
|
+
/** Every table with rows whose text holds `text`, in `org` where the table has organisations. */
|
|
122
|
+
const searchIn = async (text: string, org: string) => {
|
|
123
|
+
const tables = await s.sql<{ name: string; scoped: boolean }>(
|
|
124
|
+
`SELECT quote_ident(n.nspname) || '.' || quote_ident(c.relname) AS name,
|
|
125
|
+
EXISTS (SELECT 1 FROM pg_catalog.pg_attribute a WHERE a.attrelid = c.oid AND a.attname = 'org_id'
|
|
126
|
+
AND NOT a.attisdropped) AS scoped
|
|
127
|
+
FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
|
|
128
|
+
WHERE c.relkind IN ('r', 'p') AND n.nspname NOT IN ('pg_catalog', 'information_schema')
|
|
129
|
+
AND n.nspname NOT LIKE 'pg_toast%' AND n.nspname NOT LIKE 'pg_temp%' ORDER BY 1`,
|
|
130
|
+
)
|
|
131
|
+
const found: Array<string> = []
|
|
132
|
+
for (const { name, scoped } of tables) {
|
|
133
|
+
const [row] = await s.sql<{ n: number }>(
|
|
134
|
+
`SELECT count(*)::int AS n FROM ${name} t WHERE strpos(t::text, $1) > 0
|
|
135
|
+
${scoped ? "AND t.org_id::text = $2" : "AND $2::text IS NOT NULL"}`,
|
|
136
|
+
[text, org],
|
|
137
|
+
)
|
|
138
|
+
if ((row?.n ?? 0) > 0) found.push(name)
|
|
139
|
+
}
|
|
140
|
+
return found
|
|
141
|
+
}
|
|
142
|
+
const exportOf = async (who: InboxUser, subject?: string) => {
|
|
143
|
+
const created = ok(await call(who, "privacy.requestExport", subject === undefined ? {} : { subject }))
|
|
144
|
+
const request = await settled(who, String(created["id"]))
|
|
145
|
+
expect(request.status).toBe("succeeded")
|
|
146
|
+
return { request, data: ok(await call(who, "privacy.download", { id: request.id })) as unknown as Export }
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
beforeAll(async () => {
|
|
150
|
+
s = await start()
|
|
151
|
+
ada = await s.user("ada", ORG, { roles: ["admin"] })
|
|
152
|
+
alice = await s.user("alice", ORG)
|
|
153
|
+
aliceInOther = await s.user("alice", OTHER)
|
|
154
|
+
bob = await s.user("bob", ORG)
|
|
155
|
+
dora = await s.user("dora", ORG)
|
|
156
|
+
const write = async (who: InboxUser, body: string, visibility: "org" | "private", org = ORG) =>
|
|
157
|
+
String(
|
|
158
|
+
ok(await call(who, "journal.write", { title: `${who.email} note`, body, visibility }, "internal", org))["id"],
|
|
159
|
+
)
|
|
160
|
+
// Alice in acme: records, edits (history), a deleted private record, a setting and events naming her.
|
|
161
|
+
const entry = await write(alice, A.record, "org")
|
|
162
|
+
ok(await call(alice, "journal.edit", { id: entry, body: `${A.record} edited` }))
|
|
163
|
+
deletedEntry = await write(alice, A.deleted, "private")
|
|
164
|
+
ok(await call(alice, "journal.remove", { id: deletedEntry }))
|
|
165
|
+
ok(await call(alice, "tasks.add", { title: `${A.record} for bob`, assignee: bob.id }))
|
|
166
|
+
ok(await call(alice, "mailbox.receive", { sender: "news@example.org", subject: A.record }))
|
|
167
|
+
ok(await call(alice, "mailbox.receive", { sender: "boss@example.org", subject: "Review" }))
|
|
168
|
+
ok(await call(alice, "settings.set", { key: "journal.signature", value: A.record }))
|
|
169
|
+
ok(await call(alice, "settings.set", { key: "journal.pageSize", value: 50 }))
|
|
170
|
+
ok(await call(alice, "privacy.setConsent", { choices: { analytics: true }, region: { country: "DE" } }))
|
|
171
|
+
// The implementation's own stores: two accounts at one provider, flows, sync state, a secret; files.
|
|
172
|
+
await s.connect(alice, ORG, "alice@mail.example")
|
|
173
|
+
await s.plantKernelData(alice, ORG, A.kernel)
|
|
174
|
+
// A shared Connection Alice granted in globex: her acme erasure must leave it, grant and all, untouched.
|
|
175
|
+
await s.sql(
|
|
176
|
+
`INSERT INTO eloxiv.connection (id, org_id, owner_id, provider, account_id, account_label, scopes, status, shared)
|
|
177
|
+
VALUES ('conn_globex_team', $1, $2, 'acme', 'globex-team', 'globex team', '{}', 'active', true)`,
|
|
178
|
+
[OTHER, alice.id],
|
|
179
|
+
)
|
|
180
|
+
await s.sql(
|
|
181
|
+
`INSERT INTO eloxiv.connection_grant (connection_id, org_id, grantee_kind, grantee_id, granted_by)
|
|
182
|
+
VALUES ('conn_globex_team', $1, 'org', '', $2)`,
|
|
183
|
+
[OTHER, alice.id],
|
|
184
|
+
)
|
|
185
|
+
await s.files.put(alice.id, ORG, `${A.kernel}.pdf`)
|
|
186
|
+
// Alice in globex, and Bob: none of this may be touched by Alice's acme erasure, nor exported to her.
|
|
187
|
+
await write(alice, A_GLOBEX, "private", OTHER)
|
|
188
|
+
await write(bob, B, "private")
|
|
189
|
+
ok(await call(bob, "tasks.add", { title: "for alice", assignee: alice.id }))
|
|
190
|
+
ok(await call(bob, "tasks.add", { title: `${B} for bob himself`, assignee: bob.id }))
|
|
191
|
+
ok(await call(bob, "mailbox.receive", { sender: "news@example.org", subject: B }))
|
|
192
|
+
ok(await call(bob, "settings.set", { key: "journal.signature", value: B }))
|
|
193
|
+
ok(await call(ada, "billing.issue", { customer: alice.id, amount: 120 }))
|
|
194
|
+
ok(await call(ada, "billing.issue", { customer: bob.id, amount: 80 }))
|
|
195
|
+
await s.connect(bob, ORG, "bob@mail.example")
|
|
196
|
+
await s.files.put(bob.id, ORG, `${B}.pdf`)
|
|
197
|
+
// Runs Alice asked for by hand, one in each organisation: her acme erasure reaches only acme's.
|
|
198
|
+
for (const org of [ORG, OTHER]) {
|
|
199
|
+
await s.sql(
|
|
200
|
+
`INSERT INTO eloxiv.schedule_run (key, scheduled_at, execution_id, missed, requested_by, org_id, settled_at)
|
|
201
|
+
VALUES ($1, now(), $1, false, $2, $3, now())`,
|
|
202
|
+
[`schedule:planted-${org}#manual:${crypto.randomUUID()}`, alice.id, org],
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
}, 180_000)
|
|
206
|
+
afterAll(() => s?.dispose())
|
|
207
|
+
|
|
208
|
+
it("applies consent: necessary always, a choice wins, otherwise the person's region", async () => {
|
|
209
|
+
const unplaced = ok(await call(dora, "privacy.getConsent", {}))
|
|
210
|
+
expect(unplaced).toMatchObject({ userId: dora.id, region: null, mode: "opt-in" })
|
|
211
|
+
expect(unplaced["categories"]).toEqual({
|
|
212
|
+
necessary: { granted: true, source: "necessary", decidedAt: null },
|
|
213
|
+
functional: { granted: false, source: "region", decidedAt: null },
|
|
214
|
+
analytics: { granted: false, source: "region", decidedAt: null },
|
|
215
|
+
marketing: { granted: false, source: "region", decidedAt: null },
|
|
216
|
+
})
|
|
217
|
+
const us = ok(
|
|
218
|
+
await call(dora, "privacy.setConsent", { choices: { marketing: false }, region: { country: "us" } }),
|
|
219
|
+
)
|
|
220
|
+
expect(us).toMatchObject({ region: "us", mode: "opt-out" })
|
|
221
|
+
expect(us["categories"]).toMatchObject({
|
|
222
|
+
analytics: { granted: true, source: "region" },
|
|
223
|
+
marketing: { granted: false, source: "choice" },
|
|
224
|
+
})
|
|
225
|
+
const eea = ok(await call(dora, "privacy.setConsent", { choices: {}, region: { timeZone: "Europe/Berlin" } }))
|
|
226
|
+
expect(eea).toMatchObject({ region: "eea", mode: "opt-in" })
|
|
227
|
+
expect(eea["categories"]).toMatchObject({
|
|
228
|
+
analytics: { granted: false },
|
|
229
|
+
marketing: { granted: false, source: "choice" },
|
|
230
|
+
})
|
|
231
|
+
// `necessary` cannot be refused: it is not even a choice.
|
|
232
|
+
expect(tagOf(await call(dora, "privacy.setConsent", { choices: { necessary: false } }))).toBe("InvalidInput")
|
|
233
|
+
// Audited with what changed.
|
|
234
|
+
const audited = (await s.audit({ action: "privacy.setConsent", outcome: "succeeded" })).filter(
|
|
235
|
+
(r) => r.actorUserId === dora.id,
|
|
236
|
+
)
|
|
237
|
+
expect(audited.at(-1)?.detail).toMatchObject({ region: "eea", after: { analytics: false, marketing: false } })
|
|
238
|
+
// Synced to the person's own replica, nobody else's.
|
|
239
|
+
const own = await s.selected(await s.query(dora.token, "privacy.consent"), "eloxiv_privacy.consent")
|
|
240
|
+
const theirs = await s.selected(await s.query(bob.token, "privacy.consent"), "eloxiv_privacy.consent")
|
|
241
|
+
const doras = await s.sql<{ id: string }>(`SELECT id FROM eloxiv_privacy.consent WHERE user_id = $1`, [dora.id])
|
|
242
|
+
expect(sorted(own)).toEqual(sorted(doras.map((r) => r.id)))
|
|
243
|
+
expect(theirs.some((id) => doras.some((r) => r.id === id))).toBe(false)
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
it("refuses an app in which an entity holding user ids is left out, or half declared", async () => {
|
|
247
|
+
const none = await s.problems("journal", (c) => defineModuleContract({ ...c, dataSubjects: {} }))
|
|
248
|
+
expect(none.some((p) => /journal: entity entry holds user ids \(authorId\)/.test(p))).toBe(true)
|
|
249
|
+
const half = await s.problems("tasks", (c) =>
|
|
250
|
+
defineModuleContract({ ...c, dataSubjects: { task: { fields: ["creatorId"], erase: { kind: "delete" } } } }),
|
|
251
|
+
)
|
|
252
|
+
expect(half.some((p) => /dataSubjects task leaves out its user fields assigneeId/.test(p))).toBe(true)
|
|
253
|
+
const reasonless = await s.problems("billing", (c) =>
|
|
254
|
+
defineModuleContract({
|
|
255
|
+
...c,
|
|
256
|
+
dataSubjects: { invoice: { fields: ["customerId"], erase: { kind: "retain", reason: " " } } },
|
|
257
|
+
}),
|
|
258
|
+
)
|
|
259
|
+
expect(reasonless.some((p) => /retains records without a reason/.test(p))).toBe(true)
|
|
260
|
+
const leaky = await s.problems("tasks", (c) =>
|
|
261
|
+
defineModuleContract({
|
|
262
|
+
...c,
|
|
263
|
+
dataSubjects: {
|
|
264
|
+
task: { fields: ["creatorId", "assigneeId"], erase: { kind: "anonymise", set: { title: "x" } } },
|
|
265
|
+
},
|
|
266
|
+
}),
|
|
267
|
+
)
|
|
268
|
+
expect(leaky.some((p) => /anonymises but keeps the person's id/.test(p))).toBe(true)
|
|
269
|
+
// Every entity is declared, whether or not its person's id is typed as a user: one whose id is a plain
|
|
270
|
+
// string is not left out, and cannot pass as being about nobody.
|
|
271
|
+
const untyped = (c: AnyModuleContract) => {
|
|
272
|
+
const entity = (c.entities as Record<string, AnyEntity>)["invoice"]!
|
|
273
|
+
return defineModuleContract({
|
|
274
|
+
...c,
|
|
275
|
+
entities: {
|
|
276
|
+
...c.entities,
|
|
277
|
+
invoice: {
|
|
278
|
+
...entity,
|
|
279
|
+
policyAttributes: {
|
|
280
|
+
org: entity.policyAttributes["org"]!,
|
|
281
|
+
customer: { kind: "column", field: "customerId", type: "String" },
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
dataSubjects: {},
|
|
286
|
+
})
|
|
287
|
+
}
|
|
288
|
+
const omitted = await s.problems("billing", untyped)
|
|
289
|
+
expect(omitted.some((p) => /billing: entity invoice is not declared in dataSubjects/.test(p))).toBe(true)
|
|
290
|
+
const nobody = await s.problems("billing", (c) =>
|
|
291
|
+
defineModuleContract({ ...untyped(c), dataSubjects: { invoice: { none: "Nothing personal" } } }),
|
|
292
|
+
)
|
|
293
|
+
expect(
|
|
294
|
+
nobody.some((p) => /dataSubjects invoice says it is about nobody, but customerId holds a person's id/.test(p)),
|
|
295
|
+
).toBe(true)
|
|
296
|
+
})
|
|
297
|
+
|
|
298
|
+
it("exports exactly the records about the person, row for row, including deleted records' history, and nothing about anyone else", async () => {
|
|
299
|
+
const { request, data } = await exportOf(alice)
|
|
300
|
+
expect(data).toMatchObject({ subjectId: alice.id, orgId: ORG })
|
|
301
|
+
const bySource = new Map(data.sources.map((p) => [p.source, p.records]))
|
|
302
|
+
// Every declared source, row for row as its table holds it.
|
|
303
|
+
for (const { source, table, where } of DIRECT) {
|
|
304
|
+
const expected = await s.sql<{ row: Record<string, unknown> }>(
|
|
305
|
+
`SELECT to_jsonb(t) AS row FROM ${table} t WHERE t.org_id = $1 AND (${where})`,
|
|
306
|
+
[ORG, alice.id],
|
|
307
|
+
)
|
|
308
|
+
expect(sorted((bySource.get(source) ?? []).map(keyOf)), source).toEqual(
|
|
309
|
+
sorted(expected.map((r) => keyOf(r.row))),
|
|
310
|
+
)
|
|
311
|
+
}
|
|
312
|
+
expect(bySource.get("journal.entry")).toHaveLength(1)
|
|
313
|
+
// The deleted record is in the export, through its history (every version, with the record as it was).
|
|
314
|
+
const everything = JSON.stringify(data)
|
|
315
|
+
expect(everything).toContain(A.deleted)
|
|
316
|
+
const history = bySource.get("eloxiv.history") ?? []
|
|
317
|
+
const deleted = history.filter((h) => h["recordId"] === deletedEntry)
|
|
318
|
+
expect(deleted.map((h) => h["op"])).toEqual(["insert", "delete"])
|
|
319
|
+
expect(deleted.every((h) => (h["snapshot"] as Record<string, unknown>)["body"] === A.deleted)).toBe(true)
|
|
320
|
+
// Nothing about Bob or anyone else, and nothing from globex.
|
|
321
|
+
for (const other of [B, A_GLOBEX, bob.email, OTHER]) {
|
|
322
|
+
expect(everything.includes(other), `the export holds ${other}`).toBe(false)
|
|
323
|
+
}
|
|
324
|
+
// The kernel's stores, never a secret's value or a token.
|
|
325
|
+
expect(
|
|
326
|
+
bySource
|
|
327
|
+
.get("eloxiv.connection")
|
|
328
|
+
?.map((c) => c["account_label"])
|
|
329
|
+
.sort(),
|
|
330
|
+
).toEqual([`${A.kernel}@mail.example`, "alice@mail.example"].sort())
|
|
331
|
+
expect(bySource.get("eloxiv.secret")?.map((c) => c["name"])).toEqual([`note-${A.kernel}`])
|
|
332
|
+
expect(JSON.stringify(bySource.get("eloxiv.secret"))).not.toContain("ciphertext")
|
|
333
|
+
expect(bySource.get("eloxiv.files")).toEqual([{ name: `${A.kernel}.pdf` }])
|
|
334
|
+
// The files the person uploaded (metadata, never a storage key) and what they ingested.
|
|
335
|
+
expect(sorted((bySource.get("eloxiv.file") ?? []).map((f) => f["name"]))).toEqual(
|
|
336
|
+
sorted([`${A.kernel}.txt`, "minutes.pdf"]),
|
|
337
|
+
)
|
|
338
|
+
expect(JSON.stringify(bySource.get("eloxiv.file"))).not.toContain("storage_key")
|
|
339
|
+
expect(bySource.get("eloxiv.file")?.map((f) => f["size"])).toEqual([3, 3])
|
|
340
|
+
expect(bySource.get("eloxiv.ingestion_item")?.map((i) => i["title"])).toEqual(["minutes"])
|
|
341
|
+
// Every source the request visited is in the export, reported with its count, audited, and reported by
|
|
342
|
+
// Progress as the requester's task.
|
|
343
|
+
expect(sorted(request.sources.map((o) => o.source))).toEqual(sorted(data.sources.map((p) => p.source)))
|
|
344
|
+
for (const outcome of request.sources) expect(outcome.records).toBe(bySource.get(outcome.source)?.length)
|
|
345
|
+
const task = ok(await call(alice, "progress.get", { id: request.taskId }))
|
|
346
|
+
expect(task).toMatchObject({ status: "succeeded", kind: "export", percent: 100, ownerId: alice.id })
|
|
347
|
+
const audited = (await s.audit({ action: "eloxiv.privacy.export" })).filter((r) => r.invocationId === request.id)
|
|
348
|
+
expect(sorted(audited.map((r) => (r.detail as { source: string }).source))).toEqual(
|
|
349
|
+
sorted(request.sources.map((o) => o.source)),
|
|
350
|
+
)
|
|
351
|
+
})
|
|
352
|
+
|
|
353
|
+
it("never puts the contents of exports or requests about other people into a person's own export", async () => {
|
|
354
|
+
const { data: bobs } = await exportOf(ada, bob.id)
|
|
355
|
+
expect(JSON.stringify(bobs)).toContain(B)
|
|
356
|
+
const { data: own } = await exportOf(ada)
|
|
357
|
+
const text = JSON.stringify(own)
|
|
358
|
+
for (const other of [B, bob.id, bob.email])
|
|
359
|
+
expect(text.includes(other), `ada's export holds ${other}`).toBe(false)
|
|
360
|
+
})
|
|
361
|
+
|
|
362
|
+
it("lets only the requester and the subject read a request, and needs eloxiv.privacy.manage for another member", async () => {
|
|
363
|
+
const mine = String(ok(await call(alice, "privacy.requestExport", {}))["id"])
|
|
364
|
+
await settled(alice, mine)
|
|
365
|
+
expect(tagOf(await call(bob, "privacy.download", { id: mine }))).toBe("InvalidInput")
|
|
366
|
+
expect(await requestOf(bob, mine)).toBeUndefined()
|
|
367
|
+
expect(tagOf(await call(bob, "privacy.requestExport", { subject: alice.id }))).toBe("Forbidden")
|
|
368
|
+
expect(tagOf(await call(bob, "privacy.requestErasure", { subject: alice.id }))).toBe("Forbidden")
|
|
369
|
+
expect(tagOf(await call(ada, "privacy.requestExport", { subject: "not-a-member" }))).toBe("InvalidInput")
|
|
370
|
+
const theirs = String(ok(await call(ada, "privacy.requestExport", { subject: bob.id }))["id"])
|
|
371
|
+
expect((await settled(ada, theirs)).status).toBe("succeeded")
|
|
372
|
+
expect((await requestOf(bob, theirs))?.subjectId).toBe(bob.id)
|
|
373
|
+
expect(tagOf(await call(alice, "privacy.download", { id: theirs }))).toBe("InvalidInput")
|
|
374
|
+
expect(tagOf(await call(alice, "privacy.requestErasure", {}, "agent"))).toBe("ConsentRequired")
|
|
375
|
+
})
|
|
376
|
+
|
|
377
|
+
it("stops a request the requester cancels, at the next source, leaving the rest undone", async () => {
|
|
378
|
+
s.files.hold()
|
|
379
|
+
const created = ok(await call(ada, "privacy.requestExport", { subject: dora.id }))
|
|
380
|
+
await until(
|
|
381
|
+
"the request to reach the files",
|
|
382
|
+
async () => s.files.waiting(),
|
|
383
|
+
(w) => w,
|
|
384
|
+
30_000,
|
|
385
|
+
)
|
|
386
|
+
ok(await call(ada, "progress.cancel", { id: created["taskId"] }))
|
|
387
|
+
s.files.release()
|
|
388
|
+
const request = await settled(ada, String(created["id"]))
|
|
389
|
+
expect(request.status).toBe("cancelled")
|
|
390
|
+
const visited = request.sources.map((o) => o.source)
|
|
391
|
+
expect(visited).toContain("journal.entry")
|
|
392
|
+
expect(visited).not.toContain("eloxiv.connection")
|
|
393
|
+
expect(ok(await call(ada, "progress.get", { id: created["taskId"] }))).toMatchObject({ status: "cancelled" })
|
|
394
|
+
expect(tagOf(await call(ada, "privacy.download", { id: created["id"] }))).toBe("InvalidInput")
|
|
395
|
+
})
|
|
396
|
+
|
|
397
|
+
it("erases as declared, leaving no canary of the person anywhere in the database, and everyone else's intact", async () => {
|
|
398
|
+
// Background work was started for every saved entry (journal's trigger on `journal.saved`, whose payload
|
|
399
|
+
// names the author and carries the body): wait until every such event has started its execution.
|
|
400
|
+
await until(
|
|
401
|
+
"every saved entry's background work to start",
|
|
402
|
+
() =>
|
|
403
|
+
s.sql<{ n: number }>(
|
|
404
|
+
`SELECT count(*)::int AS n FROM eloxiv.outbox o WHERE o.type = 'journal.saved'
|
|
405
|
+
AND NOT EXISTS (SELECT 1 FROM eloxiv.workflow_execution e WHERE e.event_id = o.id)`,
|
|
406
|
+
),
|
|
407
|
+
(rows) => rows[0]?.n === 0,
|
|
408
|
+
60_000,
|
|
409
|
+
)
|
|
410
|
+
expect(
|
|
411
|
+
await s.sql(`SELECT 1 FROM eloxiv.workflow_execution WHERE workflow = 'journal.onSaved'`),
|
|
412
|
+
).not.toHaveLength(0)
|
|
413
|
+
// A sync replica holds Alice's records before the erasure.
|
|
414
|
+
if (s.syncReplica !== undefined) {
|
|
415
|
+
await until(
|
|
416
|
+
"the replica to hold Alice's record",
|
|
417
|
+
() => s.syncReplica!.search(A.record),
|
|
418
|
+
(t) => t.length > 0,
|
|
419
|
+
30_000,
|
|
420
|
+
)
|
|
421
|
+
}
|
|
422
|
+
const created = ok(await call(alice, "privacy.requestErasure", {}))
|
|
423
|
+
// Watched from outside, so the person makes no call (and no new record) until it is checked.
|
|
424
|
+
await until(
|
|
425
|
+
"the erasure to finish",
|
|
426
|
+
() => s.sql<{ status: string }>(`SELECT status FROM eloxiv_privacy.request WHERE id = $1`, [created["id"]]),
|
|
427
|
+
(rows) => ["succeeded", "failed", "cancelled"].includes(rows[0]?.status ?? ""),
|
|
428
|
+
90_000,
|
|
429
|
+
)
|
|
430
|
+
// The person's id remains only where it must, each for a stated reason: not in the engine's journal, not in
|
|
431
|
+
// the request's workflow, not next to their pseudonym.
|
|
432
|
+
const keeps = { ...KEEPS_ID, ...(s.syncReplica === undefined ? {} : SYNC_KEEPS_ID) }
|
|
433
|
+
expect((await searchIn(alice.id, ORG)).map(syncName).sort()).toEqual(Object.keys(keeps).sort())
|
|
434
|
+
const request = await settled(alice, String(created["id"]))
|
|
435
|
+
expect(request.status).toBe("succeeded")
|
|
436
|
+
const outcome = new Map(request.sources.map((o) => [o.source, o]))
|
|
437
|
+
expect(outcome.get("journal.entry")).toMatchObject({ outcome: "deleted", records: 1 })
|
|
438
|
+
expect(outcome.get("tasks.task")).toMatchObject({ outcome: "anonymised", records: 2 })
|
|
439
|
+
expect(outcome.get("billing.invoice")).toMatchObject({ outcome: "retained", records: 1, reason: RETENTION })
|
|
440
|
+
expect(outcome.get("mailbox.message")).toMatchObject({ outcome: "deleted", records: 2 })
|
|
441
|
+
expect(outcome.get("eloxiv.files")).toMatchObject({ outcome: "deleted", records: 1 })
|
|
442
|
+
// The staged file is deleted (its bytes purged after retention); the attached one stays with its record, by a
|
|
443
|
+
// pseudonym (scrubbed once, then two rows pseudonymised).
|
|
444
|
+
expect(outcome.get("eloxiv.file")).toMatchObject({ outcome: "anonymised", records: 3 })
|
|
445
|
+
expect(
|
|
446
|
+
await s.sql<{ name: string; state: string }>(
|
|
447
|
+
`SELECT name, state FROM eloxiv.file WHERE org_id = $1 AND uploaded_by <> $2 ORDER BY name`,
|
|
448
|
+
[ORG, bob.id],
|
|
449
|
+
),
|
|
450
|
+
).toEqual([
|
|
451
|
+
{ name: "", state: "deleted" },
|
|
452
|
+
{ name: "minutes.pdf", state: "available" },
|
|
453
|
+
])
|
|
454
|
+
// No canary of Alice's in acme survives, in any table: records, deleted records' history, settings and
|
|
455
|
+
// their audit, events, Connections (both accounts), flows, sync state, secrets.
|
|
456
|
+
for (const value of [A.record, A.deleted, A.kernel]) {
|
|
457
|
+
expect(await s.searchDatabase(value), value).toEqual([])
|
|
458
|
+
}
|
|
459
|
+
// Nor in the sync replica, once it has replicated the erasure.
|
|
460
|
+
if (s.syncReplica !== undefined) {
|
|
461
|
+
for (const value of [A.record, A.deleted, A.kernel]) {
|
|
462
|
+
await until(
|
|
463
|
+
`the replica to drop ${value}`,
|
|
464
|
+
() => s.syncReplica!.search(value),
|
|
465
|
+
(t) => t.length === 0,
|
|
466
|
+
30_000,
|
|
467
|
+
)
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
expect(await s.files.list(alice.id, ORG)).toEqual([])
|
|
471
|
+
// The shared Connection Alice added is the organisation's: kept, by a pseudonym, with its grant to everyone;
|
|
472
|
+
// only her own grant goes.
|
|
473
|
+
const [shared] = await s.sql<{ owner_id: string }>(`SELECT owner_id FROM eloxiv.connection WHERE id = $1`, [
|
|
474
|
+
`conn_shared_${ORG}`,
|
|
475
|
+
])
|
|
476
|
+
expect(shared?.owner_id).toMatch(/^erased_/u)
|
|
477
|
+
expect(
|
|
478
|
+
await s.sql<{ grantee_kind: string; granted_by: string }>(
|
|
479
|
+
`SELECT grantee_kind, granted_by FROM eloxiv.connection_grant WHERE connection_id = $1`,
|
|
480
|
+
[`conn_shared_${ORG}`],
|
|
481
|
+
),
|
|
482
|
+
).toEqual([{ grantee_kind: "org", granted_by: shared!.owner_id }])
|
|
483
|
+
// Her grant in globex is another organisation's: not rewritten (nothing links the pseudonym to her there).
|
|
484
|
+
expect(await s.sql(`SELECT granted_by FROM eloxiv.connection_grant WHERE org_id = $1`, [OTHER])).toEqual([
|
|
485
|
+
{ granted_by: alice.id },
|
|
486
|
+
])
|
|
487
|
+
// A deleted record cannot come back, and its history is gone.
|
|
488
|
+
expect(tagOf(await call(alice, "journal.restore", { id: deletedEntry, version: 1 }))).toBe("Forbidden")
|
|
489
|
+
expect(tagOf(await call(alice, "versioning.history", { entity: "journal.entry", id: deletedEntry }))).toBe(
|
|
490
|
+
"Forbidden",
|
|
491
|
+
)
|
|
492
|
+
// What is retained is as declared: the invoice, and the request itself as evidence.
|
|
493
|
+
expect(await s.sql(`SELECT id FROM billing.invoice WHERE customer_id = $1`, [alice.id])).toHaveLength(1)
|
|
494
|
+
expect(await requestOf(alice, request.id)).toMatchObject({ status: "succeeded", kind: "erasure" })
|
|
495
|
+
expect(ok(await call(alice, "progress.get", { id: request.taskId }))).toMatchObject({
|
|
496
|
+
status: "succeeded",
|
|
497
|
+
kind: "erasure",
|
|
498
|
+
})
|
|
499
|
+
// Everyone else, and Alice in globex, untouched: her run asked for by hand in globex still names her.
|
|
500
|
+
for (const value of [B, A_GLOBEX]) expect((await s.searchDatabase(value)).length, value).toBeGreaterThan(0)
|
|
501
|
+
expect(
|
|
502
|
+
await s.sql<{ org: string; mine: boolean }>(
|
|
503
|
+
`SELECT org_id AS org, requested_by = $1 AS mine FROM eloxiv.schedule_run
|
|
504
|
+
WHERE key LIKE 'schedule:planted-%' ORDER BY org_id`,
|
|
505
|
+
[alice.id],
|
|
506
|
+
),
|
|
507
|
+
).toEqual([
|
|
508
|
+
{ org: ORG, mine: false },
|
|
509
|
+
{ org: OTHER, mine: true },
|
|
510
|
+
])
|
|
511
|
+
expect(await s.files.list(bob.id, ORG)).toEqual([`${B}.pdf`])
|
|
512
|
+
expect(
|
|
513
|
+
await s.sql(`SELECT id FROM tasks.task WHERE creator_id = $1 AND assignee_id = $1`, [bob.id]),
|
|
514
|
+
).toHaveLength(1)
|
|
515
|
+
const audited = (await s.audit({ action: "eloxiv.privacy.erase" })).filter((r) => r.invocationId === request.id)
|
|
516
|
+
expect(audited).toHaveLength(request.sources.length)
|
|
517
|
+
})
|
|
518
|
+
|
|
519
|
+
it("names an erased person by a pseudonym of the request's own, linked to them nowhere once it is done", async () => {
|
|
520
|
+
// Alice erases her data in globex too: a pseudonym of its own, unlike acme's.
|
|
521
|
+
const created = ok(await call(aliceInOther, "privacy.requestErasure", {}, "internal", OTHER))
|
|
522
|
+
await until(
|
|
523
|
+
"the erasure to finish",
|
|
524
|
+
() => s.sql<{ status: string }>(`SELECT status FROM eloxiv_privacy.request WHERE id = $1`, [created["id"]]),
|
|
525
|
+
(rows) => rows[0]?.status === "succeeded",
|
|
526
|
+
90_000,
|
|
527
|
+
)
|
|
528
|
+
const pseudonyms = await s.sql<{ org: string; pseudonym: string }>(
|
|
529
|
+
`SELECT DISTINCT org_id AS org, detail ->> 'subject' AS pseudonym FROM eloxiv.audit_log
|
|
530
|
+
WHERE action = 'eloxiv.privacy.erase' AND invocation_id IN (
|
|
531
|
+
SELECT id FROM eloxiv_privacy.request WHERE subject_id = $1 AND kind = 'erasure')`,
|
|
532
|
+
[alice.id],
|
|
533
|
+
)
|
|
534
|
+
expect(pseudonyms.map((p) => p.org).sort()).toEqual([ORG, OTHER])
|
|
535
|
+
const [acme, globex] = [ORG, OTHER].map((org) => pseudonyms.find((p) => p.org === org)!.pseudonym)
|
|
536
|
+
expect(acme).toMatch(/^erased_[0-9a-f]{32}$/)
|
|
537
|
+
expect(acme).not.toBe(globex)
|
|
538
|
+
// Each where it replaced her id (the audit, record history, and the actor columns of what she did that is
|
|
539
|
+
// kept: a file attached to a record, an item ingested into one, the storage quota, a shared Connection she added
|
|
540
|
+
// and its grant, a run she asked for by hand, and the sync change log of the replicated file), and nowhere it could
|
|
541
|
+
// be looked up: no table holds it with her id.
|
|
542
|
+
const replaced = [
|
|
543
|
+
"eloxiv.audit_log",
|
|
544
|
+
"eloxiv.schedule_run",
|
|
545
|
+
"eloxiv.record_history",
|
|
546
|
+
"eloxiv.file",
|
|
547
|
+
"eloxiv.ingestion_item",
|
|
548
|
+
"eloxiv.storage_quota",
|
|
549
|
+
"eloxiv.connection",
|
|
550
|
+
"eloxiv.connection_grant",
|
|
551
|
+
"{sync}.changeLog",
|
|
552
|
+
]
|
|
553
|
+
for (const pseudonym of [acme!, globex!]) {
|
|
554
|
+
for (const { table } of await s.searchDatabase(pseudonym)) {
|
|
555
|
+
expect(replaced, `${table} holds a pseudonym`).toContain(syncName(table))
|
|
556
|
+
const [both] = await s.sql<{ n: number }>(
|
|
557
|
+
`SELECT count(*)::int AS n FROM ${table} t WHERE strpos(t::text, $1) > 0 AND strpos(t::text, $2) > 0`,
|
|
558
|
+
[pseudonym, alice.id],
|
|
559
|
+
)
|
|
560
|
+
expect(both?.n, `${table} links the pseudonym to her`).toBe(0)
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
})
|
|
564
|
+
|
|
565
|
+
it("refuses at setup a table a module creates without declaring it as an entity", async () => {
|
|
566
|
+
// A table in a module's schema that no entity of it declares: setup refuses to open the module with it.
|
|
567
|
+
await s.sql(`CREATE TABLE mailbox.stash (id text PRIMARY KEY, owner_id text, note text)`)
|
|
568
|
+
try {
|
|
569
|
+
const refused = await s.setupWith("mailbox", (c) => c)
|
|
570
|
+
expect(refused.ok).toBe(false)
|
|
571
|
+
expect(refused.ok ? "" : refused.error).toContain("mailbox.stash")
|
|
572
|
+
} finally {
|
|
573
|
+
await s.sql(`DROP TABLE mailbox.stash`)
|
|
574
|
+
}
|
|
575
|
+
expect(await s.setupWith("mailbox", (c) => c)).toEqual({ ok: true })
|
|
576
|
+
})
|
|
577
|
+
})
|