@eloxiv/testing 0.0.0-stage → 0.1.1
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 +908 -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 +70 -0
- package/dist/conformance/LocalClient.d.ts.map +1 -0
- package/dist/conformance/LocalClient.js +576 -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 +1075 -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 +707 -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,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the Sync contract (docs/contracts/sync.md): each named
|
|
3
|
+
* query is scoped by the entity's compiled read policy for the caller's user
|
|
4
|
+
* and organisation; queries the kernel cannot authorise are refused; a sync
|
|
5
|
+
* schema whose columns do not match the entity contracts is refused at start.
|
|
6
|
+
*
|
|
7
|
+
* Usage: `syncConformance(() => startMyKernel())` (see `./Subject.ts`).
|
|
8
|
+
* End to end through zero-cache (a second client's replica receives only what
|
|
9
|
+
* its user may read) is proven by `registry/test/sync.test.ts`.
|
|
10
|
+
*/
|
|
11
|
+
import { createSchema, relationships, string, table } from "@eloxiv/client";
|
|
12
|
+
import { shareGrant } from "@eloxiv/client/sync";
|
|
13
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
14
|
+
import * as badSync from "./fixture/docs/bad-sync.js";
|
|
15
|
+
import { schema } from "./fixture/docs/sync.js";
|
|
16
|
+
/** The query's entry in the endpoint's answer, as the kernel sent it; fails unless the endpoint answered 200. */
|
|
17
|
+
const entryOf = (answer) => {
|
|
18
|
+
if (answer.status !== 200)
|
|
19
|
+
throw new Error(`The sync endpoint answered ${answer.status}`);
|
|
20
|
+
return answer.answer;
|
|
21
|
+
};
|
|
22
|
+
/** A scoped query's AST, as JSON; fails unless the kernel answered with an AST and no error. */
|
|
23
|
+
const astOf = (answer) => {
|
|
24
|
+
const entry = entryOf(answer);
|
|
25
|
+
if (entry["error"] !== undefined || entry["ast"] === undefined) {
|
|
26
|
+
throw new Error(`Expected a scoped query, got ${JSON.stringify(entry)}`);
|
|
27
|
+
}
|
|
28
|
+
return JSON.stringify(entry["ast"]);
|
|
29
|
+
};
|
|
30
|
+
export const syncConformance = (start) => describe("Sync contract", () => {
|
|
31
|
+
let subject;
|
|
32
|
+
let sam;
|
|
33
|
+
let alice;
|
|
34
|
+
beforeAll(async () => {
|
|
35
|
+
subject = await start();
|
|
36
|
+
sam = await subject.user("sam", ["acme"]);
|
|
37
|
+
alice = await subject.user("alice", ["acme", "globex"]);
|
|
38
|
+
});
|
|
39
|
+
afterAll(() => subject?.dispose());
|
|
40
|
+
describe("named queries are scoped to what the caller may read", () => {
|
|
41
|
+
it("adds the entity's compiled read policy to a plain query", async () => {
|
|
42
|
+
const ast = astOf(await subject.sync.query(sam.token, "docs.all"));
|
|
43
|
+
expect(ast).toContain('"org_id"');
|
|
44
|
+
// The organisation the caller acts in, and the caller for the per-record sharing grants.
|
|
45
|
+
expect(ast).toContain('"acme"');
|
|
46
|
+
expect(ast).toContain(JSON.stringify(sam.id));
|
|
47
|
+
});
|
|
48
|
+
it("scopes per user and organisation: the organisation the client names, and no other", async () => {
|
|
49
|
+
const inAcme = astOf(await subject.sync.query(alice.token, "docs.all", [], "acme"));
|
|
50
|
+
const inGlobex = astOf(await subject.sync.query(alice.token, "docs.all", [], "globex"));
|
|
51
|
+
expect(inAcme).toContain('"acme"');
|
|
52
|
+
expect(inAcme).not.toContain('"globex"');
|
|
53
|
+
expect(inGlobex).toContain('"globex"');
|
|
54
|
+
expect(inGlobex).not.toContain('"acme"');
|
|
55
|
+
expect(inAcme).toContain(JSON.stringify(alice.id));
|
|
56
|
+
expect(inAcme).not.toContain(JSON.stringify(sam.id));
|
|
57
|
+
});
|
|
58
|
+
it("refuses callers who are not signed in, or not members of the organisation they name", async () => {
|
|
59
|
+
expect(await subject.sync.query("not-a-session", "docs.all")).toEqual({ status: 401 });
|
|
60
|
+
expect(await subject.sync.query(sam.token, "docs.all", [], "globex")).toEqual({ status: 401 });
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
describe("queries reaching related tables are authorised per child entity", () => {
|
|
64
|
+
/** The related subquery of `docs.withAttachments` (or the `whereExists` condition of `docs.attached`). */
|
|
65
|
+
const childOf = (ast, kind) => {
|
|
66
|
+
if (kind === "related")
|
|
67
|
+
return ast["related"]?.[0]?.["subquery"];
|
|
68
|
+
const find = (c) => c === undefined || c === null
|
|
69
|
+
? undefined
|
|
70
|
+
: c.type === "correlatedSubquery" && c.related?.system !== "permissions"
|
|
71
|
+
? c.related.subquery
|
|
72
|
+
: Array.isArray(c.conditions)
|
|
73
|
+
? c.conditions.map(find).find((x) => x !== undefined)
|
|
74
|
+
: undefined;
|
|
75
|
+
return find(ast["where"]);
|
|
76
|
+
};
|
|
77
|
+
for (const [query, kind] of [
|
|
78
|
+
["docs.withAttachments", "related"],
|
|
79
|
+
["docs.attached", "exists"],
|
|
80
|
+
]) {
|
|
81
|
+
it(`adds the child entity's own read policy to its rows (${query})`, async () => {
|
|
82
|
+
const entry = entryOf(await subject.sync.query(sam.token, query));
|
|
83
|
+
expect(entry["error"]).toBeUndefined();
|
|
84
|
+
const child = childOf(entry["ast"], kind);
|
|
85
|
+
expect(child?.["table"]).toBe("docs.attachment");
|
|
86
|
+
// The attachment's read policy (its owner, in the organisation the caller acts in), bound to the caller.
|
|
87
|
+
const where = JSON.stringify(child["where"]);
|
|
88
|
+
expect(where).toContain('"owner_id"');
|
|
89
|
+
expect(where).toContain(JSON.stringify(sam.id));
|
|
90
|
+
expect(where).toContain('"acme"');
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
describe("queries the kernel cannot authorise are refused", () => {
|
|
95
|
+
it("refuses a query that returns related rows of a table no entity governs", async () => {
|
|
96
|
+
const entry = entryOf(await subject.sync.query(sam.token, "docs.withShares"));
|
|
97
|
+
// Refused, not filtered: Zero's application error, with no query to run.
|
|
98
|
+
expect(entry["ast"]).toBeUndefined();
|
|
99
|
+
expect(entry).toMatchObject({ error: "app", message: expect.any(String) });
|
|
100
|
+
});
|
|
101
|
+
it("refuses a query that filters through a table no entity governs", async () => {
|
|
102
|
+
const entry = entryOf(await subject.sync.query(sam.token, "docs.shared"));
|
|
103
|
+
expect(entry["ast"]).toBeUndefined();
|
|
104
|
+
expect(entry).toMatchObject({ error: "app", message: expect.any(String) });
|
|
105
|
+
});
|
|
106
|
+
it("refuses a query whose own table no entity governs (its entity is inferred from the table it reads)", async () => {
|
|
107
|
+
const entry = entryOf(await subject.sync.query(sam.token, "docs.grants"));
|
|
108
|
+
expect(entry["ast"]).toBeUndefined();
|
|
109
|
+
expect(entry).toMatchObject({ error: "app", message: expect.stringContaining("no entity contract governs") });
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
describe("pushed optimistic writes (mutate)", () => {
|
|
113
|
+
const push = (token, schema) => fetch(`${subject.url}/zero/mutate?schema=${schema}&appID=zero`, {
|
|
114
|
+
method: "POST",
|
|
115
|
+
headers: {
|
|
116
|
+
"content-type": "application/json",
|
|
117
|
+
...(token === undefined ? {} : { authorization: `Bearer ${token}` }),
|
|
118
|
+
},
|
|
119
|
+
body: JSON.stringify({
|
|
120
|
+
clientGroupID: "kit-group",
|
|
121
|
+
pushVersion: 1,
|
|
122
|
+
timestamp: Date.now(),
|
|
123
|
+
requestID: "kit",
|
|
124
|
+
mutations: [
|
|
125
|
+
{ type: "custom", id: 1, clientID: "kit-client", name: "docs.create", args: [{}], timestamp: Date.now() },
|
|
126
|
+
],
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
it("refuses a push without a signed-in person's bearer token", async () => {
|
|
130
|
+
expect((await push(undefined, "zero_0")).status).toBe(401);
|
|
131
|
+
expect((await push("not-a-session", "zero_0")).status).toBe(401);
|
|
132
|
+
});
|
|
133
|
+
it("refuses a push naming a schema that is not zero-cache's shard for the kernel's app", async () => {
|
|
134
|
+
for (const schema of ["public", "eloxiv", "eloxiv_setup", "zero", "zero_x"]) {
|
|
135
|
+
expect((await push(sam.token, schema)).status).toBe(403);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
describe("the sync schema must match the entity contracts", () => {
|
|
140
|
+
it("refuses to serve a sync schema whose columns do not match the entity's policy fields", async () => {
|
|
141
|
+
await expect(subject.sync.serve(badSync)).rejects.toThrow(/orgId/);
|
|
142
|
+
});
|
|
143
|
+
const docTable = (orgColumn = "org_id") => table("doc")
|
|
144
|
+
.from("docs.doc")
|
|
145
|
+
.columns({
|
|
146
|
+
id: string(),
|
|
147
|
+
orgId: string().from(orgColumn),
|
|
148
|
+
ownerId: string().from("owner_id"),
|
|
149
|
+
title: string(),
|
|
150
|
+
locked: string(),
|
|
151
|
+
})
|
|
152
|
+
.primaryKey("id");
|
|
153
|
+
const check = (built) => subject.sync.checkSchema(built);
|
|
154
|
+
it("accepts the fixture's generated schema", () => {
|
|
155
|
+
expect(subject.sync.checkSchema(schema)).toEqual([]);
|
|
156
|
+
});
|
|
157
|
+
it("rejects a generated table changed anywhere: a column's type, its nullability, an extra column", () => {
|
|
158
|
+
const tampered = table("doc")
|
|
159
|
+
.from("docs.doc")
|
|
160
|
+
.columns({
|
|
161
|
+
id: string(),
|
|
162
|
+
orgId: string().from("org_id"),
|
|
163
|
+
ownerId: string().from("owner_id"),
|
|
164
|
+
title: string().optional(),
|
|
165
|
+
locked: string(),
|
|
166
|
+
secret: string(),
|
|
167
|
+
})
|
|
168
|
+
.primaryKey("id");
|
|
169
|
+
const problems = check(createSchema({ tables: [tampered] })).join("\n");
|
|
170
|
+
expect(problems).toMatch(/title optional/);
|
|
171
|
+
expect(problems).toMatch(/locked as string/);
|
|
172
|
+
expect(problems).toMatch(/column secret/);
|
|
173
|
+
});
|
|
174
|
+
it("rejects a policy field that reads another column", () => {
|
|
175
|
+
const t = docTable("organisation");
|
|
176
|
+
const rel = relationships(t, ({ many }) => ({
|
|
177
|
+
shares: many({ sourceField: ["id"], destSchema: shareGrant, destField: ["resourceId"] }),
|
|
178
|
+
}));
|
|
179
|
+
expect(check(createSchema({ tables: [t, shareGrant], relationships: [rel] })).join("\n")).toMatch(/orgId to column organisation/);
|
|
180
|
+
});
|
|
181
|
+
it("rejects a table that takes a name the kernel reserves for its live tables", () => {
|
|
182
|
+
const impostor = table("eloxivShareGrant")
|
|
183
|
+
.from("docs.board")
|
|
184
|
+
.columns({ id: string(), orgId: string().from("org_id") })
|
|
185
|
+
.primaryKey("id");
|
|
186
|
+
expect(check(createSchema({ tables: [docTable(), impostor] })).join("\n")).toMatch(/reserved/);
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
//# sourceMappingURL=Sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sync.js","sourceRoot":"","sources":["../../src/conformance/Sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAClE,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAG/C,iHAAiH;AACjH,MAAM,OAAO,GAAG,CAAC,MAAkB,EAAE,EAAE;IACrC,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,8BAA8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,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAC/F,8BAA8B,CAC/B,CAAA;QACH,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,2EAA2E,EAAE,GAAG,EAAE;YACnF,MAAM,QAAQ,GAAG,KAAK,CAAC,kBAAkB,CAAC;iBACvC,IAAI,CAAC,YAAY,CAAC;iBAClB,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;iBACzD,UAAU,CAAC,IAAI,CAAC,CAAA;YACnB,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;QAChG,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Telemetry.d.ts","sourceRoot":"","sources":["../../src/conformance/Telemetry.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAmB,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAIjF,eAAO,MAAM,oBAAoB,UAAW,oBAAoB,4CAoQ5D,CAAA"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the Telemetry contract (docs/contracts/telemetry.md) on the platform-services conformance
|
|
3
|
+
* app, with the subject's telemetry going to protocol fakes (an OTLP collector, Sentry's envelope endpoint,
|
|
4
|
+
* PostHog's capture endpoint).
|
|
5
|
+
*
|
|
6
|
+
* Everything that leaves is allowlisted, never free text. Traces: every invocation is a span whose attributes are
|
|
7
|
+
* declared low-cardinality values only (a registered action and module or `unknown`, the surface, the origin,
|
|
8
|
+
* the outcome, a known error tag), under the HTTP request's span, whose path leaves only as its route template;
|
|
9
|
+
* invocation metrics are exported; no exported byte holds caller text, a credential, a record value, an e-mail
|
|
10
|
+
* address or a user id. Errors: an unexpected failure reaches Sentry through the envelope protocol carrying only
|
|
11
|
+
* its tag, the invocation id and a fixed message for the tag; expected failures are not reported. Analytics:
|
|
12
|
+
* events and their properties are declared, with types (enums, numbers, booleans and ids, ids pseudonymised);
|
|
13
|
+
* anything else is refused; an event leaves only with the person's consent for its declared category in that
|
|
14
|
+
* organisation (opt-in regions grant nothing until chosen, opt-out regions until refused); clients' events go
|
|
15
|
+
* through `telemetry.track` as declared `client.*` events.
|
|
16
|
+
*
|
|
17
|
+
* Usage, in a Vitest file: `telemetryConformance(() => startMyKernel())`.
|
|
18
|
+
*/
|
|
19
|
+
import { CAPTURED_ERROR_MESSAGES, TELEMETRY_SPAN_ATTRIBUTES } from "@eloxiv/contracts";
|
|
20
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
21
|
+
import { until } from "./InboxSubject.js";
|
|
22
|
+
const ORG = "acme";
|
|
23
|
+
export const telemetryConformance = (start) => describe("Telemetry contract", () => {
|
|
24
|
+
let s;
|
|
25
|
+
let alice; // opt-in region (DE)
|
|
26
|
+
let bob; // opt-out region (US)
|
|
27
|
+
let dora; // never placed: the deployment's default (opt-in)
|
|
28
|
+
const call = (who, action, input, surface = "internal") => s.invoke({ action, input, token: who.token, surface });
|
|
29
|
+
const ok = (outcome) => {
|
|
30
|
+
if (!outcome.ok)
|
|
31
|
+
throw new Error(`call failed: ${JSON.stringify(outcome)}`);
|
|
32
|
+
return outcome.result.output;
|
|
33
|
+
};
|
|
34
|
+
const tagOf = (outcome) => (outcome.ok ? "ok" : outcome.error._tag);
|
|
35
|
+
/** The newest exported span matching `match`, after sending what is queued. */
|
|
36
|
+
const spanWhere = async (what, match) => (await until(what, async () => {
|
|
37
|
+
await s.telemetry.flush();
|
|
38
|
+
return s.telemetry.spans().findLast(match);
|
|
39
|
+
}, (span) => span !== undefined, 15_000));
|
|
40
|
+
const invocationOf = async (action, who) => (await s.audit({ action })).findLast((r) => r.actorUserId === who.id);
|
|
41
|
+
/** Every analytics event received for the marker, after sending what is queued. */
|
|
42
|
+
const eventsWith = async (match) => {
|
|
43
|
+
await s.telemetry.flush();
|
|
44
|
+
return s.telemetry.posthog().filter((e) => match(e.properties));
|
|
45
|
+
};
|
|
46
|
+
beforeAll(async () => {
|
|
47
|
+
s = await start();
|
|
48
|
+
alice = await s.user("alice", ORG);
|
|
49
|
+
bob = await s.user("bob", ORG);
|
|
50
|
+
dora = await s.user("dora", ORG);
|
|
51
|
+
ok(await call(alice, "privacy.setConsent", { choices: {}, region: { country: "DE" } }));
|
|
52
|
+
ok(await call(bob, "privacy.setConsent", { choices: {}, region: { country: "US" } }));
|
|
53
|
+
}, 120_000);
|
|
54
|
+
afterAll(() => s?.dispose());
|
|
55
|
+
it("exports a span per invocation with its declared attributes, under the request's span and its route template", async () => {
|
|
56
|
+
ok(await call(alice, "journal.write", { title: "traced", body: "b", visibility: "org" }, "http"));
|
|
57
|
+
const span = await spanWhere("the invocation span", (sp) => sp.name === "Invocation.invoke" && sp.attributes["eloxiv.action"] === "journal.write");
|
|
58
|
+
expect(span.attributes).toEqual({
|
|
59
|
+
"eloxiv.action": "journal.write",
|
|
60
|
+
"eloxiv.surface": "http",
|
|
61
|
+
"eloxiv.outcome": "succeeded",
|
|
62
|
+
"eloxiv.origin": "person",
|
|
63
|
+
"eloxiv.module": "journal",
|
|
64
|
+
});
|
|
65
|
+
// The HTTP request's span is its parent, in the same trace, with the route's template, never the path.
|
|
66
|
+
const parent = s.telemetry.spans().find((sp) => sp.spanId === span.parentSpanId);
|
|
67
|
+
expect(parent?.traceId).toBe(span.traceId);
|
|
68
|
+
expect(parent?.attributes["http.route"]).toBe("/api/actions/:action");
|
|
69
|
+
expect(parent?.attributes["url.path"]).toBeUndefined();
|
|
70
|
+
// A refused call says so, with the error's tag only.
|
|
71
|
+
expect(tagOf(await call(bob, "journal.edit", { id: "nope", title: "x" }, "http"))).toBe("Forbidden");
|
|
72
|
+
const failed = await spanWhere("the refused span", (sp) => sp.attributes["eloxiv.action"] === "journal.edit" && sp.attributes["eloxiv.error_tag"] === "Forbidden");
|
|
73
|
+
expect(failed.attributes["eloxiv.outcome"]).toBe("failed");
|
|
74
|
+
expect(JSON.stringify(failed)).not.toMatch(/may not act/);
|
|
75
|
+
await until("invocation metrics", async () => (await s.telemetry.flush(), s.telemetry.metricNames()), (names) => names.includes("eloxiv.invocations"));
|
|
76
|
+
});
|
|
77
|
+
it("never exports caller text: unknown actions and paths leave only as `unknown` and their route template", async () => {
|
|
78
|
+
const marker = `private-${crypto.randomUUID().slice(0, 8)}@example.com`;
|
|
79
|
+
expect(tagOf(await call(bob, marker, {}))).toBe("UnknownAction");
|
|
80
|
+
expect(await s.get(`/${marker}`)).toBe(404);
|
|
81
|
+
expect(await s.get(`/api/actions/${marker}?token=${marker}`)).toBeGreaterThanOrEqual(400);
|
|
82
|
+
await spanWhere("the unknown action's span", (sp) => sp.attributes["eloxiv.action"] === "unknown");
|
|
83
|
+
await spanWhere("the unmatched path's span", (sp) => sp.attributes["http.route"] === "unmatched");
|
|
84
|
+
await s.telemetry.flush();
|
|
85
|
+
expect(s.telemetry.otlpBodies().join("\n")).not.toContain(marker.split("@")[0]);
|
|
86
|
+
});
|
|
87
|
+
it("never exports a credential, a record value, an e-mail address or a user id, and only allowlisted attributes", async () => {
|
|
88
|
+
const marker = `record-value-${crypto.randomUUID()}`;
|
|
89
|
+
const id = String(ok(await call(alice, "journal.write", { title: marker, body: `${marker} body`, visibility: "private" }, "http"))["id"]);
|
|
90
|
+
ok(await call(alice, "journal.edit", { id, body: `${marker} again` }, "mcp"));
|
|
91
|
+
expect(tagOf(await call(alice, "journal.edit", { id: marker, title: marker }, "http"))).toBe("Forbidden");
|
|
92
|
+
ok(await call(alice, "journal.find", {}, "rpc"));
|
|
93
|
+
await spanWhere("the find span", (sp) => sp.attributes["eloxiv.action"] === "journal.find");
|
|
94
|
+
const exported = s.telemetry.otlpBodies().join("\n");
|
|
95
|
+
for (const forbidden of [marker, alice.token, alice.email, alice.id, "Bearer ", ORG]) {
|
|
96
|
+
expect(exported.includes(forbidden), `exported telemetry holds ${forbidden.slice(0, 12)}…`).toBe(false);
|
|
97
|
+
}
|
|
98
|
+
// Span names are declared or templated too: no name a module's work chose (a step named after an event), no
|
|
99
|
+
// name a caller sent (an unknown action over RPC).
|
|
100
|
+
ok(await call(alice, "journal.write", { title: "named", body: "steps", visibility: "private" }, "http"));
|
|
101
|
+
expect(tagOf(await call(alice, marker, {}, "rpc"))).not.toBe("ok");
|
|
102
|
+
const events = await s.sql(`SELECT id FROM eloxiv.outbox WHERE type = 'journal.saved'`);
|
|
103
|
+
await until("the saved entries' background work", () => s.sql(`SELECT 1 FROM eloxiv.workflow_step WHERE step LIKE 'measure-%' AND state = 'succeeded'`), (rows) => rows.length >= events.length, 30_000);
|
|
104
|
+
await s.telemetry.flush();
|
|
105
|
+
const names = s.telemetry.spans().map((span) => span.name);
|
|
106
|
+
for (const forbidden of [marker, ...events.map((e) => e.id)]) {
|
|
107
|
+
expect(names.filter((name) => name.includes(forbidden)), `span names hold ${forbidden.slice(0, 12)}…`).toEqual([]);
|
|
108
|
+
}
|
|
109
|
+
const allowed = new Set(TELEMETRY_SPAN_ATTRIBUTES);
|
|
110
|
+
for (const span of s.telemetry.spans()) {
|
|
111
|
+
for (const key of Object.keys(span.attributes))
|
|
112
|
+
expect(allowed.has(key), `span attribute ${key}`).toBe(true);
|
|
113
|
+
expect(span.events.filter((e) => e.name !== "exception")).toEqual([]);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
it("reports an unexpected failure to Sentry with only its tag, the invocation id and the tag's fixed message", async () => {
|
|
117
|
+
const secret = `s3cr3t${crypto.randomUUID().replaceAll("-", "")}`;
|
|
118
|
+
const outcome = await call(alice, "journal.crash", { secret }, "http");
|
|
119
|
+
expect(tagOf(outcome)).toBe("ActionFailed");
|
|
120
|
+
const record = await invocationOf("journal.crash", alice);
|
|
121
|
+
const [event] = await until("the error in Sentry", async () => {
|
|
122
|
+
await s.telemetry.flush();
|
|
123
|
+
return s.telemetry.sentry().filter((e) => e.event["tags"]?.["invocation_id"] === record.invocationId);
|
|
124
|
+
}, (events) => events.length > 0, 15_000);
|
|
125
|
+
expect(event.itemType).toBe("event");
|
|
126
|
+
expect(event.envelopeHeader["event_id"]).toBe(event.event["event_id"]);
|
|
127
|
+
expect(event.event["tags"]).toEqual({ invocation_id: record.invocationId, error_tag: "Defect" });
|
|
128
|
+
expect(event.event["exception"]).toEqual({
|
|
129
|
+
values: [{ type: "Defect", value: CAPTURED_ERROR_MESSAGES.Defect }],
|
|
130
|
+
});
|
|
131
|
+
for (const leaked of [secret, "Could not store", "carol", alice.id, alice.email, alice.token, "journal.crash"]) {
|
|
132
|
+
expect(event.raw.includes(leaked), `the report holds ${leaked.slice(0, 12)}…`).toBe(false);
|
|
133
|
+
}
|
|
134
|
+
expect(event.event["user"]).toBeUndefined();
|
|
135
|
+
});
|
|
136
|
+
it("does not report expected failures (refusals, invalid input)", async () => {
|
|
137
|
+
await s.telemetry.flush();
|
|
138
|
+
const before = s.telemetry.sentry().length;
|
|
139
|
+
expect(tagOf(await call(bob, "journal.edit", { id: "nope", title: "x" }))).toBe("Forbidden");
|
|
140
|
+
expect(tagOf(await call(bob, "journal.write", { title: 42 }))).toBe("InvalidInput");
|
|
141
|
+
await s.telemetry.flush();
|
|
142
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
143
|
+
await s.telemetry.flush();
|
|
144
|
+
expect(s.telemetry.sentry().length).toBe(before);
|
|
145
|
+
});
|
|
146
|
+
it("accepts only declared events with declared, typed properties, and pseudonymises ids", async () => {
|
|
147
|
+
const viewed = (properties) => call(bob, "journal.track", { event: "journal.viewed", properties });
|
|
148
|
+
// Free text never passes: undeclared properties, values outside an enum, wrong types, undeclared events.
|
|
149
|
+
expect(tagOf(await viewed({ view: "list", email: "private@example.com" }))).toBe("InvalidInput");
|
|
150
|
+
expect(tagOf(await viewed({ view: "Bearer short-secret" }))).toBe("InvalidInput");
|
|
151
|
+
expect(tagOf(await viewed({ view: "list", count: "3" }))).toBe("InvalidInput");
|
|
152
|
+
expect(tagOf(await viewed({ view: "list", pinned: "yes" }))).toBe("InvalidInput");
|
|
153
|
+
expect(tagOf(await call(bob, "journal.track", { event: "journal.unheard_of" }))).toBe("InvalidInput");
|
|
154
|
+
expect(tagOf(await call(bob, "journal.track", { event: "tasks.viewed" }))).toBe("InvalidInput");
|
|
155
|
+
// Declared, typed values leave (Bob is in an opt-out region); an id leaves pseudonymised.
|
|
156
|
+
const count = 1_000 + Math.floor(Math.random() * 1_000_000);
|
|
157
|
+
ok(await viewed({ view: "detail", count, pinned: true, entry: alice.id }));
|
|
158
|
+
const [event] = await until("Bob's event", () => eventsWith((p) => p["count"] === count), (e) => e.length >= 1);
|
|
159
|
+
expect(event.event).toBe("journal.viewed");
|
|
160
|
+
expect(event.properties["view"]).toBe("detail");
|
|
161
|
+
expect(event.properties["pinned"]).toBe(true);
|
|
162
|
+
expect(String(event.properties["entry"])).toMatch(/^id_[0-9a-f]{32}$/);
|
|
163
|
+
const body = s.telemetry.posthogBodies().join("\n");
|
|
164
|
+
for (const leaked of [alice.id, bob.id, bob.email, "private@example.com", "Bearer"]) {
|
|
165
|
+
expect(body.includes(leaked), `analytics holds ${leaked.slice(0, 12)}…`).toBe(false);
|
|
166
|
+
}
|
|
167
|
+
expect(event.distinct_id).toMatch(/^u_[0-9a-f]{32}$/);
|
|
168
|
+
});
|
|
169
|
+
it("sends an event only with the person's consent for its declared category, as their region decides by default", async () => {
|
|
170
|
+
const count = 2_000_000 + Math.floor(Math.random() * 1_000_000);
|
|
171
|
+
const viewed = (who) => call(who, "journal.track", { event: "journal.viewed", properties: { count } });
|
|
172
|
+
const promoted = (who) => call(who, "journal.track", { event: "journal.promoted", properties: { campaign: "spring" } });
|
|
173
|
+
const mine = () => eventsWith((p) => p["count"] === count);
|
|
174
|
+
// Opt-in region (Alice) and an unplaced person (Dora): nothing leaves until they choose.
|
|
175
|
+
ok(await viewed(alice));
|
|
176
|
+
ok(await viewed(dora));
|
|
177
|
+
// Opt-out region (Bob): analytics leave until he refuses.
|
|
178
|
+
ok(await viewed(bob));
|
|
179
|
+
await until("Bob's event", mine, (events) => events.length >= 1);
|
|
180
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
181
|
+
expect(await mine()).toHaveLength(1);
|
|
182
|
+
// Alice grants analytics: her analytics event leaves; her marketing one does not.
|
|
183
|
+
ok(await call(alice, "privacy.setConsent", { choices: { analytics: true } }));
|
|
184
|
+
const before = (await eventsWith((p) => p["campaign"] === "spring")).length;
|
|
185
|
+
ok(await viewed(alice));
|
|
186
|
+
ok(await promoted(alice));
|
|
187
|
+
await until("Alice's event", mine, (events) => events.length >= 2);
|
|
188
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
189
|
+
expect(await mine()).toHaveLength(2);
|
|
190
|
+
expect((await mine()).map((e) => e.properties["consent_category"])).toEqual(["analytics", "analytics"]);
|
|
191
|
+
expect(await eventsWith((p) => p["campaign"] === "spring")).toHaveLength(before);
|
|
192
|
+
// Bob refuses: nothing more of his leaves.
|
|
193
|
+
ok(await call(bob, "privacy.setConsent", { choices: { analytics: false } }));
|
|
194
|
+
ok(await viewed(bob));
|
|
195
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
196
|
+
expect(await mine()).toHaveLength(2);
|
|
197
|
+
});
|
|
198
|
+
it("sends the kernel's own event for a consenting person's calls, with declared values only", async () => {
|
|
199
|
+
await s.telemetry.flush();
|
|
200
|
+
const before = s.telemetry.posthog().length;
|
|
201
|
+
ok(await call(alice, "journal.summary", {}));
|
|
202
|
+
ok(await call(dora, "journal.summary", {}));
|
|
203
|
+
const found = await until("the kernel's event", async () => (await s.telemetry.flush(), s.telemetry.posthog().slice(before)), (events) => events.some((e) => e.event === "eloxiv.action_invoked" && e.properties["action"] === "journal.summary"));
|
|
204
|
+
const own = found.filter((e) => e.event === "eloxiv.action_invoked" && e.properties["action"] === "journal.summary");
|
|
205
|
+
expect(own).toHaveLength(1);
|
|
206
|
+
expect(own[0].properties).toMatchObject({ surface: "internal", origin: "person" });
|
|
207
|
+
});
|
|
208
|
+
it("relays a client's declared events through telemetry.track, named client.*", async () => {
|
|
209
|
+
ok(await call(alice, "telemetry.track", { event: "client.page_viewed", properties: { page: "settings" } }, "http"));
|
|
210
|
+
expect(tagOf(await call(alice, "telemetry.track", { event: "client.page_viewed", properties: { page: "/u/alice" } }))).toBe("InvalidInput");
|
|
211
|
+
expect(tagOf(await call(alice, "telemetry.track", { event: "client.undeclared" }))).toBe("InvalidInput");
|
|
212
|
+
expect(tagOf(await call(alice, "telemetry.track", { event: "journal.viewed" }))).toBe("InvalidInput");
|
|
213
|
+
expect(tagOf(await call(alice, "telemetry.track", { event: "eloxiv.action_invoked" }))).toBe("InvalidInput");
|
|
214
|
+
const events = await until("the client's event", () => eventsWith((p) => p["page"] === "settings"), (e) => e.length >= 1);
|
|
215
|
+
expect(events.map((e) => e.event)).toEqual(["client.page_viewed"]);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
//# sourceMappingURL=Telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Telemetry.js","sourceRoot":"","sources":["../../src/conformance/Telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAElE,OAAO,EAAE,KAAK,EAAwD,MAAM,mBAAmB,CAAA;AAG/F,MAAM,GAAG,GAAG,MAAM,CAAA;AAElB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC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AAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QACrG,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAC5G,MAAM,MAAM,GAAG,MAAM,KAAK,CACxB,oBAAoB,EACpB,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,UAAU,CAAC,EACjD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CACrB,CAAA;QACD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAA;IACpE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the ThemeTokens shell contract (docs/contracts/theme-tokens.md): validation (every
|
|
3
|
+
* colour token present, every colour measurable, every foreground at least 4.5:1 against its background in both
|
|
4
|
+
* schemes, measured: `#767676` on white passes at 4.54:1, `#777777` fails at 4.48:1), resolution per scheme and
|
|
5
|
+
* direction, the stylesheet (light on `:root`, dark on `.dark` and `[data-theme="dark"]`, rtl on
|
|
6
|
+
* `[dir="rtl"]`), logical insets mirrored for rtl, and every theme the caller ships (the registry's) valid.
|
|
7
|
+
*
|
|
8
|
+
* Usage: `themeTokensConformance({ validate, resolve, css, inset, themes })`.
|
|
9
|
+
*/
|
|
10
|
+
import { ResolvedTheme, ThemeTokens, type ColorScheme, type LogicalInset, type PhysicalInset, type TextDirection } from "@eloxiv/contracts";
|
|
11
|
+
export interface ThemeTokensSubject {
|
|
12
|
+
readonly validate: (theme: ThemeTokens) => ReadonlyArray<string>;
|
|
13
|
+
readonly resolve: (theme: ThemeTokens, scheme: ColorScheme, direction: TextDirection) => ResolvedTheme;
|
|
14
|
+
readonly css: (theme: ThemeTokens) => string;
|
|
15
|
+
readonly inset: (inset: LogicalInset, direction: TextDirection) => PhysicalInset;
|
|
16
|
+
/** Themes the implementation ships (a registry's), each of which must be valid. */
|
|
17
|
+
readonly themes: Readonly<Record<string, ThemeTokens>>;
|
|
18
|
+
}
|
|
19
|
+
/** A valid reference theme: black and white, mirrored for dark. */
|
|
20
|
+
export declare const referenceTheme: ThemeTokens;
|
|
21
|
+
export declare const themeTokensConformance: (subject: ThemeTokensSubject) => import("vitest").SuiteCollector<object>;
|
|
22
|
+
//# sourceMappingURL=ThemeTokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeTokens.d.ts","sourceRoot":"","sources":["../../src/conformance/ThemeTokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAEL,aAAa,EACb,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAA;AAK1B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,aAAa,CAAC,MAAM,CAAC,CAAA;IAChE,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,KAAK,aAAa,CAAA;IACtG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,MAAM,CAAA;IAC5C,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,KAAK,aAAa,CAAA;IAChF,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAA;CACvD;AAED,mEAAmE;AACnE,eAAO,MAAM,cAAc,EAAE,WAW5B,CAAA;AAqBD,eAAO,MAAM,sBAAsB,YAAa,kBAAkB,4CAkG9D,CAAA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the ThemeTokens shell contract (docs/contracts/theme-tokens.md): validation (every
|
|
3
|
+
* colour token present, every colour measurable, every foreground at least 4.5:1 against its background in both
|
|
4
|
+
* schemes, measured: `#767676` on white passes at 4.54:1, `#777777` fails at 4.48:1), resolution per scheme and
|
|
5
|
+
* direction, the stylesheet (light on `:root`, dark on `.dark` and `[data-theme="dark"]`, rtl on
|
|
6
|
+
* `[dir="rtl"]`), logical insets mirrored for rtl, and every theme the caller ships (the registry's) valid.
|
|
7
|
+
*
|
|
8
|
+
* Usage: `themeTokensConformance({ validate, resolve, css, inset, themes })`.
|
|
9
|
+
*/
|
|
10
|
+
import { COLOR_TOKENS, ResolvedTheme, ThemeTokens, } from "@eloxiv/contracts";
|
|
11
|
+
import { Schema } from "effect";
|
|
12
|
+
import * as fc from "fast-check";
|
|
13
|
+
import { describe, expect, it } from "vitest";
|
|
14
|
+
/** A valid reference theme: black and white, mirrored for dark. */
|
|
15
|
+
export const referenceTheme = {
|
|
16
|
+
name: "reference",
|
|
17
|
+
colors: Object.fromEntries(COLOR_TOKENS.map((token) => {
|
|
18
|
+
const text = token.endsWith("foreground");
|
|
19
|
+
return [token, text ? { light: "#000000", dark: "oklch(1 0 0)" } : { light: "#ffffff", dark: "oklch(0 0 0)" }];
|
|
20
|
+
})),
|
|
21
|
+
radius: "0.5rem",
|
|
22
|
+
spacing: "0.25rem",
|
|
23
|
+
fonts: { sans: "system-ui, sans-serif", mono: "ui-monospace, monospace" },
|
|
24
|
+
};
|
|
25
|
+
const withColor = (theme, token, light, dark) => ({
|
|
26
|
+
...theme,
|
|
27
|
+
colors: { ...theme.colors, [token]: { light, dark } },
|
|
28
|
+
});
|
|
29
|
+
/** The declarations of one block of a stylesheet (`selector { --a: b; }`), by property. */
|
|
30
|
+
const declarations = (css, selector) => {
|
|
31
|
+
const at = css.indexOf(`${selector} {`);
|
|
32
|
+
if (at < 0)
|
|
33
|
+
return {};
|
|
34
|
+
const body = css.slice(css.indexOf("{", at) + 1, css.indexOf("}", at));
|
|
35
|
+
return Object.fromEntries(body
|
|
36
|
+
.split(";")
|
|
37
|
+
.map((d) => d.trim())
|
|
38
|
+
.filter((d) => d !== "")
|
|
39
|
+
.map((d) => [d.slice(0, d.indexOf(":")).trim(), d.slice(d.indexOf(":") + 1).trim()]));
|
|
40
|
+
};
|
|
41
|
+
export const themeTokensConformance = (subject) => describe("ThemeTokens contract", () => {
|
|
42
|
+
it("accepts a complete theme whose foregrounds keep their contrast in both schemes", () => {
|
|
43
|
+
expect(Schema.is(ThemeTokens)(referenceTheme)).toBe(true);
|
|
44
|
+
expect(subject.validate(referenceTheme)).toEqual([]);
|
|
45
|
+
});
|
|
46
|
+
it("names every missing colour token", () => {
|
|
47
|
+
const { primary: _primary, ring: _ring, ...colors } = referenceTheme.colors;
|
|
48
|
+
const problems = subject.validate({ ...referenceTheme, colors }).join("\n");
|
|
49
|
+
expect(problems).toContain("primary");
|
|
50
|
+
expect(problems).toContain("ring");
|
|
51
|
+
});
|
|
52
|
+
it("measures contrast: 4.5:1 passes, just below fails, in either scheme", () => {
|
|
53
|
+
// #767676 on white is 4.54:1; #777777 is 4.48:1 (WCAG relative luminance).
|
|
54
|
+
expect(subject.validate(withColor(referenceTheme, "muted-foreground", "#767676", "oklch(1 0 0)"))).toEqual([]);
|
|
55
|
+
const light = subject.validate(withColor(referenceTheme, "muted-foreground", "#777777", "oklch(1 0 0)"));
|
|
56
|
+
expect(light.join("\n")).toMatch(/muted-foreground.*muted.*light/);
|
|
57
|
+
// Dark: a mid grey on black (oklch L 0.4 is about #474747, 2.3:1).
|
|
58
|
+
const dark = subject.validate(withColor(referenceTheme, "primary-foreground", "#000000", "oklch(0.4 0 0)"));
|
|
59
|
+
expect(dark.join("\n")).toMatch(/primary-foreground.*primary.*dark/);
|
|
60
|
+
// `foreground` is text on `background`.
|
|
61
|
+
const body = subject.validate(withColor(referenceTheme, "background", "#000000", "oklch(0 0 0)"));
|
|
62
|
+
expect(body.join("\n")).toMatch(/foreground.*background.*light/);
|
|
63
|
+
});
|
|
64
|
+
it("refuses a colour it cannot measure, and a translucent foreground or background", () => {
|
|
65
|
+
expect(subject.validate(withColor(referenceTheme, "border", "oklch(0.9 0 0 / 10%)", "#zzz")).join("\n")).toMatch(/border/);
|
|
66
|
+
expect(subject.validate(withColor(referenceTheme, "card", "oklch(1 0 0 / 50%)", "oklch(0 0 0)")).join("\n")).toMatch(/card/);
|
|
67
|
+
// Translucent tokens that are not text pairs (borders, inputs) are fine.
|
|
68
|
+
expect(subject.validate(withColor(referenceTheme, "input", "oklch(0.9 0 0 / 15%)", "oklch(1 0 0 / 15%)"))).toEqual([]);
|
|
69
|
+
});
|
|
70
|
+
it("resolves a scheme and direction into custom properties", () => {
|
|
71
|
+
for (const scheme of ["light", "dark"]) {
|
|
72
|
+
for (const direction of ["ltr", "rtl"]) {
|
|
73
|
+
const resolved = subject.resolve(referenceTheme, scheme, direction);
|
|
74
|
+
expect(Schema.is(ResolvedTheme)(resolved)).toBe(true);
|
|
75
|
+
expect(resolved).toMatchObject({ scheme, direction });
|
|
76
|
+
for (const token of COLOR_TOKENS) {
|
|
77
|
+
expect(resolved.variables[`--${token}`]).toBe(referenceTheme.colors[token][scheme]);
|
|
78
|
+
}
|
|
79
|
+
expect(resolved.variables).toMatchObject({
|
|
80
|
+
"--radius": "0.5rem",
|
|
81
|
+
"--spacing": "0.25rem",
|
|
82
|
+
"--direction": direction,
|
|
83
|
+
"--inline-start": direction === "rtl" ? "right" : "left",
|
|
84
|
+
"--inline-end": direction === "rtl" ? "left" : "right",
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
it("writes one stylesheet: light on :root, dark on .dark and [data-theme=dark], rtl on [dir=rtl]", () => {
|
|
90
|
+
const css = subject.css(referenceTheme);
|
|
91
|
+
const root = declarations(css, ":root");
|
|
92
|
+
const dark = declarations(css, '.dark,\n[data-theme="dark"]');
|
|
93
|
+
const rtl = declarations(css, '[dir="rtl"]');
|
|
94
|
+
for (const token of COLOR_TOKENS) {
|
|
95
|
+
expect(root[`--${token}`], token).toBe(referenceTheme.colors[token].light);
|
|
96
|
+
expect(dark[`--${token}`], token).toBe(referenceTheme.colors[token].dark);
|
|
97
|
+
}
|
|
98
|
+
expect(root).toMatchObject({ "--radius": "0.5rem", "--direction": "ltr", "color-scheme": "light" });
|
|
99
|
+
expect(dark["color-scheme"]).toBe("dark");
|
|
100
|
+
expect(rtl).toMatchObject({ "--direction": "rtl", "--inline-start": "right", "--inline-end": "left" });
|
|
101
|
+
});
|
|
102
|
+
it("maps logical insets to physical sides, mirrored for rtl", () => {
|
|
103
|
+
const length = fc.constantFrom("0", "1px", "0.5rem", "2em", "12px");
|
|
104
|
+
fc.assert(fc.property(fc.record({ blockStart: length, inlineEnd: length, blockEnd: length, inlineStart: length }), (inset) => {
|
|
105
|
+
const ltr = subject.inset(inset, "ltr");
|
|
106
|
+
const rtl = subject.inset(inset, "rtl");
|
|
107
|
+
expect(ltr).toEqual({
|
|
108
|
+
top: inset.blockStart,
|
|
109
|
+
right: inset.inlineEnd,
|
|
110
|
+
bottom: inset.blockEnd,
|
|
111
|
+
left: inset.inlineStart,
|
|
112
|
+
});
|
|
113
|
+
expect(rtl).toEqual({ top: ltr.top, right: ltr.left, bottom: ltr.bottom, left: ltr.right });
|
|
114
|
+
}));
|
|
115
|
+
});
|
|
116
|
+
it.each(Object.entries(subject.themes))("ships a valid theme: %s", (_name, theme) => {
|
|
117
|
+
expect(Schema.is(ThemeTokens)(theme)).toBe(true);
|
|
118
|
+
expect(subject.validate(theme)).toEqual([]);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=ThemeTokens.js.map
|