@eloxiv/testing 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/Admin.d.ts +20 -0
- package/dist/Admin.d.ts.map +1 -0
- package/dist/Admin.js +61 -0
- package/dist/Admin.js.map +1 -0
- package/dist/Agent.d.ts +97 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +210 -0
- package/dist/Agent.js.map +1 -0
- package/dist/AgentSurface.d.ts +20 -0
- package/dist/AgentSurface.d.ts.map +1 -0
- package/dist/AgentSurface.js +36 -0
- package/dist/AgentSurface.js.map +1 -0
- package/dist/Embedder.d.ts +21 -0
- package/dist/Embedder.d.ts.map +1 -0
- package/dist/Embedder.js +54 -0
- package/dist/Embedder.js.map +1 -0
- package/dist/EvalMain.d.ts +2 -0
- package/dist/EvalMain.d.ts.map +1 -0
- package/dist/EvalMain.js +80 -0
- package/dist/EvalMain.js.map +1 -0
- package/dist/Evals.d.ts +95 -0
- package/dist/Evals.d.ts.map +1 -0
- package/dist/Evals.js +389 -0
- package/dist/Evals.js.map +1 -0
- package/dist/Kernel.d.ts +88 -0
- package/dist/Kernel.d.ts.map +1 -0
- package/dist/Kernel.js +108 -0
- package/dist/Kernel.js.map +1 -0
- package/dist/Launch.d.ts +86 -0
- package/dist/Launch.d.ts.map +1 -0
- package/dist/Launch.js +370 -0
- package/dist/Launch.js.map +1 -0
- package/dist/Locks.d.ts +39 -0
- package/dist/Locks.d.ts.map +1 -0
- package/dist/Locks.js +94 -0
- package/dist/Locks.js.map +1 -0
- package/dist/Routes.d.ts +19 -0
- package/dist/Routes.d.ts.map +1 -0
- package/dist/Routes.js +38 -0
- package/dist/Routes.js.map +1 -0
- package/dist/ScriptedChatModel.d.ts +51 -0
- package/dist/ScriptedChatModel.d.ts.map +1 -0
- package/dist/ScriptedChatModel.js +135 -0
- package/dist/ScriptedChatModel.js.map +1 -0
- package/dist/SmtpSink.d.ts +36 -0
- package/dist/SmtpSink.d.ts.map +1 -0
- package/dist/SmtpSink.js +185 -0
- package/dist/SmtpSink.js.map +1 -0
- package/dist/System.d.ts +271 -0
- package/dist/System.d.ts.map +1 -0
- package/dist/System.js +905 -0
- package/dist/System.js.map +1 -0
- package/dist/TcpProxy.d.ts +17 -0
- package/dist/TcpProxy.d.ts.map +1 -0
- package/dist/TcpProxy.js +100 -0
- package/dist/TcpProxy.js.map +1 -0
- package/dist/auth/TrustedProxyAuth.d.ts +28 -0
- package/dist/auth/TrustedProxyAuth.d.ts.map +1 -0
- package/dist/auth/TrustedProxyAuth.js +128 -0
- package/dist/auth/TrustedProxyAuth.js.map +1 -0
- package/dist/conformance/ActionConsent.d.ts +3 -0
- package/dist/conformance/ActionConsent.d.ts.map +1 -0
- package/dist/conformance/ActionConsent.js +347 -0
- package/dist/conformance/ActionConsent.js.map +1 -0
- package/dist/conformance/ActionRegistry.d.ts +64 -0
- package/dist/conformance/ActionRegistry.d.ts.map +1 -0
- package/dist/conformance/ActionRegistry.js +136 -0
- package/dist/conformance/ActionRegistry.js.map +1 -0
- package/dist/conformance/Actor.d.ts +43 -0
- package/dist/conformance/Actor.d.ts.map +1 -0
- package/dist/conformance/Actor.js +171 -0
- package/dist/conformance/Actor.js.map +1 -0
- package/dist/conformance/AgentReference.d.ts +30 -0
- package/dist/conformance/AgentReference.d.ts.map +1 -0
- package/dist/conformance/AgentReference.js +137 -0
- package/dist/conformance/AgentReference.js.map +1 -0
- package/dist/conformance/AgentResources.d.ts +3 -0
- package/dist/conformance/AgentResources.d.ts.map +1 -0
- package/dist/conformance/AgentResources.js +454 -0
- package/dist/conformance/AgentResources.js.map +1 -0
- package/dist/conformance/AgentRuntime.d.ts +3 -0
- package/dist/conformance/AgentRuntime.d.ts.map +1 -0
- package/dist/conformance/AgentRuntime.js +302 -0
- package/dist/conformance/AgentRuntime.js.map +1 -0
- package/dist/conformance/AgentSubject.d.ts +87 -0
- package/dist/conformance/AgentSubject.d.ts.map +1 -0
- package/dist/conformance/AgentSubject.js +18 -0
- package/dist/conformance/AgentSubject.js.map +1 -0
- package/dist/conformance/Approvals.d.ts +3 -0
- package/dist/conformance/Approvals.d.ts.map +1 -0
- package/dist/conformance/Approvals.js +258 -0
- package/dist/conformance/Approvals.js.map +1 -0
- package/dist/conformance/Audit.d.ts +3 -0
- package/dist/conformance/Audit.d.ts.map +1 -0
- package/dist/conformance/Audit.js +221 -0
- package/dist/conformance/Audit.js.map +1 -0
- package/dist/conformance/CalendarProvider.d.ts +4 -0
- package/dist/conformance/CalendarProvider.d.ts.map +1 -0
- package/dist/conformance/CalendarProvider.js +108 -0
- package/dist/conformance/CalendarProvider.js.map +1 -0
- package/dist/conformance/CapabilityKit.d.ts +191 -0
- package/dist/conformance/CapabilityKit.d.ts.map +1 -0
- package/dist/conformance/CapabilityKit.js +375 -0
- package/dist/conformance/CapabilityKit.js.map +1 -0
- package/dist/conformance/ClientSDK.d.ts +78 -0
- package/dist/conformance/ClientSDK.d.ts.map +1 -0
- package/dist/conformance/ClientSDK.js +163 -0
- package/dist/conformance/ClientSDK.js.map +1 -0
- package/dist/conformance/CollabDocument.d.ts +3 -0
- package/dist/conformance/CollabDocument.d.ts.map +1 -0
- package/dist/conformance/CollabDocument.js +934 -0
- package/dist/conformance/CollabDocument.js.map +1 -0
- package/dist/conformance/CollabReference.d.ts +8 -0
- package/dist/conformance/CollabReference.d.ts.map +1 -0
- package/dist/conformance/CollabReference.js +138 -0
- package/dist/conformance/CollabReference.js.map +1 -0
- package/dist/conformance/CollabSubject.d.ts +68 -0
- package/dist/conformance/CollabSubject.d.ts.map +1 -0
- package/dist/conformance/CollabSubject.js +2 -0
- package/dist/conformance/CollabSubject.js.map +1 -0
- package/dist/conformance/Command.d.ts +3 -0
- package/dist/conformance/Command.d.ts.map +1 -0
- package/dist/conformance/Command.js +73 -0
- package/dist/conformance/Command.js.map +1 -0
- package/dist/conformance/Connections.d.ts +4 -0
- package/dist/conformance/Connections.d.ts.map +1 -0
- package/dist/conformance/Connections.js +308 -0
- package/dist/conformance/Connections.js.map +1 -0
- package/dist/conformance/ConnectionsReference.d.ts +56 -0
- package/dist/conformance/ConnectionsReference.d.ts.map +1 -0
- package/dist/conformance/ConnectionsReference.js +74 -0
- package/dist/conformance/ConnectionsReference.js.map +1 -0
- package/dist/conformance/ConnectorReference.d.ts +86 -0
- package/dist/conformance/ConnectorReference.d.ts.map +1 -0
- package/dist/conformance/ConnectorReference.js +185 -0
- package/dist/conformance/ConnectorReference.js.map +1 -0
- package/dist/conformance/ContextAccounting.d.ts +8 -0
- package/dist/conformance/ContextAccounting.d.ts.map +1 -0
- package/dist/conformance/ContextAccounting.js +125 -0
- package/dist/conformance/ContextAccounting.js.map +1 -0
- package/dist/conformance/Daemon.d.ts +150 -0
- package/dist/conformance/Daemon.d.ts.map +1 -0
- package/dist/conformance/Daemon.js +718 -0
- package/dist/conformance/Daemon.js.map +1 -0
- package/dist/conformance/DaemonReference.d.ts +15 -0
- package/dist/conformance/DaemonReference.d.ts.map +1 -0
- package/dist/conformance/DaemonReference.js +163 -0
- package/dist/conformance/DaemonReference.js.map +1 -0
- package/dist/conformance/DbTx.d.ts +17 -0
- package/dist/conformance/DbTx.d.ts.map +1 -0
- package/dist/conformance/DbTx.js +184 -0
- package/dist/conformance/DbTx.js.map +1 -0
- package/dist/conformance/DecisionTokens.d.ts +3 -0
- package/dist/conformance/DecisionTokens.d.ts.map +1 -0
- package/dist/conformance/DecisionTokens.js +551 -0
- package/dist/conformance/DecisionTokens.js.map +1 -0
- package/dist/conformance/Delegation.d.ts +3 -0
- package/dist/conformance/Delegation.d.ts.map +1 -0
- package/dist/conformance/Delegation.js +149 -0
- package/dist/conformance/Delegation.js.map +1 -0
- package/dist/conformance/DeskReference.d.ts +21 -0
- package/dist/conformance/DeskReference.d.ts.map +1 -0
- package/dist/conformance/DeskReference.js +47 -0
- package/dist/conformance/DeskReference.js.map +1 -0
- package/dist/conformance/DeviceControl.d.ts +3 -0
- package/dist/conformance/DeviceControl.d.ts.map +1 -0
- package/dist/conformance/DeviceControl.js +579 -0
- package/dist/conformance/DeviceControl.js.map +1 -0
- package/dist/conformance/Directory.d.ts +36 -0
- package/dist/conformance/Directory.d.ts.map +1 -0
- package/dist/conformance/Directory.js +253 -0
- package/dist/conformance/Directory.js.map +1 -0
- package/dist/conformance/DirectoryProvider.d.ts +4 -0
- package/dist/conformance/DirectoryProvider.d.ts.map +1 -0
- package/dist/conformance/DirectoryProvider.js +58 -0
- package/dist/conformance/DirectoryProvider.js.map +1 -0
- package/dist/conformance/DocumentSource.d.ts +4 -0
- package/dist/conformance/DocumentSource.d.ts.map +1 -0
- package/dist/conformance/DocumentSource.js +43 -0
- package/dist/conformance/DocumentSource.js.map +1 -0
- package/dist/conformance/EndpointReference.d.ts +40 -0
- package/dist/conformance/EndpointReference.d.ts.map +1 -0
- package/dist/conformance/EndpointReference.js +67 -0
- package/dist/conformance/EndpointReference.js.map +1 -0
- package/dist/conformance/Files.d.ts +40 -0
- package/dist/conformance/Files.d.ts.map +1 -0
- package/dist/conformance/Files.js +592 -0
- package/dist/conformance/Files.js.map +1 -0
- package/dist/conformance/FilesReference.d.ts +31 -0
- package/dist/conformance/FilesReference.d.ts.map +1 -0
- package/dist/conformance/FilesReference.js +116 -0
- package/dist/conformance/FilesReference.js.map +1 -0
- package/dist/conformance/FilesSubject.d.ts +46 -0
- package/dist/conformance/FilesSubject.d.ts.map +1 -0
- package/dist/conformance/FilesSubject.js +3 -0
- package/dist/conformance/FilesSubject.js.map +1 -0
- package/dist/conformance/Flags.d.ts +3 -0
- package/dist/conformance/Flags.d.ts.map +1 -0
- package/dist/conformance/Flags.js +183 -0
- package/dist/conformance/Flags.js.map +1 -0
- package/dist/conformance/Host.d.ts +64 -0
- package/dist/conformance/Host.d.ts.map +1 -0
- package/dist/conformance/Host.js +152 -0
- package/dist/conformance/Host.js.map +1 -0
- package/dist/conformance/HttpApi.d.ts +5 -0
- package/dist/conformance/HttpApi.d.ts.map +1 -0
- package/dist/conformance/HttpApi.js +131 -0
- package/dist/conformance/HttpApi.js.map +1 -0
- package/dist/conformance/InboxReference.d.ts +28 -0
- package/dist/conformance/InboxReference.d.ts.map +1 -0
- package/dist/conformance/InboxReference.js +331 -0
- package/dist/conformance/InboxReference.js.map +1 -0
- package/dist/conformance/InboxSubject.d.ts +92 -0
- package/dist/conformance/InboxSubject.d.ts.map +1 -0
- package/dist/conformance/InboxSubject.js +16 -0
- package/dist/conformance/InboxSubject.js.map +1 -0
- package/dist/conformance/Ingestion.d.ts +10 -0
- package/dist/conformance/Ingestion.d.ts.map +1 -0
- package/dist/conformance/Ingestion.js +335 -0
- package/dist/conformance/Ingestion.js.map +1 -0
- package/dist/conformance/Ingress.d.ts +62 -0
- package/dist/conformance/Ingress.d.ts.map +1 -0
- package/dist/conformance/Ingress.js +346 -0
- package/dist/conformance/Ingress.js.map +1 -0
- package/dist/conformance/Invocation.d.ts +3 -0
- package/dist/conformance/Invocation.d.ts.map +1 -0
- package/dist/conformance/Invocation.js +665 -0
- package/dist/conformance/Invocation.js.map +1 -0
- package/dist/conformance/IsolationMatrix.d.ts +60 -0
- package/dist/conformance/IsolationMatrix.d.ts.map +1 -0
- package/dist/conformance/IsolationMatrix.js +196 -0
- package/dist/conformance/IsolationMatrix.js.map +1 -0
- package/dist/conformance/LiveConnection.d.ts +72 -0
- package/dist/conformance/LiveConnection.d.ts.map +1 -0
- package/dist/conformance/LiveConnection.js +125 -0
- package/dist/conformance/LiveConnection.js.map +1 -0
- package/dist/conformance/LocalClient.d.ts +62 -0
- package/dist/conformance/LocalClient.d.ts.map +1 -0
- package/dist/conformance/LocalClient.js +526 -0
- package/dist/conformance/LocalClient.js.map +1 -0
- package/dist/conformance/Locale.d.ts +28 -0
- package/dist/conformance/Locale.d.ts.map +1 -0
- package/dist/conformance/Locale.js +115 -0
- package/dist/conformance/Locale.js.map +1 -0
- package/dist/conformance/MachineIdentity.d.ts +39 -0
- package/dist/conformance/MachineIdentity.d.ts.map +1 -0
- package/dist/conformance/MachineIdentity.js +595 -0
- package/dist/conformance/MachineIdentity.js.map +1 -0
- package/dist/conformance/MailProvider.d.ts +4 -0
- package/dist/conformance/MailProvider.d.ts.map +1 -0
- package/dist/conformance/MailProvider.js +167 -0
- package/dist/conformance/MailProvider.js.map +1 -0
- package/dist/conformance/Memory.d.ts +10 -0
- package/dist/conformance/Memory.d.ts.map +1 -0
- package/dist/conformance/Memory.js +179 -0
- package/dist/conformance/Memory.js.map +1 -0
- package/dist/conformance/Messaging.d.ts +49 -0
- package/dist/conformance/Messaging.d.ts.map +1 -0
- package/dist/conformance/Messaging.js +117 -0
- package/dist/conformance/Messaging.js.map +1 -0
- package/dist/conformance/Metering.d.ts +26 -0
- package/dist/conformance/Metering.d.ts.map +1 -0
- package/dist/conformance/Metering.js +236 -0
- package/dist/conformance/Metering.js.map +1 -0
- package/dist/conformance/ModelProvider.d.ts +32 -0
- package/dist/conformance/ModelProvider.d.ts.map +1 -0
- package/dist/conformance/ModelProvider.js +100 -0
- package/dist/conformance/ModelProvider.js.map +1 -0
- package/dist/conformance/ModuleManifest.d.ts +9 -0
- package/dist/conformance/ModuleManifest.d.ts.map +1 -0
- package/dist/conformance/ModuleManifest.js +542 -0
- package/dist/conformance/ModuleManifest.js.map +1 -0
- package/dist/conformance/NotebookAgent.d.ts +32 -0
- package/dist/conformance/NotebookAgent.d.ts.map +1 -0
- package/dist/conformance/NotebookAgent.js +31 -0
- package/dist/conformance/NotebookAgent.js.map +1 -0
- package/dist/conformance/NotificationChannel.d.ts +40 -0
- package/dist/conformance/NotificationChannel.d.ts.map +1 -0
- package/dist/conformance/NotificationChannel.js +78 -0
- package/dist/conformance/NotificationChannel.js.map +1 -0
- package/dist/conformance/Notifications.d.ts +3 -0
- package/dist/conformance/Notifications.d.ts.map +1 -0
- package/dist/conformance/Notifications.js +240 -0
- package/dist/conformance/Notifications.js.map +1 -0
- package/dist/conformance/OAuthClient.d.ts +123 -0
- package/dist/conformance/OAuthClient.d.ts.map +1 -0
- package/dist/conformance/OAuthClient.js +204 -0
- package/dist/conformance/OAuthClient.js.map +1 -0
- package/dist/conformance/Outbox.d.ts +3 -0
- package/dist/conformance/Outbox.d.ts.map +1 -0
- package/dist/conformance/Outbox.js +266 -0
- package/dist/conformance/Outbox.js.map +1 -0
- package/dist/conformance/PlatformReference.d.ts +5 -0
- package/dist/conformance/PlatformReference.d.ts.map +1 -0
- package/dist/conformance/PlatformReference.js +66 -0
- package/dist/conformance/PlatformReference.js.map +1 -0
- package/dist/conformance/PlatformSubject.d.ts +45 -0
- package/dist/conformance/PlatformSubject.d.ts.map +1 -0
- package/dist/conformance/PlatformSubject.js +3 -0
- package/dist/conformance/PlatformSubject.js.map +1 -0
- package/dist/conformance/Privacy.d.ts +3 -0
- package/dist/conformance/Privacy.d.ts.map +1 -0
- package/dist/conformance/Privacy.js +437 -0
- package/dist/conformance/Privacy.js.map +1 -0
- package/dist/conformance/Progress.d.ts +3 -0
- package/dist/conformance/Progress.d.ts.map +1 -0
- package/dist/conformance/Progress.js +153 -0
- package/dist/conformance/Progress.js.map +1 -0
- package/dist/conformance/Push.d.ts +38 -0
- package/dist/conformance/Push.d.ts.map +1 -0
- package/dist/conformance/Push.js +649 -0
- package/dist/conformance/Push.js.map +1 -0
- package/dist/conformance/PushReference.d.ts +3 -0
- package/dist/conformance/PushReference.d.ts.map +1 -0
- package/dist/conformance/PushReference.js +97 -0
- package/dist/conformance/PushReference.js.map +1 -0
- package/dist/conformance/QuerySurface.d.ts +9 -0
- package/dist/conformance/QuerySurface.d.ts.map +1 -0
- package/dist/conformance/QuerySurface.js +349 -0
- package/dist/conformance/QuerySurface.js.map +1 -0
- package/dist/conformance/Readiness.d.ts +23 -0
- package/dist/conformance/Readiness.d.ts.map +1 -0
- package/dist/conformance/Readiness.js +110 -0
- package/dist/conformance/Readiness.js.map +1 -0
- package/dist/conformance/Reference.d.ts +17 -0
- package/dist/conformance/Reference.d.ts.map +1 -0
- package/dist/conformance/Reference.js +246 -0
- package/dist/conformance/Reference.js.map +1 -0
- package/dist/conformance/Release.d.ts +73 -0
- package/dist/conformance/Release.d.ts.map +1 -0
- package/dist/conformance/Release.js +556 -0
- package/dist/conformance/Release.js.map +1 -0
- package/dist/conformance/ReleaseReference.d.ts +5 -0
- package/dist/conformance/ReleaseReference.d.ts.map +1 -0
- package/dist/conformance/ReleaseReference.js +124 -0
- package/dist/conformance/ReleaseReference.js.map +1 -0
- package/dist/conformance/ResultRendering.d.ts +3 -0
- package/dist/conformance/ResultRendering.d.ts.map +1 -0
- package/dist/conformance/ResultRendering.js +120 -0
- package/dist/conformance/ResultRendering.js.map +1 -0
- package/dist/conformance/Sandbox.d.ts +58 -0
- package/dist/conformance/Sandbox.d.ts.map +1 -0
- package/dist/conformance/Sandbox.js +213 -0
- package/dist/conformance/Sandbox.js.map +1 -0
- package/dist/conformance/SandboxReference.d.ts +3 -0
- package/dist/conformance/SandboxReference.d.ts.map +1 -0
- package/dist/conformance/SandboxReference.js +44 -0
- package/dist/conformance/SandboxReference.js.map +1 -0
- package/dist/conformance/Scheduler.d.ts +106 -0
- package/dist/conformance/Scheduler.d.ts.map +1 -0
- package/dist/conformance/Scheduler.js +576 -0
- package/dist/conformance/Scheduler.js.map +1 -0
- package/dist/conformance/ScreenContext.d.ts +84 -0
- package/dist/conformance/ScreenContext.d.ts.map +1 -0
- package/dist/conformance/ScreenContext.js +290 -0
- package/dist/conformance/ScreenContext.js.map +1 -0
- package/dist/conformance/Search.d.ts +3 -0
- package/dist/conformance/Search.d.ts.map +1 -0
- package/dist/conformance/Search.js +333 -0
- package/dist/conformance/Search.js.map +1 -0
- package/dist/conformance/Secrets.d.ts +8 -0
- package/dist/conformance/Secrets.d.ts.map +1 -0
- package/dist/conformance/Secrets.js +231 -0
- package/dist/conformance/Secrets.js.map +1 -0
- package/dist/conformance/SecretsReference.d.ts +44 -0
- package/dist/conformance/SecretsReference.d.ts.map +1 -0
- package/dist/conformance/SecretsReference.js +73 -0
- package/dist/conformance/SecretsReference.js.map +1 -0
- package/dist/conformance/ServicesReference.d.ts +8 -0
- package/dist/conformance/ServicesReference.d.ts.map +1 -0
- package/dist/conformance/ServicesReference.js +273 -0
- package/dist/conformance/ServicesReference.js.map +1 -0
- package/dist/conformance/ServicesSubject.d.ts +104 -0
- package/dist/conformance/ServicesSubject.d.ts.map +1 -0
- package/dist/conformance/ServicesSubject.js +2 -0
- package/dist/conformance/ServicesSubject.js.map +1 -0
- package/dist/conformance/Settings.d.ts +3 -0
- package/dist/conformance/Settings.d.ts.map +1 -0
- package/dist/conformance/Settings.js +177 -0
- package/dist/conformance/Settings.js.map +1 -0
- package/dist/conformance/Sharing.d.ts +3 -0
- package/dist/conformance/Sharing.d.ts.map +1 -0
- package/dist/conformance/Sharing.js +368 -0
- package/dist/conformance/Sharing.js.map +1 -0
- package/dist/conformance/ShellSubject.d.ts +29 -0
- package/dist/conformance/ShellSubject.d.ts.map +1 -0
- package/dist/conformance/ShellSubject.js +13 -0
- package/dist/conformance/ShellSubject.js.map +1 -0
- package/dist/conformance/SignOutRace.d.ts +23 -0
- package/dist/conformance/SignOutRace.d.ts.map +1 -0
- package/dist/conformance/SignOutRace.js +49 -0
- package/dist/conformance/SignOutRace.js.map +1 -0
- package/dist/conformance/Slot.d.ts +3 -0
- package/dist/conformance/Slot.d.ts.map +1 -0
- package/dist/conformance/Slot.js +79 -0
- package/dist/conformance/Slot.js.map +1 -0
- package/dist/conformance/Space.d.ts +63 -0
- package/dist/conformance/Space.d.ts.map +1 -0
- package/dist/conformance/Space.js +294 -0
- package/dist/conformance/Space.js.map +1 -0
- package/dist/conformance/StorageAdapter.d.ts +76 -0
- package/dist/conformance/StorageAdapter.d.ts.map +1 -0
- package/dist/conformance/StorageAdapter.js +181 -0
- package/dist/conformance/StorageAdapter.js.map +1 -0
- package/dist/conformance/StorageBackend.d.ts +23 -0
- package/dist/conformance/StorageBackend.d.ts.map +1 -0
- package/dist/conformance/StorageBackend.js +274 -0
- package/dist/conformance/StorageBackend.js.map +1 -0
- package/dist/conformance/Subject.d.ts +198 -0
- package/dist/conformance/Subject.d.ts.map +1 -0
- package/dist/conformance/Subject.js +26 -0
- package/dist/conformance/Subject.js.map +1 -0
- package/dist/conformance/Sync.d.ts +3 -0
- package/dist/conformance/Sync.d.ts.map +1 -0
- package/dist/conformance/Sync.js +190 -0
- package/dist/conformance/Sync.js.map +1 -0
- package/dist/conformance/Telemetry.d.ts +3 -0
- package/dist/conformance/Telemetry.d.ts.map +1 -0
- package/dist/conformance/Telemetry.js +218 -0
- package/dist/conformance/Telemetry.js.map +1 -0
- package/dist/conformance/ThemeTokens.d.ts +22 -0
- package/dist/conformance/ThemeTokens.d.ts.map +1 -0
- package/dist/conformance/ThemeTokens.js +121 -0
- package/dist/conformance/ThemeTokens.js.map +1 -0
- package/dist/conformance/ToolSource.d.ts +5 -0
- package/dist/conformance/ToolSource.d.ts.map +1 -0
- package/dist/conformance/ToolSource.js +520 -0
- package/dist/conformance/ToolSource.js.map +1 -0
- package/dist/conformance/Versioning.d.ts +3 -0
- package/dist/conformance/Versioning.d.ts.map +1 -0
- package/dist/conformance/Versioning.js +160 -0
- package/dist/conformance/Versioning.js.map +1 -0
- package/dist/conformance/View.d.ts +3 -0
- package/dist/conformance/View.d.ts.map +1 -0
- package/dist/conformance/View.js +121 -0
- package/dist/conformance/View.js.map +1 -0
- package/dist/conformance/WorkItems.d.ts +3 -0
- package/dist/conformance/WorkItems.d.ts.map +1 -0
- package/dist/conformance/WorkItems.js +152 -0
- package/dist/conformance/WorkItems.js.map +1 -0
- package/dist/conformance/Workflow.d.ts +63 -0
- package/dist/conformance/Workflow.d.ts.map +1 -0
- package/dist/conformance/Workflow.js +235 -0
- package/dist/conformance/Workflow.js.map +1 -0
- package/dist/conformance/acme/chatlog.d.ts +591 -0
- package/dist/conformance/acme/chatlog.d.ts.map +1 -0
- package/dist/conformance/acme/chatlog.js +101 -0
- package/dist/conformance/acme/chatlog.js.map +1 -0
- package/dist/conformance/acme/connector.d.ts +12 -0
- package/dist/conformance/acme/connector.d.ts.map +1 -0
- package/dist/conformance/acme/connector.js +123 -0
- package/dist/conformance/acme/connector.js.map +1 -0
- package/dist/conformance/acme/migrations/0000_messages.sql +8 -0
- package/dist/conformance/archive/app.d.ts +728 -0
- package/dist/conformance/archive/app.d.ts.map +1 -0
- package/dist/conformance/archive/app.js +30 -0
- package/dist/conformance/archive/app.js.map +1 -0
- package/dist/conformance/archive/contract.d.ts +467 -0
- package/dist/conformance/archive/contract.d.ts.map +1 -0
- package/dist/conformance/archive/contract.js +187 -0
- package/dist/conformance/archive/contract.js.map +1 -0
- package/dist/conformance/archive/memo.sync.gen.d.ts +148 -0
- package/dist/conformance/archive/memo.sync.gen.d.ts.map +1 -0
- package/dist/conformance/archive/memo.sync.gen.js +23 -0
- package/dist/conformance/archive/memo.sync.gen.js.map +1 -0
- package/dist/conformance/archive/migrations/archive/0000_archive.sql +9 -0
- package/dist/conformance/archive/migrations/memo/0000_memo.sql +6 -0
- package/dist/conformance/archive/schema.d.ts +185 -0
- package/dist/conformance/archive/schema.d.ts.map +1 -0
- package/dist/conformance/archive/schema.js +22 -0
- package/dist/conformance/archive/schema.js.map +1 -0
- package/dist/conformance/archive/server.d.ts +273 -0
- package/dist/conformance/archive/server.d.ts.map +1 -0
- package/dist/conformance/archive/server.js +127 -0
- package/dist/conformance/archive/server.js.map +1 -0
- package/dist/conformance/archive/sync.gen.d.ts +319 -0
- package/dist/conformance/archive/sync.gen.d.ts.map +1 -0
- package/dist/conformance/archive/sync.gen.js +29 -0
- package/dist/conformance/archive/sync.gen.js.map +1 -0
- package/dist/conformance/atlas/app.d.ts +3 -0
- package/dist/conformance/atlas/app.d.ts.map +1 -0
- package/dist/conformance/atlas/app.js +15 -0
- package/dist/conformance/atlas/app.js.map +1 -0
- package/dist/conformance/atlas/contract.d.ts +489 -0
- package/dist/conformance/atlas/contract.d.ts.map +1 -0
- package/dist/conformance/atlas/contract.js +114 -0
- package/dist/conformance/atlas/contract.js.map +1 -0
- package/dist/conformance/crm/app.d.ts +304 -0
- package/dist/conformance/crm/app.d.ts.map +1 -0
- package/dist/conformance/crm/app.js +95 -0
- package/dist/conformance/crm/app.js.map +1 -0
- package/dist/conformance/crm/contract.d.ts +586 -0
- package/dist/conformance/crm/contract.d.ts.map +1 -0
- package/dist/conformance/crm/contract.js +153 -0
- package/dist/conformance/crm/contract.js.map +1 -0
- package/dist/conformance/crm/migrations/crm/0000_crm.sql +18 -0
- package/dist/conformance/crm/migrations/team/0000_team.sql +6 -0
- package/dist/conformance/crm/schema.d.ts +261 -0
- package/dist/conformance/crm/schema.d.ts.map +1 -0
- package/dist/conformance/crm/schema.js +25 -0
- package/dist/conformance/crm/schema.js.map +1 -0
- package/dist/conformance/crm/sync.gen.d.ts +188 -0
- package/dist/conformance/crm/sync.gen.d.ts.map +1 -0
- package/dist/conformance/crm/sync.gen.js +25 -0
- package/dist/conformance/crm/sync.gen.js.map +1 -0
- package/dist/conformance/desk/contract.d.ts +306 -0
- package/dist/conformance/desk/contract.d.ts.map +1 -0
- package/dist/conformance/desk/contract.js +56 -0
- package/dist/conformance/desk/contract.js.map +1 -0
- package/dist/conformance/desk/migrations/0000_notes.sql +7 -0
- package/dist/conformance/desk/server.d.ts +231 -0
- package/dist/conformance/desk/server.d.ts.map +1 -0
- package/dist/conformance/desk/server.js +123 -0
- package/dist/conformance/desk/server.js.map +1 -0
- package/dist/conformance/drafts/migrations/0000_drafts.sql +8 -0
- package/dist/conformance/drafts/module.d.ts +571 -0
- package/dist/conformance/drafts/module.d.ts.map +1 -0
- package/dist/conformance/drafts/module.js +190 -0
- package/dist/conformance/drafts/module.js.map +1 -0
- package/dist/conformance/fixture/app.d.ts +24 -0
- package/dist/conformance/fixture/app.d.ts.map +1 -0
- package/dist/conformance/fixture/app.js +26 -0
- package/dist/conformance/fixture/app.js.map +1 -0
- package/dist/conformance/fixture/docs/bad-sync.d.ts +105 -0
- package/dist/conformance/fixture/docs/bad-sync.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/bad-sync.js +22 -0
- package/dist/conformance/fixture/docs/bad-sync.js.map +1 -0
- package/dist/conformance/fixture/docs/contract.d.ts +1091 -0
- package/dist/conformance/fixture/docs/contract.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/contract.js +277 -0
- package/dist/conformance/fixture/docs/contract.js.map +1 -0
- package/dist/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
- package/dist/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
- package/dist/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
- package/dist/conformance/fixture/docs/policy.cedar +110 -0
- package/dist/conformance/fixture/docs/schema.d.ts +308 -0
- package/dist/conformance/fixture/docs/schema.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/schema.js +36 -0
- package/dist/conformance/fixture/docs/schema.js.map +1 -0
- package/dist/conformance/fixture/docs/server.d.ts +552 -0
- package/dist/conformance/fixture/docs/server.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/server.js +192 -0
- package/dist/conformance/fixture/docs/server.js.map +1 -0
- package/dist/conformance/fixture/docs/sync.d.ts +402 -0
- package/dist/conformance/fixture/docs/sync.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/sync.gen.d.ts +574 -0
- package/dist/conformance/fixture/docs/sync.gen.d.ts.map +1 -0
- package/dist/conformance/fixture/docs/sync.gen.js +48 -0
- package/dist/conformance/fixture/docs/sync.gen.js.map +1 -0
- package/dist/conformance/fixture/docs/sync.js +23 -0
- package/dist/conformance/fixture/docs/sync.js.map +1 -0
- package/dist/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
- package/dist/conformance/fixture/peer/module.d.ts +306 -0
- package/dist/conformance/fixture/peer/module.d.ts.map +1 -0
- package/dist/conformance/fixture/peer/module.js +44 -0
- package/dist/conformance/fixture/peer/module.js.map +1 -0
- package/dist/conformance/fixture/release/blocking/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/blocking/0001_wait.sql +2 -0
- package/dist/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
- package/dist/conformance/fixture/release/broken/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/broken/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/broken/0002_label.sql +3 -0
- package/dist/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
- package/dist/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/escape/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/escape/0001_escape.sql +5 -0
- package/dist/conformance/fixture/release/misnamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
- package/dist/conformance/fixture/release/module.d.ts +1878 -0
- package/dist/conformance/fixture/release/module.d.ts.map +1 -0
- package/dist/conformance/fixture/release/module.js +102 -0
- package/dist/conformance/fixture/release/module.js.map +1 -0
- package/dist/conformance/fixture/release/outside/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/outside/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/outside/0002_index.sql +4 -0
- package/dist/conformance/fixture/release/outside/0003_later.sql +1 -0
- package/dist/conformance/fixture/release/renamed/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/renamed/0001_misname.sql +10 -0
- package/dist/conformance/fixture/release/renamed/0002_restore.sql +1 -0
- package/dist/conformance/fixture/release/rogue/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/rogue/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/rogue/0002_definer.sql +1 -0
- package/dist/conformance/fixture/release/slow/0000_item.sql +5 -0
- package/dist/conformance/fixture/release/undeclared/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/undeclared/0002_index.sql +1 -0
- package/dist/conformance/fixture/release/v1/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/v2/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/v2/0001_extra.sql +3 -0
- package/dist/conformance/fixture/release/v2/0002_label.sql +3 -0
- package/dist/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
- package/dist/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
- package/dist/conformance/kit-hash.d.ts +8 -0
- package/dist/conformance/kit-hash.d.ts.map +1 -0
- package/dist/conformance/kit-hash.js +20 -0
- package/dist/conformance/kit-hash.js.map +1 -0
- package/dist/conformance/ledger/contract.d.ts +380 -0
- package/dist/conformance/ledger/contract.d.ts.map +1 -0
- package/dist/conformance/ledger/contract.js +81 -0
- package/dist/conformance/ledger/contract.js.map +1 -0
- package/dist/conformance/ledger/migrations/0000_entries.sql +8 -0
- package/dist/conformance/ledger/server.d.ts +312 -0
- package/dist/conformance/ledger/server.d.ts.map +1 -0
- package/dist/conformance/ledger/server.js +152 -0
- package/dist/conformance/ledger/server.js.map +1 -0
- package/dist/conformance/library/app.d.ts +616 -0
- package/dist/conformance/library/app.d.ts.map +1 -0
- package/dist/conformance/library/app.js +35 -0
- package/dist/conformance/library/app.js.map +1 -0
- package/dist/conformance/library/contract.d.ts +377 -0
- package/dist/conformance/library/contract.d.ts.map +1 -0
- package/dist/conformance/library/contract.js +63 -0
- package/dist/conformance/library/contract.js.map +1 -0
- package/dist/conformance/library/migrations/0000_library.sql +14 -0
- package/dist/conformance/library/schema.d.ts +174 -0
- package/dist/conformance/library/schema.d.ts.map +1 -0
- package/dist/conformance/library/schema.js +24 -0
- package/dist/conformance/library/schema.js.map +1 -0
- package/dist/conformance/library/server.d.ts +191 -0
- package/dist/conformance/library/server.d.ts.map +1 -0
- package/dist/conformance/library/server.js +52 -0
- package/dist/conformance/library/server.js.map +1 -0
- package/dist/conformance/library/sync.gen.d.ts +519 -0
- package/dist/conformance/library/sync.gen.d.ts.map +1 -0
- package/dist/conformance/library/sync.gen.js +42 -0
- package/dist/conformance/library/sync.gen.js.map +1 -0
- package/dist/conformance/locale/catalog.d.ts +93 -0
- package/dist/conformance/locale/catalog.d.ts.map +1 -0
- package/dist/conformance/locale/catalog.js +104 -0
- package/dist/conformance/locale/catalog.js.map +1 -0
- package/dist/conformance/notebook/app.d.ts +1039 -0
- package/dist/conformance/notebook/app.d.ts.map +1 -0
- package/dist/conformance/notebook/app.js +88 -0
- package/dist/conformance/notebook/app.js.map +1 -0
- package/dist/conformance/notebook/evals/pages.evals.json +94 -0
- package/dist/conformance/notebook/migrations/0000_notebook.sql +10 -0
- package/dist/conformance/notebook/module.d.ts +717 -0
- package/dist/conformance/notebook/module.d.ts.map +1 -0
- package/dist/conformance/notebook/module.js +188 -0
- package/dist/conformance/notebook/module.js.map +1 -0
- package/dist/conformance/pad/app.d.ts +9 -0
- package/dist/conformance/pad/app.d.ts.map +1 -0
- package/dist/conformance/pad/app.js +13 -0
- package/dist/conformance/pad/app.js.map +1 -0
- package/dist/conformance/pad/contract.d.ts +281 -0
- package/dist/conformance/pad/contract.d.ts.map +1 -0
- package/dist/conformance/pad/contract.js +66 -0
- package/dist/conformance/pad/contract.js.map +1 -0
- package/dist/conformance/pad/migrations/pad/0000_pad.sql +8 -0
- package/dist/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
- package/dist/conformance/pad/schema.d.ts +127 -0
- package/dist/conformance/pad/schema.d.ts.map +1 -0
- package/dist/conformance/pad/schema.js +17 -0
- package/dist/conformance/pad/schema.js.map +1 -0
- package/dist/conformance/pad/server.d.ts +149 -0
- package/dist/conformance/pad/server.d.ts.map +1 -0
- package/dist/conformance/pad/server.js +81 -0
- package/dist/conformance/pad/server.js.map +1 -0
- package/dist/conformance/purchases/app.d.ts +480 -0
- package/dist/conformance/purchases/app.d.ts.map +1 -0
- package/dist/conformance/purchases/app.js +32 -0
- package/dist/conformance/purchases/app.js.map +1 -0
- package/dist/conformance/purchases/contract.d.ts +720 -0
- package/dist/conformance/purchases/contract.d.ts.map +1 -0
- package/dist/conformance/purchases/contract.js +148 -0
- package/dist/conformance/purchases/contract.js.map +1 -0
- package/dist/conformance/purchases/migrations/0000_purchases.sql +17 -0
- package/dist/conformance/purchases/server.d.ts +250 -0
- package/dist/conformance/purchases/server.d.ts.map +1 -0
- package/dist/conformance/purchases/server.js +85 -0
- package/dist/conformance/purchases/server.js.map +1 -0
- package/dist/conformance/studio/app.d.ts +996 -0
- package/dist/conformance/studio/app.d.ts.map +1 -0
- package/dist/conformance/studio/app.js +251 -0
- package/dist/conformance/studio/app.js.map +1 -0
- package/dist/conformance/studio/contract.d.ts +1318 -0
- package/dist/conformance/studio/contract.d.ts.map +1 -0
- package/dist/conformance/studio/contract.js +280 -0
- package/dist/conformance/studio/contract.js.map +1 -0
- package/dist/conformance/studio/migrations/billing/0000_billing.sql +6 -0
- package/dist/conformance/studio/migrations/journal/0000_journal.sql +9 -0
- package/dist/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
- package/dist/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
- package/dist/conformance/workshop/app.d.ts +8 -0
- package/dist/conformance/workshop/app.d.ts.map +1 -0
- package/dist/conformance/workshop/app.js +13 -0
- package/dist/conformance/workshop/app.js.map +1 -0
- package/dist/conformance/workshop/migrations/0000_notes.sql +7 -0
- package/dist/conformance/workshop/module.d.ts +407 -0
- package/dist/conformance/workshop/module.d.ts.map +1 -0
- package/dist/conformance/workshop/module.js +71 -0
- package/dist/conformance/workshop/module.js.map +1 -0
- package/dist/fakes/AcmeFake.d.ts +46 -0
- package/dist/fakes/AcmeFake.d.ts.map +1 -0
- package/dist/fakes/AcmeFake.js +131 -0
- package/dist/fakes/AcmeFake.js.map +1 -0
- package/dist/fakes/ApnsFake.d.ts +79 -0
- package/dist/fakes/ApnsFake.d.ts.map +1 -0
- package/dist/fakes/ApnsFake.js +220 -0
- package/dist/fakes/ApnsFake.js.map +1 -0
- package/dist/fakes/FcmFake.d.ts +46 -0
- package/dist/fakes/FcmFake.d.ts.map +1 -0
- package/dist/fakes/FcmFake.js +185 -0
- package/dist/fakes/FcmFake.js.map +1 -0
- package/dist/fakes/GoogleFake.d.ts +221 -0
- package/dist/fakes/GoogleFake.d.ts.map +1 -0
- package/dist/fakes/GoogleFake.js +1035 -0
- package/dist/fakes/GoogleFake.js.map +1 -0
- package/dist/fakes/HttpApiFake.d.ts +22 -0
- package/dist/fakes/HttpApiFake.d.ts.map +1 -0
- package/dist/fakes/HttpApiFake.js +74 -0
- package/dist/fakes/HttpApiFake.js.map +1 -0
- package/dist/fakes/McpFake.d.ts +80 -0
- package/dist/fakes/McpFake.d.ts.map +1 -0
- package/dist/fakes/McpFake.js +312 -0
- package/dist/fakes/McpFake.js.map +1 -0
- package/dist/fakes/MicrosoftGraphFake.d.ts +254 -0
- package/dist/fakes/MicrosoftGraphFake.d.ts.map +1 -0
- package/dist/fakes/MicrosoftGraphFake.js +850 -0
- package/dist/fakes/MicrosoftGraphFake.js.map +1 -0
- package/dist/fakes/S3Fake.d.ts +29 -0
- package/dist/fakes/S3Fake.d.ts.map +1 -0
- package/dist/fakes/S3Fake.js +347 -0
- package/dist/fakes/S3Fake.js.map +1 -0
- package/dist/fakes/Server.d.ts +137 -0
- package/dist/fakes/Server.d.ts.map +1 -0
- package/dist/fakes/Server.js +357 -0
- package/dist/fakes/Server.js.map +1 -0
- package/dist/fakes/SignInProviderFake.d.ts +21 -0
- package/dist/fakes/SignInProviderFake.d.ts.map +1 -0
- package/dist/fakes/SignInProviderFake.js +56 -0
- package/dist/fakes/SignInProviderFake.js.map +1 -0
- package/dist/fakes/SlackFake.d.ts +136 -0
- package/dist/fakes/SlackFake.d.ts.map +1 -0
- package/dist/fakes/SlackFake.js +787 -0
- package/dist/fakes/SlackFake.js.map +1 -0
- package/dist/fakes/Store.d.ts +40 -0
- package/dist/fakes/Store.d.ts.map +1 -0
- package/dist/fakes/Store.js +82 -0
- package/dist/fakes/Store.js.map +1 -0
- package/dist/fakes/TelemetryFakes.d.ts +77 -0
- package/dist/fakes/TelemetryFakes.d.ts.map +1 -0
- package/dist/fakes/TelemetryFakes.js +121 -0
- package/dist/fakes/TelemetryFakes.js.map +1 -0
- package/dist/fakes/TestCa.d.ts +11 -0
- package/dist/fakes/TestCa.d.ts.map +1 -0
- package/dist/fakes/TestCa.js +115 -0
- package/dist/fakes/TestCa.js.map +1 -0
- package/dist/fakes/WorkOsFake.d.ts +40 -0
- package/dist/fakes/WorkOsFake.d.ts.map +1 -0
- package/dist/fakes/WorkOsFake.js +103 -0
- package/dist/fakes/WorkOsFake.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/make/reference.d.ts +520 -0
- package/dist/make/reference.d.ts.map +1 -0
- package/dist/make/reference.js +182 -0
- package/dist/make/reference.js.map +1 -0
- package/dist/make/sources.d.ts +48 -0
- package/dist/make/sources.d.ts.map +1 -0
- package/dist/make/sources.js +806 -0
- package/dist/make/sources.js.map +1 -0
- package/package.json +77 -3
- package/src/Admin.ts +82 -0
- package/src/Agent.ts +289 -0
- package/src/AgentSurface.ts +51 -0
- package/src/Embedder.ts +69 -0
- package/src/EvalMain.ts +81 -0
- package/src/Evals.ts +490 -0
- package/src/Kernel.ts +228 -0
- package/src/Launch.ts +428 -0
- package/src/Locks.ts +123 -0
- package/src/Routes.ts +65 -0
- package/src/ScriptedChatModel.ts +189 -0
- package/src/SmtpSink.ts +205 -0
- package/src/System.ts +1072 -0
- package/src/TcpProxy.ts +102 -0
- package/src/auth/TrustedProxyAuth.ts +173 -0
- package/src/conformance/ActionConsent.ts +437 -0
- package/src/conformance/ActionRegistry.ts +174 -0
- package/src/conformance/Actor.ts +216 -0
- package/src/conformance/AgentReference.ts +171 -0
- package/src/conformance/AgentResources.ts +548 -0
- package/src/conformance/AgentRuntime.ts +388 -0
- package/src/conformance/AgentSubject.ts +103 -0
- package/src/conformance/Approvals.ts +363 -0
- package/src/conformance/Audit.ts +257 -0
- package/src/conformance/CalendarProvider.ts +156 -0
- package/src/conformance/CapabilityKit.ts +564 -0
- package/src/conformance/ClientSDK.ts +233 -0
- package/src/conformance/CollabDocument.ts +1203 -0
- package/src/conformance/CollabReference.ts +152 -0
- package/src/conformance/CollabSubject.ts +64 -0
- package/src/conformance/Command.ts +75 -0
- package/src/conformance/Connections.ts +357 -0
- package/src/conformance/ConnectionsReference.ts +172 -0
- package/src/conformance/ConnectorReference.ts +280 -0
- package/src/conformance/ContextAccounting.ts +169 -0
- package/src/conformance/Daemon.ts +936 -0
- package/src/conformance/DaemonReference.ts +189 -0
- package/src/conformance/DbTx.ts +253 -0
- package/src/conformance/DecisionTokens.ts +652 -0
- package/src/conformance/Delegation.ts +177 -0
- package/src/conformance/DeskReference.ts +73 -0
- package/src/conformance/DeviceControl.ts +700 -0
- package/src/conformance/Directory.ts +315 -0
- package/src/conformance/DirectoryProvider.ts +72 -0
- package/src/conformance/DocumentSource.ts +62 -0
- package/src/conformance/EndpointReference.ts +117 -0
- package/src/conformance/Files.ts +685 -0
- package/src/conformance/FilesReference.ts +154 -0
- package/src/conformance/FilesSubject.ts +50 -0
- package/src/conformance/Flags.ts +215 -0
- package/src/conformance/Host.ts +197 -0
- package/src/conformance/HttpApi.ts +169 -0
- package/src/conformance/InboxReference.ts +401 -0
- package/src/conformance/InboxSubject.ts +101 -0
- package/src/conformance/Ingestion.ts +425 -0
- package/src/conformance/Ingress.ts +498 -0
- package/src/conformance/Invocation.ts +780 -0
- package/src/conformance/IsolationMatrix.ts +215 -0
- package/src/conformance/LiveConnection.ts +197 -0
- package/src/conformance/LocalClient.ts +651 -0
- package/src/conformance/Locale.ts +141 -0
- package/src/conformance/MachineIdentity.ts +828 -0
- package/src/conformance/MailProvider.ts +217 -0
- package/src/conformance/Memory.ts +223 -0
- package/src/conformance/Messaging.ts +185 -0
- package/src/conformance/Metering.ts +293 -0
- package/src/conformance/ModelProvider.ts +139 -0
- package/src/conformance/ModuleManifest.ts +630 -0
- package/src/conformance/NotebookAgent.ts +41 -0
- package/src/conformance/NotificationChannel.ts +122 -0
- package/src/conformance/Notifications.ts +316 -0
- package/src/conformance/OAuthClient.ts +240 -0
- package/src/conformance/Outbox.ts +342 -0
- package/src/conformance/PlatformReference.ts +73 -0
- package/src/conformance/PlatformSubject.ts +50 -0
- package/src/conformance/Privacy.ts +577 -0
- package/src/conformance/Progress.ts +244 -0
- package/src/conformance/Push.ts +820 -0
- package/src/conformance/PushReference.ts +101 -0
- package/src/conformance/QuerySurface.ts +408 -0
- package/src/conformance/Readiness.ts +157 -0
- package/src/conformance/Reference.ts +326 -0
- package/src/conformance/Release.ts +690 -0
- package/src/conformance/ReleaseReference.ts +179 -0
- package/src/conformance/ResultRendering.ts +149 -0
- package/src/conformance/Sandbox.ts +313 -0
- package/src/conformance/SandboxReference.ts +52 -0
- package/src/conformance/Scheduler.ts +764 -0
- package/src/conformance/ScreenContext.ts +402 -0
- package/src/conformance/Search.ts +419 -0
- package/src/conformance/Secrets.ts +277 -0
- package/src/conformance/SecretsReference.ts +131 -0
- package/src/conformance/ServicesReference.ts +330 -0
- package/src/conformance/ServicesSubject.ts +105 -0
- package/src/conformance/Settings.ts +204 -0
- package/src/conformance/Sharing.ts +486 -0
- package/src/conformance/ShellSubject.ts +47 -0
- package/src/conformance/SignOutRace.ts +77 -0
- package/src/conformance/Slot.ts +84 -0
- package/src/conformance/Space.ts +432 -0
- package/src/conformance/StorageAdapter.ts +253 -0
- package/src/conformance/StorageBackend.ts +327 -0
- package/src/conformance/Subject.ts +208 -0
- package/src/conformance/Sync.ts +215 -0
- package/src/conformance/Telemetry.ts +287 -0
- package/src/conformance/ThemeTokens.ts +163 -0
- package/src/conformance/ToolSource.ts +632 -0
- package/src/conformance/Versioning.ts +199 -0
- package/src/conformance/View.ts +143 -0
- package/src/conformance/WorkItems.ts +186 -0
- package/src/conformance/Workflow.ts +304 -0
- package/src/conformance/acme/chatlog.ts +115 -0
- package/src/conformance/acme/connector.ts +151 -0
- package/src/conformance/acme/migrations/0000_messages.sql +8 -0
- package/src/conformance/archive/app.ts +33 -0
- package/src/conformance/archive/contract.ts +191 -0
- package/src/conformance/archive/memo.sync.gen.ts +25 -0
- package/src/conformance/archive/migrations/archive/0000_archive.sql +9 -0
- package/src/conformance/archive/migrations/memo/0000_memo.sql +6 -0
- package/src/conformance/archive/schema.ts +25 -0
- package/src/conformance/archive/server.ts +146 -0
- package/src/conformance/archive/sync.gen.ts +32 -0
- package/src/conformance/atlas/app.ts +16 -0
- package/src/conformance/atlas/contract.ts +118 -0
- package/src/conformance/crm/app.ts +107 -0
- package/src/conformance/crm/contract.ts +163 -0
- package/src/conformance/crm/migrations/crm/0000_crm.sql +18 -0
- package/src/conformance/crm/migrations/team/0000_team.sql +6 -0
- package/src/conformance/crm/schema.ts +28 -0
- package/src/conformance/crm/sync.gen.ts +27 -0
- package/src/conformance/desk/contract.ts +61 -0
- package/src/conformance/desk/migrations/0000_notes.sql +7 -0
- package/src/conformance/desk/server.ts +131 -0
- package/src/conformance/drafts/migrations/0000_drafts.sql +8 -0
- package/src/conformance/drafts/module.ts +211 -0
- package/src/conformance/fixture/app.ts +37 -0
- package/src/conformance/fixture/docs/bad-sync.ts +34 -0
- package/src/conformance/fixture/docs/contract.ts +297 -0
- package/src/conformance/fixture/docs/migrations/0000_docs.sql +9 -0
- package/src/conformance/fixture/docs/migrations/0001_seen.sql +12 -0
- package/src/conformance/fixture/docs/migrations/0002_attachment.sql +6 -0
- package/src/conformance/fixture/docs/policy.cedar +110 -0
- package/src/conformance/fixture/docs/schema.ts +41 -0
- package/src/conformance/fixture/docs/server.ts +292 -0
- package/src/conformance/fixture/docs/sync.gen.ts +54 -0
- package/src/conformance/fixture/docs/sync.ts +24 -0
- package/src/conformance/fixture/peer/migrations/0000_peer.sql +8 -0
- package/src/conformance/fixture/peer/module.ts +51 -0
- package/src/conformance/fixture/release/blocking/0000_item.sql +3 -0
- package/src/conformance/fixture/release/blocking/0001_wait.sql +2 -0
- package/src/conformance/fixture/release/blocking-renamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/blocking-renamed/0001_wait.sql +5 -0
- package/src/conformance/fixture/release/broken/0000_item.sql +3 -0
- package/src/conformance/fixture/release/broken/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/broken/0002_label.sql +3 -0
- package/src/conformance/fixture/release/drift/escalate/0000_item.sql +5 -0
- package/src/conformance/fixture/release/drift/escalate/0001_escalate.sql +8 -0
- package/src/conformance/fixture/release/drift/v1/0000_item.sql +5 -0
- package/src/conformance/fixture/release/escape/0000_item.sql +3 -0
- package/src/conformance/fixture/release/escape/0001_escape.sql +5 -0
- package/src/conformance/fixture/release/misnamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/misnamed/0001_misname.sql +10 -0
- package/src/conformance/fixture/release/module.ts +119 -0
- package/src/conformance/fixture/release/outside/0000_item.sql +3 -0
- package/src/conformance/fixture/release/outside/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/outside/0002_index.sql +4 -0
- package/src/conformance/fixture/release/outside/0003_later.sql +1 -0
- package/src/conformance/fixture/release/renamed/0000_item.sql +3 -0
- package/src/conformance/fixture/release/renamed/0001_misname.sql +10 -0
- package/src/conformance/fixture/release/renamed/0002_restore.sql +1 -0
- package/src/conformance/fixture/release/rogue/0000_item.sql +3 -0
- package/src/conformance/fixture/release/rogue/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/rogue/0002_definer.sql +1 -0
- package/src/conformance/fixture/release/slow/0000_item.sql +5 -0
- package/src/conformance/fixture/release/undeclared/0000_item.sql +3 -0
- package/src/conformance/fixture/release/undeclared/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/undeclared/0002_index.sql +1 -0
- package/src/conformance/fixture/release/v1/0000_item.sql +3 -0
- package/src/conformance/fixture/release/v2/0000_item.sql +3 -0
- package/src/conformance/fixture/release/v2/0001_extra.sql +3 -0
- package/src/conformance/fixture/release/v2/0002_label.sql +3 -0
- package/src/conformance/fixture/release/viewed-retyped/0000_item.sql +3 -0
- package/src/conformance/fixture/release/viewed-retyped/0001_retype.sql +1 -0
- package/src/conformance/kit-hash.ts +18 -0
- package/src/conformance/ledger/contract.ts +92 -0
- package/src/conformance/ledger/migrations/0000_entries.sql +8 -0
- package/src/conformance/ledger/server.ts +174 -0
- package/src/conformance/library/app.ts +38 -0
- package/src/conformance/library/contract.ts +66 -0
- package/src/conformance/library/migrations/0000_library.sql +14 -0
- package/src/conformance/library/schema.ts +27 -0
- package/src/conformance/library/server.ts +65 -0
- package/src/conformance/library/sync.gen.ts +47 -0
- package/src/conformance/locale/catalog.ts +111 -0
- package/src/conformance/notebook/app.ts +115 -0
- package/src/conformance/notebook/evals/pages.evals.json +94 -0
- package/src/conformance/notebook/migrations/0000_notebook.sql +10 -0
- package/src/conformance/notebook/module.ts +215 -0
- package/src/conformance/notebook/skills/meeting-notes.md +4 -0
- package/src/conformance/pad/app.ts +21 -0
- package/src/conformance/pad/contract.ts +69 -0
- package/src/conformance/pad/migrations/pad/0000_pad.sql +8 -0
- package/src/conformance/pad/migrations/pad/0001_live_copy.sql +2 -0
- package/src/conformance/pad/schema.ts +18 -0
- package/src/conformance/pad/server.ts +102 -0
- package/src/conformance/purchases/app.ts +34 -0
- package/src/conformance/purchases/contract.ts +161 -0
- package/src/conformance/purchases/migrations/0000_purchases.sql +17 -0
- package/src/conformance/purchases/server.ts +95 -0
- package/src/conformance/replica-search.mjs +22 -0
- package/src/conformance/studio/app.ts +298 -0
- package/src/conformance/studio/contract.ts +319 -0
- package/src/conformance/studio/migrations/billing/0000_billing.sql +6 -0
- package/src/conformance/studio/migrations/journal/0000_journal.sql +9 -0
- package/src/conformance/studio/migrations/mailbox/0000_mailbox.sql +7 -0
- package/src/conformance/studio/migrations/tasks/0000_tasks.sql +7 -0
- package/src/conformance/workshop/app.ts +14 -0
- package/src/conformance/workshop/migrations/0000_notes.sql +7 -0
- package/src/conformance/workshop/module.ts +79 -0
- package/src/fakes/AcmeFake.ts +182 -0
- package/src/fakes/ApnsFake.ts +245 -0
- package/src/fakes/FcmFake.ts +231 -0
- package/src/fakes/GoogleFake.ts +1346 -0
- package/src/fakes/HttpApiFake.ts +116 -0
- package/src/fakes/McpFake.ts +355 -0
- package/src/fakes/MicrosoftGraphFake.ts +1191 -0
- package/src/fakes/S3Fake.ts +376 -0
- package/src/fakes/Server.ts +445 -0
- package/src/fakes/SignInProviderFake.ts +70 -0
- package/src/fakes/SlackFake.ts +893 -0
- package/src/fakes/Store.ts +96 -0
- package/src/fakes/TelemetryFakes.ts +197 -0
- package/src/fakes/TestCa.ts +166 -0
- package/src/fakes/WorkOsFake.ts +136 -0
- package/src/index.ts +9 -0
- package/src/make/reference.ts +259 -0
- package/src/make/sources.ts +836 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Eloxiv kernel as the Connections, Metering and Messaging kits' subject: an in-process kernel on a fresh
|
|
3
|
+
* database with the kernel's inbox and `connections` modules and the reference `acme` connector, whose
|
|
4
|
+
* settings point at the acme protocol fake. `second()` starts another kernel on the same database (another
|
|
5
|
+
* process's view, sharing only the database).
|
|
6
|
+
*/
|
|
7
|
+
import type { CapabilityName, ConnectionLimits } from "@eloxiv/contracts"
|
|
8
|
+
import {
|
|
9
|
+
Connections,
|
|
10
|
+
connectionsModule,
|
|
11
|
+
inboxModules,
|
|
12
|
+
type ConnectorDefinition,
|
|
13
|
+
type KernelApp,
|
|
14
|
+
type KernelOptions,
|
|
15
|
+
} from "@eloxiv/kernel"
|
|
16
|
+
import { Effect, Redacted } from "effect"
|
|
17
|
+
import { resolve } from "node:path"
|
|
18
|
+
import { startAcmeFake, type AcmeFake } from "../fakes/AcmeFake.ts"
|
|
19
|
+
import { startKernel, type TestKernel } from "../Kernel.ts"
|
|
20
|
+
import { defaultRuntime, dropDatabase } from "../System.ts"
|
|
21
|
+
import { chatlogModule } from "./acme/chatlog.ts"
|
|
22
|
+
import { acmeConnector } from "./acme/connector.ts"
|
|
23
|
+
import type { CallResult } from "./CapabilityKit.ts"
|
|
24
|
+
import { callAction, consent, createMember, type ConnectorUser, type Surface } from "./ConnectorReference.ts"
|
|
25
|
+
|
|
26
|
+
const root = resolve(import.meta.dirname, "../../../..")
|
|
27
|
+
|
|
28
|
+
export interface KernelView {
|
|
29
|
+
/** An HTTP request over a Connection, as `user`, for an operation needing `scopes`. */
|
|
30
|
+
readonly request: (
|
|
31
|
+
connectionId: string,
|
|
32
|
+
user: ConnectorUser,
|
|
33
|
+
path: string,
|
|
34
|
+
scopes: ReadonlyArray<string>,
|
|
35
|
+
) => Promise<CallResult>
|
|
36
|
+
readonly refresh: (connectionId: string) => Promise<CallResult>
|
|
37
|
+
/** One capability operation over a Connection, as `user`. */
|
|
38
|
+
readonly call: (
|
|
39
|
+
connectionId: string,
|
|
40
|
+
user: ConnectorUser,
|
|
41
|
+
capability: CapabilityName,
|
|
42
|
+
operation: string,
|
|
43
|
+
input: unknown,
|
|
44
|
+
) => Promise<CallResult>
|
|
45
|
+
readonly dispose: () => Promise<void>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ConnectionsSubject extends KernelView {
|
|
49
|
+
readonly url: string
|
|
50
|
+
readonly fake: AcmeFake
|
|
51
|
+
readonly owner: ConnectorUser
|
|
52
|
+
readonly member: (name: string, roles?: ReadonlyArray<string>) => Promise<ConnectorUser>
|
|
53
|
+
readonly removeMember: (user: ConnectorUser) => Promise<void>
|
|
54
|
+
readonly restoreMember: (user: ConnectorUser) => Promise<void>
|
|
55
|
+
readonly action: (user: ConnectorUser, action: string, input: unknown, surface?: Surface) => Promise<CallResult>
|
|
56
|
+
readonly consent: (
|
|
57
|
+
user: ConnectorUser,
|
|
58
|
+
start: { readonly action: "connections.connect" | "connections.reconnect"; readonly input: unknown },
|
|
59
|
+
options?: { readonly callbackSession?: string | undefined },
|
|
60
|
+
) => ReturnType<typeof consent>
|
|
61
|
+
/** Superuser SQL on the app's database. */
|
|
62
|
+
readonly sql: <A = Record<string, unknown>>(
|
|
63
|
+
text: string,
|
|
64
|
+
params?: ReadonlyArray<unknown>,
|
|
65
|
+
) => Promise<ReadonlyArray<A>>
|
|
66
|
+
/** Another kernel on the same database. */
|
|
67
|
+
readonly second: () => Promise<KernelView>
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const startConnectionsReference = async (options: {
|
|
71
|
+
readonly name: string
|
|
72
|
+
readonly limits?: Partial<ConnectionLimits> | undefined
|
|
73
|
+
readonly rotateRefreshTokens?: boolean | undefined
|
|
74
|
+
readonly options?: Partial<KernelOptions> | undefined
|
|
75
|
+
/** Connections settings to override (the refresh timeout, for example). */
|
|
76
|
+
readonly connections?: { readonly refreshTimeoutMs?: number } | undefined
|
|
77
|
+
/** The connector under test (default: the reference `acme` connector with `limits`). */
|
|
78
|
+
readonly connector?: ConnectorDefinition | undefined
|
|
79
|
+
/** Install the `chatlog` fixture module, whose Ingress source receives the acme platform's events. */
|
|
80
|
+
readonly messaging?: boolean | undefined
|
|
81
|
+
}): Promise<ConnectionsSubject & { readonly kernel: TestKernel }> => {
|
|
82
|
+
const database = `eloxiv_t_${options.name}_${defaultRuntime()}`
|
|
83
|
+
await dropDatabase(database, root)
|
|
84
|
+
const fake = await startAcmeFake(
|
|
85
|
+
options.rotateRefreshTokens === undefined ? {} : { rotateRefreshTokens: options.rotateRefreshTokens },
|
|
86
|
+
)
|
|
87
|
+
const connector = options.connector ?? acmeConnector(options.limits)
|
|
88
|
+
const modules = [...inboxModules, connectionsModule, ...(options.messaging === true ? [chatlogModule] : [])]
|
|
89
|
+
const app: KernelApp = { name: options.name, modules, connectors: [connector] }
|
|
90
|
+
const config = {
|
|
91
|
+
connectors: { acme: { ...fake.settings, team: fake.team } },
|
|
92
|
+
ingress: { sweepMs: 200, secrets: { "chatlog.events": [Redacted.make(fake.signingSecret)] } },
|
|
93
|
+
...(options.connections === undefined ? {} : { connections: options.connections }),
|
|
94
|
+
}
|
|
95
|
+
const kernel = await startKernel({ app, database, config, options: options.options })
|
|
96
|
+
const owner = await createMember(kernel, "owner", "acme")
|
|
97
|
+
|
|
98
|
+
const view = (k: TestKernel): KernelView => ({
|
|
99
|
+
request: (connectionId, user, path, scopes) =>
|
|
100
|
+
k.run(
|
|
101
|
+
Effect.gen(function* () {
|
|
102
|
+
const http = (yield* Connections).http(connectionId, { userId: user.id, orgId: user.org }, scopes)
|
|
103
|
+
const response = yield* http.request({ method: "GET", url: `${fake.settings["apiUrl"]}${path}` })
|
|
104
|
+
return { status: response.status, json: response.json }
|
|
105
|
+
}).pipe(
|
|
106
|
+
Effect.map((value): CallResult => ({ ok: true, value })),
|
|
107
|
+
Effect.catch((error: any) => Effect.succeed<CallResult>({ ok: false, error })),
|
|
108
|
+
),
|
|
109
|
+
),
|
|
110
|
+
refresh: (connectionId) =>
|
|
111
|
+
k.run(
|
|
112
|
+
(
|
|
113
|
+
Effect.gen(function* () {
|
|
114
|
+
return yield* (yield* Connections).refresh(connectionId)
|
|
115
|
+
}) as Effect.Effect<unknown, any, any>
|
|
116
|
+
).pipe(
|
|
117
|
+
Effect.map((value): CallResult => ({ ok: true, value })),
|
|
118
|
+
Effect.catch((error: any) => Effect.succeed<CallResult>({ ok: false, error })),
|
|
119
|
+
),
|
|
120
|
+
),
|
|
121
|
+
call: (connectionId, user, capability, operation, input) =>
|
|
122
|
+
k.run(
|
|
123
|
+
(
|
|
124
|
+
Effect.gen(function* () {
|
|
125
|
+
const bound = yield* (yield* Connections).capability(connectionId, capability, {
|
|
126
|
+
userId: user.id,
|
|
127
|
+
orgId: user.org,
|
|
128
|
+
})
|
|
129
|
+
return yield* bound.operations[operation]!(input)
|
|
130
|
+
}) as Effect.Effect<unknown, any, any>
|
|
131
|
+
).pipe(
|
|
132
|
+
Effect.map((value): CallResult => ({ ok: true, value })),
|
|
133
|
+
Effect.catch((error: any) => Effect.succeed<CallResult>({ ok: false, error })),
|
|
134
|
+
),
|
|
135
|
+
),
|
|
136
|
+
dispose: () => k.dispose(),
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
const main = view(kernel)
|
|
140
|
+
return {
|
|
141
|
+
kernel,
|
|
142
|
+
url: kernel.url,
|
|
143
|
+
fake,
|
|
144
|
+
owner,
|
|
145
|
+
...main,
|
|
146
|
+
dispose: async () => {
|
|
147
|
+
await kernel.dispose()
|
|
148
|
+
await fake.close()
|
|
149
|
+
},
|
|
150
|
+
member: (name, roles) => createMember(kernel, name, "acme", roles),
|
|
151
|
+
removeMember: async (user) => {
|
|
152
|
+
await kernel.admin(`DELETE FROM eloxiv.membership WHERE org_id = $1 AND user_id = $2`, [user.org, user.id])
|
|
153
|
+
},
|
|
154
|
+
restoreMember: async (user) => {
|
|
155
|
+
await kernel.admin(`INSERT INTO eloxiv.membership (org_id, user_id) VALUES ($1, $2) ON CONFLICT DO NOTHING`, [
|
|
156
|
+
user.org,
|
|
157
|
+
user.id,
|
|
158
|
+
])
|
|
159
|
+
await kernel.admin(
|
|
160
|
+
`INSERT INTO eloxiv.membership_role (org_id, user_id, role_id) VALUES ($1, $2, 'member') ON CONFLICT DO NOTHING`,
|
|
161
|
+
[user.org, user.id],
|
|
162
|
+
)
|
|
163
|
+
},
|
|
164
|
+
action: (user, action, input, surface) => callAction(kernel, modules, user, action, input, surface),
|
|
165
|
+
consent: (user, start, options) => consent(kernel, modules, user, start, options),
|
|
166
|
+
sql: (text, params) => kernel.admin(text, params) as never,
|
|
167
|
+
second: async () => {
|
|
168
|
+
const other = await startKernel({ app, database, config, skipSetup: true, options: options.options })
|
|
169
|
+
return view(other)
|
|
170
|
+
},
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Eloxiv kernel as a capability kit's subject: an in-process kernel on a fresh database serving the kernel's
|
|
3
|
+
* inbox modules and `connections` module with one connector, whose deployment settings point at a protocol fake
|
|
4
|
+
* (or a real tenant). The harness drives the real consent flow over HTTP (`connections.connect`, the kernel's
|
|
5
|
+
* authorize route, the provider's authorization endpoint, the kernel's callback) and calls capability operations
|
|
6
|
+
* through the kernel's Connections.
|
|
7
|
+
*/
|
|
8
|
+
import { makeClient, signIn } from "@eloxiv/client"
|
|
9
|
+
import type { CapabilityName, Connection } from "@eloxiv/contracts"
|
|
10
|
+
import {
|
|
11
|
+
Connections,
|
|
12
|
+
connectionsModule,
|
|
13
|
+
Directory,
|
|
14
|
+
connectScopes,
|
|
15
|
+
inboxModules,
|
|
16
|
+
type AnyKernelModule,
|
|
17
|
+
type ConnectionSyncDefinition,
|
|
18
|
+
type ConnectorDefinition,
|
|
19
|
+
type KernelApp,
|
|
20
|
+
type KernelOptions,
|
|
21
|
+
} from "@eloxiv/kernel"
|
|
22
|
+
import { Client as McpClient } from "@modelcontextprotocol/sdk/client/index.js"
|
|
23
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
|
|
24
|
+
import { Effect } from "effect"
|
|
25
|
+
import { resolve } from "node:path"
|
|
26
|
+
import { callAgentTool } from "../AgentSurface.ts"
|
|
27
|
+
import { startKernel, type TestKernel } from "../Kernel.ts"
|
|
28
|
+
import { defaultRuntime, dropDatabase } from "../System.ts"
|
|
29
|
+
import type { AccountControls, CallResult, ProviderHarness, Seeds } from "./CapabilityKit.ts"
|
|
30
|
+
|
|
31
|
+
const root = resolve(import.meta.dirname, "../../../..")
|
|
32
|
+
export const OWNER_PASSWORD = "connections-owner-password"
|
|
33
|
+
|
|
34
|
+
export interface ConnectorUser {
|
|
35
|
+
readonly id: string
|
|
36
|
+
readonly email: string
|
|
37
|
+
readonly session: string
|
|
38
|
+
readonly org: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** A member of `org` with a signed-in session (and optionally extra roles). */
|
|
42
|
+
export const createMember = async (
|
|
43
|
+
kernel: TestKernel,
|
|
44
|
+
name: string,
|
|
45
|
+
org: string,
|
|
46
|
+
roles: ReadonlyArray<string> = ["member"],
|
|
47
|
+
): Promise<ConnectorUser> => {
|
|
48
|
+
const email = `${name}@example.com`
|
|
49
|
+
const id = await kernel.run(
|
|
50
|
+
Effect.gen(function* () {
|
|
51
|
+
const directory = yield* Directory
|
|
52
|
+
yield* directory.createOrganization({ id: org, name: org })
|
|
53
|
+
return yield* directory.ensureUser({ email, name, password: OWNER_PASSWORD })
|
|
54
|
+
}),
|
|
55
|
+
)
|
|
56
|
+
await kernel.admin(`INSERT INTO eloxiv.membership (org_id, user_id) VALUES ($1, $2) ON CONFLICT DO NOTHING`, [
|
|
57
|
+
org,
|
|
58
|
+
id,
|
|
59
|
+
])
|
|
60
|
+
for (const role of roles) {
|
|
61
|
+
await kernel.admin(
|
|
62
|
+
`INSERT INTO eloxiv.membership_role (org_id, user_id, role_id) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING`,
|
|
63
|
+
[org, id, role],
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
return { id, email, org, session: (await signIn(kernel.url, { email, password: OWNER_PASSWORD })).token }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type Surface = "http" | "rpc" | "mcp" | "agent"
|
|
70
|
+
|
|
71
|
+
/** Call an action as `user` on a surface; the decoded output, or the standard error. */
|
|
72
|
+
export const callAction = async (
|
|
73
|
+
kernel: TestKernel,
|
|
74
|
+
modules: ReadonlyArray<AnyKernelModule>,
|
|
75
|
+
user: ConnectorUser,
|
|
76
|
+
action: string,
|
|
77
|
+
input: unknown,
|
|
78
|
+
surface: Surface = "http",
|
|
79
|
+
): Promise<CallResult> => {
|
|
80
|
+
const headers = { authorization: `Bearer ${user.session}`, "x-eloxiv-org": user.org }
|
|
81
|
+
const failure = (error: unknown): CallResult => ({ ok: false, error: { _tag: "defect", ...(error as object) } })
|
|
82
|
+
switch (surface) {
|
|
83
|
+
case "http": {
|
|
84
|
+
const response = await fetch(`${kernel.url}/api/actions/${action}`, {
|
|
85
|
+
method: "POST",
|
|
86
|
+
headers: { ...headers, "content-type": "application/json" },
|
|
87
|
+
body: JSON.stringify(input),
|
|
88
|
+
})
|
|
89
|
+
const body = (await response.json()) as any
|
|
90
|
+
return response.ok ? { ok: true, value: body.output } : failure(body)
|
|
91
|
+
}
|
|
92
|
+
case "rpc": {
|
|
93
|
+
const client = makeClient({
|
|
94
|
+
baseUrl: kernel.url,
|
|
95
|
+
modules: modules.map((m) => m.contract),
|
|
96
|
+
token: () => user.session,
|
|
97
|
+
orgId: user.org,
|
|
98
|
+
} as Parameters<typeof makeClient>[0])
|
|
99
|
+
try {
|
|
100
|
+
const result = (await client.call(action as never, input as never)) as any
|
|
101
|
+
return { ok: true, value: result.output }
|
|
102
|
+
} catch (error) {
|
|
103
|
+
return failure(error)
|
|
104
|
+
} finally {
|
|
105
|
+
await client.dispose()
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
case "mcp": {
|
|
109
|
+
const mcp = new McpClient({ name: "eloxiv-connections-kit", version: "0.0.0" })
|
|
110
|
+
await mcp.connect(new StreamableHTTPClientTransport(new URL(`${kernel.url}/mcp`), { requestInit: { headers } }))
|
|
111
|
+
try {
|
|
112
|
+
const result = await mcp.callTool({
|
|
113
|
+
name: action.replaceAll(".", "_"),
|
|
114
|
+
arguments: input as Record<string, unknown>,
|
|
115
|
+
})
|
|
116
|
+
const text = (result.content as Array<{ type: string; text?: string }>)[0]?.text
|
|
117
|
+
const value: any = result.structuredContent ?? (text === undefined ? undefined : JSON.parse(text))
|
|
118
|
+
return result.isError ? failure(value) : { ok: true, value: value.output }
|
|
119
|
+
} finally {
|
|
120
|
+
await mcp.close()
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
case "agent": {
|
|
124
|
+
const { result } = await callAgentTool(kernel, new Headers(headers), action, input)
|
|
125
|
+
if (result.ok) return { ok: true, value: (result.output as { output?: unknown } | undefined)?.output }
|
|
126
|
+
return failure(result.error)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The consent flow, as a browser signed in as `user` would follow it: start it with `connections.connect` (or
|
|
133
|
+
* `reconnect`), open the kernel's authorize URL, follow the provider's authorization endpoint (which approves
|
|
134
|
+
* as the account the fake has signed in), and land on the kernel's callback. Returns what each hop answered.
|
|
135
|
+
*/
|
|
136
|
+
export const consent = async (
|
|
137
|
+
kernel: TestKernel,
|
|
138
|
+
modules: ReadonlyArray<AnyKernelModule>,
|
|
139
|
+
user: ConnectorUser,
|
|
140
|
+
start: { readonly action: "connections.connect" | "connections.reconnect"; readonly input: unknown },
|
|
141
|
+
options: { readonly callbackSession?: string | undefined } = {},
|
|
142
|
+
) => {
|
|
143
|
+
const started = await callAction(kernel, modules, user, start.action, start.input)
|
|
144
|
+
if (!started.ok) return { started, callback: undefined, provider: undefined }
|
|
145
|
+
const browser = { authorization: `Bearer ${user.session}` }
|
|
146
|
+
const authorize = await fetch(started.value.authorizeUrl, { headers: browser, redirect: "manual" })
|
|
147
|
+
if (authorize.status !== 302) return { started, authorize, callback: undefined, provider: undefined }
|
|
148
|
+
const providerUrl = authorize.headers.get("location")!
|
|
149
|
+
const provider = await fetch(providerUrl, { redirect: "manual" })
|
|
150
|
+
const callbackUrl = provider.headers.get("location")!
|
|
151
|
+
const callback = await fetch(callbackUrl, {
|
|
152
|
+
headers: { authorization: `Bearer ${options.callbackSession ?? user.session}` },
|
|
153
|
+
redirect: "manual",
|
|
154
|
+
})
|
|
155
|
+
return { started, authorize, providerUrl, provider, callbackUrl, callback }
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** What a protocol fake exposes to the harness. */
|
|
159
|
+
export interface FakeProvider {
|
|
160
|
+
readonly settings: Record<string, string>
|
|
161
|
+
readonly self: { readonly email: string }
|
|
162
|
+
readonly controls: AccountControls
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface ConnectorReference {
|
|
166
|
+
readonly kernel: TestKernel
|
|
167
|
+
readonly owner: ConnectorUser
|
|
168
|
+
readonly modules: ReadonlyArray<AnyKernelModule>
|
|
169
|
+
readonly harness: ProviderHarness
|
|
170
|
+
readonly dispose: () => Promise<void>
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export const startConnectorReference = async (options: {
|
|
174
|
+
readonly name: string
|
|
175
|
+
readonly connector: ConnectorDefinition
|
|
176
|
+
readonly fake: FakeProvider
|
|
177
|
+
readonly label: string
|
|
178
|
+
readonly seeds: Partial<Record<CapabilityName, Seeds>>
|
|
179
|
+
readonly modules?: ReadonlyArray<AnyKernelModule> | undefined
|
|
180
|
+
readonly connectionSyncs?: ReadonlyArray<ConnectionSyncDefinition> | undefined
|
|
181
|
+
readonly options?: Partial<KernelOptions> | undefined
|
|
182
|
+
}): Promise<ConnectorReference> => {
|
|
183
|
+
const database = `eloxiv_t_${options.name}_${defaultRuntime()}`
|
|
184
|
+
await dropDatabase(database, root)
|
|
185
|
+
const modules = [...inboxModules, connectionsModule, ...(options.modules ?? [])]
|
|
186
|
+
const app: KernelApp = {
|
|
187
|
+
name: options.name,
|
|
188
|
+
modules,
|
|
189
|
+
connectors: [options.connector],
|
|
190
|
+
connectionSyncs: options.connectionSyncs,
|
|
191
|
+
}
|
|
192
|
+
const kernel = await startKernel({
|
|
193
|
+
app,
|
|
194
|
+
database,
|
|
195
|
+
config: { connectors: { [options.connector.name]: options.fake.settings } },
|
|
196
|
+
options: options.options,
|
|
197
|
+
})
|
|
198
|
+
const owner = await createMember(kernel, "owner", "acme")
|
|
199
|
+
const normalize = options.connector.normalizeScope ?? ((s: string) => s)
|
|
200
|
+
|
|
201
|
+
const list = async (): Promise<ReadonlyArray<Connection>> => {
|
|
202
|
+
const result = await callAction(kernel, modules, owner, "connections.list", {})
|
|
203
|
+
if (!result.ok) throw new Error(`connections.list failed: ${JSON.stringify(result.error)}`)
|
|
204
|
+
return result.value.connections
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const connect = async (capabilities: ReadonlyArray<CapabilityName>) => {
|
|
208
|
+
const flow = await consent(kernel, modules, owner, {
|
|
209
|
+
action: "connections.connect",
|
|
210
|
+
input: { provider: options.connector.name, capabilities },
|
|
211
|
+
})
|
|
212
|
+
if (flow.callback?.status !== 200) {
|
|
213
|
+
throw new Error(
|
|
214
|
+
`The consent flow failed: ${JSON.stringify(flow.started)} ${flow.authorize?.status ?? ""} ${flow.callback?.status ?? ""} ${(await flow.callback?.text()) ?? ""}`,
|
|
215
|
+
)
|
|
216
|
+
}
|
|
217
|
+
const mine = (await list()).filter(
|
|
218
|
+
(c) => c.provider === options.connector.name && c.accountLabel === options.fake.self.email,
|
|
219
|
+
)
|
|
220
|
+
if (mine.length !== 1) throw new Error(`Expected one Connection, found ${mine.length}`)
|
|
221
|
+
return mine[0]!.id
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const call = async (
|
|
225
|
+
connectionId: string,
|
|
226
|
+
capability: CapabilityName,
|
|
227
|
+
operation: string,
|
|
228
|
+
input: unknown,
|
|
229
|
+
): Promise<CallResult> =>
|
|
230
|
+
kernel.run(
|
|
231
|
+
Effect.gen(function* () {
|
|
232
|
+
const connections = yield* Connections
|
|
233
|
+
const bound = yield* connections.capability(connectionId, capability, { userId: owner.id, orgId: owner.org })
|
|
234
|
+
return yield* bound.operations[operation]!(input)
|
|
235
|
+
}).pipe(
|
|
236
|
+
Effect.map((value): CallResult => ({ ok: true, value })),
|
|
237
|
+
Effect.catch((error: any) => Effect.succeed<CallResult>({ ok: false, error })),
|
|
238
|
+
),
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
const harness: ProviderHarness = {
|
|
242
|
+
label: options.label,
|
|
243
|
+
provider: options.connector.name,
|
|
244
|
+
connect,
|
|
245
|
+
list,
|
|
246
|
+
call,
|
|
247
|
+
flags: async (connectionId, capability) =>
|
|
248
|
+
kernel.run(
|
|
249
|
+
Effect.gen(function* () {
|
|
250
|
+
const bound = yield* (yield* Connections).capability(connectionId, capability, {
|
|
251
|
+
userId: owner.id,
|
|
252
|
+
orgId: owner.org,
|
|
253
|
+
})
|
|
254
|
+
return bound.flags as Record<string, unknown>
|
|
255
|
+
}),
|
|
256
|
+
),
|
|
257
|
+
providerScopes: (capability) =>
|
|
258
|
+
[
|
|
259
|
+
...new Set(
|
|
260
|
+
// What connecting the capability asks for (not what it leaves to incremental consent).
|
|
261
|
+
connectScopes(options.connector.capabilities[capability]).map(normalize),
|
|
262
|
+
),
|
|
263
|
+
].sort(),
|
|
264
|
+
notifications: async () =>
|
|
265
|
+
(
|
|
266
|
+
await kernel.admin<{ title: string }>(
|
|
267
|
+
`SELECT title FROM eloxiv_notifications.notification WHERE recipient_id = $1 ORDER BY created_at`,
|
|
268
|
+
[owner.id],
|
|
269
|
+
)
|
|
270
|
+
).map((row) => row.title),
|
|
271
|
+
resetBackpressure: async (connectionId) => {
|
|
272
|
+
await kernel.admin(`DELETE FROM eloxiv.connection_cooldown WHERE connection_id = $1`, [connectionId])
|
|
273
|
+
await kernel.admin(`DELETE FROM eloxiv.connection_usage WHERE connection_id = $1`, [connectionId])
|
|
274
|
+
},
|
|
275
|
+
selfAddress: options.fake.self.email,
|
|
276
|
+
controls: options.fake.controls,
|
|
277
|
+
seeds: options.seeds,
|
|
278
|
+
}
|
|
279
|
+
return { kernel, owner, modules, harness, dispose: () => kernel.dispose() }
|
|
280
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conformance kit for the ContextAccounting contract (docs/contracts/context-accounting.md) on the agent
|
|
3
|
+
* conformance app.
|
|
4
|
+
*
|
|
5
|
+
* The context x-ray of a model call lists every item the model was sent (instructions, skills, memory, messages,
|
|
6
|
+
* tool results, tool definitions) with its tokens, and adds up to exactly what the model received: the scripted
|
|
7
|
+
* model counts its own prompt (`promptTokens` in `../Agent.ts`, `ceil(characters / 4)` per part, written
|
|
8
|
+
* independently of any kernel) and reports it as the call's input tokens. Pinned items stay, evicted ones
|
|
9
|
+
* leave until restored, and categories over budget shed their lowest-priority unpinned items.
|
|
10
|
+
*
|
|
11
|
+
* The subject must run with a memory budget of 60 tokens (see `packages/testing/test/agent-context.test.ts`).
|
|
12
|
+
*
|
|
13
|
+
* Usage, in a Vitest file: `contextAccountingConformance(() => startMyKernel())`.
|
|
14
|
+
*/
|
|
15
|
+
import type { ContextInventory } from "@eloxiv/contracts"
|
|
16
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest"
|
|
17
|
+
import { byUserMessage } from "../Agent.ts"
|
|
18
|
+
import { unique, type AgentPerson, type AgentSubject, type StartAgentSubject } from "./AgentSubject.ts"
|
|
19
|
+
|
|
20
|
+
export const CONTEXT_SUBJECT_SETTINGS = { budgets: { memory: 60 } } as const
|
|
21
|
+
|
|
22
|
+
const sum = (inventory: ContextInventory) => inventory.items.reduce((n, item) => n + item.tokens, 0)
|
|
23
|
+
|
|
24
|
+
export const contextAccountingConformance = (start: StartAgentSubject) =>
|
|
25
|
+
describe("ContextAccounting contract", () => {
|
|
26
|
+
let s: AgentSubject
|
|
27
|
+
let ada: AgentPerson
|
|
28
|
+
let ben: AgentPerson
|
|
29
|
+
|
|
30
|
+
beforeAll(async () => {
|
|
31
|
+
s = await start()
|
|
32
|
+
ada = await s.person("ada")
|
|
33
|
+
ben = await s.person("ben")
|
|
34
|
+
}, 120_000)
|
|
35
|
+
afterAll(() => s?.dispose())
|
|
36
|
+
|
|
37
|
+
it("adds up to exactly what the model received, call by call and category by category", async () => {
|
|
38
|
+
await s.invoke(ada, "agent.remember", { scope: "user", key: "tz", content: "Ada works in Europe/London." })
|
|
39
|
+
const title = unique("xray")
|
|
40
|
+
s.script(
|
|
41
|
+
byUserMessage({
|
|
42
|
+
[`File ${title}`]: [
|
|
43
|
+
{ toolCalls: [{ tool: "notebook_write", input: { title, body: "x".repeat(400) } }] },
|
|
44
|
+
{ toolCalls: [{ tool: "query", input: { view: "notebook.pages" } }] },
|
|
45
|
+
{ text: "Filed." },
|
|
46
|
+
],
|
|
47
|
+
}),
|
|
48
|
+
)
|
|
49
|
+
const sent = await s.send(ada, `File ${title}`)
|
|
50
|
+
const run = await s.waitRun(ada, sent.runId)
|
|
51
|
+
expect(run.steps).toBe(3)
|
|
52
|
+
const calls = s.calls().filter((c) => c.seen.lastUser === `File ${title}`)
|
|
53
|
+
expect(calls).toHaveLength(3)
|
|
54
|
+
for (let step = 0; step < 3; step++) {
|
|
55
|
+
const inventory = await s.inventory(ada, sent.runId, step)
|
|
56
|
+
expect(inventory.step).toBe(step)
|
|
57
|
+
expect(inventory.total).toBe(sum(inventory))
|
|
58
|
+
// What the model itself counted, from what it actually received.
|
|
59
|
+
expect(inventory.total).toBe(calls[step]!.inputTokens)
|
|
60
|
+
const categories = Object.values(inventory.totals).reduce((n, v) => n + v, 0)
|
|
61
|
+
expect(categories).toBe(inventory.total)
|
|
62
|
+
expect(new Set(inventory.items.map((i) => i.ref)).size).toBe(inventory.items.length)
|
|
63
|
+
// Every system message sent is one item, and the tools offered are the tool items.
|
|
64
|
+
const systems = calls[step]!.options.prompt.filter((m) => m.role === "system").length
|
|
65
|
+
expect(inventory.items.filter((i) => ["instructions", "skills", "memory"].includes(i.category)).length).toBe(
|
|
66
|
+
systems,
|
|
67
|
+
)
|
|
68
|
+
expect(
|
|
69
|
+
inventory.items
|
|
70
|
+
.filter((i) => i.category === "tools")
|
|
71
|
+
.map((i) => i.ref.slice(5))
|
|
72
|
+
.sort(),
|
|
73
|
+
).toEqual([...calls[step]!.seen.tools].sort())
|
|
74
|
+
}
|
|
75
|
+
const last = await s.inventory(ada, sent.runId)
|
|
76
|
+
expect(last.step).toBe(2)
|
|
77
|
+
for (const category of ["instructions", "skills", "memory", "messages", "tool-results", "tools"]) {
|
|
78
|
+
expect(last.totals[category], category).toBeGreaterThan(0)
|
|
79
|
+
}
|
|
80
|
+
expect(last.items.find((i) => i.category === "memory")).toMatchObject({ source: { scope: "user", key: "tz" } })
|
|
81
|
+
// The inventory is the run owner's alone.
|
|
82
|
+
await expect(s.inventory(ben, sent.runId)).rejects.toThrow(/UnknownRun/u)
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
it("pins, evicts and restores items by their ref, from the next model call", async () => {
|
|
86
|
+
const first = await (async () => {
|
|
87
|
+
s.script(byUserMessage({}, { text: "ok" }))
|
|
88
|
+
const sent = await s.send(ada, "Baseline")
|
|
89
|
+
await s.waitRun(ada, sent.runId)
|
|
90
|
+
return sent
|
|
91
|
+
})()
|
|
92
|
+
const baseline = await s.inventory(ada, first.runId)
|
|
93
|
+
const memory = baseline.items.find((i) => i.category === "memory")!
|
|
94
|
+
expect(memory).toBeDefined()
|
|
95
|
+
expect(
|
|
96
|
+
(
|
|
97
|
+
await s.invoke(ada, "agent.directContext", {
|
|
98
|
+
conversationId: first.conversationId,
|
|
99
|
+
ref: "skill:notebook.pages",
|
|
100
|
+
directive: "pin",
|
|
101
|
+
})
|
|
102
|
+
).ok,
|
|
103
|
+
).toBe(true)
|
|
104
|
+
expect(
|
|
105
|
+
(
|
|
106
|
+
await s.invoke(ada, "agent.directContext", {
|
|
107
|
+
conversationId: first.conversationId,
|
|
108
|
+
ref: memory.ref,
|
|
109
|
+
directive: "evict",
|
|
110
|
+
})
|
|
111
|
+
).ok,
|
|
112
|
+
).toBe(true)
|
|
113
|
+
// Ben cannot direct Ada's conversation.
|
|
114
|
+
expect(
|
|
115
|
+
(
|
|
116
|
+
await s.invoke(ben, "agent.directContext", {
|
|
117
|
+
conversationId: first.conversationId,
|
|
118
|
+
ref: memory.ref,
|
|
119
|
+
directive: "pin",
|
|
120
|
+
})
|
|
121
|
+
).ok,
|
|
122
|
+
).toBe(false)
|
|
123
|
+
|
|
124
|
+
const second = await s.send(ada, "Again", first.conversationId)
|
|
125
|
+
await s.waitRun(ada, second.runId)
|
|
126
|
+
const directed = await s.inventory(ada, second.runId)
|
|
127
|
+
const skill = directed.items.find((i) => i.ref === "skill:notebook.pages")!
|
|
128
|
+
expect(skill.pinned).toBe(true)
|
|
129
|
+
expect(skill.tokens).toBeGreaterThan(baseline.items.find((i) => i.ref === "skill:notebook.pages")!.tokens)
|
|
130
|
+
expect(
|
|
131
|
+
s
|
|
132
|
+
.calls()
|
|
133
|
+
.at(-1)!
|
|
134
|
+
.seen.system.some((t) => t.includes("Tearing a page out")),
|
|
135
|
+
).toBe(true)
|
|
136
|
+
expect(directed.items.some((i) => i.ref === memory.ref)).toBe(false)
|
|
137
|
+
expect(directed.evicted).toContainEqual(expect.objectContaining({ ref: memory.ref, reason: "directive" }))
|
|
138
|
+
expect(directed.total).toBe(s.calls().at(-1)!.inputTokens)
|
|
139
|
+
|
|
140
|
+
await s.invoke(ada, "agent.directContext", {
|
|
141
|
+
conversationId: first.conversationId,
|
|
142
|
+
ref: memory.ref,
|
|
143
|
+
directive: "restore",
|
|
144
|
+
})
|
|
145
|
+
const third = await s.send(ada, "Once more", first.conversationId)
|
|
146
|
+
await s.waitRun(ada, third.runId)
|
|
147
|
+
expect((await s.inventory(ada, third.runId)).items.some((i) => i.ref === memory.ref)).toBe(true)
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
it("sheds a category's lowest-priority unpinned items when it is over budget, and reports them", async () => {
|
|
151
|
+
for (let i = 0; i < 6; i++) {
|
|
152
|
+
await s.invoke(ben, "agent.remember", {
|
|
153
|
+
scope: "user",
|
|
154
|
+
key: `fact-${i}`,
|
|
155
|
+
content: `Ben's fact number ${i}, kept for the record.`,
|
|
156
|
+
})
|
|
157
|
+
}
|
|
158
|
+
s.script(byUserMessage({}, { text: "ok" }))
|
|
159
|
+
const sent = await s.send(ben, "Hello")
|
|
160
|
+
await s.waitRun(ben, sent.runId)
|
|
161
|
+
const inventory = await s.inventory(ben, sent.runId)
|
|
162
|
+
expect(inventory.budgets["memory"]).toBe(60)
|
|
163
|
+
expect(inventory.totals["memory"] ?? 0).toBeLessThanOrEqual(60)
|
|
164
|
+
const shed = inventory.evicted.filter((e) => e.category === "memory" && e.reason === "budget")
|
|
165
|
+
expect(shed.length).toBeGreaterThan(0)
|
|
166
|
+
expect(inventory.items.filter((i) => i.category === "memory").length + shed.length).toBe(6)
|
|
167
|
+
expect(inventory.total).toBe(s.calls().at(-1)!.inputTokens)
|
|
168
|
+
})
|
|
169
|
+
})
|