@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,437 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the ActionConsent contract (docs/contracts/action-consent.md) on the inbox
|
|
3
|
+
* conformance app, whose `purchases.wire` is marked `consent` (it is destructive).
|
|
4
|
+
*
|
|
5
|
+
* An agent's call is held, bound to its exact prepared input, until the person approves it; approval may be
|
|
6
|
+
* remembered for the agent session or always, and revoked. Agent origin comes from the surface (agent
|
|
7
|
+
* tools, MCP) or the credential (an agent session, on every surface), never from a header; an agent can
|
|
8
|
+
* never decide consent; a person's own calls are never held.
|
|
9
|
+
*
|
|
10
|
+
* Usage, in a Vitest file: `actionConsentConformance(() => startMyKernel())`.
|
|
11
|
+
*/
|
|
12
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest"
|
|
13
|
+
import { canonicalJsonForKit, sha256ForKit } from "./kit-hash.ts"
|
|
14
|
+
import {
|
|
15
|
+
unique,
|
|
16
|
+
until,
|
|
17
|
+
type InboxCall,
|
|
18
|
+
type InboxOutcome,
|
|
19
|
+
type InboxSubject,
|
|
20
|
+
type InboxUser,
|
|
21
|
+
type StartInboxSubject,
|
|
22
|
+
} from "./InboxSubject.ts"
|
|
23
|
+
|
|
24
|
+
const ORG = "acme"
|
|
25
|
+
|
|
26
|
+
export const actionConsentConformance = (start: StartInboxSubject) =>
|
|
27
|
+
describe("ActionConsent contract", () => {
|
|
28
|
+
let s: InboxSubject
|
|
29
|
+
let pia: InboxUser
|
|
30
|
+
|
|
31
|
+
beforeAll(async () => {
|
|
32
|
+
s = await start()
|
|
33
|
+
pia = await s.user("pia", ORG)
|
|
34
|
+
}, 120_000)
|
|
35
|
+
afterAll(() => s?.dispose())
|
|
36
|
+
|
|
37
|
+
const wire = (call: Omit<InboxCall, "action" | "input"> & { readonly payee: string; readonly amount?: number }) =>
|
|
38
|
+
s.invoke({ ...call, action: "purchases.wire", input: { amount: call.amount ?? 10, payee: call.payee } })
|
|
39
|
+
const consentOf = (outcome: InboxOutcome) => {
|
|
40
|
+
if (outcome.ok || outcome.error._tag !== "ConsentRequired") {
|
|
41
|
+
throw new Error(`Expected ConsentRequired, got ${JSON.stringify(outcome)}`)
|
|
42
|
+
}
|
|
43
|
+
return outcome.error["consentId"] as string
|
|
44
|
+
}
|
|
45
|
+
const transfers = async (payee: string) =>
|
|
46
|
+
s.sql<{ id: string; owner_id: string }>(`SELECT id, owner_id FROM purchases.transfer WHERE payee = $1`, [payee])
|
|
47
|
+
const consent = async (id: string) =>
|
|
48
|
+
(
|
|
49
|
+
await s.sql<{
|
|
50
|
+
status: string
|
|
51
|
+
input: unknown
|
|
52
|
+
input_hash: string
|
|
53
|
+
user_id: string
|
|
54
|
+
session: string
|
|
55
|
+
title: string
|
|
56
|
+
}>(`SELECT status, input, input_hash, user_id, session, title FROM eloxiv_consent.request WHERE id = $1`, [id])
|
|
57
|
+
)[0]
|
|
58
|
+
const decide = (
|
|
59
|
+
id: string,
|
|
60
|
+
verdict: "approve" | "reject",
|
|
61
|
+
remember?: "once" | "session" | "always",
|
|
62
|
+
token = pia.token,
|
|
63
|
+
surface: InboxCall["surface"] = "rpc",
|
|
64
|
+
) =>
|
|
65
|
+
s.invoke({
|
|
66
|
+
action: `consent.${verdict}`,
|
|
67
|
+
input: verdict === "approve" && remember !== undefined ? { id, remember } : { id },
|
|
68
|
+
token,
|
|
69
|
+
surface,
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it("never holds a person's own call", async () => {
|
|
73
|
+
const payee = unique("own")
|
|
74
|
+
for (const surface of ["internal", "rpc", "http"] as const) {
|
|
75
|
+
expect(await wire({ token: pia.token, surface, payee }), surface).toMatchObject({ ok: true })
|
|
76
|
+
}
|
|
77
|
+
expect(await transfers(payee)).toHaveLength(3)
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it("holds an agent's call, bound to its exact input, with a work item and a notification for the person", async () => {
|
|
81
|
+
const payee = unique("held")
|
|
82
|
+
const outcome = await wire({
|
|
83
|
+
token: pia.token,
|
|
84
|
+
surface: "agent",
|
|
85
|
+
payee,
|
|
86
|
+
amount: 42,
|
|
87
|
+
idempotencyKey: unique("call"),
|
|
88
|
+
})
|
|
89
|
+
const id = consentOf(outcome)
|
|
90
|
+
expect(await transfers(payee)).toEqual([])
|
|
91
|
+
const held = await consent(id)
|
|
92
|
+
// The request keeps what people see the action called (its title) as it was when the call was held.
|
|
93
|
+
expect(held).toMatchObject({
|
|
94
|
+
status: "pending",
|
|
95
|
+
user_id: pia.id,
|
|
96
|
+
title: "Wire money",
|
|
97
|
+
input: { amount: 42, payee },
|
|
98
|
+
})
|
|
99
|
+
expect(held!.input_hash).toBe(await sha256ForKit(canonicalJsonForKit({ amount: 42, payee })))
|
|
100
|
+
const items = await s.sql<{ assignee_user_id: string; state: string; title: string }>(
|
|
101
|
+
`SELECT assignee_user_id, state, title FROM eloxiv_inbox.work_item WHERE source = 'consent.requests' AND source_id = $1`,
|
|
102
|
+
[id],
|
|
103
|
+
)
|
|
104
|
+
expect(items).toEqual([{ assignee_user_id: pia.id, state: "open", title: "Your agent wants to: Wire money" }])
|
|
105
|
+
const notes = await s.sql<{ title: string }>(
|
|
106
|
+
`SELECT title FROM eloxiv_notifications.notification WHERE recipient_id = $1 AND category = 'consent.requested' AND link_id = $2`,
|
|
107
|
+
[pia.id, id],
|
|
108
|
+
)
|
|
109
|
+
expect(notes).toEqual([{ title: "Your agent wants to: Wire money" }])
|
|
110
|
+
const audit = (await s.audit({ action: "purchases.wire" })).at(-1)
|
|
111
|
+
expect(audit).toMatchObject({ outcome: "approval-required", errorTag: "ConsentRequired", surface: "agent" })
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
it("asks once for the same held call", async () => {
|
|
115
|
+
const payee = unique("once")
|
|
116
|
+
const key = unique("call")
|
|
117
|
+
const first = consentOf(await wire({ token: pia.token, surface: "agent", payee, idempotencyKey: key }))
|
|
118
|
+
expect(consentOf(await wire({ token: pia.token, surface: "agent", payee, idempotencyKey: key }))).toBe(first)
|
|
119
|
+
// A new tool call with the same input, while the first waits, is the same request.
|
|
120
|
+
expect(consentOf(await wire({ token: pia.token, surface: "agent", payee, idempotencyKey: unique("call") }))).toBe(
|
|
121
|
+
first,
|
|
122
|
+
)
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
it("never lets an agent decide consent for the person, on any surface", async () => {
|
|
126
|
+
const payee = unique("self-approve")
|
|
127
|
+
const id = consentOf(await wire({ token: pia.token, surface: "agent", payee }))
|
|
128
|
+
const agent = await s.agentSession(pia, ORG)
|
|
129
|
+
for (const [token, surface] of [
|
|
130
|
+
[pia.token, "agent"],
|
|
131
|
+
[pia.token, "mcp"],
|
|
132
|
+
[agent.token, "rpc"],
|
|
133
|
+
[agent.token, "http"],
|
|
134
|
+
] as const) {
|
|
135
|
+
const outcome = await decide(id, "approve", "always", token, surface)
|
|
136
|
+
expect(outcome, surface).toMatchObject({ ok: false, error: { _tag: "Forbidden" } })
|
|
137
|
+
}
|
|
138
|
+
expect(await consent(id)).toMatchObject({ status: "pending" })
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
it("runs the exact approved call once when the agent retries it; other input is held again", async () => {
|
|
142
|
+
const payee = unique("approved")
|
|
143
|
+
const key = unique("call")
|
|
144
|
+
const id = consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 5, idempotencyKey: key }))
|
|
145
|
+
expect(await decide(id, "approve", "once")).toMatchObject({ ok: true })
|
|
146
|
+
expect(await wire({ token: pia.token, surface: "agent", payee, amount: 5, idempotencyKey: key })).toMatchObject({
|
|
147
|
+
ok: true,
|
|
148
|
+
result: { kind: "output" },
|
|
149
|
+
})
|
|
150
|
+
// Retrying the same tool call replays; it does not run again or ask again.
|
|
151
|
+
expect(await wire({ token: pia.token, surface: "agent", payee, amount: 5, idempotencyKey: key })).toMatchObject({
|
|
152
|
+
ok: true,
|
|
153
|
+
result: { kind: "replay" },
|
|
154
|
+
})
|
|
155
|
+
expect(await transfers(payee)).toHaveLength(1)
|
|
156
|
+
expect(await consent(id)).toMatchObject({ status: "used" })
|
|
157
|
+
// The approval bound that input: a different amount is a new request.
|
|
158
|
+
consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 6 }))
|
|
159
|
+
expect(await transfers(payee)).toHaveLength(1)
|
|
160
|
+
// The work item closed when the person decided.
|
|
161
|
+
const [item] = await s.sql<{ state: string }>(
|
|
162
|
+
`SELECT state FROM eloxiv_inbox.work_item WHERE source = 'consent.requests' AND source_id = $1`,
|
|
163
|
+
[id],
|
|
164
|
+
)
|
|
165
|
+
expect(item?.state).toBe("done")
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
it("lets later calls through once the person remembers the permission, on every agent surface, until revoked", async () => {
|
|
169
|
+
const payee = unique("always")
|
|
170
|
+
const id = consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 1 }))
|
|
171
|
+
const approved = await decide(id, "approve", "always")
|
|
172
|
+
expect(approved).toMatchObject({ ok: true })
|
|
173
|
+
const grantId = (approved as { result: { output: { grantId: string } } }).result.output.grantId
|
|
174
|
+
const agent = await s.agentSession(pia, ORG)
|
|
175
|
+
expect(await wire({ token: pia.token, surface: "agent", payee, amount: 2 })).toMatchObject({ ok: true })
|
|
176
|
+
expect(await wire({ token: pia.token, surface: "mcp", payee, amount: 3 })).toMatchObject({ ok: true })
|
|
177
|
+
expect(await wire({ token: agent.token, surface: "rpc", payee, amount: 4 })).toMatchObject({ ok: true })
|
|
178
|
+
expect(await transfers(payee)).toHaveLength(3)
|
|
179
|
+
// An agent cannot revoke it; the person can, and the next agent call is held again.
|
|
180
|
+
expect(
|
|
181
|
+
await s.invoke({ action: "consent.revoke", input: { id: grantId }, token: agent.token, surface: "http" }),
|
|
182
|
+
).toMatchObject({ ok: false, error: { _tag: "Forbidden" } })
|
|
183
|
+
expect(await s.invoke({ action: "consent.revoke", input: { id: grantId }, token: pia.token })).toMatchObject({
|
|
184
|
+
ok: true,
|
|
185
|
+
})
|
|
186
|
+
consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 5 }))
|
|
187
|
+
expect(await transfers(payee)).toHaveLength(3)
|
|
188
|
+
const audit = (await s.audit({ action: "consent.revoke" })).filter((r) => r.outcome === "succeeded")
|
|
189
|
+
expect(audit.at(-1)).toMatchObject({ actorUserId: pia.id })
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
it("uses up an approval that remembered a permission with its first execution: after revoking, the same call is held", async () => {
|
|
193
|
+
const agent = await s.agentSession(pia, ORG)
|
|
194
|
+
const payee = unique("revoked-session")
|
|
195
|
+
const call = (key: string) =>
|
|
196
|
+
wire({ token: agent.token, surface: "http", payee, amount: 17, idempotencyKey: key })
|
|
197
|
+
const id = consentOf(await call(unique("initial")))
|
|
198
|
+
const approved = await decide(id, "approve", "session")
|
|
199
|
+
expect(approved).toMatchObject({ ok: true })
|
|
200
|
+
const grantId = (approved as { result: { output: { grantId: string } } }).result.output.grantId
|
|
201
|
+
expect(await call(unique("first"))).toMatchObject({ ok: true, result: { kind: "output" } })
|
|
202
|
+
// The approval is used by that execution, even though the remembered permission let it through too.
|
|
203
|
+
expect(await consent(id)).toMatchObject({ status: "used" })
|
|
204
|
+
expect(await s.invoke({ action: "consent.revoke", input: { id: grantId }, token: pia.token })).toMatchObject({
|
|
205
|
+
ok: true,
|
|
206
|
+
})
|
|
207
|
+
// Neither the revoked permission nor the original approval runs the same input again.
|
|
208
|
+
consentOf(await call(unique("after-revocation")))
|
|
209
|
+
expect(await transfers(payee)).toHaveLength(1)
|
|
210
|
+
})
|
|
211
|
+
|
|
212
|
+
it("withdraws approved calls that have not run yet when the permission in their scope is revoked", async () => {
|
|
213
|
+
const agent = await s.agentSession(pia, ORG)
|
|
214
|
+
const payee = unique("revoked-unrun")
|
|
215
|
+
const call = (amount: number, key: string) =>
|
|
216
|
+
wire({ token: agent.token, surface: "http", payee, amount, idempotencyKey: key })
|
|
217
|
+
// Two held calls in the session; the person approves the second once and remembers the first for the session.
|
|
218
|
+
const firstKey = unique("first")
|
|
219
|
+
const once = consentOf(await call(2, unique("second")))
|
|
220
|
+
expect(await decide(once, "approve", "once")).toMatchObject({ ok: true })
|
|
221
|
+
const remembered = await decide(consentOf(await call(1, firstKey)), "approve", "session")
|
|
222
|
+
const grantId = (remembered as { result: { output: { grantId: string } } }).result.output.grantId
|
|
223
|
+
expect(await s.invoke({ action: "consent.revoke", input: { id: grantId }, token: pia.token })).toMatchObject({
|
|
224
|
+
ok: true,
|
|
225
|
+
})
|
|
226
|
+
// Neither approval runs: both are withdrawn with the permission of their session.
|
|
227
|
+
expect(await consent(once)).toMatchObject({ status: "revoked" })
|
|
228
|
+
// A retry under the key the person approved is refused: that approval is gone. A new call asks again.
|
|
229
|
+
expect(await call(1, firstKey)).toMatchObject({ ok: false, error: { _tag: "Forbidden" } })
|
|
230
|
+
consentOf(await call(1, unique("retry")))
|
|
231
|
+
consentOf(await call(2, unique("retry")))
|
|
232
|
+
expect(await transfers(payee)).toEqual([])
|
|
233
|
+
// An approval in another session is outside the permission's scope and still runs once.
|
|
234
|
+
const other = await s.agentSession(pia, ORG)
|
|
235
|
+
const otherKey = unique("other")
|
|
236
|
+
const elsewhere = consentOf(
|
|
237
|
+
await wire({ token: other.token, surface: "http", payee, amount: 3, idempotencyKey: otherKey }),
|
|
238
|
+
)
|
|
239
|
+
expect(await decide(elsewhere, "approve", "once")).toMatchObject({ ok: true })
|
|
240
|
+
const another = await decide(consentOf(await call(4, unique("fourth"))), "approve", "session")
|
|
241
|
+
const anotherGrant = (another as { result: { output: { grantId: string } } }).result.output.grantId
|
|
242
|
+
expect(await s.invoke({ action: "consent.revoke", input: { id: anotherGrant }, token: pia.token })).toMatchObject(
|
|
243
|
+
{ ok: true },
|
|
244
|
+
)
|
|
245
|
+
expect(
|
|
246
|
+
await wire({ token: other.token, surface: "http", payee, amount: 3, idempotencyKey: otherKey }),
|
|
247
|
+
).toMatchObject({ ok: true })
|
|
248
|
+
expect(await transfers(payee)).toHaveLength(1)
|
|
249
|
+
})
|
|
250
|
+
|
|
251
|
+
it("holds an agent session's calls on every surface, and remembers per session only for that session", async () => {
|
|
252
|
+
const payee = unique("session")
|
|
253
|
+
const agentA = await s.agentSession(pia, ORG)
|
|
254
|
+
const agentB = await s.agentSession(pia, ORG)
|
|
255
|
+
// An agent session is agent-originated on RPC and HTTP too: switching surface does not bypass consent.
|
|
256
|
+
const id = consentOf(await wire({ token: agentA.token, surface: "rpc", payee, amount: 1 }))
|
|
257
|
+
consentOf(await wire({ token: agentA.token, surface: "http", payee, amount: 2 }))
|
|
258
|
+
expect(await decide(id, "approve", "session")).toMatchObject({ ok: true })
|
|
259
|
+
expect(await wire({ token: agentA.token, surface: "http", payee, amount: 3 })).toMatchObject({ ok: true })
|
|
260
|
+
consentOf(await wire({ token: agentB.token, surface: "http", payee, amount: 4 }))
|
|
261
|
+
consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 5 }))
|
|
262
|
+
expect(await transfers(payee)).toHaveLength(1)
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
it("decides origin and session from the credential and surface, never from a header", async () => {
|
|
266
|
+
const payee = unique("headers")
|
|
267
|
+
const agentA = await s.agentSession(pia, ORG)
|
|
268
|
+
const spoof = {
|
|
269
|
+
"x-eloxiv-origin": "person",
|
|
270
|
+
"x-eloxiv-agent": "false",
|
|
271
|
+
"x-eloxiv-surface": "rpc",
|
|
272
|
+
"x-eloxiv-session": "person",
|
|
273
|
+
}
|
|
274
|
+
// An agent session claiming to be the person is still an agent.
|
|
275
|
+
consentOf(await wire({ token: agentA.token, surface: "http", payee, amount: 1, headers: spoof }))
|
|
276
|
+
// Give session A a session-scoped permission; nobody else can borrow it by naming the session.
|
|
277
|
+
const id = consentOf(await wire({ token: agentA.token, surface: "rpc", payee, amount: 2 }))
|
|
278
|
+
expect(await decide(id, "approve", "session")).toMatchObject({ ok: true })
|
|
279
|
+
const borrow = { "x-eloxiv-session": `agent:${agentA.id}`, "x-eloxiv-agent-session": agentA.id }
|
|
280
|
+
consentOf(await wire({ token: pia.token, surface: "mcp", payee, amount: 3, headers: borrow }))
|
|
281
|
+
consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 4, headers: borrow }))
|
|
282
|
+
expect(await transfers(payee)).toEqual([])
|
|
283
|
+
})
|
|
284
|
+
|
|
285
|
+
it("never runs a rejected call, and refuses its retry", async () => {
|
|
286
|
+
const payee = unique("rejected")
|
|
287
|
+
const key = unique("call")
|
|
288
|
+
const id = consentOf(await wire({ token: pia.token, surface: "agent", payee, idempotencyKey: key }))
|
|
289
|
+
expect(await decide(id, "reject")).toMatchObject({ ok: true, result: { output: { status: "rejected" } } })
|
|
290
|
+
expect(await wire({ token: pia.token, surface: "agent", payee, idempotencyKey: key })).toMatchObject({
|
|
291
|
+
ok: false,
|
|
292
|
+
error: { _tag: "Forbidden" },
|
|
293
|
+
})
|
|
294
|
+
expect(await transfers(payee)).toEqual([])
|
|
295
|
+
await until(
|
|
296
|
+
"the rejected request's work item closed",
|
|
297
|
+
() =>
|
|
298
|
+
s.sql<{ state: string }>(
|
|
299
|
+
`SELECT state FROM eloxiv_inbox.work_item WHERE source = 'consent.requests' AND source_id = $1`,
|
|
300
|
+
[id],
|
|
301
|
+
),
|
|
302
|
+
(rows) => rows[0]?.state === "dismissed",
|
|
303
|
+
)
|
|
304
|
+
})
|
|
305
|
+
|
|
306
|
+
it("rejects only a pending request with consent.rejectPending (a notification's Reject): an approval from another device stands", async () => {
|
|
307
|
+
const payee = unique("only-pending")
|
|
308
|
+
const key = unique("call")
|
|
309
|
+
const id = consentOf(await wire({ token: pia.token, surface: "agent", payee, idempotencyKey: key }))
|
|
310
|
+
// Approved on another device; the call has not run (it may wait for a business approval).
|
|
311
|
+
expect(await decide(id, "approve", "once")).toMatchObject({ ok: true })
|
|
312
|
+
const stale = await s.invoke({ action: "consent.rejectPending", input: { id }, token: pia.token })
|
|
313
|
+
expect(stale).toMatchObject({ ok: false, error: { _tag: "InvalidInput" } })
|
|
314
|
+
expect(await consent(id)).toMatchObject({ status: "approved" })
|
|
315
|
+
// The approval still runs its call once.
|
|
316
|
+
expect(await wire({ token: pia.token, surface: "agent", payee, idempotencyKey: key })).toMatchObject({ ok: true })
|
|
317
|
+
expect(await transfers(payee)).toHaveLength(1)
|
|
318
|
+
// Never an agent's to call.
|
|
319
|
+
const agent = await s.agentSession(pia, ORG)
|
|
320
|
+
const pendingOne = consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 10 }))
|
|
321
|
+
expect(
|
|
322
|
+
await s.invoke({
|
|
323
|
+
action: "consent.rejectPending",
|
|
324
|
+
input: { id: pendingOne },
|
|
325
|
+
token: agent.token,
|
|
326
|
+
surface: "http",
|
|
327
|
+
}),
|
|
328
|
+
).toMatchObject({ ok: false, error: { _tag: "Forbidden" } })
|
|
329
|
+
expect(await consent(pendingOne)).toMatchObject({ status: "pending" })
|
|
330
|
+
// A pending request is rejected as before.
|
|
331
|
+
const next = consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 11 }))
|
|
332
|
+
expect(await s.invoke({ action: "consent.rejectPending", input: { id: next }, token: pia.token })).toMatchObject({
|
|
333
|
+
ok: true,
|
|
334
|
+
result: { output: { status: "rejected" } },
|
|
335
|
+
})
|
|
336
|
+
// Racing an approval from another device: exactly one decides, and the request is as that one left it.
|
|
337
|
+
for (let round = 0; round < 4; round++) {
|
|
338
|
+
const raced = consentOf(await wire({ token: pia.token, surface: "agent", payee, amount: 20 + round }))
|
|
339
|
+
const [approved, rejected] = await Promise.all([
|
|
340
|
+
decide(raced, "approve", "once"),
|
|
341
|
+
s.invoke({ action: "consent.rejectPending", input: { id: raced }, token: pia.token }),
|
|
342
|
+
])
|
|
343
|
+
expect([approved.ok, rejected.ok].filter(Boolean)).toHaveLength(1)
|
|
344
|
+
expect(await consent(raced)).toMatchObject({ status: approved.ok ? "approved" : "rejected" })
|
|
345
|
+
}
|
|
346
|
+
})
|
|
347
|
+
|
|
348
|
+
it("reads the person's own request as it stands (consent.get), also when its work item was dismissed or reassigned", async () => {
|
|
349
|
+
const ola = await s.user(unique("ola"), ORG)
|
|
350
|
+
const payee = unique("get")
|
|
351
|
+
const id = consentOf(await wire({ token: pia.token, surface: "agent", payee }))
|
|
352
|
+
const get = (token: string, surface: InboxCall["surface"] = "rpc") =>
|
|
353
|
+
s.invoke({ action: "consent.get", input: { id }, token, surface })
|
|
354
|
+
expect(await get(pia.token)).toMatchObject({
|
|
355
|
+
ok: true,
|
|
356
|
+
result: {
|
|
357
|
+
output: { id, status: "pending", action: "purchases.wire", title: "Wire money", conversationId: null },
|
|
358
|
+
},
|
|
359
|
+
})
|
|
360
|
+
// The work item dismissed elsewhere, then given to someone else: the request still waits for its person.
|
|
361
|
+
await s.sql(
|
|
362
|
+
`UPDATE eloxiv_inbox.work_item SET state = 'dismissed' WHERE source = 'consent.requests' AND source_id = $1`,
|
|
363
|
+
[id],
|
|
364
|
+
)
|
|
365
|
+
await s.sql(
|
|
366
|
+
`UPDATE eloxiv_inbox.work_item SET assignee_user_id = $2 WHERE source = 'consent.requests' AND source_id = $1`,
|
|
367
|
+
[id, ola.id],
|
|
368
|
+
)
|
|
369
|
+
expect(await get(pia.token)).toMatchObject({ ok: true, result: { output: { status: "pending" } } })
|
|
370
|
+
// The conversation whose run waits on it (in an app with the agent module).
|
|
371
|
+
const [agents] = await s.sql<{ present: boolean }>(
|
|
372
|
+
`SELECT to_regclass('eloxiv_agent.run') IS NOT NULL AS present`,
|
|
373
|
+
)
|
|
374
|
+
let waiting: { readonly conversation: string; readonly read: InboxOutcome } | undefined
|
|
375
|
+
if (agents?.present === true) {
|
|
376
|
+
const conversation = unique("conv")
|
|
377
|
+
await s.sql(`INSERT INTO eloxiv_agent.conversation (id, org_id, user_id, title) VALUES ($1, $2, $3, 'Wire')`, [
|
|
378
|
+
conversation,
|
|
379
|
+
ORG,
|
|
380
|
+
pia.id,
|
|
381
|
+
])
|
|
382
|
+
await s.sql(
|
|
383
|
+
`INSERT INTO eloxiv_agent.run (id, org_id, user_id, conversation_id, kind, status, wait)
|
|
384
|
+
VALUES ($1, $2, $3, $4, 'turn', 'waiting', $5::jsonb)`,
|
|
385
|
+
[
|
|
386
|
+
unique("run"),
|
|
387
|
+
ORG,
|
|
388
|
+
pia.id,
|
|
389
|
+
conversation,
|
|
390
|
+
JSON.stringify({ signal: "wait/1/t", consentId: id, toolCallId: "t" }),
|
|
391
|
+
],
|
|
392
|
+
)
|
|
393
|
+
waiting = { conversation, read: await get(pia.token) }
|
|
394
|
+
await s.sql(`DELETE FROM eloxiv_agent.run WHERE conversation_id = $1`, [conversation])
|
|
395
|
+
await s.sql(`DELETE FROM eloxiv_agent.conversation WHERE id = $1`, [conversation])
|
|
396
|
+
}
|
|
397
|
+
// With the agent module: the waiting run's conversation (without it, nothing to check).
|
|
398
|
+
const shown = waiting?.read as { readonly result?: { readonly output?: { readonly conversationId?: unknown } } }
|
|
399
|
+
expect(shown?.result?.output?.conversationId ?? null).toBe(waiting?.conversation ?? null)
|
|
400
|
+
// Nobody else's, and never an agent's.
|
|
401
|
+
expect(await get(ola.token)).toMatchObject({ ok: false, error: { _tag: "InvalidInput" } })
|
|
402
|
+
const agent = await s.agentSession(pia, ORG)
|
|
403
|
+
expect(await get(agent.token, "http")).toMatchObject({ ok: false, error: { _tag: "Forbidden" } })
|
|
404
|
+
expect(await decide(id, "approve", "once")).toMatchObject({ ok: true })
|
|
405
|
+
expect(await get(pia.token)).toMatchObject({ ok: true, result: { output: { status: "approved" } } })
|
|
406
|
+
})
|
|
407
|
+
|
|
408
|
+
it("reads a request in an app without the agent module, also on a cluster where another app's agent role exists", async () => {
|
|
409
|
+
const [agents] = await s.sql<{ present: boolean }>(
|
|
410
|
+
`SELECT to_regclass('eloxiv_agent.run') IS NOT NULL AS present`,
|
|
411
|
+
)
|
|
412
|
+
// Only an app without the agent module has this case.
|
|
413
|
+
if (agents?.present === true) return
|
|
414
|
+
// Roles are cluster-wide: an agent-enabled app sharing the PostgreSQL cluster creates the agent module's runtime
|
|
415
|
+
// role (the same role its own setup makes and keeps; it is left in place like that app would leave it).
|
|
416
|
+
await s.sql(`DO $$ BEGIN
|
|
417
|
+
IF NOT EXISTS (SELECT 1 FROM pg_catalog.pg_roles WHERE rolname = 'eloxiv_mod_agent') THEN
|
|
418
|
+
CREATE ROLE eloxiv_mod_agent NOLOGIN NOBYPASSRLS;
|
|
419
|
+
END IF;
|
|
420
|
+
EXCEPTION WHEN duplicate_object THEN NULL;
|
|
421
|
+
END $$`)
|
|
422
|
+
const id = consentOf(await wire({ token: pia.token, surface: "agent", payee: unique("no-agent") }))
|
|
423
|
+
expect(await s.invoke({ action: "consent.get", input: { id }, token: pia.token })).toMatchObject({
|
|
424
|
+
ok: true,
|
|
425
|
+
result: { output: { id, status: "pending", conversationId: null } },
|
|
426
|
+
})
|
|
427
|
+
})
|
|
428
|
+
|
|
429
|
+
it("stops authenticating a revoked agent session", async () => {
|
|
430
|
+
const agent = await s.agentSession(pia, ORG)
|
|
431
|
+
await s.revokeAgentSession(agent.id)
|
|
432
|
+
expect(await wire({ token: agent.token, surface: "http", payee: unique("revoked") })).toMatchObject({
|
|
433
|
+
ok: false,
|
|
434
|
+
error: { _tag: "Unauthenticated" },
|
|
435
|
+
})
|
|
436
|
+
})
|
|
437
|
+
})
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the ActionRegistry contract.
|
|
3
|
+
*
|
|
4
|
+
* Registers Vitest tests against a subject the caller supplies: the registry's
|
|
5
|
+
* `list`, `lookup` and `project` operations, and what each running surface
|
|
6
|
+
* actually publishes for an action (the RPC group's schemas, the HTTP API's
|
|
7
|
+
* OpenAPI document, the MCP server's tool listing, the agent's tool set). The
|
|
8
|
+
* kit checks the registry is consistent with itself and that every surface
|
|
9
|
+
* publishes exactly the projection of the one definition: the same input
|
|
10
|
+
* schema everywhere, the same result envelope wherever a surface declares one,
|
|
11
|
+
* and the same names and descriptions.
|
|
12
|
+
*
|
|
13
|
+
* import { actionRegistryConformance } from "@eloxiv/testing/conformance/ActionRegistry"
|
|
14
|
+
* actionRegistryConformance(() => subject)
|
|
15
|
+
*/
|
|
16
|
+
import { ActionDescriptor, mcpToolInput, SurfaceProjection } from "@eloxiv/contracts"
|
|
17
|
+
import { Schema } from "effect"
|
|
18
|
+
import { describe, expect, it } from "vitest"
|
|
19
|
+
|
|
20
|
+
type Json = Record<string, unknown>
|
|
21
|
+
|
|
22
|
+
/** What one running surface publishes for an action, as JSON Schema (references may be left unresolved). */
|
|
23
|
+
export interface PublishedSchemas {
|
|
24
|
+
readonly rpc: { readonly payload: Json; readonly success: Json }
|
|
25
|
+
/** The OpenAPI operation's request body and 200 response schemas, and the document's component schemas. */
|
|
26
|
+
readonly http: { readonly requestBody: Json; readonly response: Json; readonly components: Json }
|
|
27
|
+
/**
|
|
28
|
+
* The MCP tool and the agent tool, as listed to the subject's caller: `undefined` when the action is hidden
|
|
29
|
+
* from that caller (its policy is constant false for it, or its scope or a disabled agent tool group excludes
|
|
30
|
+
* it). Surfaces list a caller only what it can reach; the projection of what they list is checked.
|
|
31
|
+
*/
|
|
32
|
+
readonly mcp:
|
|
33
|
+
| {
|
|
34
|
+
readonly name: string
|
|
35
|
+
readonly description: string
|
|
36
|
+
readonly inputSchema: Json
|
|
37
|
+
readonly outputSchema?: Json | undefined
|
|
38
|
+
}
|
|
39
|
+
| undefined
|
|
40
|
+
readonly agent: { readonly name: string; readonly description: string; readonly inputSchema: Json } | undefined
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ActionRegistrySubject {
|
|
44
|
+
readonly list: () => Promise<ReadonlyArray<ActionDescriptor>>
|
|
45
|
+
readonly lookup: (name: string) => Promise<ActionDescriptor | undefined>
|
|
46
|
+
readonly project: (name: string) => Promise<SurfaceProjection | undefined>
|
|
47
|
+
/** What the running surfaces publish for `name`. */
|
|
48
|
+
readonly published: (name: string) => Promise<PublishedSchemas>
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A JSON Schema with every `$ref` (to `#/$defs/...`, `#/definitions/...` or
|
|
53
|
+
* `#/components/schemas/...`) replaced by its target and the document-level
|
|
54
|
+
* keys (`$schema`, `$defs`, `$id`) removed, so schemas published in different
|
|
55
|
+
* containers (a JSON Schema document, an OpenAPI document, an MCP listing)
|
|
56
|
+
* compare by meaning.
|
|
57
|
+
*/
|
|
58
|
+
export const normaliseSchema = (schema: unknown, definitions: Json = {}): unknown => {
|
|
59
|
+
const defs: Json = {
|
|
60
|
+
...definitions,
|
|
61
|
+
...(schema as { $defs?: Json } | null)?.$defs,
|
|
62
|
+
...(schema as { definitions?: Json } | null)?.definitions,
|
|
63
|
+
}
|
|
64
|
+
const seen = new Set<string>()
|
|
65
|
+
const walk = (node: unknown): unknown => {
|
|
66
|
+
if (Array.isArray(node)) return node.map(walk)
|
|
67
|
+
if (node === null || typeof node !== "object") return node
|
|
68
|
+
const record = node as Json
|
|
69
|
+
const ref = record["$ref"]
|
|
70
|
+
if (typeof ref === "string") {
|
|
71
|
+
const name = ref.replace(/^#\/(\$defs|definitions|components\/schemas)\//, "")
|
|
72
|
+
if (seen.has(name)) return { $ref: name }
|
|
73
|
+
const target = defs[name]
|
|
74
|
+
if (target === undefined) return { $ref: name }
|
|
75
|
+
seen.add(name)
|
|
76
|
+
const resolved = walk(target)
|
|
77
|
+
seen.delete(name)
|
|
78
|
+
return resolved
|
|
79
|
+
}
|
|
80
|
+
return Object.fromEntries(
|
|
81
|
+
Object.entries(record)
|
|
82
|
+
.filter(([key]) => !["$schema", "$defs", "$id", "definitions"].includes(key))
|
|
83
|
+
.map(([key, value]) => [key, walk(value)]),
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
return walk(schema)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const actionRegistryConformance = (subject: ActionRegistrySubject | (() => ActionRegistrySubject)) => {
|
|
90
|
+
const get = () => (typeof subject === "function" ? subject() : subject)
|
|
91
|
+
|
|
92
|
+
describe("ActionRegistry conformance", () => {
|
|
93
|
+
it("lists every action once, sorted by name, as published ActionDescriptors", async () => {
|
|
94
|
+
const list = await get().list()
|
|
95
|
+
expect(list.length).toBeGreaterThan(0)
|
|
96
|
+
const names = list.map((a) => a.name)
|
|
97
|
+
expect(names).toEqual([...names].sort((a, b) => a.localeCompare(b)))
|
|
98
|
+
expect(new Set(names).size).toBe(names.length)
|
|
99
|
+
for (const descriptor of list) {
|
|
100
|
+
expect(() => Schema.decodeUnknownSync(ActionDescriptor)(descriptor), descriptor.name).not.toThrow()
|
|
101
|
+
expect(descriptor.name.startsWith(`${descriptor.module}.`), descriptor.name).toBe(true)
|
|
102
|
+
expect(descriptor.toolName).toBe(descriptor.name.replaceAll(".", "_"))
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
it("looks up each listed action as listed, and nothing else", async () => {
|
|
107
|
+
const subject = get()
|
|
108
|
+
for (const descriptor of await subject.list()) {
|
|
109
|
+
expect(await subject.lookup(descriptor.name)).toEqual(descriptor)
|
|
110
|
+
}
|
|
111
|
+
expect(await subject.lookup("no.such-action")).toBeUndefined()
|
|
112
|
+
expect(await subject.project("no.such-action")).toBeUndefined()
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
it("projects one definition into every surface's schema", async () => {
|
|
116
|
+
const subject = get()
|
|
117
|
+
for (const descriptor of await subject.list()) {
|
|
118
|
+
const projection = await subject.project(descriptor.name)
|
|
119
|
+
expect(projection, descriptor.name).toBeDefined()
|
|
120
|
+
const p = Schema.decodeUnknownSync(SurfaceProjection)(projection)
|
|
121
|
+
// Every surface takes the action's input and (where it declares one) returns the result envelope.
|
|
122
|
+
for (const input of [p.rpc.payload, p.http.requestBody]) {
|
|
123
|
+
expect(input, descriptor.name).toEqual(descriptor.input)
|
|
124
|
+
}
|
|
125
|
+
// MCP and agent tool parameters must be object-rooted (MCP requires it, and model providers refuse a function
|
|
126
|
+
// whose parameters are not an object): the same input, wrapped only when it has no object root.
|
|
127
|
+
for (const tool of [p.mcp.inputSchema, p.agent.inputSchema]) {
|
|
128
|
+
expect(tool, descriptor.name).toEqual(mcpToolInput(descriptor.input))
|
|
129
|
+
expect(tool["type"], descriptor.name).toBe("object")
|
|
130
|
+
}
|
|
131
|
+
for (const result of [p.rpc.success, p.http.response, p.mcp.outputSchema]) {
|
|
132
|
+
expect(result, descriptor.name).toEqual(descriptor.result)
|
|
133
|
+
}
|
|
134
|
+
expect(p.rpc.tag).toBe(descriptor.name)
|
|
135
|
+
expect(p.http).toMatchObject({ method: "POST", path: `/api/actions/${descriptor.name}` })
|
|
136
|
+
expect(p.mcp).toMatchObject({ name: descriptor.toolName, description: descriptor.description })
|
|
137
|
+
expect(p.agent).toMatchObject({ name: descriptor.toolName, description: descriptor.description })
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
it("publishes exactly the projection on every running surface", async () => {
|
|
142
|
+
const subject = get()
|
|
143
|
+
let listed = 0
|
|
144
|
+
for (const descriptor of await subject.list()) {
|
|
145
|
+
const p = (await subject.project(descriptor.name))!
|
|
146
|
+
const published = await subject.published(descriptor.name)
|
|
147
|
+
const same = (actual: unknown, expected: unknown, where: string, definitions?: Json) =>
|
|
148
|
+
expect(normaliseSchema(actual, definitions), `${descriptor.name}: ${where}`).toEqual(
|
|
149
|
+
normaliseSchema(expected),
|
|
150
|
+
)
|
|
151
|
+
same(published.rpc.payload, p.rpc.payload, "RPC payload")
|
|
152
|
+
same(published.rpc.success, p.rpc.success, "RPC success")
|
|
153
|
+
same(published.http.requestBody, p.http.requestBody, "HTTP request body", published.http.components)
|
|
154
|
+
same(published.http.response, p.http.response, "HTTP 200 response", published.http.components)
|
|
155
|
+
// A tool hidden from the caller on one of MCP and the agent tools is hidden on the other too.
|
|
156
|
+
expect(published.mcp === undefined, `${descriptor.name}: listed on MCP and to the agent alike`).toBe(
|
|
157
|
+
published.agent === undefined,
|
|
158
|
+
)
|
|
159
|
+
if (published.mcp === undefined || published.agent === undefined) continue
|
|
160
|
+
listed += 1
|
|
161
|
+
same(published.mcp.inputSchema, p.mcp.inputSchema, "MCP tool input")
|
|
162
|
+
if (published.mcp.outputSchema !== undefined)
|
|
163
|
+
same(published.mcp.outputSchema, p.mcp.outputSchema, "MCP tool output")
|
|
164
|
+
expect(published.mcp.name).toBe(p.mcp.name)
|
|
165
|
+
expect(published.mcp.description).toBe(p.mcp.description)
|
|
166
|
+
same(published.agent.inputSchema, p.agent.inputSchema, "agent tool input")
|
|
167
|
+
expect(published.agent.name).toBe(p.agent.name)
|
|
168
|
+
expect(published.agent.description).toBe(p.agent.description)
|
|
169
|
+
}
|
|
170
|
+
// The subject's caller reaches some actions, so the tool listings are checked, not skipped.
|
|
171
|
+
expect(listed).toBeGreaterThan(0)
|
|
172
|
+
})
|
|
173
|
+
})
|
|
174
|
+
}
|