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/manager.ts
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as HashMap from "effect/HashMap";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as Option from "effect/Option";
|
|
6
|
-
import * as Ref from "effect/Ref";
|
|
7
|
-
import { type Diagnostic, type LSPClient, makeLSPClient } from "./client.ts";
|
|
8
|
-
import { type ServerConfig, DefaultServers } from "./servers.ts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Create an LSPManager layer.
|
|
12
|
-
*
|
|
13
|
-
* @param servers - List of servers to use. Defaults to DefaultServers.
|
|
14
|
-
*/
|
|
15
|
-
export const LSPManagerLive = (servers: ServerConfig[] = DefaultServers) =>
|
|
16
|
-
Layer.effect(LSPManager, makeLSPManager(servers));
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* LSP Manager interface.
|
|
20
|
-
*/
|
|
21
|
-
export interface LSPManager {
|
|
22
|
-
/**
|
|
23
|
-
* Initialize all available LSP servers.
|
|
24
|
-
*/
|
|
25
|
-
initialize(root: string): Effect.Effect<void, never, never>;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Notify all servers that a file has changed.
|
|
29
|
-
*/
|
|
30
|
-
notifyFileChanged(
|
|
31
|
-
path: string,
|
|
32
|
-
content: string,
|
|
33
|
-
): Effect.Effect<void, never, never>;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Wait for diagnostics from all servers and return aggregated results.
|
|
37
|
-
*/
|
|
38
|
-
waitForDiagnostics(
|
|
39
|
-
path: string,
|
|
40
|
-
timeout?: number,
|
|
41
|
-
): Effect.Effect<Diagnostic[], never, never>;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Get current diagnostics for a file (without waiting).
|
|
45
|
-
*/
|
|
46
|
-
getDiagnostics(path: string): Effect.Effect<Diagnostic[], never, never>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Shutdown all servers.
|
|
50
|
-
*/
|
|
51
|
-
readonly shutdown: Effect.Effect<void, never, never>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export const LSPManager = Context.Service<LSPManager>("LSPManager");
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Create an LSPManager implementation.
|
|
58
|
-
*/
|
|
59
|
-
const makeLSPManager = (servers: ServerConfig[]) =>
|
|
60
|
-
Effect.gen(function* () {
|
|
61
|
-
// Map of serverId -> LSPClient
|
|
62
|
-
const clients = yield* Ref.make(HashMap.empty<string, LSPClient>());
|
|
63
|
-
|
|
64
|
-
// Aggregated diagnostics: uri -> Map<serverId, Diagnostic[]>
|
|
65
|
-
const diagnosticsMap = yield* Ref.make(
|
|
66
|
-
HashMap.empty<string, HashMap.HashMap<string, Diagnostic[]>>(),
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
// Initialization state
|
|
70
|
-
const initialized = yield* Ref.make(false);
|
|
71
|
-
|
|
72
|
-
return LSPManager.of({
|
|
73
|
-
initialize: Effect.fnUntraced(function* (root: string) {
|
|
74
|
-
const alreadyInitialized = yield* Ref.get(initialized);
|
|
75
|
-
if (alreadyInitialized) return;
|
|
76
|
-
|
|
77
|
-
yield* Effect.logDebug("[LSPManager] Initializing LSP servers...");
|
|
78
|
-
|
|
79
|
-
// Spawn all available servers in parallel
|
|
80
|
-
yield* Effect.forEach(
|
|
81
|
-
servers,
|
|
82
|
-
(config) =>
|
|
83
|
-
Effect.gen(function* () {
|
|
84
|
-
yield* Effect.logDebug(
|
|
85
|
-
`[LSPManager] Starting ${config.id} server...`,
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const proc = yield* spawnServer(config, root);
|
|
89
|
-
if (!proc) {
|
|
90
|
-
yield* Effect.logWarning(
|
|
91
|
-
`[LSPManager] ${config.id} server not available`,
|
|
92
|
-
);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const client = yield* makeLSPClient(config.id, proc, root);
|
|
97
|
-
|
|
98
|
-
// Wire up diagnostics aggregation
|
|
99
|
-
yield* client.onDiagnostics((uri, diags) =>
|
|
100
|
-
Ref.update(diagnosticsMap, (m) => {
|
|
101
|
-
const existing = HashMap.get(m, uri).pipe(
|
|
102
|
-
Option.getOrElse(() =>
|
|
103
|
-
HashMap.empty<string, Diagnostic[]>(),
|
|
104
|
-
),
|
|
105
|
-
);
|
|
106
|
-
const updated = HashMap.set(existing, config.id, diags);
|
|
107
|
-
return HashMap.set(m, uri, updated);
|
|
108
|
-
}),
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
yield* Ref.update(clients, (m) =>
|
|
112
|
-
HashMap.set(m, config.id, client),
|
|
113
|
-
);
|
|
114
|
-
yield* Effect.logDebug(
|
|
115
|
-
`[LSPManager] ${config.id} server started`,
|
|
116
|
-
);
|
|
117
|
-
}).pipe(
|
|
118
|
-
Effect.catch((e) =>
|
|
119
|
-
Effect.logWarning(
|
|
120
|
-
`[LSPManager] Failed to start ${config.id}: ${e}`,
|
|
121
|
-
),
|
|
122
|
-
),
|
|
123
|
-
),
|
|
124
|
-
{ concurrency: "unbounded" },
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
yield* Ref.set(initialized, true);
|
|
128
|
-
yield* Effect.logDebug("[LSPManager] All LSP servers initialized");
|
|
129
|
-
}),
|
|
130
|
-
|
|
131
|
-
notifyFileChanged: Effect.fnUntraced(function* (
|
|
132
|
-
path: string,
|
|
133
|
-
content: string,
|
|
134
|
-
) {
|
|
135
|
-
yield* Effect.logDebug(`[LSPManager] Notifying ${path} of changes`);
|
|
136
|
-
const allClients = yield* Ref.get(clients);
|
|
137
|
-
yield* Effect.forEach(
|
|
138
|
-
HashMap.values(allClients),
|
|
139
|
-
(client) => client.notifyFileChanged(path, content),
|
|
140
|
-
{ concurrency: "unbounded" },
|
|
141
|
-
).pipe(Effect.catch(() => Effect.void));
|
|
142
|
-
}),
|
|
143
|
-
|
|
144
|
-
waitForDiagnostics: Effect.fnUntraced(function* (
|
|
145
|
-
path: string,
|
|
146
|
-
timeout = 3000,
|
|
147
|
-
) {
|
|
148
|
-
yield* Effect.logDebug(
|
|
149
|
-
`[LSPManager] Waiting for diagnostics for ${path}`,
|
|
150
|
-
);
|
|
151
|
-
const allClients = yield* Ref.get(clients);
|
|
152
|
-
const uri = `file://${path}`;
|
|
153
|
-
|
|
154
|
-
// Wait for all servers to report diagnostics
|
|
155
|
-
yield* Effect.forEach(
|
|
156
|
-
HashMap.values(allClients),
|
|
157
|
-
(client) => client.waitForDiagnostics(path, timeout),
|
|
158
|
-
{ concurrency: "unbounded" },
|
|
159
|
-
).pipe(Effect.catch(() => Effect.void));
|
|
160
|
-
|
|
161
|
-
// Aggregate diagnostics from all servers
|
|
162
|
-
const allDiagnostics = yield* Ref.get(diagnosticsMap).pipe(
|
|
163
|
-
Effect.map((m) => {
|
|
164
|
-
const byServer = HashMap.get(m, uri).pipe(
|
|
165
|
-
Option.getOrElse(() => HashMap.empty<string, Diagnostic[]>()),
|
|
166
|
-
);
|
|
167
|
-
return Array.from(HashMap.values(byServer)).flat();
|
|
168
|
-
}),
|
|
169
|
-
);
|
|
170
|
-
|
|
171
|
-
return allDiagnostics;
|
|
172
|
-
}),
|
|
173
|
-
|
|
174
|
-
getDiagnostics: Effect.fnUntraced(function* (path: string) {
|
|
175
|
-
const uri = `file://${path}`;
|
|
176
|
-
const allDiagnostics = yield* Ref.get(diagnosticsMap).pipe(
|
|
177
|
-
Effect.map((m) => {
|
|
178
|
-
const byServer = HashMap.get(m, uri).pipe(
|
|
179
|
-
Option.getOrElse(() => HashMap.empty<string, Diagnostic[]>()),
|
|
180
|
-
);
|
|
181
|
-
return Array.from(HashMap.values(byServer)).flat();
|
|
182
|
-
}),
|
|
183
|
-
);
|
|
184
|
-
return allDiagnostics;
|
|
185
|
-
}),
|
|
186
|
-
|
|
187
|
-
shutdown: Effect.gen(function* () {
|
|
188
|
-
yield* Effect.logDebug("[LSPManager] Shutting down LSP servers...");
|
|
189
|
-
const allClients = yield* Ref.get(clients);
|
|
190
|
-
yield* Effect.forEach(
|
|
191
|
-
HashMap.values(allClients),
|
|
192
|
-
(client) => client.shutdown,
|
|
193
|
-
{ concurrency: "unbounded" },
|
|
194
|
-
).pipe(Effect.catch(() => Effect.void));
|
|
195
|
-
yield* Ref.set(clients, HashMap.empty());
|
|
196
|
-
yield* Ref.set(initialized, false);
|
|
197
|
-
yield* Effect.logDebug("[LSPManager] All LSP servers shut down");
|
|
198
|
-
}),
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Spawn an LSP server process.
|
|
204
|
-
*/
|
|
205
|
-
const spawnServer = (config: ServerConfig, cwd: string) =>
|
|
206
|
-
Effect.sync(() =>
|
|
207
|
-
Bun.spawn(config.command, {
|
|
208
|
-
cwd,
|
|
209
|
-
stdin: "pipe",
|
|
210
|
-
stdout: "pipe",
|
|
211
|
-
stderr: "inherit",
|
|
212
|
-
}),
|
|
213
|
-
);
|
package/src/Agent/lsp/servers.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration for an LSP server.
|
|
3
|
-
*/
|
|
4
|
-
export interface ServerConfig {
|
|
5
|
-
/**
|
|
6
|
-
* Unique identifier for the server.
|
|
7
|
-
*/
|
|
8
|
-
id: string;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Command to run (e.g. ["typescript-language-server", "--stdio"])
|
|
12
|
-
*/
|
|
13
|
-
command: string[];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* TypeScript Language Server configuration.
|
|
18
|
-
* Uses typescript-language-server which wraps tsserver.
|
|
19
|
-
*/
|
|
20
|
-
export const TypeScriptServer: ServerConfig = {
|
|
21
|
-
id: "typescript",
|
|
22
|
-
command: ["typescript-language-server", "--stdio"],
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* oxlint Language Server configuration.
|
|
27
|
-
* Uses oxlint --lsp for fast linting.
|
|
28
|
-
*/
|
|
29
|
-
export const OxlintServer: ServerConfig = {
|
|
30
|
-
id: "oxlint",
|
|
31
|
-
command: ["bun", "oxlint", "--lsp"],
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Default LSP servers.
|
|
36
|
-
*/
|
|
37
|
-
export const DefaultServers: ServerConfig[] = [TypeScriptServer, OxlintServer];
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck - uncomment this once we are working on AI again
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as S from "effect/Schema";
|
|
4
|
-
import * as Stream from "effect/Stream";
|
|
5
|
-
import * as util from "node:util";
|
|
6
|
-
import * as vm from "node:vm";
|
|
7
|
-
import { schemaToType } from "../../Util/schema-to-type.ts";
|
|
8
|
-
import { Agent, AgentId } from "../Agent.ts";
|
|
9
|
-
import { AspectGraph } from "../AspectGraph.ts";
|
|
10
|
-
import { Chat } from "../chat/service.ts";
|
|
11
|
-
import { Thread } from "../chat/thread.ts";
|
|
12
|
-
import { LLM } from "../llm/llm.ts";
|
|
13
|
-
import { lastMessageText } from "../llm/stream-collectors.ts";
|
|
14
|
-
import { Tool } from "../tool/tool.ts";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Called whenever a message is sent by a user to a Thread.
|
|
18
|
-
*
|
|
19
|
-
* This uses an LLM to choose which agents should respond to the message.
|
|
20
|
-
*/
|
|
21
|
-
export const driveThread = Effect.fn("driveThread")(function* (thread: Thread) {
|
|
22
|
-
const graph = yield* AspectGraph;
|
|
23
|
-
const {
|
|
24
|
-
exprs: [env],
|
|
25
|
-
types,
|
|
26
|
-
} = schemaToType(graph.schema);
|
|
27
|
-
class code extends Tool.input("code")`
|
|
28
|
-
JavaScript code to evaluate (must be a valid JavaScript module.
|
|
29
|
-
Using modern ESM syntax only.
|
|
30
|
-
The code is running in a Bun REPL environment.
|
|
31
|
-
Use arbitrary JavaScript code to explore the environment and` {}
|
|
32
|
-
|
|
33
|
-
class evaluate extends Tool("eval")`
|
|
34
|
-
Evaluates ${code} in a REPL in an Agent's environment and returns the console.log
|
|
35
|
-
output and result of the evaluation as a ${S.String}.
|
|
36
|
-
Use this tool to explore the Chat environment and find relevant information.
|
|
37
|
-
\`\`\`typescript
|
|
38
|
-
${types}
|
|
39
|
-
/** The environment of the Agent. */
|
|
40
|
-
declare const env: ${env};
|
|
41
|
-
/** The current issue
|
|
42
|
-
declare const issue: Issue;
|
|
43
|
-
/** The current prompt to the Agent. */
|
|
44
|
-
declare const query: string;
|
|
45
|
-
/** A function that can be used to recursively call the LLM to explore the environment. */
|
|
46
|
-
declare function recursiveLLM(subQuery: string): Promise<string>;
|
|
47
|
-
\`\`\`
|
|
48
|
-
`(function* ({ code }) {
|
|
49
|
-
const logs: string[] = [];
|
|
50
|
-
const capture = (...args: unknown[]) =>
|
|
51
|
-
logs.push(
|
|
52
|
-
args
|
|
53
|
-
.map((a) =>
|
|
54
|
-
typeof a === "string" ? a : util.inspect(a, { depth: null }),
|
|
55
|
-
)
|
|
56
|
-
.join(" "),
|
|
57
|
-
);
|
|
58
|
-
const context = vm.createContext({
|
|
59
|
-
env: graph.aspects,
|
|
60
|
-
issue: undefined, // TODO(sam): provide the current issue
|
|
61
|
-
console: {
|
|
62
|
-
log: capture,
|
|
63
|
-
info: capture,
|
|
64
|
-
warn: capture,
|
|
65
|
-
error: capture,
|
|
66
|
-
debug: capture,
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
try {
|
|
70
|
-
const script = new vm.Script(code);
|
|
71
|
-
const result = script.runInContext(context);
|
|
72
|
-
return `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}${typeof result === "string" ? result : util.inspect(result, { depth: null })}`;
|
|
73
|
-
} catch (err) {
|
|
74
|
-
const error = err instanceof Error ? err.message : String(err);
|
|
75
|
-
return `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}${error}`;
|
|
76
|
-
}
|
|
77
|
-
}) {}
|
|
78
|
-
|
|
79
|
-
// TODO(sam): use examples of agents in the graph, agents.map((a) => a.id).slice(0, 3).join(", ")
|
|
80
|
-
// or -> make it a literal type of all agent IDs
|
|
81
|
-
class agentId extends Tool.input("agentId", AgentId)`
|
|
82
|
-
The ID of the Agent to create a Task for, e.g. @ceo, @sde, @cfo.` {}
|
|
83
|
-
|
|
84
|
-
class prompt extends Tool.input("prompt")`
|
|
85
|
-
The prompt to start the Task with.` {}
|
|
86
|
-
|
|
87
|
-
class query extends Tool("query")`
|
|
88
|
-
You are a Recursive Language Model. You interact with context through a JavaScript Bun REPL environment.
|
|
89
|
-
|
|
90
|
-
The Aspect environment is stored in the variable \`env\`.
|
|
91
|
-
IMPORTANT: You cannot see the context directly. You MUST write JavaScript code to search and explore it.
|
|
92
|
-
|
|
93
|
-
Available in environment:
|
|
94
|
-
\`\`\`typescript
|
|
95
|
-
${types}
|
|
96
|
-
/** The environment of the Agent. */
|
|
97
|
-
declare const env: ${env};
|
|
98
|
-
// The current Issue (similar to a GitHub Issue)
|
|
99
|
-
declare const issue: Issue;
|
|
100
|
-
/** The current query to answer. */
|
|
101
|
-
declare const query: string;
|
|
102
|
-
/** A function that can be used to recursively call the LLM to explore the environment. */
|
|
103
|
-
declare function query(subQuery: string): Promise<string>;
|
|
104
|
-
\`\`\`
|
|
105
|
-
|
|
106
|
-
Write JavaScript code to answer the query. The last expression and all console.log() output will be shown to you.
|
|
107
|
-
|
|
108
|
-
Examples:
|
|
109
|
-
- console.log(issue.messages[issue.messages.length-1]) // See the last message in the issue
|
|
110
|
-
- issue.messages[issue.messages.length-1] // Print the last message in the issue (because this is the last expression in the code)
|
|
111
|
-
- matches = re.findall(r'keyword.*', context); print(matches[:5])
|
|
112
|
-
- idx = context.find('search term'); print(context[idx:idx+200])
|
|
113
|
-
|
|
114
|
-
CRITICAL: Do NOT guess or make up answers. You MUST search the context first to find the actual information.
|
|
115
|
-
Only finish your response after you have found concrete evidence in the context.
|
|
116
|
-
Finish by providing a detailed textual answer to the query.
|
|
117
|
-
|
|
118
|
-
Depth: {depth}`(function* () {}) {}
|
|
119
|
-
|
|
120
|
-
class reply extends Tool("reply")`
|
|
121
|
-
Prompt an Agent (by ${agentId}) to reply in a Thread.
|
|
122
|
-
The agent is given a ${prompt} to orient the direction of the task, but is otherwise free to choose how to complete the task.
|
|
123
|
-
Available agents: ${Object.keys(graph.aspects.agent).join(", ")}
|
|
124
|
-
If the reply fails, a ${S.String} message will be returned.
|
|
125
|
-
Use the ${recursiveLLM} tool to explore and query the contextual encironment you are operating in.
|
|
126
|
-
`(function* ({ agentId, prompt }) {
|
|
127
|
-
// TODO(sam): look up in the graph?
|
|
128
|
-
const agent = graph.aspects.agent[agentId] as Agent | undefined;
|
|
129
|
-
|
|
130
|
-
if (!agent) {
|
|
131
|
-
return `Agent '${agentId}' not found, available agents: ${Object.keys(graph.aspects.agent).join(", ")}`;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const task = yield* Chat.createTask({
|
|
135
|
-
threadId: thread.threadId,
|
|
136
|
-
agentId,
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
const lastMessage = yield* LLM.stream({
|
|
140
|
-
model: "anthropic/claude-opus-4.5",
|
|
141
|
-
system: ``,
|
|
142
|
-
messages: [{ role: "user", content: prompt }],
|
|
143
|
-
tools: [],
|
|
144
|
-
}).pipe(
|
|
145
|
-
Stream.tapSink(Chat.sinkTask(task.taskId)),
|
|
146
|
-
Stream.run(lastMessageText),
|
|
147
|
-
);
|
|
148
|
-
|
|
149
|
-
if (!lastMessage) {
|
|
150
|
-
return yield* Effect.die(`No message returned from agent '${agentId}'`);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// TODO(sam): submit the result message to the issue
|
|
154
|
-
return lastMessage;
|
|
155
|
-
}) {}
|
|
156
|
-
|
|
157
|
-
const stream = Effect.gen(function* () {
|
|
158
|
-
const llm = yield* LLM;
|
|
159
|
-
const chat = yield* Chat;
|
|
160
|
-
return yield* llm
|
|
161
|
-
.stream({
|
|
162
|
-
system: "You are a helpful assistant.",
|
|
163
|
-
messages: [],
|
|
164
|
-
tools: [evaluate, reply],
|
|
165
|
-
})
|
|
166
|
-
.pipe(Stream.tapSink(chat.sinkThreadDriver(thread.threadId)));
|
|
167
|
-
});
|
|
168
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import type { Effect } from "effect/Effect";
|
|
3
|
-
import * as S from "effect/Schema";
|
|
4
|
-
import { Issue, IssueId } from "./issue.ts";
|
|
5
|
-
import { Reply, ReplyId } from "./reply.ts";
|
|
6
|
-
|
|
7
|
-
export class CreateIssueRequest extends S.Class<CreateIssueRequest>(
|
|
8
|
-
"CreateIssueRequest",
|
|
9
|
-
)({
|
|
10
|
-
title: S.String,
|
|
11
|
-
description: S.String,
|
|
12
|
-
}) {}
|
|
13
|
-
|
|
14
|
-
export class UpdateIssueRequest extends S.Class<UpdateIssueRequest>(
|
|
15
|
-
"UpdateIssueRequest",
|
|
16
|
-
)({
|
|
17
|
-
issueId: IssueId,
|
|
18
|
-
title: S.String.pipe(S.optional),
|
|
19
|
-
description: S.String.pipe(S.optional),
|
|
20
|
-
}) {}
|
|
21
|
-
|
|
22
|
-
export class SendReplyRequest extends S.Class<SendReplyRequest>(
|
|
23
|
-
"SendReplyRequest",
|
|
24
|
-
)({
|
|
25
|
-
issueId: IssueId,
|
|
26
|
-
content: S.String,
|
|
27
|
-
}) {}
|
|
28
|
-
|
|
29
|
-
export class UpdateReplyRequest extends S.Class<UpdateReplyRequest>(
|
|
30
|
-
"UpdateReplyRequest",
|
|
31
|
-
)({
|
|
32
|
-
replyId: ReplyId,
|
|
33
|
-
content: S.String.pipe(S.optional),
|
|
34
|
-
}) {}
|
|
35
|
-
|
|
36
|
-
export class Issues extends Context.Service<
|
|
37
|
-
Issues,
|
|
38
|
-
{
|
|
39
|
-
listIssues: () => Effect<Issue[]>;
|
|
40
|
-
readIssue: (issueId: IssueId) => Effect<Issue>;
|
|
41
|
-
createIssue: (input: CreateIssueRequest) => Effect<Issue>;
|
|
42
|
-
updateIssue: (input: UpdateIssueRequest) => Effect<Issue>;
|
|
43
|
-
closeIssue: (issueId: IssueId) => Effect<Issue>;
|
|
44
|
-
sendReply: (input: SendReplyRequest) => Effect<Reply>;
|
|
45
|
-
updateReply: (input: UpdateReplyRequest) => Effect<Reply>;
|
|
46
|
-
deleteReply: (replyId: ReplyId) => Effect<void>;
|
|
47
|
-
}
|
|
48
|
-
>()("Issues") {}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck - uncomment this once we are working on AI again
|
|
2
|
-
|
|
3
|
-
import { Tool } from "../tool/tool.ts";
|
|
4
|
-
import { Issues } from "./issue-service.ts";
|
|
5
|
-
import { Issue, IssueId } from "./issue.ts";
|
|
6
|
-
|
|
7
|
-
export class title extends Tool.input("title")`
|
|
8
|
-
The title of the Issue.` {}
|
|
9
|
-
|
|
10
|
-
export class description extends Tool.input(
|
|
11
|
-
"description",
|
|
12
|
-
)`The description of the Issue.` {}
|
|
13
|
-
|
|
14
|
-
export class issueId extends Tool.input(
|
|
15
|
-
"issueId",
|
|
16
|
-
IssueId,
|
|
17
|
-
)`The ID of the Issue.` {}
|
|
18
|
-
|
|
19
|
-
export class readIssue extends Tool("readIssue")`
|
|
20
|
-
Read an ${Issue} in the Thread with its ${issueId}.
|
|
21
|
-
`(({ issueId }) => Issues.readIssue(issueId)) {}
|
|
22
|
-
|
|
23
|
-
export class createIssue extends Tool("createIssue")`
|
|
24
|
-
Create an Issue in the Thread with a ${title} and ${description}.
|
|
25
|
-
`(Issues.createIssue) {}
|
|
26
|
-
|
|
27
|
-
export class updateIssue extends Tool("updateIssue")`
|
|
28
|
-
Update an ${Issue}'s ${title} and/or ${description} referenced by its ${issueId}.
|
|
29
|
-
`(Issues.updateIssue) {}
|
|
30
|
-
|
|
31
|
-
export class closeIssue extends Tool("closeIssue")`
|
|
32
|
-
Close an Issue in the Thread referenced by its ${issueId}.
|
|
33
|
-
`(({ issueId }) => Issues.closeIssue(issueId)) {}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as S from "effect/Schema";
|
|
2
|
-
|
|
3
|
-
export type IssueId = number;
|
|
4
|
-
export const IssueId = S.Int.check(S.isGreaterThan(0)).annotate({
|
|
5
|
-
description: "The ID of the issue",
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export type IssueDescription = string;
|
|
9
|
-
export const IssueDescription = S.String.annotate({
|
|
10
|
-
description: "The description of the issue",
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export type IssueTitle = string;
|
|
14
|
-
export const IssueTitle = S.String.annotate({
|
|
15
|
-
description: "The title of the issue",
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export class Issue extends S.Class<Issue>("Issue")({
|
|
19
|
-
issueId: IssueId,
|
|
20
|
-
title: IssueTitle,
|
|
21
|
-
description: IssueDescription,
|
|
22
|
-
}) {}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type Aspect, defineAspect } from "../Aspect.ts";
|
|
2
|
-
|
|
3
|
-
export type Organization<
|
|
4
|
-
Name extends string = string,
|
|
5
|
-
References extends any[] = any[],
|
|
6
|
-
> = Aspect<Organization, "organization", Name, References>;
|
|
7
|
-
|
|
8
|
-
export const Organization =
|
|
9
|
-
defineAspect<
|
|
10
|
-
<const Name extends string>(
|
|
11
|
-
name: Name,
|
|
12
|
-
) => <References extends any[]>(
|
|
13
|
-
template: TemplateStringsArray,
|
|
14
|
-
...references: References
|
|
15
|
-
) => Organization<Name, References>
|
|
16
|
-
>("organization");
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineAspect, type Aspect } from "../Aspect";
|
|
2
|
-
|
|
3
|
-
export interface Process<
|
|
4
|
-
Name extends string = string,
|
|
5
|
-
References extends any[] = any[],
|
|
6
|
-
> extends Aspect<Process, "process", Name, References> {}
|
|
7
|
-
|
|
8
|
-
export const Process =
|
|
9
|
-
defineAspect<
|
|
10
|
-
<const Name extends string>(
|
|
11
|
-
name: Name,
|
|
12
|
-
) => <References extends any[]>(
|
|
13
|
-
template: TemplateStringsArray,
|
|
14
|
-
...references: References
|
|
15
|
-
) => Process<Name, References>
|
|
16
|
-
>("process");
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as S from "effect/Schema";
|
|
2
|
-
import { CreatedAt, UpdatedAt } from "../../Schema.ts";
|
|
3
|
-
import { IssueId } from "./issue.ts";
|
|
4
|
-
|
|
5
|
-
export type ReplyId = number;
|
|
6
|
-
export const ReplyId = S.Int.check(S.isGreaterThan(0)).annotate({
|
|
7
|
-
description: "The ID of the reply",
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export type ReplyContent = string;
|
|
11
|
-
export const ReplyContent = S.String.annotate({
|
|
12
|
-
description: "The content of the reply",
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export class Reply extends S.Class<Reply>("Reply")({
|
|
16
|
-
replyId: ReplyId,
|
|
17
|
-
issueId: IssueId,
|
|
18
|
-
content: ReplyContent,
|
|
19
|
-
createdAt: CreatedAt,
|
|
20
|
-
updatedAt: UpdatedAt,
|
|
21
|
-
}) {}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as S from "effect/Schema";
|
|
4
|
-
import { AgentId } from "../Agent.ts";
|
|
5
|
-
import { ThreadId } from "../chat/thread.ts";
|
|
6
|
-
|
|
7
|
-
export type TaskId = string;
|
|
8
|
-
export const TaskId = S.String.annotate({
|
|
9
|
-
description: "The ID of the task",
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export class Task extends S.Class<Task>("Task")({
|
|
13
|
-
taskId: TaskId,
|
|
14
|
-
threadId: ThreadId.annotate({
|
|
15
|
-
description: "The thread that the task belongs to",
|
|
16
|
-
}),
|
|
17
|
-
agent: AgentId.annotate({
|
|
18
|
-
description: "The agent that is working on the task",
|
|
19
|
-
}),
|
|
20
|
-
}) {}
|
|
21
|
-
|
|
22
|
-
export class CreateTaskRequest extends S.Class<CreateTaskRequest>(
|
|
23
|
-
"CreateTaskRequest",
|
|
24
|
-
)({
|
|
25
|
-
threadId: ThreadId,
|
|
26
|
-
agentId: AgentId,
|
|
27
|
-
}) {}
|
|
28
|
-
|
|
29
|
-
export class Tasks extends Context.Service<
|
|
30
|
-
Tasks,
|
|
31
|
-
{
|
|
32
|
-
createTask: (input: CreateTaskRequest) => Effect.Effect<Task>;
|
|
33
|
-
}
|
|
34
|
-
>()("Tasks") {}
|
package/src/Agent/tool/index.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as S from "effect/Schema";
|
|
2
|
-
import { Field } from "../../Schema.ts";
|
|
3
|
-
import { defineAspect, type Aspect } from "../Aspect.ts";
|
|
4
|
-
|
|
5
|
-
export const isParameter = (artifact: any): artifact is Parameter =>
|
|
6
|
-
artifact?.type === "param";
|
|
7
|
-
|
|
8
|
-
export type Parameter<
|
|
9
|
-
ID extends string = string,
|
|
10
|
-
References extends any[] = any[],
|
|
11
|
-
T extends Field = Field,
|
|
12
|
-
> = Aspect<Parameter, "param", ID, References, T>;
|
|
13
|
-
|
|
14
|
-
export const Parameter = defineAspect<
|
|
15
|
-
<const Name extends string, Schema extends Field = typeof S.String>(
|
|
16
|
-
name: Name,
|
|
17
|
-
schema?: Schema,
|
|
18
|
-
) => <References extends any[]>(
|
|
19
|
-
template: TemplateStringsArray,
|
|
20
|
-
...references: References
|
|
21
|
-
) => Parameter<Name, References, Schema>
|
|
22
|
-
>("param", Field);
|
|
23
|
-
|
|
24
|
-
export declare namespace Parameters {
|
|
25
|
-
export type Of<
|
|
26
|
-
References extends any[],
|
|
27
|
-
Fields extends S.Struct.Fields = {},
|
|
28
|
-
> = References extends []
|
|
29
|
-
? S.Struct<Fields>["Type"]
|
|
30
|
-
: References extends [infer Artifact, ...infer Rest]
|
|
31
|
-
? Artifact extends Parameter<infer ID extends string, any[], infer Field>
|
|
32
|
-
? Parameters.Of<Rest, Fields & { [name in ID]: Field }>
|
|
33
|
-
: Parameters.Of<Rest, Fields>
|
|
34
|
-
: [];
|
|
35
|
-
}
|