alchemy 2.0.0-beta.37 → 2.0.0-beta.39
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/bin/exec.js +488 -69
- package/bin/exec.js.map +1 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.d.ts +1 -1
- package/lib/AWS/CloudWatch/common.d.ts +1 -1
- package/lib/AWS/Credentials.d.ts.map +1 -1
- package/lib/AWS/Credentials.js +1 -2
- package/lib/AWS/Credentials.js.map +1 -1
- package/lib/AWS/DynamoDB/Stream.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/Stream.js +1 -1
- package/lib/AWS/DynamoDB/Stream.js.map +1 -1
- package/lib/AWS/EC2/Instance.d.ts +1 -1
- package/lib/AWS/EC2/hosted.d.ts +1 -1
- package/lib/AWS/EC2/hosted.d.ts.map +1 -1
- package/lib/AWS/EC2/hosted.js +3 -5
- package/lib/AWS/EC2/hosted.js.map +1 -1
- package/lib/AWS/ECS/Task.d.ts +1 -1
- package/lib/AWS/ECS/Task.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.js +3 -5
- package/lib/AWS/ECS/Task.js.map +1 -1
- package/lib/AWS/Endpoint.d.ts.map +1 -1
- package/lib/AWS/Endpoint.js +1 -2
- package/lib/AWS/Endpoint.js.map +1 -1
- package/lib/AWS/Environment.d.ts +2 -2
- package/lib/AWS/EventBridge/EventSource.d.ts.map +1 -1
- package/lib/AWS/EventBridge/EventSource.js +1 -1
- package/lib/AWS/EventBridge/EventSource.js.map +1 -1
- package/lib/AWS/Kinesis/StreamEventSource.d.ts.map +1 -1
- package/lib/AWS/Kinesis/StreamEventSource.js +1 -1
- package/lib/AWS/Kinesis/StreamEventSource.js.map +1 -1
- package/lib/AWS/Lambda/BucketEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/EventBridgeEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/Function.d.ts +1 -1
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +7 -11
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Lambda/QueueEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/StreamEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/TableEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/TopicEventSource.d.ts +1 -1
- package/lib/AWS/Organizations/common.d.ts +1 -1
- package/lib/AWS/Providers.d.ts.map +1 -1
- package/lib/AWS/Providers.js +21 -3
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/AWS/Region.d.ts +1 -1
- package/lib/AWS/Region.d.ts.map +1 -1
- package/lib/AWS/Region.js +2 -3
- package/lib/AWS/Region.js.map +1 -1
- package/lib/AWS/S3/Bucket.d.ts.map +1 -1
- package/lib/AWS/S3/Bucket.js +5 -2
- package/lib/AWS/S3/Bucket.js.map +1 -1
- package/lib/AWS/S3/BucketNotifications.d.ts.map +1 -1
- package/lib/AWS/S3/BucketNotifications.js +1 -1
- package/lib/AWS/S3/BucketNotifications.js.map +1 -1
- package/lib/AWS/SNS/TopicEventSource.d.ts.map +1 -1
- package/lib/AWS/SNS/TopicEventSource.js +1 -1
- package/lib/AWS/SNS/TopicEventSource.js.map +1 -1
- package/lib/AWS/SQS/Queue.d.ts.map +1 -1
- package/lib/AWS/SQS/Queue.js +23 -5
- package/lib/AWS/SQS/Queue.js.map +1 -1
- package/lib/Action.d.ts +77 -0
- package/lib/Action.d.ts.map +1 -0
- package/lib/Action.js +89 -0
- package/lib/Action.js.map +1 -0
- package/lib/AlchemyContext.d.ts +1 -1
- package/lib/Apply.d.ts.map +1 -1
- package/lib/Apply.js +222 -3
- package/lib/Apply.js.map +1 -1
- package/lib/Artifacts.d.ts +1 -1
- package/lib/Artifacts.d.ts.map +1 -1
- package/lib/Artifacts.js +1 -1
- package/lib/Artifacts.js.map +1 -1
- package/lib/Auth/AuthProvider.js +1 -1
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/Env.d.ts.map +1 -1
- package/lib/Auth/Env.js +4 -12
- package/lib/Auth/Env.js.map +1 -1
- package/lib/Binding.d.ts.map +1 -1
- package/lib/Binding.js +5 -5
- package/lib/Binding.js.map +1 -1
- package/lib/Build/Command.d.ts +1 -1
- package/lib/Build/Memo.d.ts +1 -1
- package/lib/Bundle/Docker.d.ts +3 -3
- package/lib/Bundle/Docker.js +1 -1
- package/lib/Bundle/Docker.js.map +1 -1
- package/lib/Bundle/TempRoot.d.ts +3 -3
- package/lib/Cli/Event.d.ts +1 -1
- package/lib/Cli/Event.d.ts.map +1 -1
- package/lib/Cli/NamespaceTree.d.ts +11 -5
- package/lib/Cli/NamespaceTree.d.ts.map +1 -1
- package/lib/Cli/NamespaceTree.js +28 -1
- package/lib/Cli/NamespaceTree.js.map +1 -1
- package/lib/Cli/commands/_shared.d.ts +1 -1
- package/lib/Cli/commands/_shared.js +2 -2
- package/lib/Cli/commands/_shared.js.map +1 -1
- package/lib/Cli/commands/aws.d.ts +1 -1
- package/lib/Cli/commands/cloudflare.d.ts +2 -2
- package/lib/Cli/commands/cloudflare.d.ts.map +1 -1
- package/lib/Cli/commands/deploy.d.ts +9 -9
- package/lib/Cli/commands/deploy.js +1 -1
- package/lib/Cli/commands/deploy.js.map +1 -1
- package/lib/Cli/commands/login.d.ts +1 -1
- package/lib/Cli/commands/logs.d.ts +1 -1
- package/lib/Cli/commands/logs.js.map +1 -1
- package/lib/Cli/commands/profile.d.ts +1 -3
- package/lib/Cli/commands/profile.d.ts.map +1 -1
- package/lib/Cli/commands/state.d.ts +1 -1
- package/lib/Cli/commands/state.d.ts.map +1 -1
- package/lib/Cli/commands/tail.d.ts +1 -1
- package/lib/Cli/commands/tail.js.map +1 -1
- package/lib/Cli/tui/components/Plan.d.ts.map +1 -1
- package/lib/Cli/tui/components/Plan.js +27 -13
- package/lib/Cli/tui/components/Plan.js.map +1 -1
- package/lib/Cli/tui/components/PlanProgress.d.ts +8 -1
- package/lib/Cli/tui/components/PlanProgress.d.ts.map +1 -1
- package/lib/Cli/tui/components/PlanProgress.js +95 -16
- package/lib/Cli/tui/components/PlanProgress.js.map +1 -1
- package/lib/Cloudflare/Access.js +0 -1
- package/lib/Cloudflare/Access.js.map +1 -1
- package/lib/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.js +1 -1
- package/lib/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.js.map +1 -1
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.js +1 -1
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.js.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts +1 -1
- package/lib/Cloudflare/Container/Container.js +0 -1
- package/lib/Cloudflare/Container/Container.js.map +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.d.ts +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.js +4 -6
- package/lib/Cloudflare/Container/ContainerApplication.js.map +1 -1
- package/lib/Cloudflare/Container/ContainerBinding.js +2 -2
- package/lib/Cloudflare/Container/ContainerBinding.js.map +1 -1
- package/lib/Cloudflare/D1/D1Database.d.ts +1 -1
- package/lib/Cloudflare/D1/D1SqlFile.d.ts +2 -2
- package/lib/Cloudflare/Email/EmailAddress.d.ts +45 -0
- package/lib/Cloudflare/Email/EmailAddress.d.ts.map +1 -0
- package/lib/Cloudflare/Email/EmailAddress.js +99 -0
- package/lib/Cloudflare/Email/EmailAddress.js.map +1 -0
- package/lib/Cloudflare/Email/EmailRouting.d.ts +42 -0
- package/lib/Cloudflare/Email/EmailRouting.d.ts.map +1 -0
- package/lib/Cloudflare/Email/EmailRouting.js +89 -0
- package/lib/Cloudflare/Email/EmailRouting.js.map +1 -0
- package/lib/Cloudflare/Email/EmailRule.d.ts +80 -0
- package/lib/Cloudflare/Email/EmailRule.d.ts.map +1 -0
- package/lib/Cloudflare/Email/EmailRule.js +110 -0
- package/lib/Cloudflare/Email/EmailRule.js.map +1 -0
- package/lib/Cloudflare/Email/SendEmail.d.ts +74 -0
- package/lib/Cloudflare/Email/SendEmail.d.ts.map +1 -0
- package/lib/Cloudflare/Email/SendEmail.js +19 -0
- package/lib/Cloudflare/Email/SendEmail.js.map +1 -0
- package/lib/Cloudflare/Email/SendEmailBinding.d.ts +64 -0
- package/lib/Cloudflare/Email/SendEmailBinding.d.ts.map +1 -0
- package/lib/Cloudflare/Email/SendEmailBinding.js +54 -0
- package/lib/Cloudflare/Email/SendEmailBinding.js.map +1 -0
- package/lib/Cloudflare/Email/index.d.ts +6 -0
- package/lib/Cloudflare/Email/index.d.ts.map +1 -0
- package/lib/Cloudflare/Email/index.js +6 -0
- package/lib/Cloudflare/Email/index.js.map +1 -0
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.d.ts +1 -1
- package/lib/Cloudflare/Images/ImagesBinding.js +1 -1
- package/lib/Cloudflare/Images/ImagesBinding.js.map +1 -1
- package/lib/Cloudflare/KV/KVNamespaceBinding.js +1 -1
- package/lib/Cloudflare/KV/KVNamespaceBinding.js.map +1 -1
- package/lib/Cloudflare/Local/Sidecar.d.ts +1 -1
- package/lib/Cloudflare/Local/SidecarHandlers.d.ts +1 -1
- package/lib/Cloudflare/Local/SidecarServer.js +1 -1
- package/lib/Cloudflare/Local/SidecarServer.js.map +1 -1
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +6 -1
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queue/QueueBinding.js +1 -1
- package/lib/Cloudflare/Queue/QueueBinding.js.map +1 -1
- package/lib/Cloudflare/R2/R2BucketBinding.js +1 -1
- package/lib/Cloudflare/R2/R2BucketBinding.js.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretBinding.js +1 -1
- package/lib/Cloudflare/SecretsStore/SecretBinding.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts +2 -2
- package/lib/Cloudflare/Workers/Assets.d.ts +2 -2
- package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Assets.js +5 -4
- package/lib/Cloudflare/Workers/Assets.js.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.js +25 -3
- package/lib/Cloudflare/Workers/HttpServer.js.map +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +4 -3
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +67 -32
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js +4 -6
- package/lib/Cloudflare/Workers/WorkerBundle.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerName.d.ts +1 -1
- package/lib/Cloudflare/Workers/Workflow.js +2 -2
- package/lib/Cloudflare/Workers/Workflow.js.map +1 -1
- package/lib/Cloudflare/index.d.ts +1 -0
- package/lib/Cloudflare/index.d.ts.map +1 -1
- package/lib/Cloudflare/index.js +1 -0
- package/lib/Cloudflare/index.js.map +1 -1
- package/lib/Construct.d.ts +3 -3
- package/lib/Construct.d.ts.map +1 -1
- package/lib/Construct.js.map +1 -1
- package/lib/Deploy.d.ts +1 -1
- package/lib/Destroy.d.ts +1 -1
- package/lib/Destroy.d.ts.map +1 -1
- package/lib/Destroy.js +1 -0
- package/lib/Destroy.js.map +1 -1
- package/lib/Drizzle/Providers.d.ts +1 -1
- package/lib/Drizzle/Schema.d.ts +1 -1
- package/lib/GitHub/Providers.d.ts +1 -1
- package/lib/Http.d.ts +1 -1
- package/lib/Http.d.ts.map +1 -1
- package/lib/Http.js +1 -1
- package/lib/Http.js.map +1 -1
- package/lib/Namespace.d.ts.map +1 -1
- package/lib/Namespace.js +3 -4
- package/lib/Namespace.js.map +1 -1
- package/lib/Neon/Branch.d.ts +2 -2
- package/lib/Neon/Branch.d.ts.map +1 -1
- package/lib/Neon/Branch.js +59 -27
- package/lib/Neon/Branch.js.map +1 -1
- package/lib/Neon/Credentials.d.ts +2 -2
- package/lib/Neon/Credentials.d.ts.map +1 -1
- package/lib/Neon/Credentials.js +2 -2
- package/lib/Neon/Credentials.js.map +1 -1
- package/lib/Neon/NeonEnvironment.d.ts +1 -1
- package/lib/Neon/Project.d.ts +25 -1
- package/lib/Neon/Project.d.ts.map +1 -1
- package/lib/Neon/Project.js +121 -42
- package/lib/Neon/Project.js.map +1 -1
- package/lib/Neon/Providers.d.ts +1 -1
- package/lib/Neon/SqlFile.d.ts +2 -2
- package/lib/Output.d.ts +3 -4
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +7 -4
- package/lib/Output.js.map +1 -1
- package/lib/PhysicalName.d.ts +1 -1
- package/lib/Plan.d.ts +36 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +197 -31
- package/lib/Plan.js.map +1 -1
- package/lib/Platform.js +6 -6
- package/lib/Platform.js.map +1 -1
- package/lib/Provider.d.ts +1 -1
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js +1 -1
- package/lib/Provider.js.map +1 -1
- package/lib/Random.d.ts +1 -1
- package/lib/Random.d.ts.map +1 -1
- package/lib/Random.js +1 -1
- package/lib/Random.js.map +1 -1
- package/lib/Resource.d.ts.map +1 -1
- package/lib/Resource.js +2 -25
- package/lib/Resource.js.map +1 -1
- package/lib/Runtime.d.ts +24 -0
- package/lib/Runtime.d.ts.map +1 -0
- package/lib/Runtime.js +31 -0
- package/lib/Runtime.js.map +1 -0
- package/lib/Secret.js +1 -1
- package/lib/Secret.js.map +1 -1
- package/lib/Sidecar/RpcClient.d.ts +1 -1
- package/lib/Sidecar/RpcPaths.d.ts +1 -1
- package/lib/Sidecar/RpcServer.d.ts +1 -1
- package/lib/Sidecar/RpcServices.d.ts +1 -1
- package/lib/Stack.d.ts +7 -2
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js +4 -4
- package/lib/Stack.js.map +1 -1
- package/lib/State/ActionState.d.ts +48 -0
- package/lib/State/ActionState.d.ts.map +1 -0
- package/lib/State/ActionState.js +1 -0
- package/lib/State/ActionState.js.map +1 -0
- package/lib/State/HttpStateStore.d.ts.map +1 -1
- package/lib/State/HttpStateStore.js +1 -1
- package/lib/State/HttpStateStore.js.map +1 -1
- package/lib/State/InMemoryState.d.ts.map +1 -1
- package/lib/State/InMemoryState.js.map +1 -1
- package/lib/State/LocalState.d.ts +2 -2
- package/lib/State/ResourceState.d.ts +5 -0
- package/lib/State/ResourceState.d.ts.map +1 -1
- package/lib/State/State.d.ts +10 -2
- package/lib/State/State.d.ts.map +1 -1
- package/lib/State/State.js +2 -0
- package/lib/State/State.js.map +1 -1
- package/lib/State/index.d.ts +1 -0
- package/lib/State/index.d.ts.map +1 -1
- package/lib/State/index.js +1 -0
- package/lib/State/index.js.map +1 -1
- package/lib/Test/Core.d.ts +2 -2
- package/lib/Test/Core.d.ts.map +1 -1
- package/lib/Test/Core.js +4 -1
- package/lib/Test/Core.js.map +1 -1
- package/lib/Util/FileLogger.d.ts +1 -1
- package/lib/Util/effect.js +4 -4
- package/lib/Util/effect.js.map +1 -1
- package/lib/Util/exec.d.ts.map +1 -0
- package/lib/Util/exec.js.map +1 -0
- package/lib/Util/hash.d.ts +8 -0
- package/lib/Util/hash.d.ts.map +1 -0
- package/lib/Util/hash.js +11 -0
- package/lib/Util/hash.js.map +1 -0
- package/lib/Util/ignore.d.ts +40 -0
- package/lib/Util/ignore.d.ts.map +1 -0
- package/lib/Util/ignore.js +591 -0
- package/lib/Util/ignore.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +22 -28
- package/src/AWS/Credentials.ts +1 -2
- package/src/AWS/DynamoDB/Stream.ts +1 -4
- package/src/AWS/EC2/hosted.ts +14 -16
- package/src/AWS/ECS/Task.ts +14 -16
- package/src/AWS/Endpoint.ts +2 -5
- package/src/AWS/EventBridge/EventSource.ts +1 -4
- package/src/AWS/Kinesis/StreamEventSource.ts +1 -4
- package/src/AWS/Lambda/Function.ts +31 -35
- package/src/AWS/Providers.ts +22 -3
- package/src/AWS/Region.ts +2 -3
- package/src/AWS/S3/Bucket.ts +7 -2
- package/src/AWS/S3/BucketNotifications.ts +1 -4
- package/src/AWS/SNS/TopicEventSource.ts +1 -4
- package/src/AWS/SQS/Queue.ts +40 -6
- package/src/Action.ts +280 -0
- package/src/Apply.ts +351 -23
- package/src/Artifacts.ts +2 -4
- package/src/Auth/AuthProvider.ts +1 -1
- package/src/Auth/Env.ts +12 -20
- package/src/Binding.ts +5 -9
- package/src/Bundle/Docker.ts +1 -1
- package/src/Cli/Event.ts +4 -0
- package/src/Cli/NamespaceTree.ts +52 -5
- package/src/Cli/commands/_shared.ts +2 -2
- package/src/Cli/commands/deploy.ts +1 -1
- package/src/Cli/commands/logs.ts +4 -4
- package/src/Cli/commands/tail.ts +4 -4
- package/src/Cli/tui/components/Plan.tsx +65 -17
- package/src/Cli/tui/components/PlanProgress.tsx +142 -32
- package/src/Cloudflare/Access.ts +1 -1
- package/src/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.ts +1 -1
- package/src/Cloudflare/Artifacts/ArtifactsBinding.ts +1 -1
- package/src/Cloudflare/Container/Container.ts +1 -1
- package/src/Cloudflare/Container/ContainerApplication.ts +4 -6
- package/src/Cloudflare/Container/ContainerBinding.ts +2 -2
- package/src/Cloudflare/Email/EmailAddress.ts +155 -0
- package/src/Cloudflare/Email/EmailRouting.ts +138 -0
- package/src/Cloudflare/Email/EmailRule.ts +210 -0
- package/src/Cloudflare/Email/SendEmail.ts +95 -0
- package/src/Cloudflare/Email/SendEmailBinding.ts +124 -0
- package/src/Cloudflare/Email/index.ts +5 -0
- package/src/Cloudflare/Images/ImagesBinding.ts +1 -1
- package/src/Cloudflare/KV/KVNamespaceBinding.ts +1 -1
- package/src/Cloudflare/Local/SidecarServer.ts +1 -1
- package/src/Cloudflare/Providers.ts +9 -0
- package/src/Cloudflare/Queue/QueueBinding.ts +1 -1
- package/src/Cloudflare/R2/R2BucketBinding.ts +1 -1
- package/src/Cloudflare/SecretsStore/SecretBinding.ts +1 -1
- package/src/Cloudflare/Workers/Assets.ts +5 -6
- package/src/Cloudflare/Workers/HttpServer.ts +37 -5
- package/src/Cloudflare/Workers/InferEnv.ts +15 -11
- package/src/Cloudflare/Workers/Worker.ts +78 -36
- package/src/Cloudflare/Workers/WorkerBundle.ts +4 -6
- package/src/Cloudflare/Workers/Workflow.ts +2 -2
- package/src/Cloudflare/index.ts +1 -0
- package/src/Construct.ts +3 -7
- package/src/Destroy.ts +1 -0
- package/src/Http.ts +1 -1
- package/src/Namespace.ts +4 -4
- package/src/Neon/Branch.ts +93 -59
- package/src/Neon/Credentials.ts +2 -2
- package/src/Neon/Project.ts +193 -64
- package/src/Output.ts +9 -7
- package/src/Plan.ts +303 -53
- package/src/Platform.ts +7 -7
- package/src/Provider.ts +8 -3
- package/src/Random.ts +1 -1
- package/src/Resource.ts +2 -25
- package/src/Runtime.ts +38 -0
- package/src/Secret.ts +1 -1
- package/src/Stack.ts +10 -6
- package/src/State/ActionState.ts +51 -0
- package/src/State/HttpStateStore.ts +6 -2
- package/src/State/InMemoryState.ts +3 -3
- package/src/State/ResourceState.ts +5 -0
- package/src/State/State.ts +17 -2
- package/src/State/index.ts +1 -0
- package/src/Test/Core.ts +4 -3
- package/src/Util/effect.ts +4 -4
- package/src/Util/hash.ts +14 -0
- package/src/Util/ignore.ts +815 -0
- package/src/index.ts +6 -0
- package/lib/Agent/Agent.d.ts +0 -9
- package/lib/Agent/Agent.d.ts.map +0 -1
- package/lib/Agent/Agent.js +0 -10
- package/lib/Agent/Agent.js.map +0 -1
- package/lib/Agent/Aspect.d.ts +0 -51
- package/lib/Agent/Aspect.d.ts.map +0 -1
- package/lib/Agent/Aspect.js +0 -45
- package/lib/Agent/Aspect.js.map +0 -1
- package/lib/Agent/AspectGraph.d.ts +0 -45
- package/lib/Agent/AspectGraph.d.ts.map +0 -1
- package/lib/Agent/AspectGraph.js +0 -39
- package/lib/Agent/AspectGraph.js.map +0 -1
- package/lib/Agent/ContextPlugin.d.ts +0 -8
- package/lib/Agent/ContextPlugin.d.ts.map +0 -1
- package/lib/Agent/ContextPlugin.js +0 -3
- package/lib/Agent/ContextPlugin.js.map +0 -1
- package/lib/Agent/Plugin.d.ts +0 -18
- package/lib/Agent/Plugin.d.ts.map +0 -1
- package/lib/Agent/Plugin.js +0 -8
- package/lib/Agent/Plugin.js.map +0 -1
- package/lib/Agent/chat/channel.d.ts +0 -9
- package/lib/Agent/chat/channel.d.ts.map +0 -1
- package/lib/Agent/chat/channel.js +0 -10
- package/lib/Agent/chat/channel.js.map +0 -1
- package/lib/Agent/chat/event.d.ts +0 -32
- package/lib/Agent/chat/event.d.ts.map +0 -1
- package/lib/Agent/chat/event.js +0 -32
- package/lib/Agent/chat/event.js.map +0 -1
- package/lib/Agent/chat/message.d.ts +0 -22
- package/lib/Agent/chat/message.d.ts.map +0 -1
- package/lib/Agent/chat/message.js +0 -31
- package/lib/Agent/chat/message.js.map +0 -1
- package/lib/Agent/chat/service.d.ts +0 -102
- package/lib/Agent/chat/service.d.ts.map +0 -1
- package/lib/Agent/chat/service.js +0 -79
- package/lib/Agent/chat/service.js.map +0 -1
- package/lib/Agent/chat/thread.d.ts +0 -13
- package/lib/Agent/chat/thread.d.ts.map +0 -1
- package/lib/Agent/chat/thread.js +0 -16
- package/lib/Agent/chat/thread.js.map +0 -1
- package/lib/Agent/coding/bash.d.ts +0 -36
- package/lib/Agent/coding/bash.d.ts.map +0 -1
- package/lib/Agent/coding/bash.js +0 -170
- package/lib/Agent/coding/bash.js.map +0 -1
- package/lib/Agent/coding/edit.d.ts +0 -31
- package/lib/Agent/coding/edit.d.ts.map +0 -1
- package/lib/Agent/coding/edit.js +0 -90
- package/lib/Agent/coding/edit.js.map +0 -1
- package/lib/Agent/coding/glob.d.ts +0 -23
- package/lib/Agent/coding/glob.d.ts.map +0 -1
- package/lib/Agent/coding/glob.js +0 -78
- package/lib/Agent/coding/glob.js.map +0 -1
- package/lib/Agent/coding/grep.d.ts +0 -26
- package/lib/Agent/coding/grep.d.ts.map +0 -1
- package/lib/Agent/coding/grep.js +0 -105
- package/lib/Agent/coding/grep.js.map +0 -1
- package/lib/Agent/coding/index.d.ts +0 -8
- package/lib/Agent/coding/index.d.ts.map +0 -1
- package/lib/Agent/coding/index.js +0 -8
- package/lib/Agent/coding/index.js.map +0 -1
- package/lib/Agent/coding/read.d.ts +0 -27
- package/lib/Agent/coding/read.d.ts.map +0 -1
- package/lib/Agent/coding/read.js +0 -89
- package/lib/Agent/coding/read.js.map +0 -1
- package/lib/Agent/coding/readlints.d.ts +0 -19
- package/lib/Agent/coding/readlints.d.ts.map +0 -1
- package/lib/Agent/coding/readlints.js +0 -53
- package/lib/Agent/coding/readlints.js.map +0 -1
- package/lib/Agent/coding/write.d.ts +0 -22
- package/lib/Agent/coding/write.d.ts.map +0 -1
- package/lib/Agent/coding/write.js +0 -53
- package/lib/Agent/coding/write.js.map +0 -1
- package/lib/Agent/fs/file.d.ts +0 -12
- package/lib/Agent/fs/file.d.ts.map +0 -1
- package/lib/Agent/fs/file.js +0 -8
- package/lib/Agent/fs/file.js.map +0 -1
- package/lib/Agent/fs/folder.d.ts +0 -5
- package/lib/Agent/fs/folder.d.ts.map +0 -1
- package/lib/Agent/fs/folder.js +0 -3
- package/lib/Agent/fs/folder.js.map +0 -1
- package/lib/Agent/index.d.ts +0 -9
- package/lib/Agent/index.d.ts.map +0 -1
- package/lib/Agent/index.js +0 -9
- package/lib/Agent/index.js.map +0 -1
- package/lib/Agent/llm/error.d.ts +0 -208
- package/lib/Agent/llm/error.d.ts.map +0 -1
- package/lib/Agent/llm/error.js +0 -209
- package/lib/Agent/llm/error.js.map +0 -1
- package/lib/Agent/llm/index.d.ts +0 -5
- package/lib/Agent/llm/index.d.ts.map +0 -1
- package/lib/Agent/llm/index.js +0 -5
- package/lib/Agent/llm/index.js.map +0 -1
- package/lib/Agent/llm/llm.d.ts +0 -32
- package/lib/Agent/llm/llm.d.ts.map +0 -1
- package/lib/Agent/llm/llm.js +0 -74
- package/lib/Agent/llm/llm.js.map +0 -1
- package/lib/Agent/llm/stream-collectors.d.ts +0 -46
- package/lib/Agent/llm/stream-collectors.d.ts.map +0 -1
- package/lib/Agent/llm/stream-collectors.js +0 -33
- package/lib/Agent/llm/stream-collectors.js.map +0 -1
- package/lib/Agent/llm/stream-text-part.d.ts +0 -5
- package/lib/Agent/llm/stream-text-part.d.ts.map +0 -1
- package/lib/Agent/llm/stream-text-part.js +0 -4
- package/lib/Agent/llm/stream-text-part.js.map +0 -1
- package/lib/Agent/lsp/client.d.ts +0 -122
- package/lib/Agent/lsp/client.d.ts.map +0 -1
- package/lib/Agent/lsp/client.js +0 -180
- package/lib/Agent/lsp/client.js.map +0 -1
- package/lib/Agent/lsp/diagnostics.d.ts +0 -16
- package/lib/Agent/lsp/diagnostics.d.ts.map +0 -1
- package/lib/Agent/lsp/diagnostics.js +0 -48
- package/lib/Agent/lsp/diagnostics.js.map +0 -1
- package/lib/Agent/lsp/jsonrpc.d.ts +0 -90
- package/lib/Agent/lsp/jsonrpc.d.ts.map +0 -1
- package/lib/Agent/lsp/jsonrpc.js +0 -178
- package/lib/Agent/lsp/jsonrpc.js.map +0 -1
- package/lib/Agent/lsp/manager.d.ts +0 -38
- package/lib/Agent/lsp/manager.d.ts.map +0 -1
- package/lib/Agent/lsp/manager.js +0 -98
- package/lib/Agent/lsp/manager.js.map +0 -1
- package/lib/Agent/lsp/servers.d.ts +0 -28
- package/lib/Agent/lsp/servers.d.ts.map +0 -1
- package/lib/Agent/lsp/servers.js +0 -21
- package/lib/Agent/lsp/servers.js.map +0 -1
- package/lib/Agent/process/driver.d.ts +0 -10
- package/lib/Agent/process/driver.d.ts.map +0 -1
- package/lib/Agent/process/driver.js +0 -153
- package/lib/Agent/process/driver.js.map +0 -1
- package/lib/Agent/process/issue-service.d.ts +0 -44
- package/lib/Agent/process/issue-service.d.ts.map +0 -1
- package/lib/Agent/process/issue-service.js +0 -28
- package/lib/Agent/process/issue-service.js.map +0 -1
- package/lib/Agent/process/issue-tools.d.ts +0 -28
- package/lib/Agent/process/issue-tools.d.ts.map +0 -1
- package/lib/Agent/process/issue-tools.js +0 -28
- package/lib/Agent/process/issue-tools.js.map +0 -1
- package/lib/Agent/process/issue.d.ts +0 -16
- package/lib/Agent/process/issue.d.ts.map +0 -1
- package/lib/Agent/process/issue.js +0 -17
- package/lib/Agent/process/issue.js.map +0 -1
- package/lib/Agent/process/organization.d.ts +0 -4
- package/lib/Agent/process/organization.d.ts.map +0 -1
- package/lib/Agent/process/organization.js +0 -3
- package/lib/Agent/process/organization.js.map +0 -1
- package/lib/Agent/process/process.d.ts +0 -5
- package/lib/Agent/process/process.d.ts.map +0 -1
- package/lib/Agent/process/process.js +0 -3
- package/lib/Agent/process/process.js.map +0 -1
- package/lib/Agent/process/reply.d.ts +0 -16
- package/lib/Agent/process/reply.d.ts.map +0 -1
- package/lib/Agent/process/reply.js +0 -18
- package/lib/Agent/process/reply.js.map +0 -1
- package/lib/Agent/process/task.d.ts +0 -25
- package/lib/Agent/process/task.d.ts.map +0 -1
- package/lib/Agent/process/task.js +0 -26
- package/lib/Agent/process/task.js.map +0 -1
- package/lib/Agent/tool/index.d.ts +0 -4
- package/lib/Agent/tool/index.d.ts.map +0 -1
- package/lib/Agent/tool/index.js +0 -4
- package/lib/Agent/tool/index.js.map +0 -1
- package/lib/Agent/tool/parameter.d.ts +0 -12
- package/lib/Agent/tool/parameter.d.ts.map +0 -1
- package/lib/Agent/tool/parameter.js +0 -6
- package/lib/Agent/tool/parameter.js.map +0 -1
- package/lib/Agent/tool/result.d.ts +0 -17
- package/lib/Agent/tool/result.d.ts.map +0 -1
- package/lib/Agent/tool/result.js +0 -6
- package/lib/Agent/tool/result.js.map +0 -1
- package/lib/Agent/tool/tool.d.ts +0 -32
- package/lib/Agent/tool/tool.d.ts.map +0 -1
- package/lib/Agent/tool/tool.js +0 -16
- package/lib/Agent/tool/tool.js.map +0 -1
- package/lib/Agent/util/command-validator.d.ts +0 -12
- package/lib/Agent/util/command-validator.d.ts.map +0 -1
- package/lib/Agent/util/command-validator.js +0 -74
- package/lib/Agent/util/command-validator.js.map +0 -1
- package/lib/Agent/util/exec.d.ts.map +0 -1
- package/lib/Agent/util/exec.js.map +0 -1
- package/lib/Agent/util/parser.d.ts +0 -5
- package/lib/Agent/util/parser.d.ts.map +0 -1
- package/lib/Agent/util/parser.js +0 -41
- package/lib/Agent/util/parser.js.map +0 -1
- package/lib/Agent/util/replace.d.ts +0 -38
- package/lib/Agent/util/replace.d.ts.map +0 -1
- package/lib/Agent/util/replace.js +0 -458
- package/lib/Agent/util/replace.js.map +0 -1
- package/lib/Agent/util/ripgrep.d.ts +0 -109
- package/lib/Agent/util/ripgrep.d.ts.map +0 -1
- package/lib/Agent/util/ripgrep.js +0 -221
- package/lib/Agent/util/ripgrep.js.map +0 -1
- package/lib/Neon/api.d.ts +0 -258
- package/lib/Neon/api.d.ts.map +0 -1
- package/lib/Neon/api.js +0 -215
- package/lib/Neon/api.js.map +0 -1
- package/src/Agent/Agent.ts +0 -26
- package/src/Agent/Aspect.ts +0 -173
- package/src/Agent/AspectGraph.ts +0 -98
- package/src/Agent/ContextPlugin.ts +0 -18
- package/src/Agent/Plugin.ts +0 -29
- package/src/Agent/chat/channel.ts +0 -26
- package/src/Agent/chat/event.ts +0 -43
- package/src/Agent/chat/message.ts +0 -35
- package/src/Agent/chat/service.ts +0 -133
- package/src/Agent/chat/thread.ts +0 -17
- package/src/Agent/coding/bash.ts +0 -197
- package/src/Agent/coding/edit.ts +0 -152
- package/src/Agent/coding/glob.ts +0 -96
- package/src/Agent/coding/grep.ts +0 -143
- package/src/Agent/coding/index.ts +0 -7
- package/src/Agent/coding/read.ts +0 -119
- package/src/Agent/coding/readlints.ts +0 -78
- package/src/Agent/coding/write.ts +0 -79
- package/src/Agent/fs/file.ts +0 -22
- package/src/Agent/fs/folder.ts +0 -16
- package/src/Agent/index.ts +0 -9
- package/src/Agent/llm/error.ts +0 -330
- package/src/Agent/llm/index.ts +0 -4
- package/src/Agent/llm/llm.ts +0 -131
- package/src/Agent/llm/stream-collectors.ts +0 -58
- package/src/Agent/llm/stream-text-part.ts +0 -7
- package/src/Agent/lsp/client.ts +0 -293
- package/src/Agent/lsp/diagnostics.ts +0 -64
- package/src/Agent/lsp/jsonrpc.ts +0 -317
- package/src/Agent/lsp/manager.ts +0 -213
- package/src/Agent/lsp/servers.ts +0 -37
- package/src/Agent/process/driver.ts +0 -168
- package/src/Agent/process/issue-service.ts +0 -48
- package/src/Agent/process/issue-tools.ts +0 -33
- package/src/Agent/process/issue.ts +0 -22
- package/src/Agent/process/organization.ts +0 -16
- package/src/Agent/process/process.ts +0 -16
- package/src/Agent/process/reply.ts +0 -21
- package/src/Agent/process/task.ts +0 -34
- package/src/Agent/tool/index.ts +0 -3
- package/src/Agent/tool/parameter.ts +0 -35
- package/src/Agent/tool/result.ts +0 -51
- package/src/Agent/tool/tool.ts +0 -74
- package/src/Agent/util/command-validator.ts +0 -98
- package/src/Agent/util/parser.ts +0 -39
- package/src/Agent/util/replace.ts +0 -559
- package/src/Agent/util/ripgrep.ts +0 -256
- package/src/Neon/api.ts +0 -579
- /package/lib/{Agent/util → Util}/exec.d.ts +0 -0
- /package/lib/{Agent/util → Util}/exec.js +0 -0
- /package/src/{Agent/util → Util}/exec.ts +0 -0
package/src/Agent/lsp/client.ts
DELETED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import type { Subprocess } from "bun";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as HashMap from "effect/HashMap";
|
|
4
|
-
import * as Option from "effect/Option";
|
|
5
|
-
import * as PubSub from "effect/PubSub";
|
|
6
|
-
import * as Ref from "effect/Ref";
|
|
7
|
-
import * as S from "effect/Schema";
|
|
8
|
-
import * as Stream from "effect/Stream";
|
|
9
|
-
import { make as makeJsonRpc } from "./jsonrpc.ts";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* LSP Position (0-indexed line and character)
|
|
13
|
-
*/
|
|
14
|
-
export const Position = S.Struct({
|
|
15
|
-
line: S.Number,
|
|
16
|
-
character: S.Number,
|
|
17
|
-
});
|
|
18
|
-
export type Position = S.Schema.Type<typeof Position>;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* LSP Range (start and end positions)
|
|
22
|
-
*/
|
|
23
|
-
export const Range = S.Struct({
|
|
24
|
-
start: Position,
|
|
25
|
-
end: Position,
|
|
26
|
-
});
|
|
27
|
-
export type Range = S.Schema.Type<typeof Range>;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* LSP Diagnostic severity
|
|
31
|
-
*/
|
|
32
|
-
export const DiagnosticSeverity = {
|
|
33
|
-
Error: 1,
|
|
34
|
-
Warning: 2,
|
|
35
|
-
Information: 3,
|
|
36
|
-
Hint: 4,
|
|
37
|
-
} as const;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* LSP Diagnostic
|
|
41
|
-
*/
|
|
42
|
-
export const Diagnostic = S.Struct({
|
|
43
|
-
range: Range,
|
|
44
|
-
severity: S.optional(S.Number),
|
|
45
|
-
message: S.String,
|
|
46
|
-
source: S.optional(S.String),
|
|
47
|
-
code: S.optional(S.Union([S.String, S.Number])),
|
|
48
|
-
});
|
|
49
|
-
export type Diagnostic = S.Schema.Type<typeof Diagnostic>;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* publishDiagnostics notification params
|
|
53
|
-
*/
|
|
54
|
-
const PublishDiagnosticsParams = S.Struct({
|
|
55
|
-
uri: S.String,
|
|
56
|
-
diagnostics: S.Array(Diagnostic),
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* A single LSP client connected to one server.
|
|
61
|
-
*/
|
|
62
|
-
export interface LSPClient {
|
|
63
|
-
readonly id: string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Notify the server that a file has changed.
|
|
67
|
-
*/
|
|
68
|
-
readonly notifyFileChanged: (
|
|
69
|
-
path: string,
|
|
70
|
-
content: string,
|
|
71
|
-
) => Effect.Effect<void>;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Wait for diagnostics for a file with debouncing.
|
|
75
|
-
*/
|
|
76
|
-
readonly waitForDiagnostics: (
|
|
77
|
-
path: string,
|
|
78
|
-
timeout?: number,
|
|
79
|
-
) => Effect.Effect<Diagnostic[]>;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Get current diagnostics for a file.
|
|
83
|
-
*/
|
|
84
|
-
readonly getDiagnostics: (path: string) => Effect.Effect<Diagnostic[]>;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Register a callback for when diagnostics are received.
|
|
88
|
-
*/
|
|
89
|
-
readonly onDiagnostics: (
|
|
90
|
-
callback: (uri: string, diagnostics: Diagnostic[]) => Effect.Effect<void>,
|
|
91
|
-
) => Effect.Effect<void>;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Shutdown the client.
|
|
95
|
-
*/
|
|
96
|
-
readonly shutdown: Effect.Effect<void>;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Create an LSP client from a subprocess.
|
|
101
|
-
*/
|
|
102
|
-
export const makeLSPClient = (id: string, proc: Subprocess, root: string) =>
|
|
103
|
-
Effect.gen(function* () {
|
|
104
|
-
const rpc = yield* makeJsonRpc(proc);
|
|
105
|
-
|
|
106
|
-
// Diagnostics storage: uri -> Diagnostic[]
|
|
107
|
-
const diagnosticsMap = yield* Ref.make(
|
|
108
|
-
HashMap.empty<string, Diagnostic[]>(),
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
// PubSub for diagnostic events
|
|
112
|
-
const diagnosticsPubSub = yield* PubSub.unbounded<{ uri: string }>();
|
|
113
|
-
|
|
114
|
-
// Track open files and their versions
|
|
115
|
-
const openFiles = yield* Ref.make(HashMap.empty<string, number>());
|
|
116
|
-
|
|
117
|
-
// External diagnostic callbacks
|
|
118
|
-
const diagnosticCallbacks = yield* Ref.make<
|
|
119
|
-
Array<(uri: string, diagnostics: Diagnostic[]) => Effect.Effect<void>>
|
|
120
|
-
>([]);
|
|
121
|
-
|
|
122
|
-
// Handle publishDiagnostics notifications
|
|
123
|
-
yield* rpc.onNotification(
|
|
124
|
-
"textDocument/publishDiagnostics",
|
|
125
|
-
(params: unknown) =>
|
|
126
|
-
Effect.gen(function* () {
|
|
127
|
-
const decoded = yield* S.decodeUnknownEffect(
|
|
128
|
-
PublishDiagnosticsParams,
|
|
129
|
-
)(params).pipe(Effect.catch(() => Effect.succeed(null)));
|
|
130
|
-
|
|
131
|
-
if (!decoded) return;
|
|
132
|
-
|
|
133
|
-
// Convert readonly array to mutable for storage
|
|
134
|
-
const diagnostics = [...decoded.diagnostics] as Diagnostic[];
|
|
135
|
-
|
|
136
|
-
yield* Ref.update(diagnosticsMap, (m) =>
|
|
137
|
-
HashMap.set(m, decoded.uri, diagnostics),
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
yield* PubSub.publish(diagnosticsPubSub, { uri: decoded.uri });
|
|
141
|
-
|
|
142
|
-
// Call external callbacks
|
|
143
|
-
const callbacks = yield* Ref.get(diagnosticCallbacks);
|
|
144
|
-
yield* Effect.forEach(
|
|
145
|
-
callbacks,
|
|
146
|
-
(cb) => cb(decoded.uri, diagnostics),
|
|
147
|
-
{ concurrency: "unbounded" },
|
|
148
|
-
).pipe(Effect.catch(() => Effect.void));
|
|
149
|
-
}),
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
// LSP initialize handshake
|
|
153
|
-
yield* rpc.request("initialize", {
|
|
154
|
-
processId: process.pid,
|
|
155
|
-
rootUri: `file://${root}`,
|
|
156
|
-
capabilities: {
|
|
157
|
-
textDocument: {
|
|
158
|
-
synchronization: {
|
|
159
|
-
didOpen: true,
|
|
160
|
-
didChange: true,
|
|
161
|
-
willSave: false,
|
|
162
|
-
willSaveWaitUntil: false,
|
|
163
|
-
didSave: false,
|
|
164
|
-
},
|
|
165
|
-
publishDiagnostics: {
|
|
166
|
-
relatedInformation: true,
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
yield* rpc.notify("initialized", {});
|
|
173
|
-
|
|
174
|
-
return {
|
|
175
|
-
id,
|
|
176
|
-
|
|
177
|
-
notifyFileChanged: (path: string, content: string) =>
|
|
178
|
-
Effect.gen(function* () {
|
|
179
|
-
const uri = `file://${path}`;
|
|
180
|
-
const maybeVersion = yield* Ref.get(openFiles).pipe(
|
|
181
|
-
Effect.map((m) => HashMap.get(m, path)),
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
if (Option.isNone(maybeVersion)) {
|
|
185
|
-
// File not open yet, send didOpen
|
|
186
|
-
yield* rpc.notify("textDocument/didOpen", {
|
|
187
|
-
textDocument: {
|
|
188
|
-
uri,
|
|
189
|
-
languageId: getLanguageId(path),
|
|
190
|
-
version: 0,
|
|
191
|
-
text: content,
|
|
192
|
-
},
|
|
193
|
-
});
|
|
194
|
-
yield* Ref.update(openFiles, (m) => HashMap.set(m, path, 0));
|
|
195
|
-
} else {
|
|
196
|
-
// File already open, send didChange with incremented version
|
|
197
|
-
const newVersion = maybeVersion.value + 1;
|
|
198
|
-
yield* rpc.notify("textDocument/didChange", {
|
|
199
|
-
textDocument: { uri, version: newVersion },
|
|
200
|
-
contentChanges: [{ text: content }],
|
|
201
|
-
});
|
|
202
|
-
yield* Ref.update(openFiles, (m) =>
|
|
203
|
-
HashMap.set(m, path, newVersion),
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
}),
|
|
207
|
-
|
|
208
|
-
waitForDiagnostics: (path: string, timeout = 3000) =>
|
|
209
|
-
Effect.gen(function* () {
|
|
210
|
-
const uri = `file://${path}`;
|
|
211
|
-
|
|
212
|
-
// Wait for diagnostics with 150ms debounce, scoped
|
|
213
|
-
yield* Effect.scoped(
|
|
214
|
-
Effect.gen(function* () {
|
|
215
|
-
const subscription = yield* PubSub.subscribe(diagnosticsPubSub);
|
|
216
|
-
yield* Stream.fromSubscription(subscription).pipe(
|
|
217
|
-
Stream.filter((e) => e.uri === uri),
|
|
218
|
-
Stream.debounce(150),
|
|
219
|
-
Stream.take(1),
|
|
220
|
-
Stream.runDrain,
|
|
221
|
-
);
|
|
222
|
-
}),
|
|
223
|
-
).pipe(
|
|
224
|
-
Effect.timeout(timeout),
|
|
225
|
-
Effect.catch(() => Effect.void),
|
|
226
|
-
);
|
|
227
|
-
|
|
228
|
-
// Return diagnostics for this file
|
|
229
|
-
const diags = yield* Ref.get(diagnosticsMap).pipe(
|
|
230
|
-
Effect.map((m) => HashMap.get(m, uri)),
|
|
231
|
-
);
|
|
232
|
-
|
|
233
|
-
return Option.getOrElse(diags, () => [] as Diagnostic[]);
|
|
234
|
-
}),
|
|
235
|
-
|
|
236
|
-
getDiagnostics: (path: string) =>
|
|
237
|
-
Effect.gen(function* () {
|
|
238
|
-
const uri = `file://${path}`;
|
|
239
|
-
const diags = yield* Ref.get(diagnosticsMap).pipe(
|
|
240
|
-
Effect.map((m) => HashMap.get(m, uri)),
|
|
241
|
-
);
|
|
242
|
-
return Option.getOrElse(diags, () => []);
|
|
243
|
-
}),
|
|
244
|
-
|
|
245
|
-
onDiagnostics: (
|
|
246
|
-
callback: (
|
|
247
|
-
uri: string,
|
|
248
|
-
diagnostics: Diagnostic[],
|
|
249
|
-
) => Effect.Effect<void>,
|
|
250
|
-
) => Ref.update(diagnosticCallbacks, (cbs) => [...cbs, callback]),
|
|
251
|
-
|
|
252
|
-
shutdown: Effect.gen(function* () {
|
|
253
|
-
yield* rpc
|
|
254
|
-
.request("shutdown", null)
|
|
255
|
-
.pipe(Effect.catch(() => Effect.void));
|
|
256
|
-
yield* rpc.notify("exit", null);
|
|
257
|
-
yield* rpc.shutdown;
|
|
258
|
-
}),
|
|
259
|
-
};
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Get LSP language ID from file path.
|
|
264
|
-
*/
|
|
265
|
-
const getLanguageId = (path: string): string => {
|
|
266
|
-
const ext = path.split(".").pop()?.toLowerCase();
|
|
267
|
-
switch (ext) {
|
|
268
|
-
case "ts":
|
|
269
|
-
case "mts":
|
|
270
|
-
case "cts":
|
|
271
|
-
return "typescript";
|
|
272
|
-
case "tsx":
|
|
273
|
-
case "mtsx":
|
|
274
|
-
case "ctsx":
|
|
275
|
-
return "typescriptreact";
|
|
276
|
-
case "js":
|
|
277
|
-
case "mjs":
|
|
278
|
-
case "cjs":
|
|
279
|
-
return "javascript";
|
|
280
|
-
case "jsx":
|
|
281
|
-
return "javascriptreact";
|
|
282
|
-
case "json":
|
|
283
|
-
return "json";
|
|
284
|
-
case "vue":
|
|
285
|
-
return "vue";
|
|
286
|
-
case "svelte":
|
|
287
|
-
return "svelte";
|
|
288
|
-
case "astro":
|
|
289
|
-
return "astro";
|
|
290
|
-
default:
|
|
291
|
-
return "plaintext";
|
|
292
|
-
}
|
|
293
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import * as Option from "effect/Option";
|
|
3
|
-
import { DiagnosticSeverity, type Diagnostic } from "./client.ts";
|
|
4
|
-
import { LSPManager } from "./manager.ts";
|
|
5
|
-
|
|
6
|
-
const MAX_DIAGNOSTICS_PER_FILE = 10;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Get diagnostics from LSP if available, otherwise return empty array.
|
|
10
|
-
*/
|
|
11
|
-
export const getDiagnosticsIfAvailable = (
|
|
12
|
-
filePath: string,
|
|
13
|
-
content: string,
|
|
14
|
-
): Effect.Effect<Diagnostic[]> =>
|
|
15
|
-
Effect.serviceOption(LSPManager).pipe(
|
|
16
|
-
Effect.flatMap((maybeManager) => {
|
|
17
|
-
if (Option.isNone(maybeManager)) {
|
|
18
|
-
return Effect.succeed([] as Diagnostic[]);
|
|
19
|
-
}
|
|
20
|
-
const manager = maybeManager.value;
|
|
21
|
-
return manager
|
|
22
|
-
.notifyFileChanged(filePath, content)
|
|
23
|
-
.pipe(Effect.andThen(manager.waitForDiagnostics(filePath)));
|
|
24
|
-
}),
|
|
25
|
-
Effect.catch(() => Effect.succeed([] as Diagnostic[])),
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Format a single diagnostic for display.
|
|
30
|
-
*/
|
|
31
|
-
export const formatDiagnostic = (d: Diagnostic): string => {
|
|
32
|
-
const severityMap: Record<number, string> = {
|
|
33
|
-
[DiagnosticSeverity.Error]: "ERROR",
|
|
34
|
-
[DiagnosticSeverity.Warning]: "WARN",
|
|
35
|
-
[DiagnosticSeverity.Information]: "INFO",
|
|
36
|
-
[DiagnosticSeverity.Hint]: "HINT",
|
|
37
|
-
};
|
|
38
|
-
const severity = severityMap[d.severity ?? DiagnosticSeverity.Error];
|
|
39
|
-
const line = d.range.start.line + 1;
|
|
40
|
-
const col = d.range.start.character + 1;
|
|
41
|
-
return `${severity} [${line}:${col}] ${d.message}`;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Format diagnostics for display (matching opencode format).
|
|
46
|
-
* Only shows errors, limits output, and wraps in XML tags.
|
|
47
|
-
*/
|
|
48
|
-
export const formatDiagnostics = (diagnostics: Diagnostic[]): string => {
|
|
49
|
-
const errors = diagnostics.filter(
|
|
50
|
-
(d) => d.severity === DiagnosticSeverity.Error,
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
if (errors.length === 0) {
|
|
54
|
-
return "";
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const limited = errors.slice(0, MAX_DIAGNOSTICS_PER_FILE);
|
|
58
|
-
const suffix =
|
|
59
|
-
errors.length > MAX_DIAGNOSTICS_PER_FILE
|
|
60
|
-
? `\n... and ${errors.length - MAX_DIAGNOSTICS_PER_FILE} more`
|
|
61
|
-
: "";
|
|
62
|
-
|
|
63
|
-
return `This file has errors, please fix\n<file_diagnostics>\n${limited.map(formatDiagnostic).join("\n")}${suffix}\n</file_diagnostics>`;
|
|
64
|
-
};
|
package/src/Agent/lsp/jsonrpc.ts
DELETED
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
import type { Subprocess } from "bun";
|
|
2
|
-
import * as Data from "effect/Data";
|
|
3
|
-
import * as Deferred from "effect/Deferred";
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
import * as Fiber from "effect/Fiber";
|
|
6
|
-
import * as HashMap from "effect/HashMap";
|
|
7
|
-
import * as Option from "effect/Option";
|
|
8
|
-
import * as Ref from "effect/Ref";
|
|
9
|
-
import * as Stream from "effect/Stream";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* JSON-RPC 2.0 message types
|
|
13
|
-
*/
|
|
14
|
-
export interface JsonRpcRequest {
|
|
15
|
-
jsonrpc: "2.0";
|
|
16
|
-
id: number;
|
|
17
|
-
method: string;
|
|
18
|
-
params?: unknown;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface JsonRpcNotification {
|
|
22
|
-
jsonrpc: "2.0";
|
|
23
|
-
method: string;
|
|
24
|
-
params?: unknown;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface JsonRpcResponse {
|
|
28
|
-
jsonrpc: "2.0";
|
|
29
|
-
id: number;
|
|
30
|
-
result?: unknown;
|
|
31
|
-
error?: {
|
|
32
|
-
code: number;
|
|
33
|
-
message: string;
|
|
34
|
-
data?: unknown;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type JsonRpcMessage =
|
|
39
|
-
| JsonRpcRequest
|
|
40
|
-
| JsonRpcNotification
|
|
41
|
-
| JsonRpcResponse;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Error from JSON-RPC protocol.
|
|
45
|
-
*/
|
|
46
|
-
export class JsonRpcProtocolError extends Data.TaggedError(
|
|
47
|
-
"JsonRpcProtocolError",
|
|
48
|
-
)<{
|
|
49
|
-
readonly code: number;
|
|
50
|
-
readonly message: string;
|
|
51
|
-
readonly data?: unknown;
|
|
52
|
-
}> {}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Error parsing JSON-RPC messages from stream.
|
|
56
|
-
*/
|
|
57
|
-
export class JsonRpcParseError extends Data.TaggedError("JsonRpcParseError")<{
|
|
58
|
-
readonly cause: unknown;
|
|
59
|
-
}> {}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Encode a JSON-RPC message with LSP wire format headers.
|
|
63
|
-
* Format: Content-Length: <length>\r\n\r\n<json>
|
|
64
|
-
*/
|
|
65
|
-
export const encodeMessage = (msg: JsonRpcMessage): Uint8Array => {
|
|
66
|
-
const json = JSON.stringify(msg);
|
|
67
|
-
const body = new TextEncoder().encode(json);
|
|
68
|
-
const header = `Content-Length: ${body.byteLength}\r\n\r\n`;
|
|
69
|
-
const headerBytes = new TextEncoder().encode(header);
|
|
70
|
-
|
|
71
|
-
const result = new Uint8Array(headerBytes.length + body.length);
|
|
72
|
-
result.set(headerBytes);
|
|
73
|
-
result.set(body, headerBytes.length);
|
|
74
|
-
return result;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Parse LSP messages from a byte buffer.
|
|
79
|
-
* Returns parsed messages and remaining buffer.
|
|
80
|
-
* Works with bytes to correctly handle Content-Length (which is in bytes, not characters).
|
|
81
|
-
*/
|
|
82
|
-
export const parseBuffer = (
|
|
83
|
-
buffer: Uint8Array,
|
|
84
|
-
): { messages: JsonRpcMessage[]; remaining: Uint8Array<ArrayBuffer> } => {
|
|
85
|
-
const messages: JsonRpcMessage[] = [];
|
|
86
|
-
let offset = 0;
|
|
87
|
-
const decoder = new TextDecoder();
|
|
88
|
-
|
|
89
|
-
while (offset < buffer.length) {
|
|
90
|
-
// Look for \r\n\r\n header terminator
|
|
91
|
-
const headerEnd = findHeaderEnd(buffer, offset);
|
|
92
|
-
if (headerEnd === -1) break;
|
|
93
|
-
|
|
94
|
-
const headerPart = decoder.decode(buffer.subarray(offset, headerEnd));
|
|
95
|
-
const match = /Content-Length:\s*(\d+)/i.exec(headerPart);
|
|
96
|
-
if (!match) break;
|
|
97
|
-
|
|
98
|
-
const contentLength = parseInt(match[1], 10);
|
|
99
|
-
const bodyStart = headerEnd + 4; // Skip \r\n\r\n
|
|
100
|
-
const bodyEnd = bodyStart + contentLength;
|
|
101
|
-
|
|
102
|
-
// Check if we have the full body (in bytes)
|
|
103
|
-
if (buffer.length < bodyEnd) break;
|
|
104
|
-
|
|
105
|
-
const body = decoder.decode(buffer.subarray(bodyStart, bodyEnd));
|
|
106
|
-
try {
|
|
107
|
-
const parsed = JSON.parse(body) as JsonRpcMessage;
|
|
108
|
-
messages.push(parsed);
|
|
109
|
-
} catch {
|
|
110
|
-
// Invalid JSON, skip this message
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
offset = bodyEnd;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Create a new array for remaining bytes to ensure ArrayBuffer type
|
|
117
|
-
const remainingLength = buffer.length - offset;
|
|
118
|
-
const remaining = new Uint8Array(remainingLength);
|
|
119
|
-
remaining.set(buffer.subarray(offset));
|
|
120
|
-
|
|
121
|
-
return { messages, remaining };
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Find the index of \r\n\r\n in a byte array starting from offset.
|
|
126
|
-
*/
|
|
127
|
-
const findHeaderEnd = (buffer: Uint8Array, offset: number): number => {
|
|
128
|
-
const CR = 13; // \r
|
|
129
|
-
const LF = 10; // \n
|
|
130
|
-
for (let i = offset; i < buffer.length - 3; i++) {
|
|
131
|
-
if (
|
|
132
|
-
buffer[i] === CR &&
|
|
133
|
-
buffer[i + 1] === LF &&
|
|
134
|
-
buffer[i + 2] === CR &&
|
|
135
|
-
buffer[i + 3] === LF
|
|
136
|
-
) {
|
|
137
|
-
return i;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return -1;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Concatenate two Uint8Arrays.
|
|
145
|
-
*/
|
|
146
|
-
const concatBytes = (a: Uint8Array, b: Uint8Array): Uint8Array<ArrayBuffer> => {
|
|
147
|
-
const result = new Uint8Array(a.length + b.length);
|
|
148
|
-
result.set(a);
|
|
149
|
-
result.set(b, a.length);
|
|
150
|
-
return result;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Parse LSP messages from a ReadableStream.
|
|
155
|
-
* Uses Stream.mapAccum to maintain buffer state across chunks.
|
|
156
|
-
*/
|
|
157
|
-
const parseMessages = (stdout: ReadableStream<Uint8Array>) =>
|
|
158
|
-
Stream.fromReadableStream({
|
|
159
|
-
evaluate: () => stdout,
|
|
160
|
-
onError: (cause) => new JsonRpcParseError({ cause }),
|
|
161
|
-
}).pipe(
|
|
162
|
-
Stream.mapAccum(
|
|
163
|
-
() => new Uint8Array(0) as Uint8Array<ArrayBuffer>,
|
|
164
|
-
(buffer, chunk): [Uint8Array<ArrayBuffer>, JsonRpcMessage[]] => {
|
|
165
|
-
const combined = concatBytes(buffer, chunk);
|
|
166
|
-
const { messages, remaining } = parseBuffer(combined);
|
|
167
|
-
return [remaining, messages];
|
|
168
|
-
},
|
|
169
|
-
),
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* A JSON-RPC connection over stdio.
|
|
174
|
-
*/
|
|
175
|
-
export interface JsonRpcConnection {
|
|
176
|
-
/**
|
|
177
|
-
* Send a request and wait for a response.
|
|
178
|
-
*/
|
|
179
|
-
readonly request: <A>(
|
|
180
|
-
method: string,
|
|
181
|
-
params: unknown,
|
|
182
|
-
) => Effect.Effect<A, JsonRpcProtocolError>;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Send a notification (no response expected).
|
|
186
|
-
*/
|
|
187
|
-
readonly notify: (method: string, params: unknown) => Effect.Effect<void>;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Register a handler for server notifications.
|
|
191
|
-
*/
|
|
192
|
-
readonly onNotification: (
|
|
193
|
-
method: string,
|
|
194
|
-
handler: (params: unknown) => Effect.Effect<void>,
|
|
195
|
-
) => Effect.Effect<void>;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Shutdown the connection.
|
|
199
|
-
*/
|
|
200
|
-
readonly shutdown: Effect.Effect<void>;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Create a JSON-RPC connection from a subprocess.
|
|
205
|
-
*/
|
|
206
|
-
export const make = (proc: Subprocess) =>
|
|
207
|
-
Effect.gen(function* () {
|
|
208
|
-
// Pending requests: id -> Deferred<response>
|
|
209
|
-
const pending = yield* Ref.make(
|
|
210
|
-
HashMap.empty<number, Deferred.Deferred<unknown, JsonRpcProtocolError>>(),
|
|
211
|
-
);
|
|
212
|
-
const nextId = yield* Ref.make(0);
|
|
213
|
-
|
|
214
|
-
// Notification handlers
|
|
215
|
-
const notificationHandlers = yield* Ref.make(
|
|
216
|
-
HashMap.empty<string, (params: unknown) => Effect.Effect<void>>(),
|
|
217
|
-
);
|
|
218
|
-
|
|
219
|
-
// Background fiber reading stdout
|
|
220
|
-
const reader = yield* parseMessages(
|
|
221
|
-
proc.stdout as ReadableStream<Uint8Array>,
|
|
222
|
-
).pipe(
|
|
223
|
-
Stream.runForEach((msg) =>
|
|
224
|
-
Effect.gen(function* () {
|
|
225
|
-
if ("id" in msg && ("result" in msg || "error" in msg)) {
|
|
226
|
-
// Response to our request
|
|
227
|
-
const response = msg as JsonRpcResponse;
|
|
228
|
-
const maybeDeferred = yield* Ref.get(pending).pipe(
|
|
229
|
-
Effect.map((m) => HashMap.get(m, response.id)),
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
if (Option.isSome(maybeDeferred)) {
|
|
233
|
-
if (response.error) {
|
|
234
|
-
yield* Deferred.fail(
|
|
235
|
-
maybeDeferred.value,
|
|
236
|
-
new JsonRpcProtocolError({
|
|
237
|
-
code: response.error.code,
|
|
238
|
-
message: response.error.message,
|
|
239
|
-
data: response.error.data,
|
|
240
|
-
}),
|
|
241
|
-
);
|
|
242
|
-
} else {
|
|
243
|
-
yield* Deferred.succeed(maybeDeferred.value, response.result);
|
|
244
|
-
}
|
|
245
|
-
// Clean up the pending request
|
|
246
|
-
yield* Ref.update(pending, (m) => HashMap.remove(m, response.id));
|
|
247
|
-
}
|
|
248
|
-
} else if ("method" in msg && !("id" in msg)) {
|
|
249
|
-
// Notification from server
|
|
250
|
-
const notification = msg as JsonRpcNotification;
|
|
251
|
-
const maybeHandler = yield* Ref.get(notificationHandlers).pipe(
|
|
252
|
-
Effect.map((m) => HashMap.get(m, notification.method)),
|
|
253
|
-
);
|
|
254
|
-
|
|
255
|
-
if (Option.isSome(maybeHandler)) {
|
|
256
|
-
yield* maybeHandler.value(notification.params);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}),
|
|
260
|
-
),
|
|
261
|
-
Effect.catch((e) => Effect.logWarning(`JSON-RPC reader error: ${e}`)),
|
|
262
|
-
Effect.forkDetach,
|
|
263
|
-
);
|
|
264
|
-
|
|
265
|
-
const connection: JsonRpcConnection = {
|
|
266
|
-
request: <A>(method: string, params: unknown) =>
|
|
267
|
-
Effect.gen(function* () {
|
|
268
|
-
const id = yield* Ref.getAndUpdate(nextId, (n) => n + 1);
|
|
269
|
-
const deferred = yield* Deferred.make<A, JsonRpcProtocolError>();
|
|
270
|
-
yield* Ref.update(pending, (m) =>
|
|
271
|
-
HashMap.set(
|
|
272
|
-
m,
|
|
273
|
-
id,
|
|
274
|
-
deferred as Deferred.Deferred<unknown, JsonRpcProtocolError>,
|
|
275
|
-
),
|
|
276
|
-
);
|
|
277
|
-
|
|
278
|
-
yield* Effect.sync(() => {
|
|
279
|
-
const msg: JsonRpcRequest = { jsonrpc: "2.0", id, method, params };
|
|
280
|
-
const stdin = proc.stdin;
|
|
281
|
-
if (stdin && typeof stdin === "object" && "write" in stdin) {
|
|
282
|
-
(stdin as { write: (data: Uint8Array) => void }).write(
|
|
283
|
-
encodeMessage(msg),
|
|
284
|
-
);
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
return yield* Deferred.await(deferred);
|
|
289
|
-
}),
|
|
290
|
-
|
|
291
|
-
notify: (method: string, params: unknown) =>
|
|
292
|
-
Effect.sync(() => {
|
|
293
|
-
const msg: JsonRpcNotification = { jsonrpc: "2.0", method, params };
|
|
294
|
-
const stdin = proc.stdin;
|
|
295
|
-
if (stdin && typeof stdin === "object" && "write" in stdin) {
|
|
296
|
-
(stdin as { write: (data: Uint8Array) => void }).write(
|
|
297
|
-
encodeMessage(msg),
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
}),
|
|
301
|
-
|
|
302
|
-
onNotification: (
|
|
303
|
-
method: string,
|
|
304
|
-
handler: (params: unknown) => Effect.Effect<void>,
|
|
305
|
-
) =>
|
|
306
|
-
Ref.update(notificationHandlers, (m) =>
|
|
307
|
-
HashMap.set(m, method, handler),
|
|
308
|
-
),
|
|
309
|
-
|
|
310
|
-
shutdown: Effect.gen(function* () {
|
|
311
|
-
yield* Fiber.interrupt(reader);
|
|
312
|
-
yield* Effect.sync(() => proc.kill());
|
|
313
|
-
}),
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
return connection;
|
|
317
|
-
});
|