@eloxiv/contracts 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/Agent.d.ts +792 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +610 -0
- package/dist/Agent.js.map +1 -0
- package/dist/Analytics.d.ts +46 -0
- package/dist/Analytics.d.ts.map +1 -0
- package/dist/Analytics.js +89 -0
- package/dist/Analytics.js.map +1 -0
- package/dist/Approval.d.ts +70 -0
- package/dist/Approval.d.ts.map +1 -0
- package/dist/Approval.js +127 -0
- package/dist/Approval.js.map +1 -0
- package/dist/Catalog.d.ts +238 -0
- package/dist/Catalog.d.ts.map +1 -0
- package/dist/Catalog.js +169 -0
- package/dist/Catalog.js.map +1 -0
- package/dist/Checklist.d.ts +99 -0
- package/dist/Checklist.d.ts.map +1 -0
- package/dist/Checklist.js +105 -0
- package/dist/Checklist.js.map +1 -0
- package/dist/Data.d.ts +107 -0
- package/dist/Data.d.ts.map +1 -0
- package/dist/Data.js +93 -0
- package/dist/Data.js.map +1 -0
- package/dist/Devices.d.ts +857 -0
- package/dist/Devices.d.ts.map +1 -0
- package/dist/Devices.js +590 -0
- package/dist/Devices.js.map +1 -0
- package/dist/Durable.d.ts +406 -0
- package/dist/Durable.d.ts.map +1 -0
- package/dist/Durable.js +203 -0
- package/dist/Durable.js.map +1 -0
- package/dist/Errors.d.ts +95 -0
- package/dist/Errors.d.ts.map +1 -0
- package/dist/Errors.js +72 -0
- package/dist/Errors.js.map +1 -0
- package/dist/JsonSchema.d.ts +355 -0
- package/dist/JsonSchema.d.ts.map +1 -0
- package/dist/JsonSchema.js +151 -0
- package/dist/JsonSchema.js.map +1 -0
- package/dist/Manifest.d.ts +353 -0
- package/dist/Manifest.d.ts.map +1 -0
- package/dist/Manifest.js +894 -0
- package/dist/Manifest.js.map +1 -0
- package/dist/Module.d.ts +447 -0
- package/dist/Module.d.ts.map +1 -0
- package/dist/Module.js +221 -0
- package/dist/Module.js.map +1 -0
- package/dist/Optimistic.d.ts +192 -0
- package/dist/Optimistic.d.ts.map +1 -0
- package/dist/Optimistic.js +319 -0
- package/dist/Optimistic.js.map +1 -0
- package/dist/Projection.d.ts +163 -0
- package/dist/Projection.d.ts.map +1 -0
- package/dist/Projection.js +158 -0
- package/dist/Projection.js.map +1 -0
- package/dist/Proposals.d.ts +103 -0
- package/dist/Proposals.d.ts.map +1 -0
- package/dist/Proposals.js +72 -0
- package/dist/Proposals.js.map +1 -0
- package/dist/Receipt.d.ts +243 -0
- package/dist/Receipt.d.ts.map +1 -0
- package/dist/Receipt.js +108 -0
- package/dist/Receipt.js.map +1 -0
- package/dist/Records.d.ts +297 -0
- package/dist/Records.d.ts.map +1 -0
- package/dist/Records.js +171 -0
- package/dist/Records.js.map +1 -0
- package/dist/Render.d.ts +207 -0
- package/dist/Render.d.ts.map +1 -0
- package/dist/Render.js +502 -0
- package/dist/Render.js.map +1 -0
- package/dist/Rpc.d.ts +115 -0
- package/dist/Rpc.d.ts.map +1 -0
- package/dist/Rpc.js +68 -0
- package/dist/Rpc.js.map +1 -0
- package/dist/SearchLanguages.d.ts +4 -0
- package/dist/SearchLanguages.d.ts.map +1 -0
- package/dist/SearchLanguages.js +33 -0
- package/dist/SearchLanguages.js.map +1 -0
- package/dist/Service.d.ts +59 -0
- package/dist/Service.d.ts.map +1 -0
- package/dist/Service.js +38 -0
- package/dist/Service.js.map +1 -0
- package/dist/Versions.d.ts +9 -0
- package/dist/Versions.d.ts.map +1 -0
- package/dist/Versions.js +78 -0
- package/dist/Versions.js.map +1 -0
- package/dist/contracts/ActionConsent.d.ts +189 -0
- package/dist/contracts/ActionConsent.d.ts.map +1 -0
- package/dist/contracts/ActionConsent.js +129 -0
- package/dist/contracts/ActionConsent.js.map +1 -0
- package/dist/contracts/ActionRegistry.d.ts +149 -0
- package/dist/contracts/ActionRegistry.d.ts.map +1 -0
- package/dist/contracts/ActionRegistry.js +37 -0
- package/dist/contracts/ActionRegistry.js.map +1 -0
- package/dist/contracts/Actor.d.ts +129 -0
- package/dist/contracts/Actor.d.ts.map +1 -0
- package/dist/contracts/Actor.js +47 -0
- package/dist/contracts/Actor.js.map +1 -0
- package/dist/contracts/AgentResources.d.ts +248 -0
- package/dist/contracts/AgentResources.d.ts.map +1 -0
- package/dist/contracts/AgentResources.js +158 -0
- package/dist/contracts/AgentResources.js.map +1 -0
- package/dist/contracts/AgentRuntime.d.ts +453 -0
- package/dist/contracts/AgentRuntime.d.ts.map +1 -0
- package/dist/contracts/AgentRuntime.js +117 -0
- package/dist/contracts/AgentRuntime.js.map +1 -0
- package/dist/contracts/Approvals.d.ts +303 -0
- package/dist/contracts/Approvals.d.ts.map +1 -0
- package/dist/contracts/Approvals.js +117 -0
- package/dist/contracts/Approvals.js.map +1 -0
- package/dist/contracts/Audit.d.ts +510 -0
- package/dist/contracts/Audit.d.ts.map +1 -0
- package/dist/contracts/Audit.js +139 -0
- package/dist/contracts/Audit.js.map +1 -0
- package/dist/contracts/CalendarProvider.d.ts +572 -0
- package/dist/contracts/CalendarProvider.d.ts.map +1 -0
- package/dist/contracts/CalendarProvider.js +203 -0
- package/dist/contracts/CalendarProvider.js.map +1 -0
- package/dist/contracts/Capability.d.ts +197 -0
- package/dist/contracts/Capability.d.ts.map +1 -0
- package/dist/contracts/Capability.js +189 -0
- package/dist/contracts/Capability.js.map +1 -0
- package/dist/contracts/ClientSDK.d.ts +250 -0
- package/dist/contracts/ClientSDK.d.ts.map +1 -0
- package/dist/contracts/ClientSDK.js +184 -0
- package/dist/contracts/ClientSDK.js.map +1 -0
- package/dist/contracts/CollabDocument.d.ts +781 -0
- package/dist/contracts/CollabDocument.d.ts.map +1 -0
- package/dist/contracts/CollabDocument.js +364 -0
- package/dist/contracts/CollabDocument.js.map +1 -0
- package/dist/contracts/Command.d.ts +183 -0
- package/dist/contracts/Command.d.ts.map +1 -0
- package/dist/contracts/Command.js +66 -0
- package/dist/contracts/Command.js.map +1 -0
- package/dist/contracts/Connections.d.ts +612 -0
- package/dist/contracts/Connections.d.ts.map +1 -0
- package/dist/contracts/Connections.js +323 -0
- package/dist/contracts/Connections.js.map +1 -0
- package/dist/contracts/ContextAccounting.d.ts +79 -0
- package/dist/contracts/ContextAccounting.d.ts.map +1 -0
- package/dist/contracts/ContextAccounting.js +32 -0
- package/dist/contracts/ContextAccounting.js.map +1 -0
- package/dist/contracts/Daemon.d.ts +486 -0
- package/dist/contracts/Daemon.d.ts.map +1 -0
- package/dist/contracts/Daemon.js +192 -0
- package/dist/contracts/Daemon.js.map +1 -0
- package/dist/contracts/DbTx.d.ts +149 -0
- package/dist/contracts/DbTx.d.ts.map +1 -0
- package/dist/contracts/DbTx.js +94 -0
- package/dist/contracts/DbTx.js.map +1 -0
- package/dist/contracts/Delegation.d.ts +121 -0
- package/dist/contracts/Delegation.d.ts.map +1 -0
- package/dist/contracts/Delegation.js +76 -0
- package/dist/contracts/Delegation.js.map +1 -0
- package/dist/contracts/DeviceControl.d.ts +293 -0
- package/dist/contracts/DeviceControl.d.ts.map +1 -0
- package/dist/contracts/DeviceControl.js +107 -0
- package/dist/contracts/DeviceControl.js.map +1 -0
- package/dist/contracts/Directory.d.ts +492 -0
- package/dist/contracts/Directory.d.ts.map +1 -0
- package/dist/contracts/Directory.js +225 -0
- package/dist/contracts/Directory.js.map +1 -0
- package/dist/contracts/DirectoryProvider.d.ts +214 -0
- package/dist/contracts/DirectoryProvider.d.ts.map +1 -0
- package/dist/contracts/DirectoryProvider.js +73 -0
- package/dist/contracts/DirectoryProvider.js.map +1 -0
- package/dist/contracts/DocumentSource.d.ts +190 -0
- package/dist/contracts/DocumentSource.d.ts.map +1 -0
- package/dist/contracts/DocumentSource.js +64 -0
- package/dist/contracts/DocumentSource.js.map +1 -0
- package/dist/contracts/Files.d.ts +762 -0
- package/dist/contracts/Files.d.ts.map +1 -0
- package/dist/contracts/Files.js +339 -0
- package/dist/contracts/Files.js.map +1 -0
- package/dist/contracts/Flags.d.ts +265 -0
- package/dist/contracts/Flags.d.ts.map +1 -0
- package/dist/contracts/Flags.js +197 -0
- package/dist/contracts/Flags.js.map +1 -0
- package/dist/contracts/Host.d.ts +320 -0
- package/dist/contracts/Host.d.ts.map +1 -0
- package/dist/contracts/Host.js +224 -0
- package/dist/contracts/Host.js.map +1 -0
- package/dist/contracts/HttpApi.d.ts +102 -0
- package/dist/contracts/HttpApi.d.ts.map +1 -0
- package/dist/contracts/HttpApi.js +89 -0
- package/dist/contracts/HttpApi.js.map +1 -0
- package/dist/contracts/Ingestion.d.ts +522 -0
- package/dist/contracts/Ingestion.d.ts.map +1 -0
- package/dist/contracts/Ingestion.js +275 -0
- package/dist/contracts/Ingestion.js.map +1 -0
- package/dist/contracts/Ingress.d.ts +132 -0
- package/dist/contracts/Ingress.d.ts.map +1 -0
- package/dist/contracts/Ingress.js +102 -0
- package/dist/contracts/Ingress.js.map +1 -0
- package/dist/contracts/Invocation.d.ts +361 -0
- package/dist/contracts/Invocation.d.ts.map +1 -0
- package/dist/contracts/Invocation.js +104 -0
- package/dist/contracts/Invocation.js.map +1 -0
- package/dist/contracts/LocalClient.d.ts +878 -0
- package/dist/contracts/LocalClient.d.ts.map +1 -0
- package/dist/contracts/LocalClient.js +423 -0
- package/dist/contracts/LocalClient.js.map +1 -0
- package/dist/contracts/Locale.d.ts +162 -0
- package/dist/contracts/Locale.d.ts.map +1 -0
- package/dist/contracts/Locale.js +123 -0
- package/dist/contracts/Locale.js.map +1 -0
- package/dist/contracts/MachineIdentity.d.ts +434 -0
- package/dist/contracts/MachineIdentity.d.ts.map +1 -0
- package/dist/contracts/MachineIdentity.js +223 -0
- package/dist/contracts/MachineIdentity.js.map +1 -0
- package/dist/contracts/MailProvider.d.ts +791 -0
- package/dist/contracts/MailProvider.d.ts.map +1 -0
- package/dist/contracts/MailProvider.js +237 -0
- package/dist/contracts/MailProvider.js.map +1 -0
- package/dist/contracts/Memory.d.ts +62 -0
- package/dist/contracts/Memory.d.ts.map +1 -0
- package/dist/contracts/Memory.js +43 -0
- package/dist/contracts/Memory.js.map +1 -0
- package/dist/contracts/Messaging.d.ts +154 -0
- package/dist/contracts/Messaging.d.ts.map +1 -0
- package/dist/contracts/Messaging.js +97 -0
- package/dist/contracts/Messaging.js.map +1 -0
- package/dist/contracts/Metering.d.ts +334 -0
- package/dist/contracts/Metering.d.ts.map +1 -0
- package/dist/contracts/Metering.js +202 -0
- package/dist/contracts/Metering.js.map +1 -0
- package/dist/contracts/ModelProvider.d.ts +142 -0
- package/dist/contracts/ModelProvider.d.ts.map +1 -0
- package/dist/contracts/ModelProvider.js +72 -0
- package/dist/contracts/ModelProvider.js.map +1 -0
- package/dist/contracts/ModuleManifest.d.ts +2519 -0
- package/dist/contracts/ModuleManifest.d.ts.map +1 -0
- package/dist/contracts/ModuleManifest.js +272 -0
- package/dist/contracts/ModuleManifest.js.map +1 -0
- package/dist/contracts/NotificationChannel.d.ts +378 -0
- package/dist/contracts/NotificationChannel.d.ts.map +1 -0
- package/dist/contracts/NotificationChannel.js +136 -0
- package/dist/contracts/NotificationChannel.js.map +1 -0
- package/dist/contracts/Notifications.d.ts +417 -0
- package/dist/contracts/Notifications.d.ts.map +1 -0
- package/dist/contracts/Notifications.js +267 -0
- package/dist/contracts/Notifications.js.map +1 -0
- package/dist/contracts/Outbox.d.ts +469 -0
- package/dist/contracts/Outbox.d.ts.map +1 -0
- package/dist/contracts/Outbox.js +215 -0
- package/dist/contracts/Outbox.js.map +1 -0
- package/dist/contracts/Privacy.d.ts +1029 -0
- package/dist/contracts/Privacy.d.ts.map +1 -0
- package/dist/contracts/Privacy.js +437 -0
- package/dist/contracts/Privacy.js.map +1 -0
- package/dist/contracts/Progress.d.ts +305 -0
- package/dist/contracts/Progress.d.ts.map +1 -0
- package/dist/contracts/Progress.js +174 -0
- package/dist/contracts/Progress.js.map +1 -0
- package/dist/contracts/QuerySurface.d.ts +231 -0
- package/dist/contracts/QuerySurface.d.ts.map +1 -0
- package/dist/contracts/QuerySurface.js +113 -0
- package/dist/contracts/QuerySurface.js.map +1 -0
- package/dist/contracts/Readiness.d.ts +105 -0
- package/dist/contracts/Readiness.d.ts.map +1 -0
- package/dist/contracts/Readiness.js +57 -0
- package/dist/contracts/Readiness.js.map +1 -0
- package/dist/contracts/Release.d.ts +295 -0
- package/dist/contracts/Release.d.ts.map +1 -0
- package/dist/contracts/Release.js +175 -0
- package/dist/contracts/Release.js.map +1 -0
- package/dist/contracts/ResultRendering.d.ts +533 -0
- package/dist/contracts/ResultRendering.d.ts.map +1 -0
- package/dist/contracts/ResultRendering.js +59 -0
- package/dist/contracts/ResultRendering.js.map +1 -0
- package/dist/contracts/Sandbox.d.ts +1164 -0
- package/dist/contracts/Sandbox.d.ts.map +1 -0
- package/dist/contracts/Sandbox.js +550 -0
- package/dist/contracts/Sandbox.js.map +1 -0
- package/dist/contracts/Scheduler.d.ts +814 -0
- package/dist/contracts/Scheduler.d.ts.map +1 -0
- package/dist/contracts/Scheduler.js +202 -0
- package/dist/contracts/Scheduler.js.map +1 -0
- package/dist/contracts/ScreenContext.d.ts +514 -0
- package/dist/contracts/ScreenContext.d.ts.map +1 -0
- package/dist/contracts/ScreenContext.js +272 -0
- package/dist/contracts/ScreenContext.js.map +1 -0
- package/dist/contracts/Search.d.ts +308 -0
- package/dist/contracts/Search.d.ts.map +1 -0
- package/dist/contracts/Search.js +107 -0
- package/dist/contracts/Search.js.map +1 -0
- package/dist/contracts/Secrets.d.ts +483 -0
- package/dist/contracts/Secrets.d.ts.map +1 -0
- package/dist/contracts/Secrets.js +136 -0
- package/dist/contracts/Secrets.js.map +1 -0
- package/dist/contracts/Settings.d.ts +221 -0
- package/dist/contracts/Settings.d.ts.map +1 -0
- package/dist/contracts/Settings.js +163 -0
- package/dist/contracts/Settings.js.map +1 -0
- package/dist/contracts/Sharing.d.ts +319 -0
- package/dist/contracts/Sharing.d.ts.map +1 -0
- package/dist/contracts/Sharing.js +172 -0
- package/dist/contracts/Sharing.js.map +1 -0
- package/dist/contracts/Slot.d.ts +162 -0
- package/dist/contracts/Slot.d.ts.map +1 -0
- package/dist/contracts/Slot.js +56 -0
- package/dist/contracts/Slot.js.map +1 -0
- package/dist/contracts/Space.d.ts +256 -0
- package/dist/contracts/Space.d.ts.map +1 -0
- package/dist/contracts/Space.js +133 -0
- package/dist/contracts/Space.js.map +1 -0
- package/dist/contracts/StorageAdapter.d.ts +124 -0
- package/dist/contracts/StorageAdapter.d.ts.map +1 -0
- package/dist/contracts/StorageAdapter.js +96 -0
- package/dist/contracts/StorageAdapter.js.map +1 -0
- package/dist/contracts/StorageBackend.d.ts +310 -0
- package/dist/contracts/StorageBackend.d.ts.map +1 -0
- package/dist/contracts/StorageBackend.js +196 -0
- package/dist/contracts/StorageBackend.js.map +1 -0
- package/dist/contracts/Sync.d.ts +286 -0
- package/dist/contracts/Sync.d.ts.map +1 -0
- package/dist/contracts/Sync.js +157 -0
- package/dist/contracts/Sync.js.map +1 -0
- package/dist/contracts/Telemetry.d.ts +183 -0
- package/dist/contracts/Telemetry.d.ts.map +1 -0
- package/dist/contracts/Telemetry.js +153 -0
- package/dist/contracts/Telemetry.js.map +1 -0
- package/dist/contracts/ThemeTokens.d.ts +212 -0
- package/dist/contracts/ThemeTokens.d.ts.map +1 -0
- package/dist/contracts/ThemeTokens.js +111 -0
- package/dist/contracts/ThemeTokens.js.map +1 -0
- package/dist/contracts/ToolSource.d.ts +135 -0
- package/dist/contracts/ToolSource.d.ts.map +1 -0
- package/dist/contracts/ToolSource.js +81 -0
- package/dist/contracts/ToolSource.js.map +1 -0
- package/dist/contracts/Versioning.d.ts +363 -0
- package/dist/contracts/Versioning.d.ts.map +1 -0
- package/dist/contracts/Versioning.js +201 -0
- package/dist/contracts/Versioning.js.map +1 -0
- package/dist/contracts/View.d.ts +232 -0
- package/dist/contracts/View.d.ts.map +1 -0
- package/dist/contracts/View.js +102 -0
- package/dist/contracts/View.js.map +1 -0
- package/dist/contracts/WorkItems.d.ts +242 -0
- package/dist/contracts/WorkItems.d.ts.map +1 -0
- package/dist/contracts/WorkItems.js +126 -0
- package/dist/contracts/WorkItems.js.map +1 -0
- package/dist/contracts/Workflow.d.ts +191 -0
- package/dist/contracts/Workflow.d.ts.map +1 -0
- package/dist/contracts/Workflow.js +63 -0
- package/dist/contracts/Workflow.js.map +1 -0
- package/dist/contracts/index.d.ts +75 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +196 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/devices/module.d.ts +3777 -0
- package/dist/devices/module.d.ts.map +1 -0
- package/dist/devices/module.js +179 -0
- package/dist/devices/module.js.map +1 -0
- package/dist/drizzle/Entity.d.ts +148 -0
- package/dist/drizzle/Entity.d.ts.map +1 -0
- package/dist/drizzle/Entity.js +396 -0
- package/dist/drizzle/Entity.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/schema/Actor.json +46 -0
- package/schema/AuditRecord.json +403 -0
- package/schema/DaemonHealth.json +29 -0
- package/schema/InvocationError.json +257 -0
- package/schema/InvocationReceipt.json +253 -0
- package/schema/Lockfile.json +129 -0
- package/schema/OutboxEvent.json +36 -0
- package/schema/PairingConfirm.json +33 -0
- package/schema/PairingResult.json +18 -0
- package/schema/PairingStart.json +18 -0
- package/schema/ProvenanceEntry.json +110 -0
- package/schema/ReplayEnvelope.json +269 -0
- package/schema/Surface.json +17 -0
- package/schema/codegen/LocalClient.json +1295 -0
- package/schema/codegen/Sandbox.json +320 -0
- package/schema/contracts/ActionConsent.json +1930 -0
- package/schema/contracts/ActionRegistry.json +722 -0
- package/schema/contracts/Actor.json +451 -0
- package/schema/contracts/AgentResources.json +1400 -0
- package/schema/contracts/AgentRuntime.json +4017 -0
- package/schema/contracts/Approvals.json +2916 -0
- package/schema/contracts/Audit.json +3268 -0
- package/schema/contracts/CalendarProvider.json +5557 -0
- package/schema/contracts/ClientSDK.json +1400 -0
- package/schema/contracts/CollabDocument.json +4012 -0
- package/schema/contracts/Command.json +616 -0
- package/schema/contracts/Connections.json +6687 -0
- package/schema/contracts/ContextAccounting.json +685 -0
- package/schema/contracts/Daemon.json +4555 -0
- package/schema/contracts/DbTx.json +321 -0
- package/schema/contracts/Delegation.json +949 -0
- package/schema/contracts/DeviceControl.json +2626 -0
- package/schema/contracts/Directory.json +5168 -0
- package/schema/contracts/DirectoryProvider.json +2090 -0
- package/schema/contracts/DocumentSource.json +2044 -0
- package/schema/contracts/Files.json +4122 -0
- package/schema/contracts/Flags.json +1202 -0
- package/schema/contracts/Host.json +1769 -0
- package/schema/contracts/HttpApi.json +1615 -0
- package/schema/contracts/Ingestion.json +3211 -0
- package/schema/contracts/Ingress.json +819 -0
- package/schema/contracts/Invocation.json +2044 -0
- package/schema/contracts/LocalClient.json +6642 -0
- package/schema/contracts/Locale.json +654 -0
- package/schema/contracts/MachineIdentity.json +2303 -0
- package/schema/contracts/MailProvider.json +6663 -0
- package/schema/contracts/Memory.json +579 -0
- package/schema/contracts/Messaging.json +1764 -0
- package/schema/contracts/Metering.json +3060 -0
- package/schema/contracts/ModelProvider.json +1127 -0
- package/schema/contracts/ModuleManifest.json +9449 -0
- package/schema/contracts/NotificationChannel.json +986 -0
- package/schema/contracts/Notifications.json +4280 -0
- package/schema/contracts/Outbox.json +1451 -0
- package/schema/contracts/Privacy.json +4354 -0
- package/schema/contracts/Progress.json +1524 -0
- package/schema/contracts/QuerySurface.json +661 -0
- package/schema/contracts/Readiness.json +209 -0
- package/schema/contracts/Release.json +805 -0
- package/schema/contracts/ResultRendering.json +2859 -0
- package/schema/contracts/Sandbox.json +2286 -0
- package/schema/contracts/Scheduler.json +6138 -0
- package/schema/contracts/ScreenContext.json +1238 -0
- package/schema/contracts/Search.json +1058 -0
- package/schema/contracts/Secrets.json +2444 -0
- package/schema/contracts/Settings.json +654 -0
- package/schema/contracts/Sharing.json +2854 -0
- package/schema/contracts/Slot.json +537 -0
- package/schema/contracts/Space.json +892 -0
- package/schema/contracts/StorageAdapter.json +623 -0
- package/schema/contracts/StorageBackend.json +2421 -0
- package/schema/contracts/Sync.json +894 -0
- package/schema/contracts/Telemetry.json +696 -0
- package/schema/contracts/ThemeTokens.json +547 -0
- package/schema/contracts/ToolSource.json +1333 -0
- package/schema/contracts/Versioning.json +1481 -0
- package/schema/contracts/View.json +750 -0
- package/schema/contracts/WorkItems.json +1731 -0
- package/schema/contracts/Workflow.json +1242 -0
- package/src/Agent.ts +758 -0
- package/src/Analytics.ts +110 -0
- package/src/Approval.ts +131 -0
- package/src/Catalog.ts +192 -0
- package/src/Checklist.ts +162 -0
- package/src/Data.ts +109 -0
- package/src/Devices.ts +721 -0
- package/src/Durable.ts +240 -0
- package/src/Errors.ts +111 -0
- package/src/JsonSchema.ts +166 -0
- package/src/Manifest.ts +1147 -0
- package/src/Module.ts +640 -0
- package/src/Optimistic.ts +332 -0
- package/src/Projection.ts +207 -0
- package/src/Proposals.ts +89 -0
- package/src/Receipt.ts +125 -0
- package/src/Records.ts +197 -0
- package/src/Render.ts +515 -0
- package/src/Rpc.ts +113 -0
- package/src/SearchLanguages.ts +33 -0
- package/src/Service.ts +102 -0
- package/src/Versions.ts +69 -0
- package/src/contracts/ActionConsent.ts +150 -0
- package/src/contracts/ActionRegistry.ts +39 -0
- package/src/contracts/Actor.ts +53 -0
- package/src/contracts/AgentResources.ts +167 -0
- package/src/contracts/AgentRuntime.ts +154 -0
- package/src/contracts/Approvals.ts +133 -0
- package/src/contracts/Audit.ts +160 -0
- package/src/contracts/CalendarProvider.ts +241 -0
- package/src/contracts/Capability.ts +246 -0
- package/src/contracts/ClientSDK.ts +199 -0
- package/src/contracts/CollabDocument.ts +420 -0
- package/src/contracts/Command.ts +74 -0
- package/src/contracts/Connections.ts +360 -0
- package/src/contracts/ContextAccounting.ts +35 -0
- package/src/contracts/Daemon.ts +247 -0
- package/src/contracts/DbTx.ts +110 -0
- package/src/contracts/Delegation.ts +91 -0
- package/src/contracts/DeviceControl.ts +143 -0
- package/src/contracts/Directory.ts +384 -0
- package/src/contracts/DirectoryProvider.ts +82 -0
- package/src/contracts/DocumentSource.ts +71 -0
- package/src/contracts/Files.ts +395 -0
- package/src/contracts/Flags.ts +241 -0
- package/src/contracts/Host.ts +245 -0
- package/src/contracts/HttpApi.ts +100 -0
- package/src/contracts/Ingestion.ts +315 -0
- package/src/contracts/Ingress.ts +132 -0
- package/src/contracts/Invocation.ts +122 -0
- package/src/contracts/LocalClient.ts +614 -0
- package/src/contracts/Locale.ts +133 -0
- package/src/contracts/MachineIdentity.ts +305 -0
- package/src/contracts/MailProvider.ts +272 -0
- package/src/contracts/Memory.ts +47 -0
- package/src/contracts/Messaging.ts +108 -0
- package/src/contracts/Metering.ts +231 -0
- package/src/contracts/ModelProvider.ts +87 -0
- package/src/contracts/ModuleManifest.ts +310 -0
- package/src/contracts/NotificationChannel.ts +158 -0
- package/src/contracts/Notifications.ts +309 -0
- package/src/contracts/Outbox.ts +246 -0
- package/src/contracts/Privacy.ts +502 -0
- package/src/contracts/Progress.ts +196 -0
- package/src/contracts/QuerySurface.ts +134 -0
- package/src/contracts/Readiness.ts +67 -0
- package/src/contracts/Release.ts +199 -0
- package/src/contracts/ResultRendering.ts +65 -0
- package/src/contracts/Sandbox.ts +648 -0
- package/src/contracts/Scheduler.ts +237 -0
- package/src/contracts/ScreenContext.ts +316 -0
- package/src/contracts/Search.ts +126 -0
- package/src/contracts/Secrets.ts +162 -0
- package/src/contracts/Settings.ts +207 -0
- package/src/contracts/Sharing.ts +205 -0
- package/src/contracts/Slot.ts +61 -0
- package/src/contracts/Space.ts +157 -0
- package/src/contracts/StorageAdapter.ts +104 -0
- package/src/contracts/StorageBackend.ts +220 -0
- package/src/contracts/Sync.ts +180 -0
- package/src/contracts/Telemetry.ts +177 -0
- package/src/contracts/ThemeTokens.ts +136 -0
- package/src/contracts/ToolSource.ts +94 -0
- package/src/contracts/Versioning.ts +237 -0
- package/src/contracts/View.ts +116 -0
- package/src/contracts/WorkItems.ts +144 -0
- package/src/contracts/Workflow.ts +67 -0
- package/src/contracts/index.ts +205 -0
- package/src/devices/module.ts +201 -0
- package/src/drizzle/Entity.ts +524 -0
- package/src/index.ts +19 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delegation: sub-agents with a narrower toolset and their own budget, run as child durable executions of the
|
|
3
|
+
* one agent; the result returns to the parent. There is no agent-to-agent protocol between modules, and a
|
|
4
|
+
* sub-agent never gains a tool or a permission its parent lacks. See docs/contracts/delegation.md.
|
|
5
|
+
*/
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
import { Run, RunLimits, ToolNotAllowed, UnknownRun } from "../Agent.js";
|
|
8
|
+
import { defineOperation, defineServiceContract } from "../Service.js";
|
|
9
|
+
export const DelegationContract = defineServiceContract({
|
|
10
|
+
name: "Delegation",
|
|
11
|
+
kind: "kernel",
|
|
12
|
+
version: "1.2.0",
|
|
13
|
+
description: "Sub-agents of the one agent: a run delegates a task to a child run with a subset of its own tools and at most its remaining limits, acting as the same person (so with no more permissions), as a child durable execution whose final answer is returned to the parent as the tool's result.",
|
|
14
|
+
operations: {
|
|
15
|
+
delegate: defineOperation({
|
|
16
|
+
description: "The agent's `delegate` tool: start a child run for `task` with `tools` (each must be one the parent may use; `delegate` only while the child would be within the deployment's `maxDelegationDepth`, default 1, so sub-agents do not delegate further by default) and optional `limits` (capped at what the parent has left); the parent waits for its answer, durably. With `profile`, the child runs as that custom agent (`KernelApp.agent.profiles`): its instructions, and when `tools` is left out, the profile's tools narrowed to the parent's. The child is in the parent's mode (a plan-mode run's sub-agent plans too).",
|
|
17
|
+
input: Schema.Struct({
|
|
18
|
+
task: Schema.String,
|
|
19
|
+
tools: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
20
|
+
profile: Schema.optionalKey(Schema.String),
|
|
21
|
+
limits: Schema.optionalKey(Schema.Struct({
|
|
22
|
+
maxSteps: Schema.optionalKey(Schema.Number),
|
|
23
|
+
maxTokens: Schema.optionalKey(Schema.Number),
|
|
24
|
+
maxWallMs: Schema.optionalKey(Schema.Number),
|
|
25
|
+
})),
|
|
26
|
+
}),
|
|
27
|
+
output: Schema.Struct({ runId: Schema.String, status: Schema.String, result: Schema.NullOr(Schema.String) }),
|
|
28
|
+
errors: ToolNotAllowed,
|
|
29
|
+
}),
|
|
30
|
+
team: defineOperation({
|
|
31
|
+
description: "The agent's `team` tool: parallel sub-agents (seats) and messages between them. `spawn` starts a seat as `delegate` starts a sub-agent (the same tools, profile, depth and limit rules) and returns its id at once; its limits are reserved from the run's until its answer is collected. `wait` waits, durably, until `all` (the default) or `any` of the run's running seats (or those in `seats`) finished, or a message arrives for it; `send` messages the run's lead (`to: \"lead\"`), one of its seats or another seat of its lead's; `list` shows the team. Every result carries the messages not yet delivered and the answers of the seats not yet collected (with what each spent). A seat has the tool for its messages; it starts seats of its own only when given the tool within the depth. Seats still running when their lead ends are cancelled.",
|
|
32
|
+
input: Schema.Struct({
|
|
33
|
+
action: Schema.Literals(["spawn", "wait", "send", "list"]),
|
|
34
|
+
task: Schema.optionalKey(Schema.String),
|
|
35
|
+
name: Schema.optionalKey(Schema.String),
|
|
36
|
+
tools: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
37
|
+
profile: Schema.optionalKey(Schema.String),
|
|
38
|
+
limits: Schema.optionalKey(Schema.Struct({
|
|
39
|
+
maxSteps: Schema.optionalKey(Schema.Number),
|
|
40
|
+
maxTokens: Schema.optionalKey(Schema.Number),
|
|
41
|
+
maxWallMs: Schema.optionalKey(Schema.Number),
|
|
42
|
+
})),
|
|
43
|
+
seats: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
44
|
+
until: Schema.optionalKey(Schema.Literals(["all", "any"])),
|
|
45
|
+
to: Schema.optionalKey(Schema.String),
|
|
46
|
+
text: Schema.optionalKey(Schema.String),
|
|
47
|
+
}),
|
|
48
|
+
output: Schema.Struct({
|
|
49
|
+
seat: Schema.optionalKey(Schema.String),
|
|
50
|
+
finished: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
51
|
+
seat: Schema.String,
|
|
52
|
+
name: Schema.String,
|
|
53
|
+
status: Schema.String,
|
|
54
|
+
result: Schema.NullOr(Schema.String),
|
|
55
|
+
spent: Schema.Struct({ calls: Schema.Number, tokens: Schema.Number }),
|
|
56
|
+
}))),
|
|
57
|
+
messages: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
58
|
+
from: Schema.String,
|
|
59
|
+
name: Schema.String,
|
|
60
|
+
text: Schema.String,
|
|
61
|
+
seq: Schema.Number,
|
|
62
|
+
sender: Schema.String,
|
|
63
|
+
}))),
|
|
64
|
+
}),
|
|
65
|
+
errors: ToolNotAllowed,
|
|
66
|
+
}),
|
|
67
|
+
children: defineOperation({
|
|
68
|
+
description: "The child runs a run delegated to, for the run's owner.",
|
|
69
|
+
input: Schema.Struct({ runId: Schema.String }),
|
|
70
|
+
output: Schema.Array(Run),
|
|
71
|
+
errors: UnknownRun,
|
|
72
|
+
}),
|
|
73
|
+
},
|
|
74
|
+
types: { ToolNotAllowed, RunLimits },
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=Delegation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Delegation.js","sourceRoot":"","sources":["../../src/contracts/Delegation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAEtE,MAAM,CAAC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;IACtD,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OA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E,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;iBACtE,CAAC,CACH,CACF;gBACD,QAAQ,EAAE,MAAM,CAAC,WAAW,CAC1B,MAAM,CAAC,KAAK,CACV,MAAM,CAAC,MAAM,CAAC;oBACZ,IAAI,EAAE,MAAM,CAAC,MAAM;oBACnB,IAAI,EAAE,MAAM,CAAC,MAAM;oBACnB,IAAI,EAAE,MAAM,CAAC,MAAM;oBACnB,GAAG,EAAE,MAAM,CAAC,MAAM;oBAClB,MAAM,EAAE,MAAM,CAAC,MAAM;iBACtB,CAAC,CACH,CACF;aACF,CAAC;YACF,MAAM,EAAE,cAAc;SACvB,CAAC;QACF,QAAQ,EAAE,eAAe,CAAC;YACxB,WAAW,EAAE,yDAAyD;YACtE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;YAC9C,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;YACzB,MAAM,EAAE,UAAU;SACnB,CAAC;KACH;IACD,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE;CACrC,CAAC,CAAA"}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DeviceControl (extending Daemon): the paired devices of an organisation, listed and revoked by their person
|
|
3
|
+
* and the organisation's administrators, the sessions on each device (local clients, harness turns, terminals,
|
|
4
|
+
* browser-extension and computer-use companions), device commands (a terminal, the workspace's files, a browser
|
|
5
|
+
* or the computer, each enabled on the device, with consent for an agent's), what each device offers now, and
|
|
6
|
+
* push registrations. See docs/contracts/device-control.md.
|
|
7
|
+
*/
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
import { ConsentRequired, Forbidden, InvalidInput, Unauthenticated } from "../Errors.ts";
|
|
10
|
+
export declare const DeviceControl: import("../Service.ts").ServiceContract<"DeviceControl", {
|
|
11
|
+
readonly listDevices: import("../Service.ts").OperationContract<Schema.Struct<{}>, Schema.$Array<Schema.Struct<{
|
|
12
|
+
readonly id: Schema.String;
|
|
13
|
+
readonly orgId: Schema.String;
|
|
14
|
+
readonly subject: Schema.String;
|
|
15
|
+
readonly subjectKind: Schema.Literals<readonly ["user", "service"]>;
|
|
16
|
+
readonly pairedBy: Schema.String;
|
|
17
|
+
readonly name: Schema.String;
|
|
18
|
+
readonly kind: Schema.Literals<readonly ["desktop", "runner"]>;
|
|
19
|
+
readonly platform: Schema.String;
|
|
20
|
+
readonly capabilities: Schema.Struct<{
|
|
21
|
+
readonly harnesses: Schema.$Array<Schema.Literals<readonly ["claude-code", "codex", "opencode", "acp"]>>;
|
|
22
|
+
readonly computerUse: Schema.Boolean;
|
|
23
|
+
readonly browserExtension: Schema.Boolean;
|
|
24
|
+
readonly commands: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["terminal", "files", "browser", "computer"]>>>;
|
|
25
|
+
readonly toolsOnly: Schema.optionalKey<Schema.Boolean>;
|
|
26
|
+
}>;
|
|
27
|
+
readonly createdAt: Schema.String;
|
|
28
|
+
readonly lastSeenAt: Schema.NullOr<Schema.String>;
|
|
29
|
+
readonly revokedAt: Schema.NullOr<Schema.String>;
|
|
30
|
+
readonly push: Schema.optionalKey<Schema.Boolean>;
|
|
31
|
+
}>>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
32
|
+
readonly revokeDevice: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
33
|
+
readonly id: Schema.String;
|
|
34
|
+
}>, Schema.Struct<{
|
|
35
|
+
readonly id: Schema.String;
|
|
36
|
+
readonly orgId: Schema.String;
|
|
37
|
+
readonly subject: Schema.String;
|
|
38
|
+
readonly subjectKind: Schema.Literals<readonly ["user", "service"]>;
|
|
39
|
+
readonly pairedBy: Schema.String;
|
|
40
|
+
readonly name: Schema.String;
|
|
41
|
+
readonly kind: Schema.Literals<readonly ["desktop", "runner"]>;
|
|
42
|
+
readonly platform: Schema.String;
|
|
43
|
+
readonly capabilities: Schema.Struct<{
|
|
44
|
+
readonly harnesses: Schema.$Array<Schema.Literals<readonly ["claude-code", "codex", "opencode", "acp"]>>;
|
|
45
|
+
readonly computerUse: Schema.Boolean;
|
|
46
|
+
readonly browserExtension: Schema.Boolean;
|
|
47
|
+
readonly commands: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["terminal", "files", "browser", "computer"]>>>;
|
|
48
|
+
readonly toolsOnly: Schema.optionalKey<Schema.Boolean>;
|
|
49
|
+
}>;
|
|
50
|
+
readonly createdAt: Schema.String;
|
|
51
|
+
readonly lastSeenAt: Schema.NullOr<Schema.String>;
|
|
52
|
+
readonly revokedAt: Schema.NullOr<Schema.String>;
|
|
53
|
+
readonly push: Schema.optionalKey<Schema.Boolean>;
|
|
54
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
55
|
+
readonly reportSessions: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
56
|
+
readonly sessions: Schema.$Array<Schema.Struct<{
|
|
57
|
+
readonly id: Schema.String;
|
|
58
|
+
readonly kind: Schema.Literals<readonly ["shell", "browser-extension", "cli", "harness", "computer-use", "desktop-app", "terminal"]>;
|
|
59
|
+
readonly label: Schema.String;
|
|
60
|
+
readonly startedAt: Schema.String;
|
|
61
|
+
readonly endedAt: Schema.NullOr<Schema.String>;
|
|
62
|
+
readonly detail: Schema.NullOr<Schema.String>;
|
|
63
|
+
}>>;
|
|
64
|
+
}>, Schema.Struct<{
|
|
65
|
+
readonly recorded: Schema.Number;
|
|
66
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof InvalidInput]>>;
|
|
67
|
+
readonly listSessions: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
68
|
+
readonly deviceId: Schema.String;
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
|
+
readonly deviceId: Schema.String;
|
|
71
|
+
readonly sessions: Schema.$Array<Schema.Struct<{
|
|
72
|
+
readonly id: Schema.String;
|
|
73
|
+
readonly kind: Schema.Literals<readonly ["shell", "browser-extension", "cli", "harness", "computer-use", "desktop-app", "terminal"]>;
|
|
74
|
+
readonly label: Schema.String;
|
|
75
|
+
readonly startedAt: Schema.String;
|
|
76
|
+
readonly endedAt: Schema.NullOr<Schema.String>;
|
|
77
|
+
readonly detail: Schema.NullOr<Schema.String>;
|
|
78
|
+
}>>;
|
|
79
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
80
|
+
readonly computerUse: import("../Service.ts").OperationContract<Schema.Struct<{}>, Schema.Struct<{
|
|
81
|
+
readonly available: Schema.Boolean;
|
|
82
|
+
readonly reason: Schema.String;
|
|
83
|
+
}>, Schema.Union<readonly [typeof Unauthenticated]>>;
|
|
84
|
+
readonly availability: import("../Service.ts").OperationContract<Schema.Struct<{}>, Schema.Struct<{
|
|
85
|
+
readonly terminal: Schema.Struct<{
|
|
86
|
+
readonly enabled: Schema.Boolean;
|
|
87
|
+
readonly available: Schema.Boolean;
|
|
88
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
89
|
+
}>;
|
|
90
|
+
readonly files: Schema.Struct<{
|
|
91
|
+
readonly enabled: Schema.Boolean;
|
|
92
|
+
readonly available: Schema.Boolean;
|
|
93
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
94
|
+
}>;
|
|
95
|
+
readonly browser: Schema.Struct<{
|
|
96
|
+
readonly enabled: Schema.Boolean;
|
|
97
|
+
readonly available: Schema.Boolean;
|
|
98
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
99
|
+
}>;
|
|
100
|
+
readonly computer: Schema.Struct<{
|
|
101
|
+
readonly enabled: Schema.Boolean;
|
|
102
|
+
readonly available: Schema.Boolean;
|
|
103
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
104
|
+
}>;
|
|
105
|
+
readonly pty: Schema.Boolean;
|
|
106
|
+
readonly toolsOnly: Schema.Boolean;
|
|
107
|
+
}>, Schema.Union<readonly [typeof Unauthenticated]>>;
|
|
108
|
+
readonly sendCommand: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
109
|
+
readonly deviceId: Schema.String;
|
|
110
|
+
readonly operation: Schema.Literals<["browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec", ...("browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec")[]]>;
|
|
111
|
+
readonly input: Schema.Unknown;
|
|
112
|
+
readonly timeoutMs: Schema.optionalKey<Schema.Number>;
|
|
113
|
+
}>, Schema.Struct<{
|
|
114
|
+
readonly commandId: Schema.String;
|
|
115
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput, typeof ConsentRequired]>>;
|
|
116
|
+
readonly cancelCommand: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
117
|
+
readonly id: Schema.String;
|
|
118
|
+
}>, Schema.Struct<{
|
|
119
|
+
readonly id: Schema.String;
|
|
120
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "succeeded", "failed", "expired", "cancelled"]>;
|
|
121
|
+
readonly cancelRequested: Schema.Boolean;
|
|
122
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
123
|
+
readonly getCommand: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
124
|
+
readonly id: Schema.String;
|
|
125
|
+
}>, Schema.Struct<{
|
|
126
|
+
readonly id: Schema.String;
|
|
127
|
+
readonly deviceId: Schema.String;
|
|
128
|
+
readonly requestedBy: Schema.String;
|
|
129
|
+
readonly source: Schema.Literals<readonly ["person", "agent", "system"]>;
|
|
130
|
+
readonly operation: Schema.Literals<["browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec", ...("browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec")[]]>;
|
|
131
|
+
readonly input: Schema.Unknown;
|
|
132
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "succeeded", "failed", "expired", "cancelled"]>;
|
|
133
|
+
readonly result: Schema.Unknown;
|
|
134
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
135
|
+
readonly createdAt: Schema.String;
|
|
136
|
+
readonly completedAt: Schema.NullOr<Schema.String>;
|
|
137
|
+
readonly cancelRequestedAt: Schema.NullOr<Schema.String>;
|
|
138
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
139
|
+
readonly nextCommand: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
140
|
+
readonly kinds: Schema.$Array<Schema.Literals<readonly ["terminal", "files", "browser", "computer"]>>;
|
|
141
|
+
readonly waitMs: Schema.optionalKey<Schema.Number>;
|
|
142
|
+
}>, Schema.Struct<{
|
|
143
|
+
readonly command: Schema.NullOr<Schema.Struct<{
|
|
144
|
+
readonly id: Schema.String;
|
|
145
|
+
readonly lease: Schema.String;
|
|
146
|
+
readonly operation: Schema.Literals<["browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec", ...("browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec")[]]>;
|
|
147
|
+
readonly input: Schema.Unknown;
|
|
148
|
+
readonly timeoutMs: Schema.Number;
|
|
149
|
+
readonly deadline: Schema.String;
|
|
150
|
+
}>>;
|
|
151
|
+
}>, Schema.Union<readonly [typeof Unauthenticated]>>;
|
|
152
|
+
readonly completeCommand: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
153
|
+
readonly commandId: Schema.String;
|
|
154
|
+
readonly lease: Schema.String;
|
|
155
|
+
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
|
|
156
|
+
readonly result: Schema.Unknown;
|
|
157
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
158
|
+
}>, Schema.Struct<{
|
|
159
|
+
readonly settled: Schema.Boolean;
|
|
160
|
+
readonly duplicate: Schema.Boolean;
|
|
161
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof InvalidInput]>>;
|
|
162
|
+
readonly checkCommand: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
163
|
+
readonly commandId: Schema.String;
|
|
164
|
+
readonly lease: Schema.String;
|
|
165
|
+
}>, Schema.Struct<{
|
|
166
|
+
readonly stop: Schema.Boolean;
|
|
167
|
+
}>, Schema.Union<readonly [typeof Unauthenticated]>>;
|
|
168
|
+
readonly reportCapabilities: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
169
|
+
readonly capabilities: Schema.Struct<{
|
|
170
|
+
readonly harnesses: Schema.$Array<Schema.Literals<readonly ["claude-code", "codex", "opencode", "acp"]>>;
|
|
171
|
+
readonly computerUse: Schema.Boolean;
|
|
172
|
+
readonly browserExtension: Schema.Boolean;
|
|
173
|
+
readonly commands: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["terminal", "files", "browser", "computer"]>>>;
|
|
174
|
+
readonly toolsOnly: Schema.optionalKey<Schema.Boolean>;
|
|
175
|
+
}>;
|
|
176
|
+
}>, Schema.Struct<{
|
|
177
|
+
readonly id: Schema.String;
|
|
178
|
+
readonly orgId: Schema.String;
|
|
179
|
+
readonly subject: Schema.String;
|
|
180
|
+
readonly subjectKind: Schema.Literals<readonly ["user", "service"]>;
|
|
181
|
+
readonly pairedBy: Schema.String;
|
|
182
|
+
readonly name: Schema.String;
|
|
183
|
+
readonly kind: Schema.Literals<readonly ["desktop", "runner"]>;
|
|
184
|
+
readonly platform: Schema.String;
|
|
185
|
+
readonly capabilities: Schema.Struct<{
|
|
186
|
+
readonly harnesses: Schema.$Array<Schema.Literals<readonly ["claude-code", "codex", "opencode", "acp"]>>;
|
|
187
|
+
readonly computerUse: Schema.Boolean;
|
|
188
|
+
readonly browserExtension: Schema.Boolean;
|
|
189
|
+
readonly commands: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["terminal", "files", "browser", "computer"]>>>;
|
|
190
|
+
readonly toolsOnly: Schema.optionalKey<Schema.Boolean>;
|
|
191
|
+
}>;
|
|
192
|
+
readonly createdAt: Schema.String;
|
|
193
|
+
readonly lastSeenAt: Schema.NullOr<Schema.String>;
|
|
194
|
+
readonly revokedAt: Schema.NullOr<Schema.String>;
|
|
195
|
+
readonly push: Schema.optionalKey<Schema.Boolean>;
|
|
196
|
+
}>, Schema.Union<readonly [typeof Unauthenticated]>>;
|
|
197
|
+
readonly registerPush: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
198
|
+
readonly subscription: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
199
|
+
readonly kind: Schema.Literal<"web-push">;
|
|
200
|
+
readonly endpoint: Schema.String;
|
|
201
|
+
readonly keys: Schema.Struct<{
|
|
202
|
+
readonly p256dh: Schema.String;
|
|
203
|
+
readonly auth: Schema.String;
|
|
204
|
+
}>;
|
|
205
|
+
}>, Schema.Struct<{
|
|
206
|
+
readonly kind: Schema.Literals<readonly ["apns", "fcm"]>;
|
|
207
|
+
readonly token: Schema.String;
|
|
208
|
+
}>]>>;
|
|
209
|
+
}>, Schema.Struct<{
|
|
210
|
+
readonly registered: Schema.Boolean;
|
|
211
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof InvalidInput]>>;
|
|
212
|
+
}, {
|
|
213
|
+
readonly DeviceInfo: Schema.Struct<{
|
|
214
|
+
readonly id: Schema.String;
|
|
215
|
+
readonly orgId: Schema.String;
|
|
216
|
+
readonly subject: Schema.String;
|
|
217
|
+
readonly subjectKind: Schema.Literals<readonly ["user", "service"]>;
|
|
218
|
+
readonly pairedBy: Schema.String;
|
|
219
|
+
readonly name: Schema.String;
|
|
220
|
+
readonly kind: Schema.Literals<readonly ["desktop", "runner"]>;
|
|
221
|
+
readonly platform: Schema.String;
|
|
222
|
+
readonly capabilities: Schema.Struct<{
|
|
223
|
+
readonly harnesses: Schema.$Array<Schema.Literals<readonly ["claude-code", "codex", "opencode", "acp"]>>;
|
|
224
|
+
readonly computerUse: Schema.Boolean;
|
|
225
|
+
readonly browserExtension: Schema.Boolean;
|
|
226
|
+
readonly commands: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["terminal", "files", "browser", "computer"]>>>;
|
|
227
|
+
readonly toolsOnly: Schema.optionalKey<Schema.Boolean>;
|
|
228
|
+
}>;
|
|
229
|
+
readonly createdAt: Schema.String;
|
|
230
|
+
readonly lastSeenAt: Schema.NullOr<Schema.String>;
|
|
231
|
+
readonly revokedAt: Schema.NullOr<Schema.String>;
|
|
232
|
+
readonly push: Schema.optionalKey<Schema.Boolean>;
|
|
233
|
+
}>;
|
|
234
|
+
readonly DeviceSession: Schema.Struct<{
|
|
235
|
+
readonly id: Schema.String;
|
|
236
|
+
readonly kind: Schema.Literals<readonly ["shell", "browser-extension", "cli", "harness", "computer-use", "desktop-app", "terminal"]>;
|
|
237
|
+
readonly label: Schema.String;
|
|
238
|
+
readonly startedAt: Schema.String;
|
|
239
|
+
readonly endedAt: Schema.NullOr<Schema.String>;
|
|
240
|
+
readonly detail: Schema.NullOr<Schema.String>;
|
|
241
|
+
}>;
|
|
242
|
+
readonly ComputerUseCapability: Schema.Struct<{
|
|
243
|
+
readonly available: Schema.Boolean;
|
|
244
|
+
readonly reason: Schema.String;
|
|
245
|
+
}>;
|
|
246
|
+
readonly DeviceAvailability: Schema.Struct<{
|
|
247
|
+
readonly terminal: Schema.Struct<{
|
|
248
|
+
readonly enabled: Schema.Boolean;
|
|
249
|
+
readonly available: Schema.Boolean;
|
|
250
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
251
|
+
}>;
|
|
252
|
+
readonly files: Schema.Struct<{
|
|
253
|
+
readonly enabled: Schema.Boolean;
|
|
254
|
+
readonly available: Schema.Boolean;
|
|
255
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
256
|
+
}>;
|
|
257
|
+
readonly browser: Schema.Struct<{
|
|
258
|
+
readonly enabled: Schema.Boolean;
|
|
259
|
+
readonly available: Schema.Boolean;
|
|
260
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
261
|
+
}>;
|
|
262
|
+
readonly computer: Schema.Struct<{
|
|
263
|
+
readonly enabled: Schema.Boolean;
|
|
264
|
+
readonly available: Schema.Boolean;
|
|
265
|
+
readonly reason: Schema.NullOr<Schema.String>;
|
|
266
|
+
}>;
|
|
267
|
+
readonly pty: Schema.Boolean;
|
|
268
|
+
readonly toolsOnly: Schema.Boolean;
|
|
269
|
+
}>;
|
|
270
|
+
readonly CommandRecord: Schema.Struct<{
|
|
271
|
+
readonly id: Schema.String;
|
|
272
|
+
readonly deviceId: Schema.String;
|
|
273
|
+
readonly requestedBy: Schema.String;
|
|
274
|
+
readonly source: Schema.Literals<readonly ["person", "agent", "system"]>;
|
|
275
|
+
readonly operation: Schema.Literals<["browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec", ...("browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec")[]]>;
|
|
276
|
+
readonly input: Schema.Unknown;
|
|
277
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "succeeded", "failed", "expired", "cancelled"]>;
|
|
278
|
+
readonly result: Schema.Unknown;
|
|
279
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
280
|
+
readonly createdAt: Schema.String;
|
|
281
|
+
readonly completedAt: Schema.NullOr<Schema.String>;
|
|
282
|
+
readonly cancelRequestedAt: Schema.NullOr<Schema.String>;
|
|
283
|
+
}>;
|
|
284
|
+
readonly ClaimedCommand: Schema.Struct<{
|
|
285
|
+
readonly id: Schema.String;
|
|
286
|
+
readonly lease: Schema.String;
|
|
287
|
+
readonly operation: Schema.Literals<["browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec", ...("browser.click" | "browser.navigate" | "browser.observe" | "browser.scroll" | "browser.type" | "computer.click" | "computer.key" | "computer.observe" | "computer.scroll" | "computer.type" | "files.edit" | "files.list" | "files.read" | "files.search" | "files.write" | "terminal.exec")[]]>;
|
|
288
|
+
readonly input: Schema.Unknown;
|
|
289
|
+
readonly timeoutMs: Schema.Number;
|
|
290
|
+
readonly deadline: Schema.String;
|
|
291
|
+
}>;
|
|
292
|
+
}>;
|
|
293
|
+
//# sourceMappingURL=DeviceControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceControl.d.ts","sourceRoot":"","sources":["../../src/contracts/DeviceControl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAsB/B,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAKxF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4GxB,CAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DeviceControl (extending Daemon): the paired devices of an organisation, listed and revoked by their person
|
|
3
|
+
* and the organisation's administrators, the sessions on each device (local clients, harness turns, terminals,
|
|
4
|
+
* browser-extension and computer-use companions), device commands (a terminal, the workspace's files, a browser
|
|
5
|
+
* or the computer, each enabled on the device, with consent for an agent's), what each device offers now, and
|
|
6
|
+
* push registrations. See docs/contracts/device-control.md.
|
|
7
|
+
*/
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
import { CheckCommand, CheckedCommand, ClaimedCommand, CommandRecord, CommandStatus, CompleteCommand, CompletedCommand, ComputerUseCapability, DeviceAvailability, DeviceInfo, DeviceSession, DeviceSessions, NextCommand, NextCommandRequest, RegisteredPush, RegisterPush, ReportCapabilities, ReportSessions, SendCommand, } from "../Devices.js";
|
|
10
|
+
import { ConsentRequired, Forbidden, InvalidInput, Unauthenticated } from "../Errors.js";
|
|
11
|
+
import { defineOperation, defineServiceContract } from "../Service.js";
|
|
12
|
+
const AuthErrors = Schema.Union([Unauthenticated, Forbidden, InvalidInput]);
|
|
13
|
+
export const DeviceControl = defineServiceContract({
|
|
14
|
+
name: "DeviceControl",
|
|
15
|
+
kind: "kernel",
|
|
16
|
+
version: "1.3.0",
|
|
17
|
+
description: "Paired devices (listing and revocation), the sessions on each device, device commands (terminal, files, browser, computer) with consent and per-device enablement, capability availability, and push registrations, extending Daemon.",
|
|
18
|
+
operations: {
|
|
19
|
+
listDevices: defineOperation({
|
|
20
|
+
description: "POST /kernel/devices/listDevices (a signed-in person): the caller's devices (paired to them, or confirmed by them); with eloxiv.machine.manage, every device of the organisation. Never a credential.",
|
|
21
|
+
input: Schema.Struct({}),
|
|
22
|
+
output: Schema.Array(DeviceInfo),
|
|
23
|
+
errors: AuthErrors,
|
|
24
|
+
}),
|
|
25
|
+
revokeDevice: defineOperation({
|
|
26
|
+
description: "POST /kernel/devices/revokeDevice (a signed-in person: the device's subject, the person who paired it, or eloxiv.machine.manage): revoke the device. Its credential and every agent session issued to it are refused from their next request, and its unfinished turns fail. Audited.",
|
|
27
|
+
input: Schema.Struct({ id: Schema.String }),
|
|
28
|
+
output: DeviceInfo,
|
|
29
|
+
errors: AuthErrors,
|
|
30
|
+
}),
|
|
31
|
+
reportSessions: defineOperation({
|
|
32
|
+
description: "POST /kernel/device/sessions (the device credential): the device's current sessions, replacing what it reported before (sessions it no longer lists are ended).",
|
|
33
|
+
input: ReportSessions,
|
|
34
|
+
output: Schema.Struct({ recorded: Schema.Number }),
|
|
35
|
+
errors: Schema.Union([Unauthenticated, InvalidInput]),
|
|
36
|
+
}),
|
|
37
|
+
listSessions: defineOperation({
|
|
38
|
+
description: "POST /kernel/devices/listSessions (a signed-in person who may see the device): the sessions the device reported, open ones first.",
|
|
39
|
+
input: Schema.Struct({ deviceId: Schema.String }),
|
|
40
|
+
output: DeviceSessions,
|
|
41
|
+
errors: AuthErrors,
|
|
42
|
+
}),
|
|
43
|
+
computerUse: defineOperation({
|
|
44
|
+
description: "GET /computer-use on the daemon (a local client): whether computer use is available on this device (enabled, and a computer-use companion connected), with the reason when it is not.",
|
|
45
|
+
input: Schema.Struct({}),
|
|
46
|
+
output: ComputerUseCapability,
|
|
47
|
+
errors: Schema.Union([Unauthenticated]),
|
|
48
|
+
}),
|
|
49
|
+
availability: defineOperation({
|
|
50
|
+
description: "GET /capabilities on the daemon (a local client): each command kind's availability (enabled on the daemon; for a browser or the computer, its companion connected), whether a PTY backs terminals, and the tools-only profile.",
|
|
51
|
+
input: Schema.Struct({}),
|
|
52
|
+
output: DeviceAvailability,
|
|
53
|
+
errors: Schema.Union([Unauthenticated]),
|
|
54
|
+
}),
|
|
55
|
+
// --- Commands ------------------------------------------------------------------------------------------------
|
|
56
|
+
sendCommand: defineOperation({
|
|
57
|
+
description: "Action devices.sendCommand (every surface): queue one command for one of the caller's devices. Only the device's subject may address it, the device must offer the operation's kind, the organisation's devices.commands setting must allow it, and an agent-originated call needs consent. Read the result with the action devices.getCommand; devices.listDevices lists what each device offers.",
|
|
58
|
+
input: SendCommand,
|
|
59
|
+
output: Schema.Struct({ commandId: Schema.String }),
|
|
60
|
+
errors: Schema.Union([Unauthenticated, Forbidden, InvalidInput, ConsentRequired]),
|
|
61
|
+
}),
|
|
62
|
+
cancelCommand: defineOperation({
|
|
63
|
+
description: "Action devices.cancelCommand (the sender or the device's subject): a queued command is cancelled and never runs; a taken one is stopped if it still can be (the device hears at its next check: before it acts, it does not; a shell command is interrupted and ends failed); one a companion already took, and a finished one, end as they really end. Nothing done is reported undone.",
|
|
64
|
+
input: Schema.Struct({ id: Schema.String }),
|
|
65
|
+
output: Schema.Struct({ id: Schema.String, status: CommandStatus, cancelRequested: Schema.Boolean }),
|
|
66
|
+
errors: AuthErrors,
|
|
67
|
+
}),
|
|
68
|
+
getCommand: defineOperation({
|
|
69
|
+
description: "Action devices.getCommand: a command the caller sent or that was sent to their device, with its status and result. A command not taken in time is expired; one taken but not reported before its deadline failed.",
|
|
70
|
+
input: Schema.Struct({ id: Schema.String }),
|
|
71
|
+
output: CommandRecord,
|
|
72
|
+
errors: AuthErrors,
|
|
73
|
+
}),
|
|
74
|
+
nextCommand: defineOperation({
|
|
75
|
+
description: "POST /kernel/device/commands/next (the device credential): take the oldest queued command of the kinds the device serves now (a long poll of up to 30 s). A command runs at most once: one not reported before its deadline fails, and is never handed out again.",
|
|
76
|
+
input: NextCommandRequest,
|
|
77
|
+
output: NextCommand,
|
|
78
|
+
errors: Schema.Union([Unauthenticated]),
|
|
79
|
+
}),
|
|
80
|
+
completeCommand: defineOperation({
|
|
81
|
+
description: "POST /kernel/device/commands/complete (the device credential, the command's lease): settle the command once with its result. The same report again is duplicate: true; one after the deadline or under another lease is refused (InvalidInput).",
|
|
82
|
+
input: CompleteCommand,
|
|
83
|
+
output: CompletedCommand,
|
|
84
|
+
errors: Schema.Union([Unauthenticated, InvalidInput]),
|
|
85
|
+
}),
|
|
86
|
+
checkCommand: defineOperation({
|
|
87
|
+
description: "POST /kernel/device/commands/check (the device credential, the command's lease): whether a command the device took should stop: a cancellation was asked, or the device no longer holds it. The device asks just before it acts and every second while it waits or acts.",
|
|
88
|
+
input: CheckCommand,
|
|
89
|
+
output: CheckedCommand,
|
|
90
|
+
errors: Schema.Union([Unauthenticated]),
|
|
91
|
+
}),
|
|
92
|
+
reportCapabilities: defineOperation({
|
|
93
|
+
description: "POST /kernel/device/capabilities (the device credential): what the device offers now (harnesses, command kinds, tools-only), replacing what it reported before.",
|
|
94
|
+
input: ReportCapabilities,
|
|
95
|
+
output: DeviceInfo,
|
|
96
|
+
errors: Schema.Union([Unauthenticated]),
|
|
97
|
+
}),
|
|
98
|
+
registerPush: defineOperation({
|
|
99
|
+
description: "POST /kernel/device/push (the device credential): register the push subscription of the host the daemon runs beside (Web Push, APNs or FCM), or remove it with null. One per device; revoking the device removes it.",
|
|
100
|
+
input: RegisterPush,
|
|
101
|
+
output: RegisteredPush,
|
|
102
|
+
errors: Schema.Union([Unauthenticated, InvalidInput]),
|
|
103
|
+
}),
|
|
104
|
+
},
|
|
105
|
+
types: { DeviceInfo, DeviceSession, ComputerUseCapability, DeviceAvailability, CommandRecord, ClaimedCommand },
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=DeviceControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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