@eloxiv/contracts 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/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 +888 -0
- package/dist/contracts/LocalClient.d.ts.map +1 -0
- package/dist/contracts/LocalClient.js +429 -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 +1298 -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 +6657 -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 +620 -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,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ingestion: pipelines that turn inbound content into extracted text and searchable chunks
|
|
3
|
+
* (docs/contracts/ingestion.md): files attached to records, documents from a DocumentSource connector over a
|
|
4
|
+
* Connection, emails and other text a module receives. Each source item belongs to a record (whose read policy
|
|
5
|
+
* governs who finds its chunks through Search), runs as a durable workflow (fetch, extract, chunk, index), is
|
|
6
|
+
* idempotent per source item and version, and reports its progress.
|
|
7
|
+
*/
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
import { Forbidden, InvalidInput, Unauthenticated } from "../Errors.js";
|
|
10
|
+
import { defineOperation, defineServiceContract } from "../Service.js";
|
|
11
|
+
import { RecordRef } from "./Files.js";
|
|
12
|
+
import { CollectionStatus, CollectSpec, DatasetInfo, DatasetRows, QueryDataset, StageDataset } from "../Data.js";
|
|
13
|
+
/** The kernel's ingestion actions. */
|
|
14
|
+
export const INGESTION_ACTIONS = { status: "ingestion.status" };
|
|
15
|
+
/** Media types the kernel extracts text from itself (a deployment adds more with an `Extractor`). */
|
|
16
|
+
export const BUILTIN_EXTRACTABLE = [
|
|
17
|
+
"text/plain",
|
|
18
|
+
"text/markdown",
|
|
19
|
+
"text/csv",
|
|
20
|
+
"text/tab-separated-values",
|
|
21
|
+
"text/html",
|
|
22
|
+
"application/xhtml+xml",
|
|
23
|
+
"application/json",
|
|
24
|
+
"application/xml",
|
|
25
|
+
"text/xml",
|
|
26
|
+
"application/pdf",
|
|
27
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
28
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
29
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
30
|
+
];
|
|
31
|
+
/** What to ingest, and where it comes from. */
|
|
32
|
+
export const IngestionSource = Schema.Union([
|
|
33
|
+
/** A file attached to the record (the Files contract), once it is available. */
|
|
34
|
+
Schema.Struct({ kind: Schema.Literal("file"), fileId: Schema.String }),
|
|
35
|
+
/** Text the module already holds (a message, a note). `key` identifies it within the record. */
|
|
36
|
+
Schema.Struct({
|
|
37
|
+
kind: Schema.Literal("text"),
|
|
38
|
+
key: Schema.String.check(Schema.isNonEmpty(), Schema.isMaxLength(200)),
|
|
39
|
+
title: Schema.optionalKey(Schema.NullOr(Schema.String)),
|
|
40
|
+
mediaType: Schema.optionalKey(Schema.String),
|
|
41
|
+
text: Schema.String,
|
|
42
|
+
}),
|
|
43
|
+
/** An email: its subject and its body, plain text or HTML (the HTML is reduced to its text). */
|
|
44
|
+
Schema.Struct({
|
|
45
|
+
kind: Schema.Literal("email"),
|
|
46
|
+
/** The message id. */
|
|
47
|
+
key: Schema.String.check(Schema.isNonEmpty(), Schema.isMaxLength(500)),
|
|
48
|
+
subject: Schema.NullOr(Schema.String),
|
|
49
|
+
from: Schema.optionalKey(Schema.NullOr(Schema.String)),
|
|
50
|
+
text: Schema.optionalKey(Schema.NullOr(Schema.String)),
|
|
51
|
+
html: Schema.optionalKey(Schema.NullOr(Schema.String)),
|
|
52
|
+
}),
|
|
53
|
+
/**
|
|
54
|
+
* A document at a provider (the DocumentSource contract), fetched over the Connection with `getContent`.
|
|
55
|
+
* `version` (the item's `modifiedAt`, or the provider's version) makes a changed document a new version.
|
|
56
|
+
*/
|
|
57
|
+
Schema.Struct({
|
|
58
|
+
kind: Schema.Literal("document"),
|
|
59
|
+
connectionId: Schema.String,
|
|
60
|
+
itemId: Schema.String,
|
|
61
|
+
version: Schema.String,
|
|
62
|
+
name: Schema.optionalKey(Schema.NullOr(Schema.String)),
|
|
63
|
+
}),
|
|
64
|
+
]);
|
|
65
|
+
export const SubmitIngestion = Schema.Struct({
|
|
66
|
+
/** The record the content belongs to, of the submitting module's own entities. */
|
|
67
|
+
record: RecordRef,
|
|
68
|
+
source: IngestionSource,
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* `queued` → `fetching` → `extracting` → `indexing` → `done`; `failed` (with `error`, resubmit to retry);
|
|
72
|
+
* `superseded` (a newer version of the same source item replaced it, or its record was deleted).
|
|
73
|
+
*/
|
|
74
|
+
export const IngestionState = Schema.Literals([
|
|
75
|
+
"queued",
|
|
76
|
+
"fetching",
|
|
77
|
+
"extracting",
|
|
78
|
+
"indexing",
|
|
79
|
+
"done",
|
|
80
|
+
"failed",
|
|
81
|
+
"superseded",
|
|
82
|
+
]);
|
|
83
|
+
export const IngestionItem = Schema.Struct({
|
|
84
|
+
id: Schema.String,
|
|
85
|
+
orgId: Schema.String,
|
|
86
|
+
record: RecordRef,
|
|
87
|
+
/** `file`, `text`, `email` or `document`. */
|
|
88
|
+
sourceKind: Schema.String,
|
|
89
|
+
/** The source item's identity within the record: `file:<id>`, `text:<key>`, `email:<key>`, `document:<connection>:<item>`. */
|
|
90
|
+
sourceKey: Schema.String,
|
|
91
|
+
version: Schema.String,
|
|
92
|
+
title: Schema.NullOr(Schema.String),
|
|
93
|
+
mediaType: Schema.NullOr(Schema.String),
|
|
94
|
+
state: IngestionState,
|
|
95
|
+
/** 0 to 1, across the pipeline's stages. */
|
|
96
|
+
progress: Schema.Number,
|
|
97
|
+
chunks: Schema.Number,
|
|
98
|
+
characters: Schema.Number,
|
|
99
|
+
/** The extracted text was cut at the deployment's limit. */
|
|
100
|
+
truncated: Schema.Boolean,
|
|
101
|
+
error: Schema.NullOr(Schema.String),
|
|
102
|
+
/** ISO 8601, UTC. */
|
|
103
|
+
createdAt: Schema.String,
|
|
104
|
+
updatedAt: Schema.String,
|
|
105
|
+
completedAt: Schema.NullOr(Schema.String),
|
|
106
|
+
});
|
|
107
|
+
export const SubmitResult = Schema.Struct({
|
|
108
|
+
itemId: Schema.String,
|
|
109
|
+
state: IngestionState,
|
|
110
|
+
/** False when this source item and version were already submitted: nothing new runs. */
|
|
111
|
+
created: Schema.Boolean,
|
|
112
|
+
});
|
|
113
|
+
/** An extractor's answer (the in-process `Extractor` hook). */
|
|
114
|
+
export const Extracted = Schema.Struct({ text: Schema.String, title: Schema.NullOr(Schema.String) });
|
|
115
|
+
// --- Bulk runs: leases, budgets, inventory ------------------------------------------------------------------
|
|
116
|
+
/** An item key of a bulk run (a provider's id for it): at most 500 characters. */
|
|
117
|
+
const RunKey = Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(500));
|
|
118
|
+
/** `ctx.ingestion.runs.open`: a run over an inventory of item keys, with an optional budget of cost units. */
|
|
119
|
+
export const OpenRun = Schema.Struct({
|
|
120
|
+
/** What the run processes (`mail.backfill`, `drive:<connection>`): for its owner to tell runs apart. */
|
|
121
|
+
source: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(200)),
|
|
122
|
+
/** Every item the provider listed: the run is complete only when each is done or reported. */
|
|
123
|
+
items: Schema.Array(RunKey).check(Schema.isMaxLength(100_000)),
|
|
124
|
+
/** Stop the run once this many cost units are spent (each item's `cost`, default 1). */
|
|
125
|
+
budget: Schema.optionalKey(Schema.Number.check(Schema.isGreaterThan(0))),
|
|
126
|
+
});
|
|
127
|
+
export const RunItemState = Schema.Literals(["pending", "leased", "done", "reported"]);
|
|
128
|
+
/** A claimed item: its key and which attempt this is (2 or more: an earlier worker's lease ran out). */
|
|
129
|
+
export const ClaimedItem = Schema.Struct({ key: Schema.String, attempt: Schema.Number });
|
|
130
|
+
export const BulkRunStatus = Schema.Literals(["running", "completed", "stopped"]);
|
|
131
|
+
/** A run's inventory: every item's state, and whether each listed item was processed or reported. */
|
|
132
|
+
export const RunInventory = Schema.Struct({
|
|
133
|
+
runId: Schema.String,
|
|
134
|
+
source: Schema.String,
|
|
135
|
+
status: BulkRunStatus,
|
|
136
|
+
stopReason: Schema.NullOr(Schema.Literals(["budget"])),
|
|
137
|
+
budget: Schema.NullOr(Schema.Number),
|
|
138
|
+
spent: Schema.Number,
|
|
139
|
+
/** True when every item is done or reported. */
|
|
140
|
+
complete: Schema.Boolean,
|
|
141
|
+
counts: Schema.Struct({
|
|
142
|
+
pending: Schema.Number,
|
|
143
|
+
leased: Schema.Number,
|
|
144
|
+
done: Schema.Number,
|
|
145
|
+
reported: Schema.Number,
|
|
146
|
+
}),
|
|
147
|
+
items: Schema.Array(Schema.Struct({
|
|
148
|
+
key: Schema.String,
|
|
149
|
+
state: RunItemState,
|
|
150
|
+
attempts: Schema.Number,
|
|
151
|
+
reason: Schema.NullOr(Schema.String),
|
|
152
|
+
})),
|
|
153
|
+
});
|
|
154
|
+
export const IngestionContract = defineServiceContract({
|
|
155
|
+
name: "Ingestion",
|
|
156
|
+
kind: "kernel",
|
|
157
|
+
version: "1.2.0",
|
|
158
|
+
description: "Turns inbound content (files attached to records, DocumentSource documents over a Connection, emails and text a module receives) into extracted text and bounded, overlapping chunks that Search indexes under the record they belong to, so they are found exactly by those who may read the record. Each source item runs as a durable workflow (fetch, extract, chunk, index) that survives restarts without indexing anything twice, is idempotent per source item and version (resubmitting changes nothing; a new version supersedes the old one's chunks; a failed item resubmitted runs again), and reports its state and progress.",
|
|
159
|
+
operations: {
|
|
160
|
+
stageDataset: defineOperation({
|
|
161
|
+
description: "data.stage, ctx.ingestion.datasets.stage: stage rows as a dataset of the caller (a person) or the calling module, replacing it (or one page of it); bounded per dataset and per owner, expiring.",
|
|
162
|
+
input: StageDataset,
|
|
163
|
+
output: DatasetInfo,
|
|
164
|
+
errors: Schema.Union([Unauthenticated, Forbidden, InvalidInput]),
|
|
165
|
+
}),
|
|
166
|
+
queryDataset: defineOperation({
|
|
167
|
+
description: "data.query, ctx.ingestion.datasets.query: one read-only SELECT over the relation dataset, of the owner's dataset, in a transaction that always rolls back.",
|
|
168
|
+
input: QueryDataset,
|
|
169
|
+
output: DatasetRows,
|
|
170
|
+
errors: Schema.Union([Unauthenticated, Forbidden, InvalidInput]),
|
|
171
|
+
}),
|
|
172
|
+
listDatasets: defineOperation({
|
|
173
|
+
description: "data.datasets, ctx.ingestion.datasets.list: the owner's datasets that have not expired.",
|
|
174
|
+
input: Schema.Struct({}),
|
|
175
|
+
output: Schema.Struct({ datasets: Schema.Array(DatasetInfo) }),
|
|
176
|
+
errors: Schema.Union([Unauthenticated, Forbidden]),
|
|
177
|
+
}),
|
|
178
|
+
dropDataset: defineOperation({
|
|
179
|
+
description: "data.drop, ctx.ingestion.datasets.drop: delete one of the owner's datasets.",
|
|
180
|
+
input: Schema.Struct({ name: Schema.String }),
|
|
181
|
+
output: Schema.Struct({ dropped: Schema.Boolean }),
|
|
182
|
+
errors: Schema.Union([Unauthenticated, Forbidden]),
|
|
183
|
+
}),
|
|
184
|
+
collect: defineOperation({
|
|
185
|
+
description: "data.collect, ctx.ingestion.collect: a durable, checkpointed collection of a provider's paginated listing over the caller's Connection into a dataset of the caller or the calling module, under the call's authority; at most three at once per owner.",
|
|
186
|
+
input: CollectSpec,
|
|
187
|
+
output: Schema.Struct({ collectionId: Schema.String }),
|
|
188
|
+
errors: Schema.Union([Unauthenticated, Forbidden, InvalidInput]),
|
|
189
|
+
}),
|
|
190
|
+
collection: defineOperation({
|
|
191
|
+
description: "data.collection, ctx.ingestion.collection: how one of the owner's collections stands.",
|
|
192
|
+
input: Schema.Struct({ collectionId: Schema.String }),
|
|
193
|
+
output: CollectionStatus,
|
|
194
|
+
errors: Schema.Union([Unauthenticated, InvalidInput]),
|
|
195
|
+
}),
|
|
196
|
+
submit: defineOperation({
|
|
197
|
+
description: "In process (a handler's `ctx.ingestion.submit`, for the module's own records, in its transaction): queue a source item for a record. Idempotent per (record, source item, version).",
|
|
198
|
+
input: SubmitIngestion,
|
|
199
|
+
output: SubmitResult,
|
|
200
|
+
errors: Schema.Union([Forbidden, InvalidInput]),
|
|
201
|
+
}),
|
|
202
|
+
status: defineOperation({
|
|
203
|
+
description: "The ingestion items of a record the caller may read, with their state and progress (action ingestion.status).",
|
|
204
|
+
input: RecordRef,
|
|
205
|
+
output: Schema.Struct({ items: Schema.Array(IngestionItem) }),
|
|
206
|
+
errors: Schema.Union([Unauthenticated, Forbidden, InvalidInput]),
|
|
207
|
+
}),
|
|
208
|
+
openRun: defineOperation({
|
|
209
|
+
description: "ctx.ingestion.runs.open: a bulk run of the calling module in the acting organisation over an inventory of item keys, with an optional budget of cost units; its id.",
|
|
210
|
+
input: OpenRun,
|
|
211
|
+
output: Schema.Struct({ runId: Schema.String }),
|
|
212
|
+
errors: InvalidInput,
|
|
213
|
+
}),
|
|
214
|
+
claim: defineOperation({
|
|
215
|
+
description: "ctx.ingestion.runs.claim: lease up to `max` items for `leaseMs` to a worker: pending items, and items whose lease ran out (a crashed worker's, resumed with their next attempt). None once the run is stopped or completed.",
|
|
216
|
+
input: Schema.Struct({ runId: Schema.String, worker: Schema.String, max: Schema.Number, leaseMs: Schema.Number }),
|
|
217
|
+
output: Schema.Array(ClaimedItem),
|
|
218
|
+
errors: InvalidInput,
|
|
219
|
+
}),
|
|
220
|
+
completeItem: defineOperation({
|
|
221
|
+
description: "ctx.ingestion.runs.complete: an item the worker holds under the attempt `claim` gave it, done, with its cost (default 1); refused when that lease ran out or the item was leased again (by another worker, or the same one). Spending the budget stops the run: no item is leased after.",
|
|
222
|
+
input: Schema.Struct({
|
|
223
|
+
runId: Schema.String,
|
|
224
|
+
worker: Schema.String,
|
|
225
|
+
key: Schema.String,
|
|
226
|
+
attempt: Schema.Number,
|
|
227
|
+
cost: Schema.optionalKey(Schema.Number),
|
|
228
|
+
}),
|
|
229
|
+
output: Schema.Struct({ status: BulkRunStatus }),
|
|
230
|
+
errors: InvalidInput,
|
|
231
|
+
}),
|
|
232
|
+
reportItem: defineOperation({
|
|
233
|
+
description: "ctx.ingestion.runs.report: an item the worker holds, not processed, with the reason (gone at the provider, refused): it counts towards completeness.",
|
|
234
|
+
input: Schema.Struct({
|
|
235
|
+
runId: Schema.String,
|
|
236
|
+
worker: Schema.String,
|
|
237
|
+
key: Schema.String,
|
|
238
|
+
attempt: Schema.Number,
|
|
239
|
+
reason: Schema.String,
|
|
240
|
+
}),
|
|
241
|
+
output: Schema.Struct({ status: BulkRunStatus }),
|
|
242
|
+
errors: InvalidInput,
|
|
243
|
+
}),
|
|
244
|
+
inventory: defineOperation({
|
|
245
|
+
description: "ctx.ingestion.runs.inventory: the run's inventory (the calling module's, in the acting organisation).",
|
|
246
|
+
input: Schema.Struct({ runId: Schema.String }),
|
|
247
|
+
output: RunInventory,
|
|
248
|
+
errors: InvalidInput,
|
|
249
|
+
}),
|
|
250
|
+
finishRun: defineOperation({
|
|
251
|
+
description: "ctx.ingestion.runs.finish: complete the run, refused (naming the items) while any item is neither done nor reported; a stopped run stays stopped.",
|
|
252
|
+
input: Schema.Struct({ runId: Schema.String }),
|
|
253
|
+
output: RunInventory,
|
|
254
|
+
errors: InvalidInput,
|
|
255
|
+
}),
|
|
256
|
+
extract: defineOperation({
|
|
257
|
+
description: "The extractor hook (in process, `Extractor`): text and an optional title from a media type the kernel does not extract itself.",
|
|
258
|
+
input: Schema.Struct({ mediaType: Schema.String, name: Schema.NullOr(Schema.String), bodyBase64: Schema.String }),
|
|
259
|
+
output: Extracted,
|
|
260
|
+
errors: Schema.Never,
|
|
261
|
+
}),
|
|
262
|
+
},
|
|
263
|
+
types: {
|
|
264
|
+
IngestionSource,
|
|
265
|
+
SubmitIngestion,
|
|
266
|
+
IngestionState,
|
|
267
|
+
IngestionItem,
|
|
268
|
+
SubmitResult,
|
|
269
|
+
Extracted,
|
|
270
|
+
OpenRun,
|
|
271
|
+
ClaimedItem,
|
|
272
|
+
RunInventory,
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
//# sourceMappingURL=Ingestion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ingestion.js","sourceRoot":"","sources":["../../src/contracts/Ingestion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,O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YACpB,MAAM,EAAE,YAAY;SACrB,CAAC;QACF,OAAO,EAAE,eAAe,CAAC;YACvB,WAAW,EACT,gIAAgI;YAClI,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;YACjH,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,MAAM,CAAC,KAAK;SACrB,CAAC;KACH;IACD,KAAK,EAAE;QACL,eAAe;QACf,eAAe;QACf,cAAc;QACd,aAAa;QACb,YAAY;QACZ,SAAS;QACT,OAAO;QACP,WAAW;QACX,YAAY;KACb;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ingress: inbound webhooks. Signature verification, replay protection, durable acceptance and linked
|
|
3
|
+
* platform identities. See docs/contracts/ingress.md.
|
|
4
|
+
*/
|
|
5
|
+
import { Schema } from "effect";
|
|
6
|
+
import { Forbidden, InvalidInput, Unauthenticated } from "../Errors.ts";
|
|
7
|
+
declare const InvalidSignature_base: Schema.Class<InvalidSignature, Schema.TaggedStruct<"InvalidSignature", {
|
|
8
|
+
readonly message: Schema.String;
|
|
9
|
+
}>, import("effect/Cause").YieldableError>;
|
|
10
|
+
/** The delivery's signature is missing or does not verify with any of the source's secrets. */
|
|
11
|
+
export declare class InvalidSignature extends InvalidSignature_base {
|
|
12
|
+
}
|
|
13
|
+
declare const StaleDelivery_base: Schema.Class<StaleDelivery, Schema.TaggedStruct<"StaleDelivery", {
|
|
14
|
+
readonly message: Schema.String;
|
|
15
|
+
}>, import("effect/Cause").YieldableError>;
|
|
16
|
+
/** The delivery's signed timestamp is outside the source's tolerance window. */
|
|
17
|
+
export declare class StaleDelivery extends StaleDelivery_base {
|
|
18
|
+
}
|
|
19
|
+
declare const ReplayedDelivery_base: Schema.Class<ReplayedDelivery, Schema.TaggedStruct<"ReplayedDelivery", {
|
|
20
|
+
readonly message: Schema.String;
|
|
21
|
+
}>, import("effect/Cause").YieldableError>;
|
|
22
|
+
/** A delivery id already accepted, presented with a different body. */
|
|
23
|
+
export declare class ReplayedDelivery extends ReplayedDelivery_base {
|
|
24
|
+
}
|
|
25
|
+
declare const UnknownSource_base: Schema.Class<UnknownSource, Schema.TaggedStruct<"UnknownSource", {
|
|
26
|
+
readonly source: Schema.String;
|
|
27
|
+
}>, import("effect/Cause").YieldableError>;
|
|
28
|
+
export declare class UnknownSource extends UnknownSource_base {
|
|
29
|
+
}
|
|
30
|
+
declare const PayloadTooLarge_base: Schema.Class<PayloadTooLarge, Schema.TaggedStruct<"PayloadTooLarge", {
|
|
31
|
+
readonly message: Schema.String;
|
|
32
|
+
}>, import("effect/Cause").YieldableError>;
|
|
33
|
+
export declare class PayloadTooLarge extends PayloadTooLarge_base {
|
|
34
|
+
}
|
|
35
|
+
export declare const IngressRefusal: Schema.Union<readonly [typeof InvalidSignature, typeof StaleDelivery, typeof ReplayedDelivery, typeof UnknownSource, typeof PayloadTooLarge]>;
|
|
36
|
+
export type IngressRefusal = typeof IngressRefusal.Type;
|
|
37
|
+
export declare const DeliveryState: Schema.Literals<readonly ["accepted", "processed", "refused", "failed"]>;
|
|
38
|
+
export declare const DeliveryStatus: Schema.Struct<{
|
|
39
|
+
readonly source: Schema.String;
|
|
40
|
+
readonly deliveryId: Schema.String;
|
|
41
|
+
readonly state: Schema.Literals<readonly ["accepted", "processed", "refused", "failed"]>;
|
|
42
|
+
/**
|
|
43
|
+
* What processing did: `handled`, `linked` (the delivery completed an identity link), `unlinked` (the
|
|
44
|
+
* sender is not linked to an actor), `link-refused`, `no-principal`, or the handler's error tag.
|
|
45
|
+
*/
|
|
46
|
+
readonly outcome: Schema.NullOr<Schema.String>;
|
|
47
|
+
/** The durable execution processing it (keyed by source and delivery id). */
|
|
48
|
+
readonly executionId: Schema.NullOr<Schema.String>;
|
|
49
|
+
readonly receivedAt: Schema.String;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const LinkedIdentity: Schema.Struct<{
|
|
52
|
+
readonly platform: Schema.String;
|
|
53
|
+
readonly externalId: Schema.String;
|
|
54
|
+
readonly orgId: Schema.String;
|
|
55
|
+
readonly actorId: Schema.String;
|
|
56
|
+
readonly linkedBy: Schema.String;
|
|
57
|
+
readonly createdAt: Schema.String;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const IngressContract: import("../Service.ts").ServiceContract<"Ingress", {
|
|
60
|
+
readonly deliver: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
61
|
+
readonly source: Schema.String;
|
|
62
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
63
|
+
readonly body: Schema.String;
|
|
64
|
+
}>, Schema.Struct<{
|
|
65
|
+
readonly accepted: Schema.Boolean;
|
|
66
|
+
readonly deliveryId: Schema.String;
|
|
67
|
+
readonly duplicate: Schema.Boolean;
|
|
68
|
+
}>, Schema.Union<readonly [typeof InvalidSignature, typeof StaleDelivery, typeof ReplayedDelivery, typeof UnknownSource, typeof PayloadTooLarge]>>;
|
|
69
|
+
readonly status: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
70
|
+
readonly source: Schema.String;
|
|
71
|
+
readonly deliveryId: Schema.String;
|
|
72
|
+
}>, Schema.Struct<{
|
|
73
|
+
readonly source: Schema.String;
|
|
74
|
+
readonly deliveryId: Schema.String;
|
|
75
|
+
readonly state: Schema.Literals<readonly ["accepted", "processed", "refused", "failed"]>;
|
|
76
|
+
/**
|
|
77
|
+
* What processing did: `handled`, `linked` (the delivery completed an identity link), `unlinked` (the
|
|
78
|
+
* sender is not linked to an actor), `link-refused`, `no-principal`, or the handler's error tag.
|
|
79
|
+
*/
|
|
80
|
+
readonly outcome: Schema.NullOr<Schema.String>;
|
|
81
|
+
/** The durable execution processing it (keyed by source and delivery id). */
|
|
82
|
+
readonly executionId: Schema.NullOr<Schema.String>;
|
|
83
|
+
readonly receivedAt: Schema.String;
|
|
84
|
+
}>, typeof UnknownSource>;
|
|
85
|
+
readonly createLinkCode: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
86
|
+
readonly platform: Schema.String;
|
|
87
|
+
}>, Schema.Struct<{
|
|
88
|
+
readonly code: Schema.String;
|
|
89
|
+
readonly expiresAt: Schema.String;
|
|
90
|
+
}>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
91
|
+
readonly listLinks: import("../Service.ts").OperationContract<Schema.Struct<{}>, Schema.$Array<Schema.Struct<{
|
|
92
|
+
readonly platform: Schema.String;
|
|
93
|
+
readonly externalId: Schema.String;
|
|
94
|
+
readonly orgId: Schema.String;
|
|
95
|
+
readonly actorId: Schema.String;
|
|
96
|
+
readonly linkedBy: Schema.String;
|
|
97
|
+
readonly createdAt: Schema.String;
|
|
98
|
+
}>>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
99
|
+
readonly unlink: import("../Service.ts").OperationContract<Schema.Struct<{
|
|
100
|
+
readonly platform: Schema.String;
|
|
101
|
+
readonly externalId: Schema.String;
|
|
102
|
+
}>, Schema.Struct<{}>, Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>>;
|
|
103
|
+
}, {
|
|
104
|
+
readonly DeliveryStatus: Schema.Struct<{
|
|
105
|
+
readonly source: Schema.String;
|
|
106
|
+
readonly deliveryId: Schema.String;
|
|
107
|
+
readonly state: Schema.Literals<readonly ["accepted", "processed", "refused", "failed"]>;
|
|
108
|
+
/**
|
|
109
|
+
* What processing did: `handled`, `linked` (the delivery completed an identity link), `unlinked` (the
|
|
110
|
+
* sender is not linked to an actor), `link-refused`, `no-principal`, or the handler's error tag.
|
|
111
|
+
*/
|
|
112
|
+
readonly outcome: Schema.NullOr<Schema.String>;
|
|
113
|
+
/** The durable execution processing it (keyed by source and delivery id). */
|
|
114
|
+
readonly executionId: Schema.NullOr<Schema.String>;
|
|
115
|
+
readonly receivedAt: Schema.String;
|
|
116
|
+
}>;
|
|
117
|
+
readonly LinkedIdentity: Schema.Struct<{
|
|
118
|
+
readonly platform: Schema.String;
|
|
119
|
+
readonly externalId: Schema.String;
|
|
120
|
+
readonly orgId: Schema.String;
|
|
121
|
+
readonly actorId: Schema.String;
|
|
122
|
+
readonly linkedBy: Schema.String;
|
|
123
|
+
readonly createdAt: Schema.String;
|
|
124
|
+
}>;
|
|
125
|
+
readonly InvalidSignature: typeof InvalidSignature;
|
|
126
|
+
readonly StaleDelivery: typeof StaleDelivery;
|
|
127
|
+
readonly ReplayedDelivery: typeof ReplayedDelivery;
|
|
128
|
+
readonly UnknownSource: typeof UnknownSource;
|
|
129
|
+
readonly PayloadTooLarge: typeof PayloadTooLarge;
|
|
130
|
+
}>;
|
|
131
|
+
export {};
|
|
132
|
+
//# sourceMappingURL=Ingress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ingress.d.ts","sourceRoot":"","sources":["../../src/contracts/Ingress.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;;;;AAGvE,+FAA+F;AAC/F,qBAAa,gBAAiB,SAAQ,qBAIrC;CAAG;;;;AAEJ,gFAAgF;AAChF,qBAAa,aAAc,SAAQ,kBAIlC;CAAG;;;;AAEJ,uEAAuE;AACvE,qBAAa,gBAAiB,SAAQ,qBAIrC;CAAG;;;;AAEJ,qBAAa,aAAc,SAAQ,kBAIlC;CAAG;;;;AAEJ,qBAAa,eAAgB,SAAQ,oBAIpC;CAAG;AAEJ,eAAO,MAAM,cAAc,+IAMzB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD,eAAO,MAAM,aAAa,0EAAkE,CAAA;AAE5F,eAAO,MAAM,cAAc;;;;IAIzB;;;OAGG;;IAEH,6EAA6E;;;EAG7E,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;EAOzB,CAAA;AAIF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;QArB1B;;;WAGG;;QAEH,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;QAL7E;;;WAGG;;QAEH,6EAA6E;;;;;;;;;;;;;;;;;EAsE7E,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ingress: inbound webhooks. Signature verification, replay protection, durable acceptance and linked
|
|
3
|
+
* platform identities. See docs/contracts/ingress.md.
|
|
4
|
+
*/
|
|
5
|
+
import { Schema } from "effect";
|
|
6
|
+
import { Forbidden, InvalidInput, Unauthenticated } from "../Errors.js";
|
|
7
|
+
import { defineOperation, defineServiceContract } from "../Service.js";
|
|
8
|
+
/** The delivery's signature is missing or does not verify with any of the source's secrets. */
|
|
9
|
+
export class InvalidSignature extends Schema.TaggedError()("InvalidSignature", { message: Schema.String }, { httpApiStatus: 401 }) {
|
|
10
|
+
}
|
|
11
|
+
/** The delivery's signed timestamp is outside the source's tolerance window. */
|
|
12
|
+
export class StaleDelivery extends Schema.TaggedError()("StaleDelivery", { message: Schema.String }, { httpApiStatus: 401 }) {
|
|
13
|
+
}
|
|
14
|
+
/** A delivery id already accepted, presented with a different body. */
|
|
15
|
+
export class ReplayedDelivery extends Schema.TaggedError()("ReplayedDelivery", { message: Schema.String }, { httpApiStatus: 409 }) {
|
|
16
|
+
}
|
|
17
|
+
export class UnknownSource extends Schema.TaggedError()("UnknownSource", { source: Schema.String }, { httpApiStatus: 404 }) {
|
|
18
|
+
}
|
|
19
|
+
export class PayloadTooLarge extends Schema.TaggedError()("PayloadTooLarge", { message: Schema.String }, { httpApiStatus: 413 }) {
|
|
20
|
+
}
|
|
21
|
+
export const IngressRefusal = Schema.Union([
|
|
22
|
+
InvalidSignature,
|
|
23
|
+
StaleDelivery,
|
|
24
|
+
ReplayedDelivery,
|
|
25
|
+
UnknownSource,
|
|
26
|
+
PayloadTooLarge,
|
|
27
|
+
]);
|
|
28
|
+
export const DeliveryState = Schema.Literals(["accepted", "processed", "refused", "failed"]);
|
|
29
|
+
export const DeliveryStatus = Schema.Struct({
|
|
30
|
+
source: Schema.String,
|
|
31
|
+
deliveryId: Schema.String,
|
|
32
|
+
state: DeliveryState,
|
|
33
|
+
/**
|
|
34
|
+
* What processing did: `handled`, `linked` (the delivery completed an identity link), `unlinked` (the
|
|
35
|
+
* sender is not linked to an actor), `link-refused`, `no-principal`, or the handler's error tag.
|
|
36
|
+
*/
|
|
37
|
+
outcome: Schema.NullOr(Schema.String),
|
|
38
|
+
/** The durable execution processing it (keyed by source and delivery id). */
|
|
39
|
+
executionId: Schema.NullOr(Schema.String),
|
|
40
|
+
receivedAt: Schema.String,
|
|
41
|
+
});
|
|
42
|
+
export const LinkedIdentity = Schema.Struct({
|
|
43
|
+
platform: Schema.String,
|
|
44
|
+
externalId: Schema.String,
|
|
45
|
+
orgId: Schema.String,
|
|
46
|
+
actorId: Schema.String,
|
|
47
|
+
linkedBy: Schema.String,
|
|
48
|
+
createdAt: Schema.String,
|
|
49
|
+
});
|
|
50
|
+
const ManageError = Schema.Union([Unauthenticated, Forbidden, InvalidInput]);
|
|
51
|
+
export const IngressContract = defineServiceContract({
|
|
52
|
+
name: "Ingress",
|
|
53
|
+
kind: "kernel",
|
|
54
|
+
version: "1.1.0",
|
|
55
|
+
description: "Inbound webhooks at POST /ingress/<source>. Each source declares a verifier, a handler (an action or a workflow) and an identity mapping. A delivery is verified (pluggable verifiers; HMAC-SHA256 over the raw body and a timestamp, constant-time), checked for replay (timestamp tolerance plus the stored delivery id), persisted and answered 2xx only after commit, then processed asynchronously in a durable execution keyed by the delivery id, acting as the sender's linked actor or a declared service principal through the invocation path (surface ingress). Unlinked senders cannot act. Refusals are audited by hash, never with the payload.",
|
|
56
|
+
operations: {
|
|
57
|
+
deliver: defineOperation({
|
|
58
|
+
description: "POST /ingress/<source> with the raw body and the source's signature headers. 200 `{ accepted: true, deliveryId, duplicate }` once the delivery is committed; a redelivery of the same id and body joins the same execution (`duplicate: true`). Refused deliveries get the refusal's status (401, 404, 409, 413) and are audited. A verified, in-window handshake the source recognises (Slack's url_verification) is answered with the source's own answer instead, and is neither stored nor processed.",
|
|
59
|
+
input: Schema.Struct({
|
|
60
|
+
source: Schema.String,
|
|
61
|
+
headers: Schema.Record(Schema.String, Schema.String),
|
|
62
|
+
body: Schema.String,
|
|
63
|
+
}),
|
|
64
|
+
output: Schema.Struct({ accepted: Schema.Boolean, deliveryId: Schema.String, duplicate: Schema.Boolean }),
|
|
65
|
+
errors: IngressRefusal,
|
|
66
|
+
}),
|
|
67
|
+
status: defineOperation({
|
|
68
|
+
description: "Where an accepted delivery is (in-process, for operators and tests).",
|
|
69
|
+
input: Schema.Struct({ source: Schema.String, deliveryId: Schema.String }),
|
|
70
|
+
output: DeliveryStatus,
|
|
71
|
+
errors: UnknownSource,
|
|
72
|
+
}),
|
|
73
|
+
createLinkCode: defineOperation({
|
|
74
|
+
description: "POST /kernel/ingress/createLinkCode (signed-in session): a one-time code (10 minutes) that links the caller, in the organisation they act in, to the platform identity of whoever sends it in a verified delivery of a source on that platform.",
|
|
75
|
+
input: Schema.Struct({ platform: Schema.String }),
|
|
76
|
+
output: Schema.Struct({ code: Schema.String, expiresAt: Schema.String }),
|
|
77
|
+
errors: ManageError,
|
|
78
|
+
}),
|
|
79
|
+
listLinks: defineOperation({
|
|
80
|
+
description: "The caller's linked platform identities in the organisation they act in.",
|
|
81
|
+
input: Schema.Struct({}),
|
|
82
|
+
output: Schema.Array(LinkedIdentity),
|
|
83
|
+
errors: ManageError,
|
|
84
|
+
}),
|
|
85
|
+
unlink: defineOperation({
|
|
86
|
+
description: "Remove one of the caller's linked identities (or, with eloxiv.machine.manage, any in the organisation).",
|
|
87
|
+
input: Schema.Struct({ platform: Schema.String, externalId: Schema.String }),
|
|
88
|
+
output: Schema.Struct({}),
|
|
89
|
+
errors: ManageError,
|
|
90
|
+
}),
|
|
91
|
+
},
|
|
92
|
+
types: {
|
|
93
|
+
DeliveryStatus,
|
|
94
|
+
LinkedIdentity,
|
|
95
|
+
InvalidSignature,
|
|
96
|
+
StaleDelivery,
|
|
97
|
+
ReplayedDelivery,
|
|
98
|
+
UnknownSource,
|
|
99
|
+
PayloadTooLarge,
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
//# sourceMappingURL=Ingress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ingress.js","sourceRoot":"","sources":["../../src/contracts/Ingress.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAEtE,+FAA+F;AAC/F,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,WAAW,EAAoB,CAC1E,kBAAkB,EAClB,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,EAC1B,EAAE,aAAa,EAAE,GAAG,EAAE,CACvB;CAAG;AAEJ,gFAAgF;AAChF,MAAM,OAAO,aAAc,SAAQ,MAAM,CAAC,WAAW,EAAiB,CACpE,eAAe,EACf,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,EAC1B,EAAE,aAAa,EAAE,GAAG,EAAE,CACvB;CAAG;AAEJ,uEAAuE;AACvE,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,WAAW,EAAoB,CAC1E,kBAAkB,EAClB,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,EAC1B,EAAE,aAAa,EAAE,GAAG,EAAE,CACvB;CAAG;AAEJ,MAAM,OAAO,aAAc,SA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