@eloxiv/testing 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/Admin.d.ts +20 -0
- package/dist/Admin.d.ts.map +1 -0
- package/dist/Admin.js +61 -0
- package/dist/Admin.js.map +1 -0
- package/dist/Agent.d.ts +97 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +210 -0
- package/dist/Agent.js.map +1 -0
- package/dist/AgentSurface.d.ts +20 -0
- package/dist/AgentSurface.d.ts.map +1 -0
- package/dist/AgentSurface.js +36 -0
- package/dist/AgentSurface.js.map +1 -0
- package/dist/Embedder.d.ts +21 -0
- package/dist/Embedder.d.ts.map +1 -0
- package/dist/Embedder.js +54 -0
- package/dist/Embedder.js.map +1 -0
- package/dist/EvalMain.d.ts +2 -0
- package/dist/EvalMain.d.ts.map +1 -0
- package/dist/EvalMain.js +80 -0
- package/dist/EvalMain.js.map +1 -0
- package/dist/Evals.d.ts +95 -0
- package/dist/Evals.d.ts.map +1 -0
- package/dist/Evals.js +389 -0
- package/dist/Evals.js.map +1 -0
- package/dist/Kernel.d.ts +88 -0
- package/dist/Kernel.d.ts.map +1 -0
- package/dist/Kernel.js +108 -0
- package/dist/Kernel.js.map +1 -0
- package/dist/Launch.d.ts +86 -0
- package/dist/Launch.d.ts.map +1 -0
- package/dist/Launch.js +370 -0
- package/dist/Launch.js.map +1 -0
- package/dist/Locks.d.ts +39 -0
- package/dist/Locks.d.ts.map +1 -0
- package/dist/Locks.js +94 -0
- package/dist/Locks.js.map +1 -0
- package/dist/Routes.d.ts +19 -0
- package/dist/Routes.d.ts.map +1 -0
- package/dist/Routes.js +38 -0
- package/dist/Routes.js.map +1 -0
- package/dist/ScriptedChatModel.d.ts +51 -0
- package/dist/ScriptedChatModel.d.ts.map +1 -0
- package/dist/ScriptedChatModel.js +135 -0
- package/dist/ScriptedChatModel.js.map +1 -0
- package/dist/SmtpSink.d.ts +36 -0
- package/dist/SmtpSink.d.ts.map +1 -0
- package/dist/SmtpSink.js +185 -0
- package/dist/SmtpSink.js.map +1 -0
- package/dist/System.d.ts +271 -0
- package/dist/System.d.ts.map +1 -0
- package/dist/System.js +905 -0
- package/dist/System.js.map +1 -0
- package/dist/TcpProxy.d.ts +17 -0
- package/dist/TcpProxy.d.ts.map +1 -0
- package/dist/TcpProxy.js +100 -0
- package/dist/TcpProxy.js.map +1 -0
- package/dist/auth/TrustedProxyAuth.d.ts +28 -0
- package/dist/auth/TrustedProxyAuth.d.ts.map +1 -0
- package/dist/auth/TrustedProxyAuth.js +128 -0
- package/dist/auth/TrustedProxyAuth.js.map +1 -0
- package/dist/conformance/ActionConsent.d.ts +3 -0
- package/dist/conformance/ActionConsent.d.ts.map +1 -0
- package/dist/conformance/ActionConsent.js +347 -0
- package/dist/conformance/ActionConsent.js.map +1 -0
- package/dist/conformance/ActionRegistry.d.ts +64 -0
- package/dist/conformance/ActionRegistry.d.ts.map +1 -0
- package/dist/conformance/ActionRegistry.js +136 -0
- package/dist/conformance/ActionRegistry.js.map +1 -0
- package/dist/conformance/Actor.d.ts +43 -0
- package/dist/conformance/Actor.d.ts.map +1 -0
- package/dist/conformance/Actor.js +171 -0
- package/dist/conformance/Actor.js.map +1 -0
- package/dist/conformance/AgentReference.d.ts +30 -0
- package/dist/conformance/AgentReference.d.ts.map +1 -0
- package/dist/conformance/AgentReference.js +137 -0
- package/dist/conformance/AgentReference.js.map +1 -0
- package/dist/conformance/AgentResources.d.ts +3 -0
- package/dist/conformance/AgentResources.d.ts.map +1 -0
- package/dist/conformance/AgentResources.js +454 -0
- package/dist/conformance/AgentResources.js.map +1 -0
- package/dist/conformance/AgentRuntime.d.ts +3 -0
- package/dist/conformance/AgentRuntime.d.ts.map +1 -0
- package/dist/conformance/AgentRuntime.js +302 -0
- package/dist/conformance/AgentRuntime.js.map +1 -0
- package/dist/conformance/AgentSubject.d.ts +87 -0
- package/dist/conformance/AgentSubject.d.ts.map +1 -0
- package/dist/conformance/AgentSubject.js +18 -0
- package/dist/conformance/AgentSubject.js.map +1 -0
- package/dist/conformance/Approvals.d.ts +3 -0
- package/dist/conformance/Approvals.d.ts.map +1 -0
- package/dist/conformance/Approvals.js +258 -0
- package/dist/conformance/Approvals.js.map +1 -0
- package/dist/conformance/Audit.d.ts +3 -0
- package/dist/conformance/Audit.d.ts.map +1 -0
- package/dist/conformance/Audit.js +221 -0
- package/dist/conformance/Audit.js.map +1 -0
- package/dist/conformance/CalendarProvider.d.ts +4 -0
- package/dist/conformance/CalendarProvider.d.ts.map +1 -0
- package/dist/conformance/CalendarProvider.js +108 -0
- package/dist/conformance/CalendarProvider.js.map +1 -0
- package/dist/conformance/CapabilityKit.d.ts +191 -0
- package/dist/conformance/CapabilityKit.d.ts.map +1 -0
- package/dist/conformance/CapabilityKit.js +375 -0
- package/dist/conformance/CapabilityKit.js.map +1 -0
- package/dist/conformance/ClientSDK.d.ts +78 -0
- package/dist/conformance/ClientSDK.d.ts.map +1 -0
- package/dist/conformance/ClientSDK.js +163 -0
- package/dist/conformance/ClientSDK.js.map +1 -0
- package/dist/conformance/CollabDocument.d.ts +3 -0
- package/dist/conformance/CollabDocument.d.ts.map +1 -0
- package/dist/conformance/CollabDocument.js +934 -0
- package/dist/conformance/CollabDocument.js.map +1 -0
- package/dist/conformance/CollabReference.d.ts +8 -0
- package/dist/conformance/CollabReference.d.ts.map +1 -0
- package/dist/conformance/CollabReference.js +138 -0
- package/dist/conformance/CollabReference.js.map +1 -0
- package/dist/conformance/CollabSubject.d.ts +68 -0
- package/dist/conformance/CollabSubject.d.ts.map +1 -0
- package/dist/conformance/CollabSubject.js +2 -0
- package/dist/conformance/CollabSubject.js.map +1 -0
- package/dist/conformance/Command.d.ts +3 -0
- package/dist/conformance/Command.d.ts.map +1 -0
- package/dist/conformance/Command.js +73 -0
- package/dist/conformance/Command.js.map +1 -0
- package/dist/conformance/Connections.d.ts +4 -0
- package/dist/conformance/Connections.d.ts.map +1 -0
- package/dist/conformance/Connections.js +308 -0
- package/dist/conformance/Connections.js.map +1 -0
- package/dist/conformance/ConnectionsReference.d.ts +56 -0
- package/dist/conformance/ConnectionsReference.d.ts.map +1 -0
- package/dist/conformance/ConnectionsReference.js +74 -0
- package/dist/conformance/ConnectionsReference.js.map +1 -0
- package/dist/conformance/ConnectorReference.d.ts +86 -0
- package/dist/conformance/ConnectorReference.d.ts.map +1 -0
- package/dist/conformance/ConnectorReference.js +185 -0
- package/dist/conformance/ConnectorReference.js.map +1 -0
- package/dist/conformance/ContextAccounting.d.ts +8 -0
- package/dist/conformance/ContextAccounting.d.ts.map +1 -0
- package/dist/conformance/ContextAccounting.js +125 -0
- package/dist/conformance/ContextAccounting.js.map +1 -0
- package/dist/conformance/Daemon.d.ts +150 -0
- package/dist/conformance/Daemon.d.ts.map +1 -0
- package/dist/conformance/Daemon.js +718 -0
- package/dist/conformance/Daemon.js.map +1 -0
- package/dist/conformance/DaemonReference.d.ts +15 -0
- package/dist/conformance/DaemonReference.d.ts.map +1 -0
- package/dist/conformance/DaemonReference.js +163 -0
- package/dist/conformance/DaemonReference.js.map +1 -0
- package/dist/conformance/DbTx.d.ts +17 -0
- package/dist/conformance/DbTx.d.ts.map +1 -0
- package/dist/conformance/DbTx.js +184 -0
- package/dist/conformance/DbTx.js.map +1 -0
- package/dist/conformance/DecisionTokens.d.ts +3 -0
- package/dist/conformance/DecisionTokens.d.ts.map +1 -0
- package/dist/conformance/DecisionTokens.js +551 -0
- package/dist/conformance/DecisionTokens.js.map +1 -0
- package/dist/conformance/Delegation.d.ts +3 -0
- package/dist/conformance/Delegation.d.ts.map +1 -0
- package/dist/conformance/Delegation.js +149 -0
- package/dist/conformance/Delegation.js.map +1 -0
- package/dist/conformance/DeskReference.d.ts +21 -0
- package/dist/conformance/DeskReference.d.ts.map +1 -0
- package/dist/conformance/DeskReference.js +47 -0
- package/dist/conformance/DeskReference.js.map +1 -0
- package/dist/conformance/DeviceControl.d.ts +3 -0
- package/dist/conformance/DeviceControl.d.ts.map +1 -0
- package/dist/conformance/DeviceControl.js +579 -0
- package/dist/conformance/DeviceControl.js.map +1 -0
- package/dist/conformance/Directory.d.ts +36 -0
- package/dist/conformance/Directory.d.ts.map +1 -0
- package/dist/conformance/Directory.js +253 -0
- package/dist/conformance/Directory.js.map +1 -0
- package/dist/conformance/DirectoryProvider.d.ts +4 -0
- package/dist/conformance/DirectoryProvider.d.ts.map +1 -0
- package/dist/conformance/DirectoryProvider.js +58 -0
- package/dist/conformance/DirectoryProvider.js.map +1 -0
- package/dist/conformance/DocumentSource.d.ts +4 -0
- package/dist/conformance/DocumentSource.d.ts.map +1 -0
- package/dist/conformance/DocumentSource.js +43 -0
- package/dist/conformance/DocumentSource.js.map +1 -0
- package/dist/conformance/EndpointReference.d.ts +40 -0
- package/dist/conformance/EndpointReference.d.ts.map +1 -0
- package/dist/conformance/EndpointReference.js +67 -0
- package/dist/conformance/EndpointReference.js.map +1 -0
- package/dist/conformance/Files.d.ts +40 -0
- package/dist/conformance/Files.d.ts.map +1 -0
- package/dist/conformance/Files.js +592 -0
- package/dist/conformance/Files.js.map +1 -0
- package/dist/conformance/FilesReference.d.ts +31 -0
- package/dist/conformance/FilesReference.d.ts.map +1 -0
- package/dist/conformance/FilesReference.js +116 -0
- package/dist/conformance/FilesReference.js.map +1 -0
- package/dist/conformance/FilesSubject.d.ts +46 -0
- package/dist/conformance/FilesSubject.d.ts.map +1 -0
- package/dist/conformance/FilesSubject.js +3 -0
- package/dist/conformance/FilesSubject.js.map +1 -0
- package/dist/conformance/Flags.d.ts +3 -0
- package/dist/conformance/Flags.d.ts.map +1 -0
- package/dist/conformance/Flags.js +183 -0
- package/dist/conformance/Flags.js.map +1 -0
- package/dist/conformance/Host.d.ts +64 -0
- package/dist/conformance/Host.d.ts.map +1 -0
- package/dist/conformance/Host.js +152 -0
- package/dist/conformance/Host.js.map +1 -0
- package/dist/conformance/HttpApi.d.ts +5 -0
- package/dist/conformance/HttpApi.d.ts.map +1 -0
- package/dist/conformance/HttpApi.js +131 -0
- package/dist/conformance/HttpApi.js.map +1 -0
- package/dist/conformance/InboxReference.d.ts +28 -0
- package/dist/conformance/InboxReference.d.ts.map +1 -0
- package/dist/conformance/InboxReference.js +331 -0
- package/dist/conformance/InboxReference.js.map +1 -0
- package/dist/conformance/InboxSubject.d.ts +92 -0
- package/dist/conformance/InboxSubject.d.ts.map +1 -0
- package/dist/conformance/InboxSubject.js +16 -0
- package/dist/conformance/InboxSubject.js.map +1 -0
- package/dist/conformance/Ingestion.d.ts +10 -0
- package/dist/conformance/Ingestion.d.ts.map +1 -0
- package/dist/conformance/Ingestion.js +335 -0
- package/dist/conformance/Ingestion.js.map +1 -0
- package/dist/conformance/Ingress.d.ts +62 -0
- package/dist/conformance/Ingress.d.ts.map +1 -0
- package/dist/conformance/Ingress.js +346 -0
- package/dist/conformance/Ingress.js.map +1 -0
- package/dist/conformance/Invocation.d.ts +3 -0
- package/dist/conformance/Invocation.d.ts.map +1 -0
- package/dist/conformance/Invocation.js +665 -0
- package/dist/conformance/Invocation.js.map +1 -0
- package/dist/conformance/IsolationMatrix.d.ts +60 -0
- package/dist/conformance/IsolationMatrix.d.ts.map +1 -0
- package/dist/conformance/IsolationMatrix.js +196 -0
- package/dist/conformance/IsolationMatrix.js.map +1 -0
- package/dist/conformance/LiveConnection.d.ts +72 -0
- package/dist/conformance/LiveConnection.d.ts.map +1 -0
- package/dist/conformance/LiveConnection.js +125 -0
- package/dist/conformance/LiveConnection.js.map +1 -0
- package/dist/conformance/LocalClient.d.ts +62 -0
- package/dist/conformance/LocalClient.d.ts.map +1 -0
- package/dist/conformance/LocalClient.js +526 -0
- package/dist/conformance/LocalClient.js.map +1 -0
- package/dist/conformance/Locale.d.ts +28 -0
- package/dist/conformance/Locale.d.ts.map +1 -0
- package/dist/conformance/Locale.js +115 -0
- package/dist/conformance/Locale.js.map +1 -0
- package/dist/conformance/MachineIdentity.d.ts +39 -0
- package/dist/conformance/MachineIdentity.d.ts.map +1 -0
- package/dist/conformance/MachineIdentity.js +595 -0
- package/dist/conformance/MachineIdentity.js.map +1 -0
- package/dist/conformance/MailProvider.d.ts +4 -0
- package/dist/conformance/MailProvider.d.ts.map +1 -0
- package/dist/conformance/MailProvider.js +167 -0
- package/dist/conformance/MailProvider.js.map +1 -0
- package/dist/conformance/Memory.d.ts +10 -0
- package/dist/conformance/Memory.d.ts.map +1 -0
- package/dist/conformance/Memory.js +179 -0
- package/dist/conformance/Memory.js.map +1 -0
- package/dist/conformance/Messaging.d.ts +49 -0
- package/dist/conformance/Messaging.d.ts.map +1 -0
- package/dist/conformance/Messaging.js +117 -0
- package/dist/conformance/Messaging.js.map +1 -0
- package/dist/conformance/Metering.d.ts +26 -0
- package/dist/conformance/Metering.d.ts.map +1 -0
- package/dist/conformance/Metering.js +236 -0
- package/dist/conformance/Metering.js.map +1 -0
- package/dist/conformance/ModelProvider.d.ts +32 -0
- package/dist/conformance/ModelProvider.d.ts.map +1 -0
- package/dist/conformance/ModelProvider.js +100 -0
- package/dist/conformance/ModelProvider.js.map +1 -0
- package/dist/conformance/ModuleManifest.d.ts +9 -0
- package/dist/conformance/ModuleManifest.d.ts.map +1 -0
- package/dist/conformance/ModuleManifest.js +542 -0
- package/dist/conformance/ModuleManifest.js.map +1 -0
- package/dist/conformance/NotebookAgent.d.ts +32 -0
- package/dist/conformance/NotebookAgent.d.ts.map +1 -0
- package/dist/conformance/NotebookAgent.js +31 -0
- package/dist/conformance/NotebookAgent.js.map +1 -0
- package/dist/conformance/NotificationChannel.d.ts +40 -0
- package/dist/conformance/NotificationChannel.d.ts.map +1 -0
- package/dist/conformance/NotificationChannel.js +78 -0
- package/dist/conformance/NotificationChannel.js.map +1 -0
- package/dist/conformance/Notifications.d.ts +3 -0
- package/dist/conformance/Notifications.d.ts.map +1 -0
- package/dist/conformance/Notifications.js +240 -0
- package/dist/conformance/Notifications.js.map +1 -0
- package/dist/conformance/OAuthClient.d.ts +123 -0
- package/dist/conformance/OAuthClient.d.ts.map +1 -0
- package/dist/conformance/OAuthClient.js +204 -0
- package/dist/conformance/OAuthClient.js.map +1 -0
- package/dist/conformance/Outbox.d.ts +3 -0
- package/dist/conformance/Outbox.d.ts.map +1 -0
- package/dist/conformance/Outbox.js +266 -0
- package/dist/conformance/Outbox.js.map +1 -0
- package/dist/conformance/PlatformReference.d.ts +5 -0
- package/dist/conformance/PlatformReference.d.ts.map +1 -0
- package/dist/conformance/PlatformReference.js +66 -0
- package/dist/conformance/PlatformReference.js.map +1 -0
- package/dist/conformance/PlatformSubject.d.ts +45 -0
- package/dist/conformance/PlatformSubject.d.ts.map +1 -0
- package/dist/conformance/PlatformSubject.js +3 -0
- package/dist/conformance/PlatformSubject.js.map +1 -0
- package/dist/conformance/Privacy.d.ts +3 -0
- package/dist/conformance/Privacy.d.ts.map +1 -0
- package/dist/conformance/Privacy.js +437 -0
- package/dist/conformance/Privacy.js.map +1 -0
- package/dist/conformance/Progress.d.ts +3 -0
- package/dist/conformance/Progress.d.ts.map +1 -0
- package/dist/conformance/Progress.js +153 -0
- package/dist/conformance/Progress.js.map +1 -0
- package/dist/conformance/Push.d.ts +38 -0
- package/dist/conformance/Push.d.ts.map +1 -0
- package/dist/conformance/Push.js +649 -0
- package/dist/conformance/Push.js.map +1 -0
- package/dist/conformance/PushReference.d.ts +3 -0
- package/dist/conformance/PushReference.d.ts.map +1 -0
- package/dist/conformance/PushReference.js +97 -0
- package/dist/conformance/PushReference.js.map +1 -0
- package/dist/conformance/QuerySurface.d.ts +9 -0
- package/dist/conformance/QuerySurface.d.ts.map +1 -0
- package/dist/conformance/QuerySurface.js +349 -0
- package/dist/conformance/QuerySurface.js.map +1 -0
- package/dist/conformance/Readiness.d.ts +23 -0
- package/dist/conformance/Readiness.d.ts.map +1 -0
- package/dist/conformance/Readiness.js +110 -0
- package/dist/conformance/Readiness.js.map +1 -0
- package/dist/conformance/Reference.d.ts +17 -0
- package/dist/conformance/Reference.d.ts.map +1 -0
- package/dist/conformance/Reference.js +246 -0
- package/dist/conformance/Reference.js.map +1 -0
- package/dist/conformance/Release.d.ts +73 -0
- package/dist/conformance/Release.d.ts.map +1 -0
- package/dist/conformance/Release.js +556 -0
- package/dist/conformance/Release.js.map +1 -0
- package/dist/conformance/ReleaseReference.d.ts +5 -0
- package/dist/conformance/ReleaseReference.d.ts.map +1 -0
- package/dist/conformance/ReleaseReference.js +124 -0
- package/dist/conformance/ReleaseReference.js.map +1 -0
- package/dist/conformance/ResultRendering.d.ts +3 -0
- package/dist/conformance/ResultRendering.d.ts.map +1 -0
- package/dist/conformance/ResultRendering.js +120 -0
- package/dist/conformance/ResultRendering.js.map +1 -0
- package/dist/conformance/Sandbox.d.ts +58 -0
- package/dist/conformance/Sandbox.d.ts.map +1 -0
- package/dist/conformance/Sandbox.js +213 -0
- package/dist/conformance/Sandbox.js.map +1 -0
- package/dist/conformance/SandboxReference.d.ts +3 -0
- package/dist/conformance/SandboxReference.d.ts.map +1 -0
- package/dist/conformance/SandboxReference.js +44 -0
- package/dist/conformance/SandboxReference.js.map +1 -0
- package/dist/conformance/Scheduler.d.ts +106 -0
- package/dist/conformance/Scheduler.d.ts.map +1 -0
- package/dist/conformance/Scheduler.js +576 -0
- package/dist/conformance/Scheduler.js.map +1 -0
- package/dist/conformance/ScreenContext.d.ts +84 -0
- package/dist/conformance/ScreenContext.d.ts.map +1 -0
- package/dist/conformance/ScreenContext.js +290 -0
- package/dist/conformance/ScreenContext.js.map +1 -0
- package/dist/conformance/Search.d.ts +3 -0
- package/dist/conformance/Search.d.ts.map +1 -0
- package/dist/conformance/Search.js +333 -0
- package/dist/conformance/Search.js.map +1 -0
- package/dist/conformance/Secrets.d.ts +8 -0
- package/dist/conformance/Secrets.d.ts.map +1 -0
- package/dist/conformance/Secrets.js +231 -0
- package/dist/conformance/Secrets.js.map +1 -0
- package/dist/conformance/SecretsReference.d.ts +44 -0
- package/dist/conformance/SecretsReference.d.ts.map +1 -0
- package/dist/conformance/SecretsReference.js +73 -0
- package/dist/conformance/SecretsReference.js.map +1 -0
- package/dist/conformance/ServicesReference.d.ts +8 -0
- package/dist/conformance/ServicesReference.d.ts.map +1 -0
- package/dist/conformance/ServicesReference.js +273 -0
- package/dist/conformance/ServicesReference.js.map +1 -0
- package/dist/conformance/ServicesSubject.d.ts +104 -0
- package/dist/conformance/ServicesSubject.d.ts.map +1 -0
- package/dist/conformance/ServicesSubject.js +2 -0
- package/dist/conformance/ServicesSubject.js.map +1 -0
- package/dist/conformance/Settings.d.ts +3 -0
- package/dist/conformance/Settings.d.ts.map +1 -0
- package/dist/conformance/Settings.js +177 -0
- package/dist/conformance/Settings.js.map +1 -0
- package/dist/conformance/Sharing.d.ts +3 -0
- package/dist/conformance/Sharing.d.ts.map +1 -0
- package/dist/conformance/Sharing.js +368 -0
- package/dist/conformance/Sharing.js.map +1 -0
- package/dist/conformance/ShellSubject.d.ts +29 -0
- package/dist/conformance/ShellSubject.d.ts.map +1 -0
- package/dist/conformance/ShellSubject.js +13 -0
- package/dist/conformance/ShellSubject.js.map +1 -0
- package/dist/conformance/SignOutRace.d.ts +23 -0
- package/dist/conformance/SignOutRace.d.ts.map +1 -0
- package/dist/conformance/SignOutRace.js +49 -0
- package/dist/conformance/SignOutRace.js.map +1 -0
- package/dist/conformance/Slot.d.ts +3 -0
- package/dist/conformance/Slot.d.ts.map +1 -0
- package/dist/conformance/Slot.js +79 -0
- package/dist/conformance/Slot.js.map +1 -0
- package/dist/conformance/Space.d.ts +63 -0
- package/dist/conformance/Space.d.ts.map +1 -0
- package/dist/conformance/Space.js +294 -0
- package/dist/conformance/Space.js.map +1 -0
- package/dist/conformance/StorageAdapter.d.ts +76 -0
- package/dist/conformance/StorageAdapter.d.ts.map +1 -0
- package/dist/conformance/StorageAdapter.js +181 -0
- package/dist/conformance/StorageAdapter.js.map +1 -0
- package/dist/conformance/StorageBackend.d.ts +23 -0
- package/dist/conformance/StorageBackend.d.ts.map +1 -0
- package/dist/conformance/StorageBackend.js +274 -0
- package/dist/conformance/StorageBackend.js.map +1 -0
- package/dist/conformance/Subject.d.ts +198 -0
- package/dist/conformance/Subject.d.ts.map +1 -0
- package/dist/conformance/Subject.js +26 -0
- package/dist/conformance/Subject.js.map +1 -0
- package/dist/conformance/Sync.d.ts +3 -0
- package/dist/conformance/Sync.d.ts.map +1 -0
- package/dist/conformance/Sync.js +190 -0
- package/dist/conformance/Sync.js.map +1 -0
- package/dist/conformance/Telemetry.d.ts +3 -0
- package/dist/conformance/Telemetry.d.ts.map +1 -0
- package/dist/conformance/Telemetry.js +218 -0
- package/dist/conformance/Telemetry.js.map +1 -0
- package/dist/conformance/ThemeTokens.d.ts +22 -0
- package/dist/conformance/ThemeTokens.d.ts.map +1 -0
- package/dist/conformance/ThemeTokens.js +121 -0
- package/dist/conformance/ThemeTokens.js.map +1 -0
- package/dist/conformance/ToolSource.d.ts +5 -0
- package/dist/conformance/ToolSource.d.ts.map +1 -0
- package/dist/conformance/ToolSource.js +520 -0
- package/dist/conformance/ToolSource.js.map +1 -0
- package/dist/conformance/Versioning.d.ts +3 -0
- package/dist/conformance/Versioning.d.ts.map +1 -0
- package/dist/conformance/Versioning.js +160 -0
- package/dist/conformance/Versioning.js.map +1 -0
- package/dist/conformance/View.d.ts +3 -0
- package/dist/conformance/View.d.ts.map +1 -0
- package/dist/conformance/View.js +121 -0
- package/dist/conformance/View.js.map +1 -0
- package/dist/conformance/WorkItems.d.ts +3 -0
- package/dist/conformance/WorkItems.d.ts.map +1 -0
- package/dist/conformance/WorkItems.js +152 -0
- package/dist/conformance/WorkItems.js.map +1 -0
- package/dist/conformance/Workflow.d.ts +63 -0
- package/dist/conformance/Workflow.d.ts.map +1 -0
- package/dist/conformance/Workflow.js +235 -0
- package/dist/conformance/Workflow.js.map +1 -0
- package/dist/conformance/acme/chatlog.d.ts +591 -0
- package/dist/conformance/acme/chatlog.d.ts.map +1 -0
- package/dist/conformance/acme/chatlog.js +101 -0
- package/dist/conformance/acme/chatlog.js.map +1 -0
- package/dist/conformance/acme/connector.d.ts +12 -0
- package/dist/conformance/acme/connector.d.ts.map +1 -0
- package/dist/conformance/acme/connector.js +123 -0
- package/dist/conformance/acme/connector.js.map +1 -0
- package/dist/conformance/acme/migrations/0000_messages.sql +8 -0
- package/dist/conformance/archive/app.d.ts +728 -0
- package/dist/conformance/archive/app.d.ts.map +1 -0
- package/dist/conformance/archive/app.js +30 -0
- package/dist/conformance/archive/app.js.map +1 -0
- package/dist/conformance/archive/contract.d.ts +467 -0
- package/dist/conformance/archive/contract.d.ts.map +1 -0
- package/dist/conformance/archive/contract.js +187 -0
- package/dist/conformance/archive/contract.js.map +1 -0
- package/dist/conformance/archive/memo.sync.gen.d.ts +148 -0
- package/dist/conformance/archive/memo.sync.gen.d.ts.map +1 -0
- package/dist/conformance/archive/memo.sync.gen.js +23 -0
- package/dist/conformance/archive/memo.sync.gen.js.map +1 -0
- package/dist/conformance/archive/migrations/archive/0000_archive.sql +9 -0
- package/dist/conformance/archive/migrations/memo/0000_memo.sql +6 -0
- package/dist/conformance/archive/schema.d.ts +185 -0
- package/dist/conformance/archive/schema.d.ts.map +1 -0
- package/dist/conformance/archive/schema.js +22 -0
- package/dist/conformance/archive/schema.js.map +1 -0
- package/dist/conformance/archive/server.d.ts +273 -0
- package/dist/conformance/archive/server.d.ts.map +1 -0
- package/dist/conformance/archive/server.js +127 -0
- package/dist/conformance/archive/server.js.map +1 -0
- package/dist/conformance/archive/sync.gen.d.ts +319 -0
- package/dist/conformance/archive/sync.gen.d.ts.map +1 -0
- package/dist/conformance/archive/sync.gen.js +29 -0
- package/dist/conformance/archive/sync.gen.js.map +1 -0
- package/dist/conformance/atlas/app.d.ts +3 -0
- package/dist/conformance/atlas/app.d.ts.map +1 -0
- package/dist/conformance/atlas/app.js +15 -0
- package/dist/conformance/atlas/app.js.map +1 -0
- package/dist/conformance/atlas/contract.d.ts +489 -0
- package/dist/conformance/atlas/contract.d.ts.map +1 -0
- package/dist/conformance/atlas/contract.js +114 -0
- package/dist/conformance/atlas/contract.js.map +1 -0
- package/dist/conformance/crm/app.d.ts +304 -0
- package/dist/conformance/crm/app.d.ts.map +1 -0
- package/dist/conformance/crm/app.js +95 -0
- package/dist/conformance/crm/app.js.map +1 -0
- package/dist/conformance/crm/contract.d.ts +586 -0
- package/dist/conformance/crm/contract.d.ts.map +1 -0
- package/dist/conformance/crm/contract.js +153 -0
- package/dist/conformance/crm/contract.js.map +1 -0
- package/dist/conformance/crm/migrations/crm/0000_crm.sql +18 -0
- package/dist/conformance/crm/migrations/team/0000_team.sql +6 -0
- package/dist/conformance/crm/schema.d.ts +261 -0
- package/dist/conformance/crm/schema.d.ts.map +1 -0
- package/dist/conformance/crm/schema.js +25 -0
- package/dist/conformance/crm/schema.js.map +1 -0
- package/dist/conformance/crm/sync.gen.d.ts +188 -0
- package/dist/conformance/crm/sync.gen.d.ts.map +1 -0
- package/dist/conformance/crm/sync.gen.js +25 -0
- package/dist/conformance/crm/sync.gen.js.map +1 -0
- package/dist/conformance/desk/contract.d.ts +306 -0
- package/dist/conformance/desk/contract.d.ts.map +1 -0
- package/dist/conformance/desk/contract.js +56 -0
- package/dist/conformance/desk/contract.js.map +1 -0
- package/dist/conformance/desk/migrations/0000_notes.sql +7 -0
- package/dist/conformance/desk/server.d.ts +231 -0
- package/dist/conformance/desk/server.d.ts.map +1 -0
- package/dist/conformance/desk/server.js +123 -0
- package/dist/conformance/desk/server.js.map +1 -0
- package/dist/conformance/drafts/migrations/0000_drafts.sql +8 -0
- package/dist/conformance/drafts/module.d.ts +571 -0
- package/dist/conformance/drafts/module.d.ts.map +1 -0
- package/dist/conformance/drafts/module.js +190 -0
- package/dist/conformance/drafts/module.js.map +1 -0
- package/dist/conformance/fixture/app.d.ts +24 -0
- package/dist/conformance/fixture/app.d.ts.map +1 -0
- package/dist/conformance/fixture/app.js +26 -0
- package/dist/conformance/fixture/app.js.map +1 -0
- package/dist/conformance/fixture/docs/bad-sync.d.ts +105 -0
- package/dist/conformance/fixture/docs/bad-sync.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/bad-sync.js +22 -0
- package/dist/conformance/fixture/docs/bad-sync.js.map +1 -0
- package/dist/conformance/fixture/docs/contract.d.ts +1091 -0
- package/dist/conformance/fixture/docs/contract.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/contract.js +277 -0
- package/dist/conformance/fixture/docs/contract.js.map +1 -0
- package/dist/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
- package/dist/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
- package/dist/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
- package/dist/conformance/fixture/docs/policy.cedar +110 -0
- package/dist/conformance/fixture/docs/schema.d.ts +308 -0
- package/dist/conformance/fixture/docs/schema.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/schema.js +36 -0
- package/dist/conformance/fixture/docs/schema.js.map +1 -0
- package/dist/conformance/fixture/docs/server.d.ts +552 -0
- package/dist/conformance/fixture/docs/server.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/server.js +192 -0
- package/dist/conformance/fixture/docs/server.js.map +1 -0
- package/dist/conformance/fixture/docs/sync.d.ts +402 -0
- package/dist/conformance/fixture/docs/sync.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/sync.gen.d.ts +574 -0
- package/dist/conformance/fixture/docs/sync.gen.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/sync.gen.js +48 -0
- package/dist/conformance/fixture/docs/sync.gen.js.map +1 -0
- package/dist/conformance/fixture/docs/sync.js +23 -0
- package/dist/conformance/fixture/docs/sync.js.map +1 -0
- package/dist/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
- package/dist/conformance/fixture/peer/module.d.ts +306 -0
- package/dist/conformance/fixture/peer/module.d.ts.map +1 -0
- package/dist/conformance/fixture/peer/module.js +44 -0
- package/dist/conformance/fixture/peer/module.js.map +1 -0
- package/dist/conformance/fixture/release/blocking/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/blocking/0001_wait.sql +2 -0
- package/dist/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
- package/dist/conformance/fixture/release/broken/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/broken/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/broken/0002_label.sql +3 -0
- package/dist/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
- package/dist/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/escape/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/escape/0001_escape.sql +5 -0
- package/dist/conformance/fixture/release/misnamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
- package/dist/conformance/fixture/release/module.d.ts +1878 -0
- package/dist/conformance/fixture/release/module.d.ts.map +1 -0
- package/dist/conformance/fixture/release/module.js +102 -0
- package/dist/conformance/fixture/release/module.js.map +1 -0
- package/dist/conformance/fixture/release/outside/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/outside/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/outside/0002_index.sql +4 -0
- package/dist/conformance/fixture/release/outside/0003_later.sql +1 -0
- package/dist/conformance/fixture/release/renamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/renamed/0001_misname.sql +10 -0
- package/dist/conformance/fixture/release/renamed/0002_restore.sql +1 -0
- package/dist/conformance/fixture/release/rogue/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/rogue/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/rogue/0002_definer.sql +1 -0
- package/dist/conformance/fixture/release/slow/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/undeclared/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/undeclared/0002_index.sql +1 -0
- package/dist/conformance/fixture/release/v1/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/v2/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/v2/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/v2/0002_label.sql +3 -0
- package/dist/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
- package/dist/conformance/kit-hash.d.ts +8 -0
- package/dist/conformance/kit-hash.d.ts.map +1 -0
- package/dist/conformance/kit-hash.js +20 -0
- package/dist/conformance/kit-hash.js.map +1 -0
- package/dist/conformance/ledger/contract.d.ts +380 -0
- package/dist/conformance/ledger/contract.d.ts.map +1 -0
- package/dist/conformance/ledger/contract.js +81 -0
- package/dist/conformance/ledger/contract.js.map +1 -0
- package/dist/conformance/ledger/migrations/0000_entries.sql +8 -0
- package/dist/conformance/ledger/server.d.ts +312 -0
- package/dist/conformance/ledger/server.d.ts.map +1 -0
- package/dist/conformance/ledger/server.js +152 -0
- package/dist/conformance/ledger/server.js.map +1 -0
- package/dist/conformance/library/app.d.ts +616 -0
- package/dist/conformance/library/app.d.ts.map +1 -0
- package/dist/conformance/library/app.js +35 -0
- package/dist/conformance/library/app.js.map +1 -0
- package/dist/conformance/library/contract.d.ts +377 -0
- package/dist/conformance/library/contract.d.ts.map +1 -0
- package/dist/conformance/library/contract.js +63 -0
- package/dist/conformance/library/contract.js.map +1 -0
- package/dist/conformance/library/migrations/0000_library.sql +14 -0
- package/dist/conformance/library/schema.d.ts +174 -0
- package/dist/conformance/library/schema.d.ts.map +1 -0
- package/dist/conformance/library/schema.js +24 -0
- package/dist/conformance/library/schema.js.map +1 -0
- package/dist/conformance/library/server.d.ts +191 -0
- package/dist/conformance/library/server.d.ts.map +1 -0
- package/dist/conformance/library/server.js +52 -0
- package/dist/conformance/library/server.js.map +1 -0
- package/dist/conformance/library/sync.gen.d.ts +519 -0
- package/dist/conformance/library/sync.gen.d.ts.map +1 -0
- package/dist/conformance/library/sync.gen.js +42 -0
- package/dist/conformance/library/sync.gen.js.map +1 -0
- package/dist/conformance/locale/catalog.d.ts +93 -0
- package/dist/conformance/locale/catalog.d.ts.map +1 -0
- package/dist/conformance/locale/catalog.js +104 -0
- package/dist/conformance/locale/catalog.js.map +1 -0
- package/dist/conformance/notebook/app.d.ts +1039 -0
- package/dist/conformance/notebook/app.d.ts.map +1 -0
- package/dist/conformance/notebook/app.js +88 -0
- package/dist/conformance/notebook/app.js.map +1 -0
- package/dist/conformance/notebook/evals/pages.evals.json +94 -0
- package/dist/conformance/notebook/migrations/0000_notebook.sql +10 -0
- package/dist/conformance/notebook/module.d.ts +717 -0
- package/dist/conformance/notebook/module.d.ts.map +1 -0
- package/dist/conformance/notebook/module.js +188 -0
- package/dist/conformance/notebook/module.js.map +1 -0
- package/dist/conformance/pad/app.d.ts +9 -0
- package/dist/conformance/pad/app.d.ts.map +1 -0
- package/dist/conformance/pad/app.js +13 -0
- package/dist/conformance/pad/app.js.map +1 -0
- package/dist/conformance/pad/contract.d.ts +281 -0
- package/dist/conformance/pad/contract.d.ts.map +1 -0
- package/dist/conformance/pad/contract.js +66 -0
- package/dist/conformance/pad/contract.js.map +1 -0
- package/dist/conformance/pad/migrations/pad/0000_pad.sql +8 -0
- package/dist/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
- package/dist/conformance/pad/schema.d.ts +127 -0
- package/dist/conformance/pad/schema.d.ts.map +1 -0
- package/dist/conformance/pad/schema.js +17 -0
- package/dist/conformance/pad/schema.js.map +1 -0
- package/dist/conformance/pad/server.d.ts +149 -0
- package/dist/conformance/pad/server.d.ts.map +1 -0
- package/dist/conformance/pad/server.js +81 -0
- package/dist/conformance/pad/server.js.map +1 -0
- package/dist/conformance/purchases/app.d.ts +480 -0
- package/dist/conformance/purchases/app.d.ts.map +1 -0
- package/dist/conformance/purchases/app.js +32 -0
- package/dist/conformance/purchases/app.js.map +1 -0
- package/dist/conformance/purchases/contract.d.ts +720 -0
- package/dist/conformance/purchases/contract.d.ts.map +1 -0
- package/dist/conformance/purchases/contract.js +148 -0
- package/dist/conformance/purchases/contract.js.map +1 -0
- package/dist/conformance/purchases/migrations/0000_purchases.sql +17 -0
- package/dist/conformance/purchases/server.d.ts +250 -0
- package/dist/conformance/purchases/server.d.ts.map +1 -0
- package/dist/conformance/purchases/server.js +85 -0
- package/dist/conformance/purchases/server.js.map +1 -0
- package/dist/conformance/studio/app.d.ts +996 -0
- package/dist/conformance/studio/app.d.ts.map +1 -0
- package/dist/conformance/studio/app.js +251 -0
- package/dist/conformance/studio/app.js.map +1 -0
- package/dist/conformance/studio/contract.d.ts +1318 -0
- package/dist/conformance/studio/contract.d.ts.map +1 -0
- package/dist/conformance/studio/contract.js +280 -0
- package/dist/conformance/studio/contract.js.map +1 -0
- package/dist/conformance/studio/migrations/billing/0000_billing.sql +6 -0
- package/dist/conformance/studio/migrations/journal/0000_journal.sql +9 -0
- package/dist/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
- package/dist/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
- package/dist/conformance/workshop/app.d.ts +8 -0
- package/dist/conformance/workshop/app.d.ts.map +1 -0
- package/dist/conformance/workshop/app.js +13 -0
- package/dist/conformance/workshop/app.js.map +1 -0
- package/dist/conformance/workshop/migrations/0000_notes.sql +7 -0
- package/dist/conformance/workshop/module.d.ts +407 -0
- package/dist/conformance/workshop/module.d.ts.map +1 -0
- package/dist/conformance/workshop/module.js +71 -0
- package/dist/conformance/workshop/module.js.map +1 -0
- package/dist/fakes/AcmeFake.d.ts +46 -0
- package/dist/fakes/AcmeFake.d.ts.map +1 -0
- package/dist/fakes/AcmeFake.js +131 -0
- package/dist/fakes/AcmeFake.js.map +1 -0
- package/dist/fakes/ApnsFake.d.ts +79 -0
- package/dist/fakes/ApnsFake.d.ts.map +1 -0
- package/dist/fakes/ApnsFake.js +220 -0
- package/dist/fakes/ApnsFake.js.map +1 -0
- package/dist/fakes/FcmFake.d.ts +46 -0
- package/dist/fakes/FcmFake.d.ts.map +1 -0
- package/dist/fakes/FcmFake.js +185 -0
- package/dist/fakes/FcmFake.js.map +1 -0
- package/dist/fakes/GoogleFake.d.ts +221 -0
- package/dist/fakes/GoogleFake.d.ts.map +1 -0
- package/dist/fakes/GoogleFake.js +1035 -0
- package/dist/fakes/GoogleFake.js.map +1 -0
- package/dist/fakes/HttpApiFake.d.ts +22 -0
- package/dist/fakes/HttpApiFake.d.ts.map +1 -0
- package/dist/fakes/HttpApiFake.js +74 -0
- package/dist/fakes/HttpApiFake.js.map +1 -0
- package/dist/fakes/McpFake.d.ts +80 -0
- package/dist/fakes/McpFake.d.ts.map +1 -0
- package/dist/fakes/McpFake.js +312 -0
- package/dist/fakes/McpFake.js.map +1 -0
- package/dist/fakes/MicrosoftGraphFake.d.ts +254 -0
- package/dist/fakes/MicrosoftGraphFake.d.ts.map +1 -0
- package/dist/fakes/MicrosoftGraphFake.js +850 -0
- package/dist/fakes/MicrosoftGraphFake.js.map +1 -0
- package/dist/fakes/S3Fake.d.ts +29 -0
- package/dist/fakes/S3Fake.d.ts.map +1 -0
- package/dist/fakes/S3Fake.js +347 -0
- package/dist/fakes/S3Fake.js.map +1 -0
- package/dist/fakes/Server.d.ts +137 -0
- package/dist/fakes/Server.d.ts.map +1 -0
- package/dist/fakes/Server.js +357 -0
- package/dist/fakes/Server.js.map +1 -0
- package/dist/fakes/SignInProviderFake.d.ts +21 -0
- package/dist/fakes/SignInProviderFake.d.ts.map +1 -0
- package/dist/fakes/SignInProviderFake.js +56 -0
- package/dist/fakes/SignInProviderFake.js.map +1 -0
- package/dist/fakes/SlackFake.d.ts +136 -0
- package/dist/fakes/SlackFake.d.ts.map +1 -0
- package/dist/fakes/SlackFake.js +787 -0
- package/dist/fakes/SlackFake.js.map +1 -0
- package/dist/fakes/Store.d.ts +40 -0
- package/dist/fakes/Store.d.ts.map +1 -0
- package/dist/fakes/Store.js +82 -0
- package/dist/fakes/Store.js.map +1 -0
- package/dist/fakes/TelemetryFakes.d.ts +77 -0
- package/dist/fakes/TelemetryFakes.d.ts.map +1 -0
- package/dist/fakes/TelemetryFakes.js +121 -0
- package/dist/fakes/TelemetryFakes.js.map +1 -0
- package/dist/fakes/TestCa.d.ts +11 -0
- package/dist/fakes/TestCa.d.ts.map +1 -0
- package/dist/fakes/TestCa.js +115 -0
- package/dist/fakes/TestCa.js.map +1 -0
- package/dist/fakes/WorkOsFake.d.ts +40 -0
- package/dist/fakes/WorkOsFake.d.ts.map +1 -0
- package/dist/fakes/WorkOsFake.js +103 -0
- package/dist/fakes/WorkOsFake.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/make/reference.d.ts +520 -0
- package/dist/make/reference.d.ts.map +1 -0
- package/dist/make/reference.js +182 -0
- package/dist/make/reference.js.map +1 -0
- package/dist/make/sources.d.ts +48 -0
- package/dist/make/sources.d.ts.map +1 -0
- package/dist/make/sources.js +806 -0
- package/dist/make/sources.js.map +1 -0
- package/package.json +77 -3
- package/src/Admin.ts +82 -0
- package/src/Agent.ts +289 -0
- package/src/AgentSurface.ts +51 -0
- package/src/Embedder.ts +69 -0
- package/src/EvalMain.ts +81 -0
- package/src/Evals.ts +490 -0
- package/src/Kernel.ts +228 -0
- package/src/Launch.ts +428 -0
- package/src/Locks.ts +123 -0
- package/src/Routes.ts +65 -0
- package/src/ScriptedChatModel.ts +189 -0
- package/src/SmtpSink.ts +205 -0
- package/src/System.ts +1072 -0
- package/src/TcpProxy.ts +102 -0
- package/src/auth/TrustedProxyAuth.ts +173 -0
- package/src/conformance/ActionConsent.ts +437 -0
- package/src/conformance/ActionRegistry.ts +174 -0
- package/src/conformance/Actor.ts +216 -0
- package/src/conformance/AgentReference.ts +171 -0
- package/src/conformance/AgentResources.ts +548 -0
- package/src/conformance/AgentRuntime.ts +388 -0
- package/src/conformance/AgentSubject.ts +103 -0
- package/src/conformance/Approvals.ts +363 -0
- package/src/conformance/Audit.ts +257 -0
- package/src/conformance/CalendarProvider.ts +156 -0
- package/src/conformance/CapabilityKit.ts +564 -0
- package/src/conformance/ClientSDK.ts +233 -0
- package/src/conformance/CollabDocument.ts +1203 -0
- package/src/conformance/CollabReference.ts +152 -0
- package/src/conformance/CollabSubject.ts +64 -0
- package/src/conformance/Command.ts +75 -0
- package/src/conformance/Connections.ts +357 -0
- package/src/conformance/ConnectionsReference.ts +172 -0
- package/src/conformance/ConnectorReference.ts +280 -0
- package/src/conformance/ContextAccounting.ts +169 -0
- package/src/conformance/Daemon.ts +936 -0
- package/src/conformance/DaemonReference.ts +189 -0
- package/src/conformance/DbTx.ts +253 -0
- package/src/conformance/DecisionTokens.ts +652 -0
- package/src/conformance/Delegation.ts +177 -0
- package/src/conformance/DeskReference.ts +73 -0
- package/src/conformance/DeviceControl.ts +700 -0
- package/src/conformance/Directory.ts +315 -0
- package/src/conformance/DirectoryProvider.ts +72 -0
- package/src/conformance/DocumentSource.ts +62 -0
- package/src/conformance/EndpointReference.ts +117 -0
- package/src/conformance/Files.ts +685 -0
- package/src/conformance/FilesReference.ts +154 -0
- package/src/conformance/FilesSubject.ts +50 -0
- package/src/conformance/Flags.ts +215 -0
- package/src/conformance/Host.ts +197 -0
- package/src/conformance/HttpApi.ts +169 -0
- package/src/conformance/InboxReference.ts +401 -0
- package/src/conformance/InboxSubject.ts +101 -0
- package/src/conformance/Ingestion.ts +425 -0
- package/src/conformance/Ingress.ts +498 -0
- package/src/conformance/Invocation.ts +780 -0
- package/src/conformance/IsolationMatrix.ts +215 -0
- package/src/conformance/LiveConnection.ts +197 -0
- package/src/conformance/LocalClient.ts +651 -0
- package/src/conformance/Locale.ts +141 -0
- package/src/conformance/MachineIdentity.ts +828 -0
- package/src/conformance/MailProvider.ts +217 -0
- package/src/conformance/Memory.ts +223 -0
- package/src/conformance/Messaging.ts +185 -0
- package/src/conformance/Metering.ts +293 -0
- package/src/conformance/ModelProvider.ts +139 -0
- package/src/conformance/ModuleManifest.ts +630 -0
- package/src/conformance/NotebookAgent.ts +41 -0
- package/src/conformance/NotificationChannel.ts +122 -0
- package/src/conformance/Notifications.ts +316 -0
- package/src/conformance/OAuthClient.ts +240 -0
- package/src/conformance/Outbox.ts +342 -0
- package/src/conformance/PlatformReference.ts +73 -0
- package/src/conformance/PlatformSubject.ts +50 -0
- package/src/conformance/Privacy.ts +577 -0
- package/src/conformance/Progress.ts +244 -0
- package/src/conformance/Push.ts +820 -0
- package/src/conformance/PushReference.ts +101 -0
- package/src/conformance/QuerySurface.ts +408 -0
- package/src/conformance/Readiness.ts +157 -0
- package/src/conformance/Reference.ts +326 -0
- package/src/conformance/Release.ts +690 -0
- package/src/conformance/ReleaseReference.ts +179 -0
- package/src/conformance/ResultRendering.ts +149 -0
- package/src/conformance/Sandbox.ts +313 -0
- package/src/conformance/SandboxReference.ts +52 -0
- package/src/conformance/Scheduler.ts +764 -0
- package/src/conformance/ScreenContext.ts +402 -0
- package/src/conformance/Search.ts +419 -0
- package/src/conformance/Secrets.ts +277 -0
- package/src/conformance/SecretsReference.ts +131 -0
- package/src/conformance/ServicesReference.ts +330 -0
- package/src/conformance/ServicesSubject.ts +105 -0
- package/src/conformance/Settings.ts +204 -0
- package/src/conformance/Sharing.ts +486 -0
- package/src/conformance/ShellSubject.ts +47 -0
- package/src/conformance/SignOutRace.ts +77 -0
- package/src/conformance/Slot.ts +84 -0
- package/src/conformance/Space.ts +432 -0
- package/src/conformance/StorageAdapter.ts +253 -0
- package/src/conformance/StorageBackend.ts +327 -0
- package/src/conformance/Subject.ts +208 -0
- package/src/conformance/Sync.ts +215 -0
- package/src/conformance/Telemetry.ts +287 -0
- package/src/conformance/ThemeTokens.ts +163 -0
- package/src/conformance/ToolSource.ts +632 -0
- package/src/conformance/Versioning.ts +199 -0
- package/src/conformance/View.ts +143 -0
- package/src/conformance/WorkItems.ts +186 -0
- package/src/conformance/Workflow.ts +304 -0
- package/src/conformance/acme/chatlog.ts +115 -0
- package/src/conformance/acme/connector.ts +151 -0
- package/src/conformance/acme/migrations/0000_messages.sql +8 -0
- package/src/conformance/archive/app.ts +33 -0
- package/src/conformance/archive/contract.ts +191 -0
- package/src/conformance/archive/memo.sync.gen.ts +25 -0
- package/src/conformance/archive/migrations/archive/0000_archive.sql +9 -0
- package/src/conformance/archive/migrations/memo/0000_memo.sql +6 -0
- package/src/conformance/archive/schema.ts +25 -0
- package/src/conformance/archive/server.ts +146 -0
- package/src/conformance/archive/sync.gen.ts +32 -0
- package/src/conformance/atlas/app.ts +16 -0
- package/src/conformance/atlas/contract.ts +118 -0
- package/src/conformance/crm/app.ts +107 -0
- package/src/conformance/crm/contract.ts +163 -0
- package/src/conformance/crm/migrations/crm/0000_crm.sql +18 -0
- package/src/conformance/crm/migrations/team/0000_team.sql +6 -0
- package/src/conformance/crm/schema.ts +28 -0
- package/src/conformance/crm/sync.gen.ts +27 -0
- package/src/conformance/desk/contract.ts +61 -0
- package/src/conformance/desk/migrations/0000_notes.sql +7 -0
- package/src/conformance/desk/server.ts +131 -0
- package/src/conformance/drafts/migrations/0000_drafts.sql +8 -0
- package/src/conformance/drafts/module.ts +211 -0
- package/src/conformance/fixture/app.ts +37 -0
- package/src/conformance/fixture/docs/bad-sync.ts +34 -0
- package/src/conformance/fixture/docs/contract.ts +297 -0
- package/src/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
- package/src/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
- package/src/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
- package/src/conformance/fixture/docs/policy.cedar +110 -0
- package/src/conformance/fixture/docs/schema.ts +41 -0
- package/src/conformance/fixture/docs/server.ts +292 -0
- package/src/conformance/fixture/docs/sync.gen.ts +54 -0
- package/src/conformance/fixture/docs/sync.ts +24 -0
- package/src/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
- package/src/conformance/fixture/peer/module.ts +51 -0
- package/src/conformance/fixture/release/blocking/0000_item.sql +3 -0
- package/src/conformance/fixture/release/blocking/0001_wait.sql +2 -0
- package/src/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
- package/src/conformance/fixture/release/broken/0000_item.sql +3 -0
- package/src/conformance/fixture/release/broken/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/broken/0002_label.sql +3 -0
- package/src/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
- package/src/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
- package/src/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
- package/src/conformance/fixture/release/escape/0000_item.sql +3 -0
- package/src/conformance/fixture/release/escape/0001_escape.sql +5 -0
- package/src/conformance/fixture/release/misnamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
- package/src/conformance/fixture/release/module.ts +119 -0
- package/src/conformance/fixture/release/outside/0000_item.sql +3 -0
- package/src/conformance/fixture/release/outside/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/outside/0002_index.sql +4 -0
- package/src/conformance/fixture/release/outside/0003_later.sql +1 -0
- package/src/conformance/fixture/release/renamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/renamed/0001_misname.sql +10 -0
- package/src/conformance/fixture/release/renamed/0002_restore.sql +1 -0
- package/src/conformance/fixture/release/rogue/0000_item.sql +3 -0
- package/src/conformance/fixture/release/rogue/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/rogue/0002_definer.sql +1 -0
- package/src/conformance/fixture/release/slow/0000_item.sql +5 -0
- package/src/conformance/fixture/release/undeclared/0000_item.sql +3 -0
- package/src/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/undeclared/0002_index.sql +1 -0
- package/src/conformance/fixture/release/v1/0000_item.sql +3 -0
- package/src/conformance/fixture/release/v2/0000_item.sql +3 -0
- package/src/conformance/fixture/release/v2/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/v2/0002_label.sql +3 -0
- package/src/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
- package/src/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
- package/src/conformance/kit-hash.ts +18 -0
- package/src/conformance/ledger/contract.ts +92 -0
- package/src/conformance/ledger/migrations/0000_entries.sql +8 -0
- package/src/conformance/ledger/server.ts +174 -0
- package/src/conformance/library/app.ts +38 -0
- package/src/conformance/library/contract.ts +66 -0
- package/src/conformance/library/migrations/0000_library.sql +14 -0
- package/src/conformance/library/schema.ts +27 -0
- package/src/conformance/library/server.ts +65 -0
- package/src/conformance/library/sync.gen.ts +47 -0
- package/src/conformance/locale/catalog.ts +111 -0
- package/src/conformance/notebook/app.ts +115 -0
- package/src/conformance/notebook/evals/pages.evals.json +94 -0
- package/src/conformance/notebook/migrations/0000_notebook.sql +10 -0
- package/src/conformance/notebook/module.ts +215 -0
- package/src/conformance/notebook/skills/meeting-notes.md +4 -0
- package/src/conformance/pad/app.ts +21 -0
- package/src/conformance/pad/contract.ts +69 -0
- package/src/conformance/pad/migrations/pad/0000_pad.sql +8 -0
- package/src/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
- package/src/conformance/pad/schema.ts +18 -0
- package/src/conformance/pad/server.ts +102 -0
- package/src/conformance/purchases/app.ts +34 -0
- package/src/conformance/purchases/contract.ts +161 -0
- package/src/conformance/purchases/migrations/0000_purchases.sql +17 -0
- package/src/conformance/purchases/server.ts +95 -0
- package/src/conformance/replica-search.mjs +22 -0
- package/src/conformance/studio/app.ts +298 -0
- package/src/conformance/studio/contract.ts +319 -0
- package/src/conformance/studio/migrations/billing/0000_billing.sql +6 -0
- package/src/conformance/studio/migrations/journal/0000_journal.sql +9 -0
- package/src/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
- package/src/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
- package/src/conformance/workshop/app.ts +14 -0
- package/src/conformance/workshop/migrations/0000_notes.sql +7 -0
- package/src/conformance/workshop/module.ts +79 -0
- package/src/fakes/AcmeFake.ts +182 -0
- package/src/fakes/ApnsFake.ts +245 -0
- package/src/fakes/FcmFake.ts +231 -0
- package/src/fakes/GoogleFake.ts +1346 -0
- package/src/fakes/HttpApiFake.ts +116 -0
- package/src/fakes/McpFake.ts +355 -0
- package/src/fakes/MicrosoftGraphFake.ts +1191 -0
- package/src/fakes/S3Fake.ts +376 -0
- package/src/fakes/Server.ts +445 -0
- package/src/fakes/SignInProviderFake.ts +70 -0
- package/src/fakes/SlackFake.ts +893 -0
- package/src/fakes/Store.ts +96 -0
- package/src/fakes/TelemetryFakes.ts +197 -0
- package/src/fakes/TestCa.ts +166 -0
- package/src/fakes/WorkOsFake.ts +136 -0
- package/src/index.ts +9 -0
- package/src/make/reference.ts +259 -0
- package/src/make/sources.ts +836 -0
|
@@ -0,0 +1,764 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the Scheduler contract (docs/contracts/scheduler.md).
|
|
3
|
+
*
|
|
4
|
+
* The harness drives a kernel with the ledger fixture installed (with its `minutely` job) and the runtime
|
|
5
|
+
* `scheduler` module, whose own scheduling loop is off, so every sweep happens at a time the check chooses.
|
|
6
|
+
* Its grace period is 30 s. The kernel runs the kit in `packages/testing/test/scheduler.test.ts`; restart
|
|
7
|
+
* guarantees (missed runs after a real outage, a run killed mid-step) are in
|
|
8
|
+
* `packages/testing/test/durable-restart.test.ts`.
|
|
9
|
+
*/
|
|
10
|
+
import type {
|
|
11
|
+
AutomationCatalog,
|
|
12
|
+
CatchUp,
|
|
13
|
+
ExecutionStatus,
|
|
14
|
+
RunRecord,
|
|
15
|
+
RuntimeScheduleSpec,
|
|
16
|
+
ScheduledRun,
|
|
17
|
+
ScheduleRecord,
|
|
18
|
+
SchedulerHealth,
|
|
19
|
+
ScheduleSpec,
|
|
20
|
+
ScheduleSummary,
|
|
21
|
+
ScheduleTarget,
|
|
22
|
+
} from "@eloxiv/contracts"
|
|
23
|
+
import assert from "node:assert/strict"
|
|
24
|
+
import { eventually, type Check } from "./Workflow.ts"
|
|
25
|
+
|
|
26
|
+
export interface SchedulerHarness {
|
|
27
|
+
/** The schedule actions, as a member (`as: "owner"`) or another member of the same organisation. */
|
|
28
|
+
readonly create: (
|
|
29
|
+
input: {
|
|
30
|
+
readonly name: string
|
|
31
|
+
readonly schedule: RuntimeScheduleSpec
|
|
32
|
+
readonly target: ScheduleTarget
|
|
33
|
+
readonly catchUp?: CatchUp
|
|
34
|
+
readonly share?: ReadonlyArray<{
|
|
35
|
+
readonly grantee: { readonly user: string }
|
|
36
|
+
readonly permission: "view" | "operate"
|
|
37
|
+
}>
|
|
38
|
+
},
|
|
39
|
+
as?: "owner" | "other",
|
|
40
|
+
) => Promise<{ readonly id: string }>
|
|
41
|
+
readonly pause: (id: string, as?: "owner" | "other") => Promise<{ readonly id: string }>
|
|
42
|
+
readonly resume: (id: string, as?: "owner" | "other") => Promise<{ readonly id: string }>
|
|
43
|
+
readonly delete: (id: string, as?: "owner" | "other") => Promise<{ readonly id: string }>
|
|
44
|
+
readonly schedules: () => Promise<ReadonlyArray<ScheduleRecord>>
|
|
45
|
+
readonly sweep: (now: Date) => Promise<ReadonlyArray<ScheduledRun>>
|
|
46
|
+
readonly preview: (schedule: ScheduleSpec, after: Date, count: number) => Promise<ReadonlyArray<string>>
|
|
47
|
+
readonly status: (executionId: string) => Promise<ExecutionStatus>
|
|
48
|
+
/** The owner's user id and organisation. */
|
|
49
|
+
readonly owner: { readonly userId: string; readonly orgId: string }
|
|
50
|
+
readonly entries: (ref: string) => Promise<ReadonlyArray<{ readonly ownerId: string }>>
|
|
51
|
+
/** Audit outcomes of `action` by `actor`, oldest first. */
|
|
52
|
+
readonly auditOutcomes: (action: string, actor: string) => Promise<ReadonlyArray<string>>
|
|
53
|
+
/** Deliver an outbox event again, as after a crash between the delivery and its record. */
|
|
54
|
+
readonly redeliver: (eventId: string) => Promise<void>
|
|
55
|
+
/** The outbox event that recording the entry with this ref emitted. */
|
|
56
|
+
readonly eventFor: (ref: string) => Promise<{ readonly id: string; readonly delivered: boolean } | undefined>
|
|
57
|
+
/** The execution id the trigger started for an event. */
|
|
58
|
+
readonly triggered: (trigger: string, eventId: string) => Promise<string>
|
|
59
|
+
/** `scheduler.runNow`, `scheduler.run`, `scheduler.list`, `scheduler.runs` and `scheduler.health`, as a member. */
|
|
60
|
+
readonly runNow: (id: string, as?: "owner" | "other") => Promise<{ readonly id: string; readonly key: string }>
|
|
61
|
+
readonly run: (
|
|
62
|
+
target: ScheduleTarget,
|
|
63
|
+
as?: "owner" | "other",
|
|
64
|
+
) => Promise<{ readonly id: string; readonly key: string }>
|
|
65
|
+
readonly list: (as?: "owner" | "other") => Promise<ReadonlyArray<ScheduleSummary>>
|
|
66
|
+
readonly runs: (id: string, as?: "owner" | "other") => Promise<ReadonlyArray<RunRecord>>
|
|
67
|
+
readonly health: () => Promise<SchedulerHealth>
|
|
68
|
+
readonly catalog: () => Promise<AutomationCatalog>
|
|
69
|
+
/** Share one of the owner's schedules with the other member, for `view` or `operate` (a trusted grant). */
|
|
70
|
+
readonly share: (id: string, permission: "view" | "operate") => Promise<void>
|
|
71
|
+
/** The other member's user id. */
|
|
72
|
+
readonly other: { readonly userId: string }
|
|
73
|
+
/** Titles of the owner's notifications in `category`, oldest first. */
|
|
74
|
+
readonly notifications: (category: string) => Promise<ReadonlyArray<string>>
|
|
75
|
+
/** How many due runs of a schedule fail in a row before the kernel pauses it. */
|
|
76
|
+
readonly pauseAfter: number
|
|
77
|
+
/** `ledger.record` as the owner or the other member (an entry of `kind`, emitting `ledger.recorded`). */
|
|
78
|
+
readonly recordAs: (entry: { readonly kind: string; readonly ref: string }, as: "owner" | "other") => Promise<void>
|
|
79
|
+
/**
|
|
80
|
+
* What the organisation's (scripted) model was asked so far, oldest first; it answers `holds` for an event whose
|
|
81
|
+
* payload is a `note` entry mentioning "urgent".
|
|
82
|
+
*/
|
|
83
|
+
readonly modelPrompts: () => Promise<ReadonlyArray<string>>
|
|
84
|
+
/**
|
|
85
|
+
* The agent runs whose person's message contains `text`: kind, status, stop reason, result, and how the run's
|
|
86
|
+
* execution ended. The model ends a run asked to "Check the queue" with its `no_op` tool when it is offered.
|
|
87
|
+
*/
|
|
88
|
+
readonly agentRuns: (text: string) => Promise<
|
|
89
|
+
ReadonlyArray<{
|
|
90
|
+
readonly kind: string
|
|
91
|
+
readonly status: string
|
|
92
|
+
readonly stopReason: string | null
|
|
93
|
+
readonly result: string | null
|
|
94
|
+
readonly executionState: string | null
|
|
95
|
+
}>
|
|
96
|
+
>
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Each check sweeps at times of its own, a day after the previous check's, because a sweep moves every
|
|
101
|
+
* schedule's cursor forward and a later sweep at an earlier time would find nothing due.
|
|
102
|
+
*/
|
|
103
|
+
let clock = Date.now()
|
|
104
|
+
const nextBase = () => new Date((clock += 86_400_000))
|
|
105
|
+
|
|
106
|
+
const unique = (prefix: string) => `${prefix}-${crypto.randomUUID().slice(0, 8)}`
|
|
107
|
+
const minutes = (n: number) => n * 60_000
|
|
108
|
+
const at = (base: Date, ms: number) => new Date(base.getTime() + ms)
|
|
109
|
+
const record = (ref: string): ScheduleTarget => ({
|
|
110
|
+
kind: "action",
|
|
111
|
+
action: "ledger.record",
|
|
112
|
+
input: { kind: "sched", ref },
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
const rejectsWith = async (promise: Promise<unknown>, tag: string) => {
|
|
116
|
+
try {
|
|
117
|
+
await promise
|
|
118
|
+
} catch (error) {
|
|
119
|
+
assert.equal((error as { _tag?: string })._tag, tag)
|
|
120
|
+
return
|
|
121
|
+
}
|
|
122
|
+
assert.fail(`expected a ${tag} failure`)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const runsOf = (runs: ReadonlyArray<ScheduledRun>, key: string) =>
|
|
126
|
+
runs
|
|
127
|
+
.filter((r) => r.key === key)
|
|
128
|
+
.map((r) => [r.scheduledAt, r.missed] as const)
|
|
129
|
+
.sort((x, y) => x[0].localeCompare(y[0]))
|
|
130
|
+
|
|
131
|
+
/** The runs of `id` once none is pending or running any more. */
|
|
132
|
+
const settledRuns = (h: SchedulerHarness, id: string, count: number, as?: "owner" | "other") =>
|
|
133
|
+
eventually(
|
|
134
|
+
`${count} finished run(s)`,
|
|
135
|
+
() => h.runs(id, as),
|
|
136
|
+
(runs) => runs.length >= count && runs.every((r) => r.state !== "pending" && r.state !== "running"),
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
/** Sweep at `now` until the runs it starts have finished, then once more, so the scheduler settles them. */
|
|
140
|
+
const sweepAndSettle = async (h: SchedulerHarness, id: string, now: Date, count: number) => {
|
|
141
|
+
await h.sweep(now)
|
|
142
|
+
const runs = await settledRuns(h, id, count)
|
|
143
|
+
await h.sweep(now)
|
|
144
|
+
return runs
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Sweep (starting what event deliveries recorded) until `count` runs of `id` have finished. */
|
|
148
|
+
const automated = (h: SchedulerHarness, id: string, count: number) =>
|
|
149
|
+
eventually(
|
|
150
|
+
`${count} finished run(s) of ${id}`,
|
|
151
|
+
async () => {
|
|
152
|
+
await h.sweep(new Date())
|
|
153
|
+
return h.runs(id)
|
|
154
|
+
},
|
|
155
|
+
(runs) => runs.length >= count && runs.every((r) => r.state !== "pending" && r.state !== "running"),
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
export const schedulerChecks: ReadonlyArray<Check<SchedulerHarness>> = [
|
|
159
|
+
{
|
|
160
|
+
name: "previews cron times in the schedule's time zone, across DST changes",
|
|
161
|
+
run: async (h) => {
|
|
162
|
+
const berlin: ScheduleSpec = { kind: "cron", expression: "30 2 * * *", timeZone: "Europe/Berlin" }
|
|
163
|
+
// 29 March 2026: 02:00 jumps to 03:00, so 02:30 does not exist: it runs as late as the gap is long, at
|
|
164
|
+
// 03:30 CEST (the wall time an hour on), once.
|
|
165
|
+
assert.deepEqual(await h.preview(berlin, new Date("2026-03-27T12:00:00Z"), 4), [
|
|
166
|
+
"2026-03-28T01:30:00.000Z",
|
|
167
|
+
"2026-03-29T01:30:00.000Z",
|
|
168
|
+
"2026-03-30T00:30:00.000Z",
|
|
169
|
+
"2026-03-31T00:30:00.000Z",
|
|
170
|
+
])
|
|
171
|
+
// 25 October 2026: 03:00 falls back to 02:00, so 02:30 happens twice and runs once (the earlier).
|
|
172
|
+
assert.deepEqual(await h.preview(berlin, new Date("2026-10-23T12:00:00Z"), 4), [
|
|
173
|
+
"2026-10-24T00:30:00.000Z",
|
|
174
|
+
"2026-10-25T00:30:00.000Z",
|
|
175
|
+
"2026-10-26T01:30:00.000Z",
|
|
176
|
+
"2026-10-27T01:30:00.000Z",
|
|
177
|
+
])
|
|
178
|
+
await rejectsWith(
|
|
179
|
+
h.preview({ kind: "cron", expression: "61 * * * *", timeZone: "UTC" }, new Date(), 1),
|
|
180
|
+
"InvalidInput",
|
|
181
|
+
)
|
|
182
|
+
await rejectsWith(
|
|
183
|
+
h.preview({ kind: "cron", expression: "* * * * *", timeZone: "Mars/Olympus" }, new Date(), 1),
|
|
184
|
+
"InvalidInput",
|
|
185
|
+
)
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: "starts one workflow execution per due time, keyed by (schedule, time), and never twice",
|
|
190
|
+
run: async (h) => {
|
|
191
|
+
const ref = unique("due")
|
|
192
|
+
const { id } = await h.create({
|
|
193
|
+
name: ref,
|
|
194
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
195
|
+
target: record(ref),
|
|
196
|
+
})
|
|
197
|
+
const key = `schedule:${id}`
|
|
198
|
+
const t0 = nextBase()
|
|
199
|
+
assert.deepEqual(runsOf(await h.sweep(t0), key), [])
|
|
200
|
+
const runs = await h.sweep(at(t0, minutes(1) + 1_000))
|
|
201
|
+
assert.deepEqual(runsOf(runs, key), [[at(t0, minutes(1)).toISOString(), false]])
|
|
202
|
+
// The same sweep again, or a later one before the next due time, starts nothing.
|
|
203
|
+
assert.deepEqual(runsOf(await h.sweep(at(t0, minutes(1) + 2_000)), key), [])
|
|
204
|
+
const run = runs.find((r) => r.key === key)!
|
|
205
|
+
await eventually(
|
|
206
|
+
"the run to finish",
|
|
207
|
+
() => h.status(run.executionId),
|
|
208
|
+
(s) => s.state === "succeeded",
|
|
209
|
+
)
|
|
210
|
+
const entries = await h.entries(ref)
|
|
211
|
+
assert.equal(entries.length, 1)
|
|
212
|
+
// A runtime schedule runs as its owner.
|
|
213
|
+
assert.equal(entries[0]!.ownerId, h.owner.userId)
|
|
214
|
+
await h.delete(id)
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "applies each schedule's catch-up policy to runs missed while no sweep ran",
|
|
219
|
+
run: async (h) => {
|
|
220
|
+
const make = async (catchUp: CatchUp) => {
|
|
221
|
+
const ref = unique(catchUp)
|
|
222
|
+
const { id } = await h.create({
|
|
223
|
+
name: ref,
|
|
224
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
225
|
+
target: record(ref),
|
|
226
|
+
catchUp,
|
|
227
|
+
})
|
|
228
|
+
return `schedule:${id}`
|
|
229
|
+
}
|
|
230
|
+
const keys = { all: await make("all"), once: await make("once"), skip: await make("skip") }
|
|
231
|
+
const t0 = nextBase()
|
|
232
|
+
await h.sweep(t0)
|
|
233
|
+
// Ten due times later: the last is on time (within the grace period), the nine before it were missed.
|
|
234
|
+
const runs = await h.sweep(at(t0, minutes(10) + 5_000))
|
|
235
|
+
const time = (n: number) => at(t0, minutes(n)).toISOString()
|
|
236
|
+
assert.deepEqual(
|
|
237
|
+
runsOf(runs, keys.all),
|
|
238
|
+
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((n) => [time(n), n < 10]),
|
|
239
|
+
)
|
|
240
|
+
assert.deepEqual(runsOf(runs, keys.once), [
|
|
241
|
+
[time(9), true],
|
|
242
|
+
[time(10), false],
|
|
243
|
+
])
|
|
244
|
+
assert.deepEqual(runsOf(runs, keys.skip), [[time(10), false]])
|
|
245
|
+
for (const key of Object.values(keys)) await h.delete(key.slice("schedule:".length))
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: "catch-up all starts every missed run of a long backlog, oldest first, over several sweeps",
|
|
250
|
+
run: async (h) => {
|
|
251
|
+
const ref = unique("backlog")
|
|
252
|
+
const { id } = await h.create({
|
|
253
|
+
name: ref,
|
|
254
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
255
|
+
target: record(ref),
|
|
256
|
+
catchUp: "all",
|
|
257
|
+
})
|
|
258
|
+
const key = `schedule:${id}`
|
|
259
|
+
const t0 = nextBase()
|
|
260
|
+
await h.sweep(t0)
|
|
261
|
+
// 250 due times, more than one sweep starts: the rest start in the following sweeps, none is dropped.
|
|
262
|
+
const now = at(t0, minutes(250) + 5_000)
|
|
263
|
+
const started: Array<string> = []
|
|
264
|
+
for (let sweeps = 0; sweeps < 10; sweeps++) {
|
|
265
|
+
const runs = runsOf(await h.sweep(now), key)
|
|
266
|
+
if (runs.length === 0) break
|
|
267
|
+
started.push(...runs.map(([time]) => time))
|
|
268
|
+
}
|
|
269
|
+
assert.deepEqual(
|
|
270
|
+
started,
|
|
271
|
+
Array.from({ length: 250 }, (_, i) => at(t0, minutes(i + 1)).toISOString()),
|
|
272
|
+
)
|
|
273
|
+
assert.deepEqual(runsOf(await h.sweep(at(now, 1_000)), key), [])
|
|
274
|
+
await h.delete(id)
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: "a schedule paused and resumed between two sweeps runs none of the time it was paused",
|
|
279
|
+
run: async (h) => {
|
|
280
|
+
const ref = unique("paused-briefly")
|
|
281
|
+
const { id } = await h.create({
|
|
282
|
+
name: ref,
|
|
283
|
+
schedule: { kind: "interval", everyMs: 100 },
|
|
284
|
+
target: record(ref),
|
|
285
|
+
catchUp: "all",
|
|
286
|
+
})
|
|
287
|
+
const key = `schedule:${id}`
|
|
288
|
+
// Real time: pausing and resuming happen now, so the sweeps must too.
|
|
289
|
+
await h.sweep(new Date())
|
|
290
|
+
await h.pause(id)
|
|
291
|
+
await new Promise((resolve) => setTimeout(resolve, 550))
|
|
292
|
+
const resumedAfter = Date.now()
|
|
293
|
+
await h.resume(id)
|
|
294
|
+
const paused = runsOf(await h.sweep(new Date()), key).filter(([time]) => Date.parse(time) <= resumedAfter)
|
|
295
|
+
assert.deepEqual(paused, [])
|
|
296
|
+
// It runs again after the resume.
|
|
297
|
+
await new Promise((resolve) => setTimeout(resolve, 350))
|
|
298
|
+
const after = runsOf(await h.sweep(new Date()), key)
|
|
299
|
+
assert.ok(after.length >= 1, "the resumed schedule runs again")
|
|
300
|
+
assert.ok(after.every(([time]) => Date.parse(time) > resumedAfter))
|
|
301
|
+
await h.delete(id)
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: "a paused schedule starts nothing and is not caught up when resumed",
|
|
306
|
+
run: async (h) => {
|
|
307
|
+
const ref = unique("paused")
|
|
308
|
+
const { id } = await h.create({
|
|
309
|
+
name: ref,
|
|
310
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
311
|
+
target: record(ref),
|
|
312
|
+
catchUp: "all",
|
|
313
|
+
})
|
|
314
|
+
const key = `schedule:${id}`
|
|
315
|
+
const t0 = nextBase()
|
|
316
|
+
await h.sweep(t0)
|
|
317
|
+
await h.pause(id)
|
|
318
|
+
assert.equal((await h.schedules()).find((s) => s.key === key)?.paused, true)
|
|
319
|
+
assert.deepEqual(runsOf(await h.sweep(at(t0, minutes(5) + 1_000)), key), [])
|
|
320
|
+
await h.resume(id)
|
|
321
|
+
assert.deepEqual(runsOf(await h.sweep(at(t0, minutes(6) + 1_000)), key), [
|
|
322
|
+
[at(t0, minutes(6)).toISOString(), false],
|
|
323
|
+
])
|
|
324
|
+
await h.delete(id)
|
|
325
|
+
assert.equal(
|
|
326
|
+
(await h.schedules()).some((s) => s.key === key),
|
|
327
|
+
false,
|
|
328
|
+
)
|
|
329
|
+
assert.deepEqual(runsOf(await h.sweep(at(t0, minutes(8) + 1_000)), key), [])
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: "only a schedule's owner may change it, and every change is audited",
|
|
334
|
+
run: async (h) => {
|
|
335
|
+
const ref = unique("owned")
|
|
336
|
+
const { id } = await h.create({
|
|
337
|
+
name: ref,
|
|
338
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
339
|
+
target: record(ref),
|
|
340
|
+
})
|
|
341
|
+
await rejectsWith(h.pause(id, "other"), "Forbidden")
|
|
342
|
+
await rejectsWith(h.delete(id, "other"), "Forbidden")
|
|
343
|
+
await h.pause(id)
|
|
344
|
+
assert.equal((await h.auditOutcomes("scheduler.pause", h.owner.userId)).at(-1), "succeeded")
|
|
345
|
+
await rejectsWith(
|
|
346
|
+
h.create({ name: ref, schedule: { kind: "cron", expression: "nope", timeZone: "UTC" }, target: record(ref) }),
|
|
347
|
+
"InvalidInput",
|
|
348
|
+
)
|
|
349
|
+
await h.delete(id)
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: "starts a workflow target from a runtime schedule only when the workflow is schedulable",
|
|
354
|
+
run: async (h) => {
|
|
355
|
+
const label = unique("sleepy")
|
|
356
|
+
const allowed = await h.create({
|
|
357
|
+
name: label,
|
|
358
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
359
|
+
target: { kind: "workflow", workflow: "ledger.sleeper", input: { label, ms: 0 } },
|
|
360
|
+
})
|
|
361
|
+
const refused = await h.create({
|
|
362
|
+
name: label,
|
|
363
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
364
|
+
target: { kind: "workflow", workflow: "ledger.doomed", input: { reason: "not schedulable" } },
|
|
365
|
+
})
|
|
366
|
+
const t0 = nextBase()
|
|
367
|
+
await h.sweep(t0)
|
|
368
|
+
const runs = await h.sweep(at(t0, minutes(1)))
|
|
369
|
+
assert.deepEqual(runsOf(runs, `schedule:${refused.id}`), [])
|
|
370
|
+
const run = runs.find((r) => r.key === `schedule:${allowed.id}`)
|
|
371
|
+
assert.ok(run, "the schedulable workflow was started")
|
|
372
|
+
await eventually(
|
|
373
|
+
"the workflow run to finish",
|
|
374
|
+
() => h.status(run.executionId),
|
|
375
|
+
(s) => s.state === "succeeded",
|
|
376
|
+
)
|
|
377
|
+
assert.equal((await h.entries(`${label}/after`))[0]?.ownerId, h.owner.userId)
|
|
378
|
+
await h.delete(allowed.id)
|
|
379
|
+
await h.delete(refused.id)
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: "runs manifest jobs for every organisation, as its system actor",
|
|
384
|
+
run: async (h) => {
|
|
385
|
+
const job = (await h.schedules()).find((s) => s.key === `job:ledger.minutely:${h.owner.orgId}`)
|
|
386
|
+
assert.ok(job, "the ledger's minutely job is scheduled for the owner's organisation")
|
|
387
|
+
assert.deepEqual(job.identity, { kind: "system", orgId: h.owner.orgId })
|
|
388
|
+
assert.equal(job.source, "manifest")
|
|
389
|
+
const t0 = nextBase()
|
|
390
|
+
await h.sweep(t0)
|
|
391
|
+
const runs = (await h.sweep(at(t0, minutes(1)))).filter((r) => r.key === job.key)
|
|
392
|
+
assert.equal(runs.length, 1)
|
|
393
|
+
await eventually(
|
|
394
|
+
"the job run to finish",
|
|
395
|
+
() => h.status(runs[0]!.executionId),
|
|
396
|
+
(s) => s.state === "succeeded",
|
|
397
|
+
)
|
|
398
|
+
const entries = await h.entries("minutely")
|
|
399
|
+
assert.ok(entries.length >= 1)
|
|
400
|
+
assert.ok(entries.every((e) => e.ownerId === "$system"))
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: "an event trigger starts its workflow once per event, also when the event is delivered again",
|
|
405
|
+
run: async (h) => {
|
|
406
|
+
const ref = unique("evt")
|
|
407
|
+
const target: ScheduleTarget = { kind: "action", action: "ledger.record", input: { kind: "evt", ref } }
|
|
408
|
+
const { id } = await h.create({ name: ref, schedule: { kind: "interval", everyMs: minutes(1) }, target })
|
|
409
|
+
const t0 = nextBase()
|
|
410
|
+
await h.sweep(t0)
|
|
411
|
+
const run = (await h.sweep(at(t0, minutes(1) + 1_000))).find((r) => r.key === `schedule:${id}`)
|
|
412
|
+
await eventually(
|
|
413
|
+
"the run to finish",
|
|
414
|
+
() => h.status(run!.executionId),
|
|
415
|
+
(s) => s.state === "succeeded",
|
|
416
|
+
)
|
|
417
|
+
await h.delete(id)
|
|
418
|
+
const event = await eventually(
|
|
419
|
+
"the event's delivery",
|
|
420
|
+
() => h.eventFor(ref),
|
|
421
|
+
(e) => e?.delivered === true,
|
|
422
|
+
)
|
|
423
|
+
const execution = await h.triggered("ledger.echo", event!.id)
|
|
424
|
+
await eventually(
|
|
425
|
+
"the echo",
|
|
426
|
+
() => h.entries(ref),
|
|
427
|
+
(e) => e.length === 2,
|
|
428
|
+
)
|
|
429
|
+
await h.redeliver(event!.id)
|
|
430
|
+
await eventually(
|
|
431
|
+
"the redelivery",
|
|
432
|
+
() => h.eventFor(ref),
|
|
433
|
+
(e) => e?.delivered === true,
|
|
434
|
+
)
|
|
435
|
+
assert.equal(await h.triggered("ledger.echo", event!.id), execution)
|
|
436
|
+
await eventually(
|
|
437
|
+
"the echo execution",
|
|
438
|
+
() => h.status(execution),
|
|
439
|
+
(s) => s.state === "succeeded",
|
|
440
|
+
)
|
|
441
|
+
assert.equal((await h.entries(ref)).length, 2)
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: "records each run's outcome in its schedule's history: succeeded, a no-op with its reason, failed with its error tag",
|
|
446
|
+
run: async (h) => {
|
|
447
|
+
const ref = unique("outcomes")
|
|
448
|
+
const every = { kind: "interval", everyMs: minutes(1) } as const
|
|
449
|
+
const ok = await h.create({ name: `${ref}-ok`, schedule: every, target: record(ref) })
|
|
450
|
+
const idleAction = await h.create({
|
|
451
|
+
name: `${ref}-idle`,
|
|
452
|
+
schedule: every,
|
|
453
|
+
target: { kind: "action", action: "ledger.idle", input: { reason: "nothing waiting" } },
|
|
454
|
+
})
|
|
455
|
+
const idleFlow = await h.create({
|
|
456
|
+
name: `${ref}-flow`,
|
|
457
|
+
schedule: every,
|
|
458
|
+
target: { kind: "workflow", workflow: "ledger.idle-flow", input: { reason: "inbox empty" } },
|
|
459
|
+
})
|
|
460
|
+
// The action refuses this input (`kind` must be a string): the run fails.
|
|
461
|
+
const broken = await h.create({
|
|
462
|
+
name: `${ref}-broken`,
|
|
463
|
+
schedule: every,
|
|
464
|
+
target: { kind: "action", action: "ledger.record", input: { kind: 1, ref } },
|
|
465
|
+
})
|
|
466
|
+
const t0 = nextBase()
|
|
467
|
+
await h.sweep(t0)
|
|
468
|
+
await h.sweep(at(t0, minutes(1)))
|
|
469
|
+
const [okRun] = await settledRuns(h, ok.id, 1)
|
|
470
|
+
assert.equal(okRun!.state, "succeeded")
|
|
471
|
+
assert.equal(okRun!.requestedBy, null)
|
|
472
|
+
assert.equal(okRun!.scheduledAt, at(t0, minutes(1)).toISOString())
|
|
473
|
+
const [idleRun] = await settledRuns(h, idleAction.id, 1)
|
|
474
|
+
assert.deepEqual(
|
|
475
|
+
[idleRun!.state, idleRun!.reason, idleRun!.evidence],
|
|
476
|
+
["noop", "nothing waiting", ["no entries waiting"]],
|
|
477
|
+
)
|
|
478
|
+
const [flowRun] = await settledRuns(h, idleFlow.id, 1)
|
|
479
|
+
assert.deepEqual([flowRun!.state, flowRun!.reason, flowRun!.evidence], ["noop", "inbox empty", ["queue empty"]])
|
|
480
|
+
assert.equal((await h.status(flowRun!.executionId)).noop?.reason, "inbox empty")
|
|
481
|
+
const [brokenRun] = await settledRuns(h, broken.id, 1)
|
|
482
|
+
assert.deepEqual([brokenRun!.state, brokenRun!.error], ["failed", "InvalidInput"])
|
|
483
|
+
// A no-op is not a failure: only the broken schedule has a streak.
|
|
484
|
+
const listed = new Map((await h.list()).map((s) => [s.id, s]))
|
|
485
|
+
assert.equal(listed.get(idleAction.id)?.failureStreak, 0)
|
|
486
|
+
assert.equal(listed.get(broken.id)?.failureStreak, 1)
|
|
487
|
+
assert.equal(listed.get(ok.id)?.lastRun?.state, "succeeded")
|
|
488
|
+
for (const { id } of [ok, idleAction, idleFlow, broken]) await h.delete(id)
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
name: "alerts the owner once when a schedule starts failing, and pauses it when its due runs keep failing",
|
|
493
|
+
run: async (h) => {
|
|
494
|
+
const ref = unique("failing")
|
|
495
|
+
const { id } = await h.create({
|
|
496
|
+
name: ref,
|
|
497
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
498
|
+
target: { kind: "action", action: "ledger.record", input: { kind: 1, ref } },
|
|
499
|
+
})
|
|
500
|
+
const t0 = nextBase()
|
|
501
|
+
await h.sweep(t0)
|
|
502
|
+
for (let n = 1; n <= h.pauseAfter; n++) await sweepAndSettle(h, id, at(t0, minutes(n)), n)
|
|
503
|
+
// A run by hand that fails never counts.
|
|
504
|
+
await h.runNow(id)
|
|
505
|
+
await sweepAndSettle(h, id, at(t0, minutes(h.pauseAfter) + 1_000), h.pauseAfter + 1)
|
|
506
|
+
const schedule = (await h.list()).find((s) => s.id === id)
|
|
507
|
+
assert.deepEqual(
|
|
508
|
+
[schedule?.paused, schedule?.pausedReason, schedule?.failureStreak],
|
|
509
|
+
[true, "failures", h.pauseAfter],
|
|
510
|
+
)
|
|
511
|
+
// Once when the streak started, once when the kernel paused it; never for the runs between.
|
|
512
|
+
const alerts = (await h.notifications("scheduler.failures")).filter((t) => t.includes(ref))
|
|
513
|
+
assert.deepEqual(alerts, [
|
|
514
|
+
`Schedule ${ref} started failing`,
|
|
515
|
+
`Schedule ${ref} was paused after ${h.pauseAfter} failed runs in a row`,
|
|
516
|
+
])
|
|
517
|
+
// Paused: no due run starts; resumed, its streak starts again.
|
|
518
|
+
assert.deepEqual(runsOf(await h.sweep(at(t0, minutes(h.pauseAfter + 3))), `schedule:${id}`), [])
|
|
519
|
+
await h.resume(id)
|
|
520
|
+
assert.equal((await h.list()).find((s) => s.id === id)?.failureStreak, 0)
|
|
521
|
+
await h.delete(id)
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
name: "runs a schedule by hand once, as the schedule's own identity, also while it is paused",
|
|
526
|
+
run: async (h) => {
|
|
527
|
+
const ref = unique("by-hand")
|
|
528
|
+
const { id } = await h.create({
|
|
529
|
+
name: ref,
|
|
530
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
531
|
+
target: record(ref),
|
|
532
|
+
})
|
|
533
|
+
await h.pause(id)
|
|
534
|
+
const asked = await h.runNow(id)
|
|
535
|
+
assert.equal(asked.key, `schedule:${id}#manual:${asked.id}`)
|
|
536
|
+
await h.sweep(new Date())
|
|
537
|
+
// Another sweep records nothing more: the request is recorded once.
|
|
538
|
+
await h.sweep(new Date())
|
|
539
|
+
const runs = await settledRuns(h, id, 1)
|
|
540
|
+
assert.equal(runs.length, 1)
|
|
541
|
+
assert.deepEqual([runs[0]!.state, runs[0]!.requestedBy], ["succeeded", h.owner.userId])
|
|
542
|
+
const entries = await h.entries(ref)
|
|
543
|
+
assert.deepEqual(
|
|
544
|
+
entries.map((e) => e.ownerId),
|
|
545
|
+
[h.owner.userId],
|
|
546
|
+
)
|
|
547
|
+
assert.equal((await h.auditOutcomes("scheduler.runNow", h.owner.userId)).at(-1), "succeeded")
|
|
548
|
+
await h.delete(id)
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
name: "a schedule is seen by whom it is shared with and operated only by its operators, and always runs as its owner",
|
|
553
|
+
run: async (h) => {
|
|
554
|
+
const ref = unique("shared")
|
|
555
|
+
const { id } = await h.create({
|
|
556
|
+
name: ref,
|
|
557
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
558
|
+
target: record(ref),
|
|
559
|
+
})
|
|
560
|
+
const seen = async (as: "owner" | "other") => (await h.list(as)).some((s) => s.id === id)
|
|
561
|
+
// Not shared: another member neither sees nor operates it, nor reads its runs.
|
|
562
|
+
assert.equal(await seen("other"), false)
|
|
563
|
+
await rejectsWith(h.runNow(id, "other"), "Forbidden")
|
|
564
|
+
await rejectsWith(h.runs(id, "other"), "Forbidden")
|
|
565
|
+
// Shared to view: seen, its runs readable, not operated.
|
|
566
|
+
await h.share(id, "view")
|
|
567
|
+
assert.equal(await seen("other"), true)
|
|
568
|
+
assert.deepEqual(await h.runs(id, "other"), [])
|
|
569
|
+
await rejectsWith(h.pause(id, "other"), "Forbidden")
|
|
570
|
+
await rejectsWith(h.runNow(id, "other"), "Forbidden")
|
|
571
|
+
// Shared to operate: paused and run by hand, still never resumed or deleted by the operator.
|
|
572
|
+
await h.share(id, "operate")
|
|
573
|
+
await h.pause(id, "other")
|
|
574
|
+
await rejectsWith(h.resume(id, "other"), "Forbidden")
|
|
575
|
+
await rejectsWith(h.delete(id, "other"), "Forbidden")
|
|
576
|
+
await h.runNow(id, "other")
|
|
577
|
+
await h.sweep(new Date())
|
|
578
|
+
const [run] = await settledRuns(h, id, 1, "other")
|
|
579
|
+
assert.deepEqual([run!.state, run!.requestedBy], ["succeeded", h.other.userId])
|
|
580
|
+
// The operator asked; the owner's authority ran it.
|
|
581
|
+
assert.deepEqual(
|
|
582
|
+
(await h.entries(ref)).map((e) => e.ownerId),
|
|
583
|
+
[h.owner.userId],
|
|
584
|
+
)
|
|
585
|
+
await h.delete(id)
|
|
586
|
+
// Created and shared in one call: both, or (a grantee outside the organisation) neither.
|
|
587
|
+
const shared = await h.create({
|
|
588
|
+
name: `${ref}-at-once`,
|
|
589
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
590
|
+
target: record(ref),
|
|
591
|
+
share: [{ grantee: { user: h.other.userId }, permission: "operate" }],
|
|
592
|
+
})
|
|
593
|
+
assert.ok((await h.list("other")).some((s) => s.id === shared.id))
|
|
594
|
+
await h.pause(shared.id, "other")
|
|
595
|
+
const before = (await h.list()).length
|
|
596
|
+
await rejectsWith(
|
|
597
|
+
h.create({
|
|
598
|
+
name: `${ref}-refused`,
|
|
599
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
600
|
+
target: record(ref),
|
|
601
|
+
share: [{ grantee: { user: "not-a-member" }, permission: "view" }],
|
|
602
|
+
}),
|
|
603
|
+
"InvalidInput",
|
|
604
|
+
)
|
|
605
|
+
assert.equal((await h.list()).length, before)
|
|
606
|
+
await h.delete(shared.id)
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: "runs an action or a schedulable workflow once, now, as the caller, and refuses a workflow members may not start",
|
|
611
|
+
run: async (h) => {
|
|
612
|
+
const ref = unique("once")
|
|
613
|
+
const asked = await h.run(record(ref), "other")
|
|
614
|
+
assert.equal(asked.key, `run:${asked.id}`)
|
|
615
|
+
const refused = await h.run({ kind: "workflow", workflow: "ledger.doomed", input: { reason: "x" } }, "other")
|
|
616
|
+
await h.sweep(new Date())
|
|
617
|
+
const [ran] = await settledRuns(h, asked.id, 1, "other")
|
|
618
|
+
assert.deepEqual([ran!.state, ran!.requestedBy], ["succeeded", h.other.userId])
|
|
619
|
+
assert.deepEqual(
|
|
620
|
+
(await h.entries(ref)).map((e) => e.ownerId),
|
|
621
|
+
[h.other.userId],
|
|
622
|
+
)
|
|
623
|
+
const [no] = await settledRuns(h, refused.id, 1, "other")
|
|
624
|
+
assert.equal(no!.state, "refused")
|
|
625
|
+
assert.match(no!.reason ?? "", /not schedulable/)
|
|
626
|
+
// Someone else's one-off run is not theirs to read.
|
|
627
|
+
await rejectsWith(h.runs(asked.id, "owner"), "Forbidden")
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
name: "reports the scheduler as healthy while a kernel sweeps",
|
|
632
|
+
run: async (h) => {
|
|
633
|
+
const before = Date.now()
|
|
634
|
+
await new Promise((resolve) => setTimeout(resolve, 2_100))
|
|
635
|
+
await h.sweep(new Date())
|
|
636
|
+
const health = await h.health()
|
|
637
|
+
assert.equal(health.status, "ok")
|
|
638
|
+
assert.ok(health.lastSweepAt !== null && Date.parse(health.lastSweepAt) >= before - 1_000)
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
name: "lists what members can automate: actions, the workflows they may schedule, and event types",
|
|
643
|
+
run: async (h) => {
|
|
644
|
+
const catalog = await h.catalog()
|
|
645
|
+
assert.ok(catalog.actions.some((a) => a.name === "ledger.record" && a.module === "ledger"))
|
|
646
|
+
const workflows = new Set(catalog.workflows.map((w) => w.name))
|
|
647
|
+
assert.ok(workflows.has("ledger.sleeper"))
|
|
648
|
+
// A workflow members may not start is not offered.
|
|
649
|
+
assert.ok(!workflows.has("ledger.doomed"))
|
|
650
|
+
assert.ok(catalog.events.some((e) => e.type === "ledger.recorded" && e.module === "ledger"))
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
name: "an event automation runs its action once per event its owner may read and whose condition holds, as its owner",
|
|
655
|
+
run: async (h) => {
|
|
656
|
+
const ref = unique("auto")
|
|
657
|
+
const { id } = await h.create({
|
|
658
|
+
name: ref,
|
|
659
|
+
schedule: {
|
|
660
|
+
kind: "event",
|
|
661
|
+
event: "ledger.recorded",
|
|
662
|
+
condition: { kind: "match", all: [{ field: "kind", op: "in", value: ["auto-src", "secret"] }] },
|
|
663
|
+
},
|
|
664
|
+
target: { kind: "action", action: "ledger.record", input: { kind: "auto", ref: "{{event.ref}}" } },
|
|
665
|
+
})
|
|
666
|
+
// Another member's entry the owner may read, one that fails the condition, and a secret the owner may not read.
|
|
667
|
+
await h.recordAs({ kind: "auto-src", ref: `${ref}-seen` }, "other")
|
|
668
|
+
await h.recordAs({ kind: "other", ref: `${ref}-skipped` }, "other")
|
|
669
|
+
await h.recordAs({ kind: "secret", ref: `${ref}-hidden` }, "other")
|
|
670
|
+
// The automation's own entry is an event too: its condition does not hold for it.
|
|
671
|
+
const runs = await automated(h, id, 4)
|
|
672
|
+
const states = runs.map((r) => `${r.state}: ${r.reason}`).sort((a, b) => a.localeCompare(b))
|
|
673
|
+
assert.deepEqual(states, [
|
|
674
|
+
"noop: Its owner may not read the event's record",
|
|
675
|
+
"noop: The condition does not hold",
|
|
676
|
+
"noop: The condition does not hold",
|
|
677
|
+
"succeeded: null",
|
|
678
|
+
])
|
|
679
|
+
// The action ran once, as the owner, with the event's field in its input; the secret's ref never reached it.
|
|
680
|
+
assert.deepEqual(
|
|
681
|
+
(await h.entries(`${ref}-seen`)).map((e) => e.ownerId).sort(),
|
|
682
|
+
[h.owner.userId, h.other.userId].sort(),
|
|
683
|
+
)
|
|
684
|
+
assert.equal((await h.entries(`${ref}-hidden`)).length, 1)
|
|
685
|
+
// Sweeping again starts nothing more; a paused automation records nothing for new events.
|
|
686
|
+
await h.sweep(new Date())
|
|
687
|
+
assert.equal((await h.runs(id)).length, 4)
|
|
688
|
+
await h.pause(id)
|
|
689
|
+
await h.recordAs({ kind: "auto-src", ref: `${ref}-paused` }, "other")
|
|
690
|
+
await new Promise((resolve) => setTimeout(resolve, 1_500))
|
|
691
|
+
await h.sweep(new Date())
|
|
692
|
+
assert.equal((await h.runs(id)).length, 4)
|
|
693
|
+
await h.delete(id)
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
name: "a natural-language condition asks the organisation's model about that one event, for the automation's owner",
|
|
698
|
+
run: async (h) => {
|
|
699
|
+
const ref = unique("nl")
|
|
700
|
+
const { id } = await h.create({
|
|
701
|
+
name: ref,
|
|
702
|
+
schedule: {
|
|
703
|
+
kind: "event",
|
|
704
|
+
event: "ledger.recorded",
|
|
705
|
+
condition: { kind: "prompt", prompt: `Is this entry (${ref}) urgent?` },
|
|
706
|
+
},
|
|
707
|
+
target: { kind: "action", action: "ledger.record", input: { kind: "handled", ref: "{{event.ref}}" } },
|
|
708
|
+
})
|
|
709
|
+
const before = (await h.modelPrompts()).length
|
|
710
|
+
await h.recordAs({ kind: "note", ref: `${ref}-urgent` }, "other")
|
|
711
|
+
await h.recordAs({ kind: "note", ref: `${ref}-later` }, "other")
|
|
712
|
+
await h.recordAs({ kind: "secret", ref: `${ref}-urgent-secret` }, "other")
|
|
713
|
+
// The urgent note, the later one, the secret, and the automation's own entry (not a note).
|
|
714
|
+
const runs = await automated(h, id, 4)
|
|
715
|
+
assert.deepEqual(runs.map((r) => r.state).sort(), ["noop", "noop", "noop", "succeeded"])
|
|
716
|
+
// History, which the automation's viewers read, keeps the verdict only, never the model's explanation of it.
|
|
717
|
+
assert.deepEqual(
|
|
718
|
+
runs
|
|
719
|
+
.filter((r) => r.state === "noop")
|
|
720
|
+
.map((r) => r.reason ?? "")
|
|
721
|
+
.sort((a, b) => a.localeCompare(b)),
|
|
722
|
+
["Its owner may not read the event's record", "The condition does not hold", "The condition does not hold"],
|
|
723
|
+
)
|
|
724
|
+
// The urgent note, and the automation's own entry for it.
|
|
725
|
+
assert.equal((await h.entries(`${ref}-urgent`)).length, 2)
|
|
726
|
+
// The model saw each event the owner may read once, never the secret one.
|
|
727
|
+
const asked = (await h.modelPrompts()).slice(before).filter((p) => p.includes(ref))
|
|
728
|
+
assert.equal(asked.length, 3)
|
|
729
|
+
assert.ok(asked.every((p) => !p.includes("secret")))
|
|
730
|
+
await h.delete(id)
|
|
731
|
+
},
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
name: "an agent run a schedule starts can end as a no-op with its reason, distinct from work done",
|
|
735
|
+
run: async (h) => {
|
|
736
|
+
const ref = unique("queue")
|
|
737
|
+
const { id } = await h.create({
|
|
738
|
+
name: ref,
|
|
739
|
+
schedule: { kind: "interval", everyMs: minutes(1) },
|
|
740
|
+
target: { kind: "action", action: "agent.send", input: { text: `Check the queue ${ref}` } },
|
|
741
|
+
})
|
|
742
|
+
await h.runNow(id)
|
|
743
|
+
await h.sweep(new Date())
|
|
744
|
+
const [run] = await eventually(
|
|
745
|
+
"the job's agent run to end",
|
|
746
|
+
() => h.agentRuns(ref),
|
|
747
|
+
(runs) =>
|
|
748
|
+
runs.length === 1 &&
|
|
749
|
+
runs[0]!.status !== "queued" &&
|
|
750
|
+
runs[0]!.status !== "running" &&
|
|
751
|
+
runs[0]!.executionState !== null,
|
|
752
|
+
30_000,
|
|
753
|
+
)
|
|
754
|
+
assert.deepEqual(run, {
|
|
755
|
+
kind: "job",
|
|
756
|
+
status: "succeeded",
|
|
757
|
+
stopReason: "noop",
|
|
758
|
+
result: "The queue is empty",
|
|
759
|
+
executionState: "noop",
|
|
760
|
+
})
|
|
761
|
+
await h.delete(id)
|
|
762
|
+
},
|
|
763
|
+
},
|
|
764
|
+
]
|