@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,632 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ToolSource conformance kit (docs/contracts/tool-source.md): remote MCP servers over kernel endpoint Connections,
|
|
3
|
+
* against the MCP protocol fake in each of its modes (no credential, a secret in a header, OAuth discovered from the
|
|
4
|
+
* server). Run it with a subject whose kernel installs an endpoint connector providing `tools` (the registry's `mcp`)
|
|
5
|
+
* and allows only the fakes' hosts as private destinations.
|
|
6
|
+
*/
|
|
7
|
+
import type { Connection, ConsentStart } from "@eloxiv/contracts"
|
|
8
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest"
|
|
9
|
+
import { BOARD_VIEW, GIVEN_CLIENT, startMcpFake, type McpFake } from "../fakes/McpFake.ts"
|
|
10
|
+
import { holding, releaseAll, waitedFor } from "../Locks.ts"
|
|
11
|
+
import type { CallResult } from "./CapabilityKit.ts"
|
|
12
|
+
import type { EndpointSubject } from "./EndpointReference.ts"
|
|
13
|
+
|
|
14
|
+
const ok = (result: CallResult): any => {
|
|
15
|
+
if (!result.ok) throw new Error(`Expected success, got ${JSON.stringify(result.error)}`)
|
|
16
|
+
return result.value
|
|
17
|
+
}
|
|
18
|
+
const failed = (result: CallResult): any => {
|
|
19
|
+
if (result.ok) throw new Error(`Expected a failure, got ${JSON.stringify(result.value)}`)
|
|
20
|
+
return result.error
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const toolSourceConformance = (
|
|
24
|
+
start: (allow: ReadonlyArray<string>) => Promise<EndpointSubject>,
|
|
25
|
+
options: { readonly provider?: string } = {},
|
|
26
|
+
) => {
|
|
27
|
+
const provider = options.provider ?? "mcp"
|
|
28
|
+
describe("ToolSource contract", () => {
|
|
29
|
+
let s: EndpointSubject
|
|
30
|
+
let open: McpFake
|
|
31
|
+
let keyed: McpFake
|
|
32
|
+
let oauth: McpFake
|
|
33
|
+
let apps: McpFake
|
|
34
|
+
const SECRET = "mcp-secret-value-0123456789abcdef"
|
|
35
|
+
|
|
36
|
+
beforeAll(async () => {
|
|
37
|
+
open = await startMcpFake({ auth: { kind: "none" } })
|
|
38
|
+
keyed = await startMcpFake({ auth: { kind: "secret", header: "x-mcp-key", value: SECRET } })
|
|
39
|
+
oauth = await startMcpFake({ auth: { kind: "oauth" } })
|
|
40
|
+
apps = await startMcpFake({ auth: { kind: "none" }, apps: true })
|
|
41
|
+
s = await start([open.host, keyed.host, oauth.host, apps.host])
|
|
42
|
+
}, 120_000)
|
|
43
|
+
afterAll(async () => {
|
|
44
|
+
await s?.dispose()
|
|
45
|
+
await Promise.all([open?.close(), keyed?.close(), oauth?.close(), apps?.close()])
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const add = (user = s.owner, input: Record<string, unknown> = {}) =>
|
|
49
|
+
s.action(user, "connections.add", { provider, endpoint: open.endpoint, auth: { kind: "none" }, ...input })
|
|
50
|
+
const added = async (user = s.owner, input: Record<string, unknown> = {}) =>
|
|
51
|
+
ok(await add(user, input)) as { connection: Connection; consent: ConsentStart | null }
|
|
52
|
+
|
|
53
|
+
it("adds a server without a credential, active at once, and lists every page of its tools", async () => {
|
|
54
|
+
const { connection, consent } = await added()
|
|
55
|
+
expect(connection).toMatchObject({
|
|
56
|
+
provider,
|
|
57
|
+
endpoint: open.endpoint,
|
|
58
|
+
auth: "none",
|
|
59
|
+
status: "active",
|
|
60
|
+
shared: false,
|
|
61
|
+
})
|
|
62
|
+
expect(consent).toBeNull()
|
|
63
|
+
const { tools } = ok(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))
|
|
64
|
+
expect(tools.map((t: { name: string }) => t.name)).toEqual([
|
|
65
|
+
"echo",
|
|
66
|
+
"add",
|
|
67
|
+
"fail",
|
|
68
|
+
"create_issue",
|
|
69
|
+
"delete_everything",
|
|
70
|
+
])
|
|
71
|
+
expect(tools[0]).toMatchObject({ readOnly: true, destructive: false, inputSchema: { type: "object" } })
|
|
72
|
+
expect(tools.find((t: { name: string }) => t.name === "delete_everything")).toMatchObject({ destructive: true })
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it("calls a tool, answering its content, its structured content, and a tool's own error as a result", async () => {
|
|
76
|
+
const { connection } = await added()
|
|
77
|
+
const call = (name: string, args: Record<string, unknown>) =>
|
|
78
|
+
s.action(s.owner, "connections.callTool", { connectionId: connection.id, name, arguments: args })
|
|
79
|
+
expect(ok(await call("echo", { text: "hello" }))).toEqual({
|
|
80
|
+
content: [{ type: "text", text: "hello" }],
|
|
81
|
+
structuredContent: null,
|
|
82
|
+
isError: false,
|
|
83
|
+
})
|
|
84
|
+
expect(ok(await call("add", { a: 2, b: 3 }))).toMatchObject({ structuredContent: { sum: 5 }, isError: false })
|
|
85
|
+
expect(ok(await call("fail", {}))).toMatchObject({ isError: true })
|
|
86
|
+
// A tool the server does not have is the request's fault, not the server failing.
|
|
87
|
+
expect(failed(await call("no_such_tool", {}))).toMatchObject({ _tag: "InvalidInput" })
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
it("reads answers the server sends as an event stream", async () => {
|
|
91
|
+
const { connection } = await added()
|
|
92
|
+
open.setSse(true)
|
|
93
|
+
try {
|
|
94
|
+
expect(
|
|
95
|
+
ok(
|
|
96
|
+
await s.action(s.owner, "connections.callTool", {
|
|
97
|
+
connectionId: connection.id,
|
|
98
|
+
name: "echo",
|
|
99
|
+
arguments: { text: "streamed" },
|
|
100
|
+
}),
|
|
101
|
+
),
|
|
102
|
+
).toMatchObject({ content: [{ type: "text", text: "streamed" }] })
|
|
103
|
+
} finally {
|
|
104
|
+
open.setSse(false)
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
it("sends a named secret only in its header, never holding it in the Connection, the audit or an answer", async () => {
|
|
109
|
+
const put = await s.secrets(s.owner, "put", {
|
|
110
|
+
scope: { kind: "user", orgId: s.owner.org, userId: s.owner.id },
|
|
111
|
+
name: "mcp-key",
|
|
112
|
+
value: SECRET,
|
|
113
|
+
})
|
|
114
|
+
expect(put.status).toBe(200)
|
|
115
|
+
expect(JSON.stringify(put.body)).not.toContain(SECRET)
|
|
116
|
+
const result = await s.action(s.owner, "connections.add", {
|
|
117
|
+
provider,
|
|
118
|
+
endpoint: keyed.endpoint,
|
|
119
|
+
auth: { kind: "secret", scope: "user", name: "mcp-key", header: "x-mcp-key" },
|
|
120
|
+
})
|
|
121
|
+
const { connection } = ok(result)
|
|
122
|
+
expect(JSON.stringify(result)).not.toContain(SECRET)
|
|
123
|
+
ok(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))
|
|
124
|
+
expect(keyed.requests.filter((r) => r.path === "/mcp").every((r) => r.headers["x-mcp-key"] === SECRET)).toBe(true)
|
|
125
|
+
expect(keyed.requests.some((r) => r.headers["authorization"] !== undefined)).toBe(false)
|
|
126
|
+
for (const table of ["eloxiv.connection", "eloxiv.connection_flow", "eloxiv.audit_log"]) {
|
|
127
|
+
const rows = await s.sql(`SELECT t::text AS row FROM ${table} t`)
|
|
128
|
+
expect(
|
|
129
|
+
rows.some((r: any) => String(r.row).includes(SECRET)),
|
|
130
|
+
table,
|
|
131
|
+
).toBe(false)
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
it("refuses a secret that is not the caller's, missing, or restricted to other origins, before anything is sent", async () => {
|
|
136
|
+
const before = keyed.requests.length
|
|
137
|
+
const refused = async (auth: Record<string, unknown>) =>
|
|
138
|
+
failed(await s.action(s.owner, "connections.add", { provider, endpoint: keyed.endpoint, auth }))
|
|
139
|
+
expect(await refused({ kind: "secret", scope: "org", name: "billing-key" })).toMatchObject({
|
|
140
|
+
_tag: "InvalidInput",
|
|
141
|
+
})
|
|
142
|
+
expect(await refused({ kind: "secret", scope: "user", name: "never-put" })).toMatchObject({
|
|
143
|
+
_tag: "InvalidInput",
|
|
144
|
+
})
|
|
145
|
+
const put = await s.secrets(s.owner, "put", {
|
|
146
|
+
scope: { kind: "user", orgId: s.owner.org, userId: s.owner.id },
|
|
147
|
+
name: "elsewhere-key",
|
|
148
|
+
value: SECRET,
|
|
149
|
+
allowedOrigins: ["https://elsewhere.example"],
|
|
150
|
+
})
|
|
151
|
+
expect(put.body).toMatchObject({ allowedOrigins: ["https://elsewhere.example"] })
|
|
152
|
+
expect(
|
|
153
|
+
await refused({ kind: "secret", scope: "user", name: "elsewhere-key", header: "x-mcp-key" }),
|
|
154
|
+
).toMatchObject({ _tag: "InvalidInput" })
|
|
155
|
+
expect(keyed.requests.length).toBe(before)
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
it("connects over OAuth discovered from the server: a registered client, PKCE S256 and the resource, tokens only in custody", async () => {
|
|
159
|
+
const { connection, consent } = await added(s.owner, { endpoint: oauth.endpoint, auth: { kind: "oauth" } })
|
|
160
|
+
expect(connection).toMatchObject({ auth: "oauth", status: "needs-reauth", statusReason: "consent pending" })
|
|
161
|
+
expect(oauth.stats.registrations).toBe(1)
|
|
162
|
+
// Unusable until the person consents: nothing reaches the server.
|
|
163
|
+
const before = oauth.requests.filter((r) => r.path === "/mcp").length
|
|
164
|
+
expect(failed(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))).toMatchObject({
|
|
165
|
+
_tag: "Forbidden",
|
|
166
|
+
})
|
|
167
|
+
expect(oauth.requests.filter((r) => r.path === "/mcp").length).toBe(before)
|
|
168
|
+
expect(await s.consent(s.owner, consent!)).toBe(200)
|
|
169
|
+
expect(oauth.stats.codeExchanges).toBe(1)
|
|
170
|
+
const listed = ok(await s.action(s.owner, "connections.list", {})).connections.find(
|
|
171
|
+
(c: Connection) => c.id === connection.id,
|
|
172
|
+
)
|
|
173
|
+
expect(listed).toMatchObject({ status: "active" })
|
|
174
|
+
expect(ok(await s.action(s.owner, "connections.tools", { connectionId: connection.id })).tools).toHaveLength(5)
|
|
175
|
+
for (const table of ["eloxiv.connection", "eloxiv.connection_flow", "eloxiv.audit_log", "eloxiv.secret"]) {
|
|
176
|
+
const rows = await s.sql(`SELECT t::text AS row FROM ${table} t`)
|
|
177
|
+
for (const issued of oauth.issued) {
|
|
178
|
+
expect(
|
|
179
|
+
rows.some((r: any) => String(r.row).includes(issued)),
|
|
180
|
+
table,
|
|
181
|
+
).toBe(false)
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
it("refreshes once on a 401, and when the refresh is refused needs reauthorisation and fails fast", async () => {
|
|
187
|
+
const { connection, consent } = await added(s.owner, {
|
|
188
|
+
endpoint: oauth.endpoint,
|
|
189
|
+
auth: { kind: "oauth" },
|
|
190
|
+
label: "again",
|
|
191
|
+
})
|
|
192
|
+
expect(await s.consent(s.owner, consent!)).toBe(200)
|
|
193
|
+
const refreshes = oauth.stats.refreshes
|
|
194
|
+
oauth.expireAccessTokens()
|
|
195
|
+
ok(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))
|
|
196
|
+
expect(oauth.stats.refreshes).toBe(refreshes + 1)
|
|
197
|
+
oauth.expireAccessTokens()
|
|
198
|
+
oauth.revokeRefreshTokens()
|
|
199
|
+
expect(failed(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))).toMatchObject({
|
|
200
|
+
_tag: "Forbidden",
|
|
201
|
+
})
|
|
202
|
+
const [row] = await s.sql<{ status: string }>(`SELECT status FROM eloxiv.connection WHERE id = $1`, [
|
|
203
|
+
connection.id,
|
|
204
|
+
])
|
|
205
|
+
expect(row?.status).toBe("needs-reauth")
|
|
206
|
+
const seen = oauth.requests.length
|
|
207
|
+
expect(failed(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))).toMatchObject({
|
|
208
|
+
_tag: "Forbidden",
|
|
209
|
+
})
|
|
210
|
+
expect(oauth.requests.length).toBe(seen)
|
|
211
|
+
// Consenting again recovers the same Connection.
|
|
212
|
+
const again = ok(await s.action(s.owner, "connections.reconnect", { connectionId: connection.id }))
|
|
213
|
+
expect(await s.consent(s.owner, again)).toBe(200)
|
|
214
|
+
ok(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
it("never repeats a credential a provider echoes: not to callers, nor in the Connection, its audit or notifications", async () => {
|
|
218
|
+
const { connection, consent } = await added(s.owner, {
|
|
219
|
+
endpoint: oauth.endpoint,
|
|
220
|
+
auth: { kind: "oauth" },
|
|
221
|
+
label: "echo",
|
|
222
|
+
})
|
|
223
|
+
expect(await s.consent(s.owner, consent!)).toBe(200)
|
|
224
|
+
oauth.echoCredentials()
|
|
225
|
+
// An API error echoing the bearer token it was sent.
|
|
226
|
+
const echoed = failed(
|
|
227
|
+
await s.action(s.owner, "connections.callTool", { connectionId: connection.id, name: "echo", arguments: {} }),
|
|
228
|
+
)
|
|
229
|
+
// A refresh refused with an answer echoing the refresh token.
|
|
230
|
+
oauth.expireAccessTokens()
|
|
231
|
+
oauth.revokeRefreshTokens()
|
|
232
|
+
const refused = failed(await s.action(s.owner, "connections.tools", { connectionId: connection.id }))
|
|
233
|
+
expect(refused).toMatchObject({ _tag: "Forbidden" })
|
|
234
|
+
const [row] = await s.sql<{ status: string; status_reason: string }>(
|
|
235
|
+
`SELECT status, status_reason FROM eloxiv.connection WHERE id = $1`,
|
|
236
|
+
[connection.id],
|
|
237
|
+
)
|
|
238
|
+
expect(row).toMatchObject({
|
|
239
|
+
status: "needs-reauth",
|
|
240
|
+
status_reason: "the provider refused the refresh (HTTP 400)",
|
|
241
|
+
})
|
|
242
|
+
const kept = [
|
|
243
|
+
JSON.stringify(echoed),
|
|
244
|
+
JSON.stringify(refused),
|
|
245
|
+
JSON.stringify(await s.sql(`SELECT t::text AS row FROM eloxiv.connection t`)),
|
|
246
|
+
JSON.stringify(await s.sql(`SELECT t::text AS row FROM eloxiv.audit_log t`)),
|
|
247
|
+
JSON.stringify(await s.sql(`SELECT t::text AS row FROM eloxiv_notifications.notification t`)),
|
|
248
|
+
].join("\n")
|
|
249
|
+
expect(kept).toContain("Bad request made with")
|
|
250
|
+
for (const issued of oauth.issued) expect(kept.includes(issued), issued).toBe(false)
|
|
251
|
+
})
|
|
252
|
+
|
|
253
|
+
it("reports a 403 as a refusal and never refreshes on it", async () => {
|
|
254
|
+
const { connection, consent } = await added(s.owner, { endpoint: oauth.endpoint, auth: { kind: "oauth" } })
|
|
255
|
+
expect(await s.consent(s.owner, consent!)).toBe(200)
|
|
256
|
+
const refreshes = oauth.stats.refreshes
|
|
257
|
+
oauth.forbidNextCall()
|
|
258
|
+
expect(
|
|
259
|
+
failed(
|
|
260
|
+
await s.action(s.owner, "connections.callTool", { connectionId: connection.id, name: "echo", arguments: {} }),
|
|
261
|
+
),
|
|
262
|
+
).toMatchObject({ _tag: "Forbidden" })
|
|
263
|
+
expect(oauth.stats.refreshes).toBe(refreshes)
|
|
264
|
+
const [row] = await s.sql<{ status: string }>(`SELECT status FROM eloxiv.connection WHERE id = $1`, [
|
|
265
|
+
connection.id,
|
|
266
|
+
])
|
|
267
|
+
expect(row?.status).toBe("active")
|
|
268
|
+
})
|
|
269
|
+
|
|
270
|
+
it("exposes only the tools the Connection allows: others are neither listed nor sent", async () => {
|
|
271
|
+
const { connection } = await added(s.owner, { tools: ["echo"], label: "limited" })
|
|
272
|
+
expect(
|
|
273
|
+
ok(await s.action(s.owner, "connections.tools", { connectionId: connection.id })).tools.map((t: any) => t.name),
|
|
274
|
+
).toEqual(["echo"])
|
|
275
|
+
const calls = open.calls.length
|
|
276
|
+
expect(
|
|
277
|
+
failed(
|
|
278
|
+
await s.action(s.owner, "connections.callTool", {
|
|
279
|
+
connectionId: connection.id,
|
|
280
|
+
name: "create_issue",
|
|
281
|
+
arguments: {},
|
|
282
|
+
}),
|
|
283
|
+
),
|
|
284
|
+
).toMatchObject({ _tag: "Forbidden" })
|
|
285
|
+
expect(open.calls.length).toBe(calls)
|
|
286
|
+
})
|
|
287
|
+
|
|
288
|
+
it("refuses an endpoint that is not public unless the deployment allows its host, sending nothing", async () => {
|
|
289
|
+
for (const endpoint of [
|
|
290
|
+
open.endpoint.replace(/:\d+\//u, ":1/"),
|
|
291
|
+
"http://169.254.169.254/latest/meta-data",
|
|
292
|
+
"https://10.0.0.1/mcp",
|
|
293
|
+
"https://[::1]/mcp",
|
|
294
|
+
"https://localhost/mcp",
|
|
295
|
+
"ftp://example.com/mcp",
|
|
296
|
+
]) {
|
|
297
|
+
expect(failed(await add(s.owner, { endpoint })), endpoint).toMatchObject({ _tag: "InvalidInput" })
|
|
298
|
+
}
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
it("never lets an agent send the person's secret to an endpoint it picks: each add and grant waits for the person", async () => {
|
|
302
|
+
const attacker = await startMcpFake({ auth: { kind: "none" } })
|
|
303
|
+
try {
|
|
304
|
+
const put = await s.secrets(s.owner, "put", {
|
|
305
|
+
scope: { kind: "user", orgId: s.owner.org, userId: s.owner.id },
|
|
306
|
+
name: "agent-target-key",
|
|
307
|
+
value: SECRET,
|
|
308
|
+
})
|
|
309
|
+
expect(put.status).toBe(200)
|
|
310
|
+
const addAs = (endpoint: string) =>
|
|
311
|
+
s.action(
|
|
312
|
+
s.owner,
|
|
313
|
+
"connections.add",
|
|
314
|
+
{
|
|
315
|
+
provider,
|
|
316
|
+
endpoint,
|
|
317
|
+
auth: { kind: "secret", scope: "user", name: "agent-target-key", header: "x-mcp-key" },
|
|
318
|
+
},
|
|
319
|
+
"agent",
|
|
320
|
+
)
|
|
321
|
+
// The person approves one add and remembers it "always": the next add, to another endpoint, is still held.
|
|
322
|
+
const first = failed(await addAs(open.endpoint))
|
|
323
|
+
expect(first).toMatchObject({ _tag: "ConsentRequired" })
|
|
324
|
+
ok(await s.action(s.owner, "consent.approve", { id: first.consentId, remember: "always" }))
|
|
325
|
+
expect(failed(await addAs(attacker.endpoint))).toMatchObject({ _tag: "ConsentRequired" })
|
|
326
|
+
expect(await s.sql(`SELECT id FROM eloxiv.connection WHERE endpoint = $1`, [attacker.endpoint])).toEqual([])
|
|
327
|
+
expect(attacker.requests).toEqual([])
|
|
328
|
+
// A grant widens who uses the organisation's credential: approved once, the next grant is still held.
|
|
329
|
+
const { connection } = await added(s.admin, { shared: true, label: "agent grant" })
|
|
330
|
+
const grantAs = (grantee: Record<string, unknown>) =>
|
|
331
|
+
s.action(s.admin, "connections.grant", { connectionId: connection.id, grantee }, "agent")
|
|
332
|
+
const held = failed(await grantAs({ kind: "user", id: s.owner.id }))
|
|
333
|
+
expect(held).toMatchObject({ _tag: "ConsentRequired" })
|
|
334
|
+
ok(await s.action(s.admin, "consent.approve", { id: held.consentId, remember: "always" }))
|
|
335
|
+
expect(failed(await grantAs({ kind: "org" }))).toMatchObject({ _tag: "ConsentRequired" })
|
|
336
|
+
expect(ok(await s.action(s.admin, "connections.grants", { connectionId: connection.id })).grants).toEqual([])
|
|
337
|
+
} finally {
|
|
338
|
+
await attacker.close()
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
|
|
342
|
+
it("sends a named OAuth client secret only to a token endpoint its destinations allow, checked again at each exchange", async () => {
|
|
343
|
+
const scope = { kind: "user", orgId: s.owner.org, userId: s.owner.id }
|
|
344
|
+
const put = (allowedOrigins: ReadonlyArray<string>) =>
|
|
345
|
+
s.secrets(s.owner, "put", { scope, name: "given-client-secret", value: GIVEN_CLIENT.secret, allowedOrigins })
|
|
346
|
+
const oauthWithGiven = () =>
|
|
347
|
+
s.action(s.owner, "connections.add", {
|
|
348
|
+
provider,
|
|
349
|
+
endpoint: oauth.endpoint,
|
|
350
|
+
label: "given client",
|
|
351
|
+
auth: {
|
|
352
|
+
kind: "oauth",
|
|
353
|
+
clientId: GIVEN_CLIENT.id,
|
|
354
|
+
clientSecret: { scope: "user", name: "given-client-secret" },
|
|
355
|
+
},
|
|
356
|
+
})
|
|
357
|
+
// Restricted to another origin than the token endpoint the metadata names: refused when added.
|
|
358
|
+
expect((await put(["https://elsewhere.example"])).status).toBe(200)
|
|
359
|
+
expect(failed(await oauthWithGiven())).toMatchObject({ _tag: "InvalidInput" })
|
|
360
|
+
// Allowed there: added; then restricted before the code is exchanged: the exchange never happens.
|
|
361
|
+
expect((await put([oauth.url])).status).toBe(200)
|
|
362
|
+
const { consent } = ok(await oauthWithGiven())
|
|
363
|
+
expect((await put(["https://elsewhere.example"])).status).toBe(200)
|
|
364
|
+
const exchanges = oauth.stats.codeExchanges
|
|
365
|
+
expect(await s.consent(s.owner, consent)).not.toBe(200)
|
|
366
|
+
expect(oauth.stats.codeExchanges).toBe(exchanges)
|
|
367
|
+
// Allowed again: the next consent exchanges its code with the secret.
|
|
368
|
+
expect((await put([oauth.url])).status).toBe(200)
|
|
369
|
+
const again = ok(await oauthWithGiven())
|
|
370
|
+
expect(await s.consent(s.owner, again.consent)).toBe(200)
|
|
371
|
+
expect(oauth.stats.codeExchanges).toBe(exchanges + 1)
|
|
372
|
+
})
|
|
373
|
+
|
|
374
|
+
it("refuses a request that waited for a slot once the grant it waited under is revoked, sending nothing", async () => {
|
|
375
|
+
try {
|
|
376
|
+
// A shared server the member is granted, and four calls holding its four slots.
|
|
377
|
+
const { connection } = ok(
|
|
378
|
+
await s.action(s.admin, "connections.add", {
|
|
379
|
+
provider,
|
|
380
|
+
endpoint: open.endpoint,
|
|
381
|
+
label: "slots",
|
|
382
|
+
auth: { kind: "none" },
|
|
383
|
+
shared: true,
|
|
384
|
+
}),
|
|
385
|
+
)
|
|
386
|
+
ok(
|
|
387
|
+
await s.action(s.admin, "connections.grant", {
|
|
388
|
+
connectionId: connection.id,
|
|
389
|
+
grantee: { kind: "user", id: s.owner.id },
|
|
390
|
+
}),
|
|
391
|
+
)
|
|
392
|
+
open.setDelay(600)
|
|
393
|
+
const initialised = () => open.requests.filter((r) => r.rpc === "initialize").length
|
|
394
|
+
const before = initialised()
|
|
395
|
+
const calls = Array.from({ length: 5 }, () => s.call(connection.id, s.owner, "tools", "listTools", {}))
|
|
396
|
+
await new Promise((r) => setTimeout(r, 150))
|
|
397
|
+
ok(
|
|
398
|
+
await s.action(s.admin, "connections.revoke", {
|
|
399
|
+
connectionId: connection.id,
|
|
400
|
+
grantee: { kind: "user", id: s.owner.id },
|
|
401
|
+
}),
|
|
402
|
+
)
|
|
403
|
+
const results = await Promise.all(calls)
|
|
404
|
+
open.setDelay(0)
|
|
405
|
+
// The fifth waited for a slot past the revocation: it never reached the server.
|
|
406
|
+
expect(initialised() - before).toBe(4)
|
|
407
|
+
expect(results.every((r) => !r.ok)).toBe(true)
|
|
408
|
+
} finally {
|
|
409
|
+
open.setDelay(0)
|
|
410
|
+
}
|
|
411
|
+
})
|
|
412
|
+
|
|
413
|
+
it("gives up an authorization server's metadata past its bound, while it streams", async () => {
|
|
414
|
+
oauth.setEndlessMetadata(true)
|
|
415
|
+
try {
|
|
416
|
+
const started = Date.now()
|
|
417
|
+
const result = await s.action(s.owner, "connections.add", {
|
|
418
|
+
provider,
|
|
419
|
+
endpoint: oauth.endpoint,
|
|
420
|
+
label: "endless",
|
|
421
|
+
auth: { kind: "oauth" },
|
|
422
|
+
})
|
|
423
|
+
expect(failed(result)).toMatchObject({ _tag: "InvalidInput" })
|
|
424
|
+
expect(Date.now() - started).toBeLessThan(5_000)
|
|
425
|
+
} finally {
|
|
426
|
+
oauth.setEndlessMetadata(false)
|
|
427
|
+
}
|
|
428
|
+
})
|
|
429
|
+
|
|
430
|
+
it("holds an agent's tool call for the person's consent, sending nothing until approved", async () => {
|
|
431
|
+
const { connection } = await added()
|
|
432
|
+
const calls = open.calls.length
|
|
433
|
+
const held = failed(
|
|
434
|
+
await s.action(
|
|
435
|
+
s.owner,
|
|
436
|
+
"connections.callTool",
|
|
437
|
+
{ connectionId: connection.id, name: "create_issue", arguments: {} },
|
|
438
|
+
"agent",
|
|
439
|
+
),
|
|
440
|
+
)
|
|
441
|
+
expect(held).toMatchObject({ _tag: "ConsentRequired" })
|
|
442
|
+
expect(open.calls.length).toBe(calls)
|
|
443
|
+
})
|
|
444
|
+
|
|
445
|
+
it("uses a shared server only for the members and groups it is granted to, and from a module only when granted to it", async () => {
|
|
446
|
+
const outsider = await s.member("outsider")
|
|
447
|
+
expect(failed(await add(s.owner, { shared: true }))).toMatchObject({ _tag: "Forbidden" })
|
|
448
|
+
const { connection } = await added(s.admin, { shared: true, label: "team server" })
|
|
449
|
+
expect(connection.shared).toBe(true)
|
|
450
|
+
const tools = (user = s.owner) => s.action(user, "connections.tools", { connectionId: connection.id })
|
|
451
|
+
expect(failed(await tools())).toMatchObject({ _tag: "Forbidden" })
|
|
452
|
+
expect(failed(await tools(s.admin))).toMatchObject({ _tag: "Forbidden" })
|
|
453
|
+
ok(
|
|
454
|
+
await s.action(s.admin, "connections.grant", {
|
|
455
|
+
connectionId: connection.id,
|
|
456
|
+
grantee: { kind: "user", id: s.owner.id },
|
|
457
|
+
}),
|
|
458
|
+
)
|
|
459
|
+
ok(await tools())
|
|
460
|
+
expect(failed(await tools(outsider))).toMatchObject({ _tag: "Forbidden" })
|
|
461
|
+
expect(ok(await s.action(s.owner, "connections.list", {})).connections.map((c: Connection) => c.id)).toContain(
|
|
462
|
+
connection.id,
|
|
463
|
+
)
|
|
464
|
+
expect(
|
|
465
|
+
ok(await s.action(outsider, "connections.list", {})).connections.map((c: Connection) => c.id),
|
|
466
|
+
).not.toContain(connection.id)
|
|
467
|
+
// A module's handler needs a grant to the module as well.
|
|
468
|
+
expect(failed(await s.call(connection.id, s.owner, "tools", "listTools", {}, "notes"))).toMatchObject({
|
|
469
|
+
_tag: "Forbidden",
|
|
470
|
+
})
|
|
471
|
+
ok(
|
|
472
|
+
await s.action(s.admin, "connections.grant", {
|
|
473
|
+
connectionId: connection.id,
|
|
474
|
+
grantee: { kind: "module", id: "notes" },
|
|
475
|
+
}),
|
|
476
|
+
)
|
|
477
|
+
ok(await s.call(connection.id, s.owner, "tools", "listTools", {}, "notes"))
|
|
478
|
+
expect(failed(await s.call(connection.id, s.owner, "tools", "listTools", {}, "mail"))).toMatchObject({
|
|
479
|
+
_tag: "Forbidden",
|
|
480
|
+
})
|
|
481
|
+
// A group's members, as the group is on each use.
|
|
482
|
+
await s.sql(`INSERT INTO eloxiv.org_group (org_id, id, name) VALUES ($1, 'ops', 'Ops')`, [outsider.org])
|
|
483
|
+
ok(
|
|
484
|
+
await s.action(s.admin, "connections.grant", {
|
|
485
|
+
connectionId: connection.id,
|
|
486
|
+
grantee: { kind: "group", id: "ops" },
|
|
487
|
+
}),
|
|
488
|
+
)
|
|
489
|
+
expect(failed(await tools(outsider))).toMatchObject({ _tag: "Forbidden" })
|
|
490
|
+
await s.sql(`INSERT INTO eloxiv.group_member (org_id, group_id, user_id) VALUES ($1, 'ops', $2)`, [
|
|
491
|
+
outsider.org,
|
|
492
|
+
outsider.id,
|
|
493
|
+
])
|
|
494
|
+
ok(await tools(outsider))
|
|
495
|
+
await s.sql(`DELETE FROM eloxiv.group_member WHERE org_id = $1 AND group_id = 'ops' AND user_id = $2`, [
|
|
496
|
+
outsider.org,
|
|
497
|
+
outsider.id,
|
|
498
|
+
])
|
|
499
|
+
expect(failed(await tools(outsider))).toMatchObject({ _tag: "Forbidden" })
|
|
500
|
+
// Granting needs the permission; revoking takes effect on the next use.
|
|
501
|
+
expect(
|
|
502
|
+
failed(await s.action(s.owner, "connections.grant", { connectionId: connection.id, grantee: { kind: "org" } })),
|
|
503
|
+
).toMatchObject({ _tag: "Forbidden" })
|
|
504
|
+
ok(
|
|
505
|
+
await s.action(s.admin, "connections.revoke", {
|
|
506
|
+
connectionId: connection.id,
|
|
507
|
+
grantee: { kind: "user", id: s.owner.id },
|
|
508
|
+
}),
|
|
509
|
+
)
|
|
510
|
+
expect(failed(await tools())).toMatchObject({ _tag: "Forbidden" })
|
|
511
|
+
})
|
|
512
|
+
|
|
513
|
+
describe("MCP App sessions (headless)", () => {
|
|
514
|
+
const openBoard = async (user = s.owner, connectionId: string) =>
|
|
515
|
+
ok(await s.action(user, "connections.openApp", { connectionId, tool: "show_board" })) as {
|
|
516
|
+
session: { id: string; tools: ReadonlyArray<string>; resourceUri: string }
|
|
517
|
+
resource: { uri: string; mimeType: string; text: string; meta: unknown }
|
|
518
|
+
tools: ReadonlyArray<{ name: string }>
|
|
519
|
+
}
|
|
520
|
+
const appCall = (user: typeof s.owner, sessionId: string, name: string, origin?: "agent") =>
|
|
521
|
+
s.action(user, "connections.appCall", { sessionId, name, arguments: { text: name } }, origin)
|
|
522
|
+
|
|
523
|
+
it("opens a session on a tool's ui:// view and calls through it: the app's tools only, an agent's call held for consent", async () => {
|
|
524
|
+
const { connection } = await added(s.owner, { endpoint: apps.endpoint, label: "board" })
|
|
525
|
+
const opened = await openBoard(s.owner, connection.id)
|
|
526
|
+
expect(opened.resource).toEqual({
|
|
527
|
+
uri: BOARD_VIEW.uri,
|
|
528
|
+
mimeType: BOARD_VIEW.mimeType,
|
|
529
|
+
text: BOARD_VIEW.text,
|
|
530
|
+
blob: null,
|
|
531
|
+
meta: BOARD_VIEW._meta,
|
|
532
|
+
})
|
|
533
|
+
// The view may call what the server lets an app call: never the model-only tool.
|
|
534
|
+
expect(opened.session.tools).toContain("move_card")
|
|
535
|
+
expect(opened.session.tools).toContain("echo")
|
|
536
|
+
expect(opened.session.tools).not.toContain("model_only")
|
|
537
|
+
expect(opened.tools.map((t) => t.name)).toEqual(opened.session.tools)
|
|
538
|
+
expect(ok(await appCall(s.owner, opened.session.id, "move_card"))).toMatchObject({
|
|
539
|
+
content: [{ type: "text", text: "move_card" }],
|
|
540
|
+
isError: false,
|
|
541
|
+
})
|
|
542
|
+
const calls = apps.calls.length
|
|
543
|
+
expect(failed(await appCall(s.owner, opened.session.id, "model_only"))).toMatchObject({ _tag: "Forbidden" })
|
|
544
|
+
// The same consent as connections.callTool: an agent's call waits for the person, sending nothing.
|
|
545
|
+
expect(failed(await appCall(s.owner, opened.session.id, "move_card", "agent"))).toMatchObject({
|
|
546
|
+
_tag: "ConsentRequired",
|
|
547
|
+
})
|
|
548
|
+
expect(apps.calls.length).toBe(calls)
|
|
549
|
+
// A tool without a view opens no session; nor does one the Connection does not expose.
|
|
550
|
+
expect(
|
|
551
|
+
failed(await s.action(s.owner, "connections.openApp", { connectionId: connection.id, tool: "echo" })),
|
|
552
|
+
).toMatchObject({ _tag: "InvalidInput" })
|
|
553
|
+
const { connection: limited } = await added(s.owner, {
|
|
554
|
+
endpoint: apps.endpoint,
|
|
555
|
+
label: "board limited",
|
|
556
|
+
tools: ["echo"],
|
|
557
|
+
})
|
|
558
|
+
expect(
|
|
559
|
+
failed(await s.action(s.owner, "connections.openApp", { connectionId: limited.id, tool: "show_board" })),
|
|
560
|
+
).toMatchObject({ _tag: "InvalidInput" })
|
|
561
|
+
})
|
|
562
|
+
|
|
563
|
+
it("refuses a session's calls once it is closed, or once the shared server's grant is revoked, sending nothing", async () => {
|
|
564
|
+
const { connection } = await added(s.owner, { endpoint: apps.endpoint, label: "board to close" })
|
|
565
|
+
const opened = await openBoard(s.owner, connection.id)
|
|
566
|
+
ok(await s.action(s.owner, "connections.closeApp", { sessionId: opened.session.id }))
|
|
567
|
+
const calls = apps.calls.length
|
|
568
|
+
expect(failed(await appCall(s.owner, opened.session.id, "move_card"))).toMatchObject({ _tag: "Forbidden" })
|
|
569
|
+
const { connection: shared } = await added(s.admin, {
|
|
570
|
+
endpoint: apps.endpoint,
|
|
571
|
+
label: "team board",
|
|
572
|
+
shared: true,
|
|
573
|
+
})
|
|
574
|
+
const grantee = { kind: "user", id: s.owner.id }
|
|
575
|
+
ok(await s.action(s.admin, "connections.grant", { connectionId: shared.id, grantee }))
|
|
576
|
+
const granted = await openBoard(s.owner, shared.id)
|
|
577
|
+
ok(await appCall(s.owner, granted.session.id, "move_card"))
|
|
578
|
+
ok(await s.action(s.admin, "connections.revoke", { connectionId: shared.id, grantee }))
|
|
579
|
+
const before = apps.calls.length
|
|
580
|
+
expect(failed(await appCall(s.owner, granted.session.id, "move_card"))).toMatchObject({ _tag: "Forbidden" })
|
|
581
|
+
expect(apps.calls.length).toBe(before)
|
|
582
|
+
expect(before).toBe(calls + 1)
|
|
583
|
+
})
|
|
584
|
+
|
|
585
|
+
it("is its person's alone: another member cannot call through or close it", async () => {
|
|
586
|
+
const other = await s.member("app-viewer")
|
|
587
|
+
const { connection } = await added(s.owner, { endpoint: apps.endpoint, label: "my board" })
|
|
588
|
+
const opened = await openBoard(s.owner, connection.id)
|
|
589
|
+
const calls = apps.calls.length
|
|
590
|
+
expect(failed(await appCall(other, opened.session.id, "move_card"))).toMatchObject({ _tag: "Forbidden" })
|
|
591
|
+
ok(await s.action(other, "connections.closeApp", { sessionId: opened.session.id }))
|
|
592
|
+
expect(apps.calls.length).toBe(calls)
|
|
593
|
+
// Still the owner's, open.
|
|
594
|
+
ok(await appCall(s.owner, opened.session.id, "move_card"))
|
|
595
|
+
})
|
|
596
|
+
|
|
597
|
+
it("refuses a session that expired while its call waited before the session check, sending nothing", async () => {
|
|
598
|
+
const { connection } = await added(s.owner, { endpoint: apps.endpoint, label: "board expiring" })
|
|
599
|
+
const opened = await openBoard(s.owner, connection.id)
|
|
600
|
+
const [expiry] = await s.sql<{ at: number }>(
|
|
601
|
+
`UPDATE eloxiv.mcp_app_session SET expires_at = clock_timestamp() + interval '3 seconds' WHERE id = $1
|
|
602
|
+
RETURNING (extract(epoch FROM expires_at) * 1000)::float8 AS at`,
|
|
603
|
+
[opened.session.id],
|
|
604
|
+
)
|
|
605
|
+
const [database] = await s.sql<{ name: string }>(`SELECT current_database() AS name`)
|
|
606
|
+
const calls = apps.calls.length
|
|
607
|
+
let pending: ReturnType<typeof appCall> | undefined
|
|
608
|
+
try {
|
|
609
|
+
// The call starts before expiry, then waits on the session table until after it.
|
|
610
|
+
const lock = await holding(database!.name, "LOCK TABLE eloxiv.mcp_app_session IN ACCESS EXCLUSIVE MODE")
|
|
611
|
+
pending = appCall(s.owner, opened.session.id, "move_card")
|
|
612
|
+
expect(await waitedFor(s.sql, lock.pid)).toBe(true)
|
|
613
|
+
await new Promise((r) => setTimeout(r, Math.max(0, expiry!.at - Date.now() + 200)))
|
|
614
|
+
await lock.release()
|
|
615
|
+
expect(failed(await pending)).toMatchObject({ _tag: "Forbidden" })
|
|
616
|
+
expect(apps.calls.length).toBe(calls)
|
|
617
|
+
} finally {
|
|
618
|
+
await releaseAll()
|
|
619
|
+
await pending?.catch(() => undefined)
|
|
620
|
+
}
|
|
621
|
+
})
|
|
622
|
+
})
|
|
623
|
+
|
|
624
|
+
it("keeps a shared server working after the administrator who added it leaves", async () => {
|
|
625
|
+
const leaving = await s.member("leaving-admin", ["member", "admin"])
|
|
626
|
+
const { connection } = await added(leaving, { shared: true, label: "left behind", tools: ["echo"] })
|
|
627
|
+
ok(await s.action(leaving, "connections.grant", { connectionId: connection.id, grantee: { kind: "org" } }))
|
|
628
|
+
await s.sql(`DELETE FROM eloxiv.membership WHERE org_id = $1 AND user_id = $2`, [leaving.org, leaving.id])
|
|
629
|
+
expect(ok(await s.action(s.owner, "connections.tools", { connectionId: connection.id })).tools).toHaveLength(1)
|
|
630
|
+
})
|
|
631
|
+
})
|
|
632
|
+
}
|