From 84cbe5246bf596d6ae65b8900bd71ea778d91f05 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:44:40 +0000 Subject: [PATCH 01/16] chore: configure new SDK language --- .stats.yml | 4 +- packages/mcp-server/src/local-docs-search.ts | 169 +++++++++++++++++++ 2 files changed, 171 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bc3166c..5881d87 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-a63ad804ae8ee532d57afae307595dae02d2a6924f83657430b3579193560775.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-496eeda72044dcdea7432ae162e71388cc0010253739b4d517caea45a4a73278.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: 0e31b0b75cafdbc25febc2b7ca219799 +config_hash: 1496c4ae7adec54338483c55916ef732 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index b232d4f..c6d46f9 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -74,6 +74,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\norg_usage = client.usage.retrieve()\nprint(org_usage.billed_awake_seconds)', }, + java: { + method: 'usage().retrieve', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.usage.OrgUsage;\nimport com.dedalus.api.models.usage.UsageRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n OrgUsage orgUsage = client.usage().retrieve();\n }\n}', + }, go: { method: 'client.Usage.Get', example: @@ -118,6 +123,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine_compute_usage = client.usage.machine_compute()\nprint(machine_compute_usage.granularity)', }, + java: { + method: 'usage().machineCompute', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.usage.MachineComputeUsage;\nimport com.dedalus.api.models.usage.UsageMachineComputeParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineComputeUsage machineComputeUsage = client.usage().machineCompute();\n }\n}', + }, go: { method: 'client.Usage.MachineCompute', example: @@ -157,6 +167,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine_storage_usage = client.usage.machine_storage()\nprint(machine_storage_usage.period_end)', }, + java: { + method: 'usage().machineStorage', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.usage.MachineStorageUsage;\nimport com.dedalus.api.models.usage.UsageMachineStorageParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineStorageUsage machineStorageUsage = client.usage().machineStorage();\n }\n}', + }, go: { method: 'client.Usage.MachineStorage', example: @@ -196,6 +211,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npage = client.machines.list()\npage = page.items[0]\nprint(page.machine_id)', }, + java: { + method: 'machines().list', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.MachineListPage;\nimport com.dedalus.api.models.machines.MachineListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineListPage page = client.machines().list();\n }\n}', + }, go: { method: 'client.Machines.List', example: @@ -235,6 +255,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine = client.machines.create(\n memory_mib=0,\n storage_gib=0,\n vcpu=0,\n)\nprint(machine.machine_id)', }, + java: { + method: 'machines().create', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n CreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\n Machine machine = client.machines().create(params);\n }\n}', + }, go: { method: 'client.Machines.New', example: @@ -275,6 +300,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine = client.machines.retrieve(\n machine_id="dm-3",\n)\nprint(machine.machine_id)', }, + java: { + method: 'machines().retrieve', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineRetrieveParams params = MachineRetrieveParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().retrieve(params);\n }\n}', + }, go: { method: 'client.Machines.Get', example: @@ -320,6 +350,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine = client.machines.update(\n machine_id="dm-3",\n)\nprint(machine.machine_id)', }, + java: { + method: 'machines().update', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineUpdateParams;\nimport com.dedalus.api.models.machines.UpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineUpdateParams params = MachineUpdateParams.builder()\n .machineId("dm-3")\n .updateParams(UpdateParams.builder().build())\n .build();\n Machine machine = client.machines().update(params);\n }\n}', + }, go: { method: 'client.Machines.Update', example: @@ -359,6 +394,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine = client.machines.delete(\n machine_id="dm-3",\n)\nprint(machine.machine_id)', }, + java: { + method: 'machines().delete', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineDeleteParams params = MachineDeleteParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().delete(params);\n }\n}', + }, go: { method: 'client.Machines.Delete', example: @@ -399,6 +439,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nfor machine in client.machines.watch(\n machine_id="dm-3",\n):\n print(machine)', }, + java: { + method: 'machines().watchStreaming', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.http.StreamResponse;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineWatchParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineWatchParams params = MachineWatchParams.builder()\n .machineId("dm-3")\n .build();\n StreamResponse machine = client.machines().watchStreaming(params);\n }\n}', + }, go: { method: 'client.Machines.Watch', example: @@ -438,6 +483,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine = client.machines.sleep(\n machine_id="dm-3",\n)\nprint(machine.machine_id)', }, + java: { + method: 'machines().sleep', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineSleepParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineSleepParams params = MachineSleepParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().sleep(params);\n }\n}', + }, go: { method: 'client.Machines.Sleep', example: @@ -477,6 +527,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nmachine = client.machines.wake(\n machine_id="dm-3",\n)\nprint(machine.machine_id)', }, + java: { + method: 'machines().wake', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineWakeParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineWakeParams params = MachineWakeParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().wake(params);\n }\n}', + }, go: { method: 'client.Machines.Wake', example: @@ -516,6 +571,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npage = client.machines.artifacts.list(\n machine_id="dm-3",\n)\npage = page.items[0]\nprint(page.artifact_id)', }, + java: { + method: 'machines().artifacts().list', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.artifacts.ArtifactListPage;\nimport com.dedalus.api.models.machines.artifacts.ArtifactListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ArtifactListParams params = ArtifactListParams.builder()\n .machineId("dm-3")\n .build();\n ArtifactListPage page = client.machines().artifacts().list(params);\n }\n}', + }, go: { method: 'client.Machines.Artifacts.List', example: @@ -555,6 +615,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nartifact = client.machines.artifacts.retrieve(\n machine_id="dm-3",\n artifact_id="artifact_id",\n)\nprint(artifact.artifact_id)', }, + java: { + method: 'machines().artifacts().retrieve', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.artifacts.Artifact;\nimport com.dedalus.api.models.machines.artifacts.ArtifactRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ArtifactRetrieveParams params = ArtifactRetrieveParams.builder()\n .machineId("dm-3")\n .artifactId("artifact_id")\n .build();\n Artifact artifact = client.machines().artifacts().retrieve(params);\n }\n}', + }, go: { method: 'client.Machines.Artifacts.Get', example: @@ -595,6 +660,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nartifact = client.machines.artifacts.delete(\n machine_id="dm-3",\n artifact_id="artifact_id",\n)\nprint(artifact.artifact_id)', }, + java: { + method: 'machines().artifacts().delete', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.artifacts.Artifact;\nimport com.dedalus.api.models.machines.artifacts.ArtifactDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ArtifactDeleteParams params = ArtifactDeleteParams.builder()\n .machineId("dm-3")\n .artifactId("artifact_id")\n .build();\n Artifact artifact = client.machines().artifacts().delete(params);\n }\n}', + }, go: { method: 'client.Machines.Artifacts.Delete', example: @@ -635,6 +705,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npage = client.machines.previews.list(\n machine_id="dm-3",\n)\npage = page.items[0]\nprint(page.machine_id)', }, + java: { + method: 'machines().previews().list', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.PreviewListPage;\nimport com.dedalus.api.models.machines.previews.PreviewListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewListParams params = PreviewListParams.builder()\n .machineId("dm-3")\n .build();\n PreviewListPage page = client.machines().previews().list(params);\n }\n}', + }, go: { method: 'client.Machines.Previews.List', example: @@ -679,6 +754,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npreview = client.machines.previews.create(\n machine_id="dm-3",\n port=0,\n)\nprint(preview.preview_id)', }, + java: { + method: 'machines().previews().create', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.Preview;\nimport com.dedalus.api.models.machines.previews.PreviewCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewCreateParams params = PreviewCreateParams.builder()\n .machineId("dm-3")\n .previewCreateParams(PreviewCreateParams.builder()\n .port(0L)\n .build())\n .build();\n Preview preview = client.machines().previews().create(params);\n }\n}', + }, go: { method: 'client.Machines.Previews.New', example: @@ -719,6 +799,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npreview = client.machines.previews.retrieve(\n machine_id="dm-3",\n preview_id="preview_id",\n)\nprint(preview.preview_id)', }, + java: { + method: 'machines().previews().retrieve', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.Preview;\nimport com.dedalus.api.models.machines.previews.PreviewRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewRetrieveParams params = PreviewRetrieveParams.builder()\n .machineId("dm-3")\n .previewId("preview_id")\n .build();\n Preview preview = client.machines().previews().retrieve(params);\n }\n}', + }, go: { method: 'client.Machines.Previews.Get', example: @@ -759,6 +844,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npreview = client.machines.previews.delete(\n machine_id="dm-3",\n preview_id="preview_id",\n)\nprint(preview.preview_id)', }, + java: { + method: 'machines().previews().delete', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.Preview;\nimport com.dedalus.api.models.machines.previews.PreviewDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewDeleteParams params = PreviewDeleteParams.builder()\n .machineId("dm-3")\n .previewId("preview_id")\n .build();\n Preview preview = client.machines().previews().delete(params);\n }\n}', + }, go: { method: 'client.Machines.Previews.Delete', example: @@ -799,6 +889,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npage = client.machines.ssh.list(\n machine_id="dm-3",\n)\npage = page.items[0]\nprint(page.machine_id)', }, + java: { + method: 'machines().ssh().list', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshListPage;\nimport com.dedalus.api.models.machines.ssh.SshListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshListParams params = SshListParams.builder()\n .machineId("dm-3")\n .build();\n SshListPage page = client.machines().ssh().list(params);\n }\n}', + }, go: { method: 'client.Machines.SSH.List', example: @@ -838,6 +933,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nssh_session = client.machines.ssh.create(\n machine_id="dm-3",\n public_key="public_key",\n)\nprint(ssh_session.session_id)', }, + java: { + method: 'machines().ssh().create', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshCreateParams;\nimport com.dedalus.api.models.machines.ssh.SshSession;\nimport com.dedalus.api.models.machines.ssh.SshSessionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshCreateParams params = SshCreateParams.builder()\n .machineId("dm-3")\n .sshSessionCreateParams(SshSessionCreateParams.builder()\n .publicKey("public_key")\n .build())\n .build();\n SshSession sshSession = client.machines().ssh().create(params);\n }\n}', + }, go: { method: 'client.Machines.SSH.New', example: @@ -878,6 +978,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nssh_session = client.machines.ssh.retrieve(\n machine_id="dm-3",\n session_id="session_id",\n)\nprint(ssh_session.session_id)', }, + java: { + method: 'machines().ssh().retrieve', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshRetrieveParams;\nimport com.dedalus.api.models.machines.ssh.SshSession;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshRetrieveParams params = SshRetrieveParams.builder()\n .machineId("dm-3")\n .sessionId("session_id")\n .build();\n SshSession sshSession = client.machines().ssh().retrieve(params);\n }\n}', + }, go: { method: 'client.Machines.SSH.Get', example: @@ -918,6 +1023,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nssh_session = client.machines.ssh.delete(\n machine_id="dm-3",\n session_id="session_id",\n)\nprint(ssh_session.session_id)', }, + java: { + method: 'machines().ssh().delete', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshDeleteParams;\nimport com.dedalus.api.models.machines.ssh.SshSession;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshDeleteParams params = SshDeleteParams.builder()\n .machineId("dm-3")\n .sessionId("session_id")\n .build();\n SshSession sshSession = client.machines().ssh().delete(params);\n }\n}', + }, go: { method: 'client.Machines.SSH.Delete', example: @@ -958,6 +1068,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npage = client.machines.executions.list(\n machine_id="dm-3",\n)\npage = page.items[0]\nprint(page.execution_id)', }, + java: { + method: 'machines().executions().list', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.ExecutionListPage;\nimport com.dedalus.api.models.machines.executions.ExecutionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionListParams params = ExecutionListParams.builder()\n .machineId("dm-3")\n .build();\n ExecutionListPage page = client.machines().executions().list(params);\n }\n}', + }, go: { method: 'client.Machines.Executions.List', example: @@ -1004,6 +1119,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nexecution = client.machines.executions.create(\n machine_id="dm-3",\n command=["string"],\n)\nprint(execution.execution_id)', }, + java: { + method: 'machines().executions().create', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.Execution;\nimport com.dedalus.api.models.machines.executions.ExecutionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionCreateParams params = ExecutionCreateParams.builder()\n .machineId("dm-3")\n .executionCreateParams(ExecutionCreateParams.builder()\n .addCommand("string")\n .build())\n .build();\n Execution execution = client.machines().executions().create(params);\n }\n}', + }, go: { method: 'client.Machines.Executions.New', example: @@ -1044,6 +1164,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nexecution = client.machines.executions.retrieve(\n machine_id="dm-3",\n execution_id="execution_id",\n)\nprint(execution.execution_id)', }, + java: { + method: 'machines().executions().retrieve', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.Execution;\nimport com.dedalus.api.models.machines.executions.ExecutionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionRetrieveParams params = ExecutionRetrieveParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n Execution execution = client.machines().executions().retrieve(params);\n }\n}', + }, go: { method: 'client.Machines.Executions.Get', example: @@ -1084,6 +1209,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nexecution = client.machines.executions.delete(\n machine_id="dm-3",\n execution_id="execution_id",\n)\nprint(execution.execution_id)', }, + java: { + method: 'machines().executions().delete', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.Execution;\nimport com.dedalus.api.models.machines.executions.ExecutionDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionDeleteParams params = ExecutionDeleteParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n Execution execution = client.machines().executions().delete(params);\n }\n}', + }, go: { method: 'client.Machines.Executions.Delete', example: @@ -1124,6 +1254,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nexecution_output = client.machines.executions.output(\n machine_id="dm-3",\n execution_id="execution_id",\n)\nprint(execution_output.execution_id)', }, + java: { + method: 'machines().executions().output', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.ExecutionOutput;\nimport com.dedalus.api.models.machines.executions.ExecutionOutputParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionOutputParams params = ExecutionOutputParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n ExecutionOutput executionOutput = client.machines().executions().output(params);\n }\n}', + }, go: { method: 'client.Machines.Executions.Output', example: @@ -1164,6 +1299,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npage = client.machines.executions.events(\n machine_id="dm-3",\n execution_id="execution_id",\n)\npage = page.items[0]\nprint(page.at)', }, + java: { + method: 'machines().executions().events', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.ExecutionEventsPage;\nimport com.dedalus.api.models.machines.executions.ExecutionEventsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionEventsParams params = ExecutionEventsParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n ExecutionEventsPage page = client.machines().executions().events(params);\n }\n}', + }, go: { method: 'client.Machines.Executions.Events', example: @@ -1204,6 +1344,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\npage = client.machines.terminals.list(\n machine_id="dm-3",\n)\npage = page.items[0]\nprint(page.machine_id)', }, + java: { + method: 'machines().terminals().list', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.TerminalListPage;\nimport com.dedalus.api.models.machines.terminals.TerminalListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalListParams params = TerminalListParams.builder()\n .machineId("dm-3")\n .build();\n TerminalListPage page = client.machines().terminals().list(params);\n }\n}', + }, go: { method: 'client.Machines.Terminals.List', example: @@ -1250,6 +1395,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nterminal = client.machines.terminals.create(\n machine_id="dm-3",\n height=0,\n width=0,\n)\nprint(terminal.terminal_id)', }, + java: { + method: 'machines().terminals().create', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.Terminal;\nimport com.dedalus.api.models.machines.terminals.TerminalCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalCreateParams params = TerminalCreateParams.builder()\n .machineId("dm-3")\n .terminalCreateParams(TerminalCreateParams.builder()\n .height(0L)\n .width(0L)\n .build())\n .build();\n Terminal terminal = client.machines().terminals().create(params);\n }\n}', + }, go: { method: 'client.Machines.Terminals.New', example: @@ -1290,6 +1440,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nterminal = client.machines.terminals.retrieve(\n machine_id="dm-3",\n terminal_id="terminal_id",\n)\nprint(terminal.terminal_id)', }, + java: { + method: 'machines().terminals().retrieve', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.Terminal;\nimport com.dedalus.api.models.machines.terminals.TerminalRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalRetrieveParams params = TerminalRetrieveParams.builder()\n .machineId("dm-3")\n .terminalId("terminal_id")\n .build();\n Terminal terminal = client.machines().terminals().retrieve(params);\n }\n}', + }, go: { method: 'client.Machines.Terminals.Get', example: @@ -1330,6 +1485,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nterminal = client.machines.terminals.delete(\n machine_id="dm-3",\n terminal_id="terminal_id",\n)\nprint(terminal.terminal_id)', }, + java: { + method: 'machines().terminals().delete', + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.Terminal;\nimport com.dedalus.api.models.machines.terminals.TerminalDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalDeleteParams params = TerminalDeleteParams.builder()\n .machineId("dm-3")\n .terminalId("terminal_id")\n .build();\n Terminal terminal = client.machines().terminals().delete(params);\n }\n}', + }, go: { method: 'client.Machines.Terminals.Delete', example: @@ -1365,6 +1525,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'import os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\nclient.machines.terminals.connect(\n machine_id="machine_id",\n terminal_id="terminal_id",\n)', }, + java: { + example: + 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.TerminalConnectParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalConnectParams params = TerminalConnectParams.builder()\n .machineId("machine_id")\n .terminalId("terminal_id")\n .build();\n client.machines().terminals().connect(params);\n }\n}', + }, go: { method: 'client.Machines.Terminals.Connect', example: @@ -1389,6 +1553,11 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ content: '# Dedalus Go API Library\n\nGo Reference\n\nThe Dedalus Go library provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai)\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n\n\n```go\nimport (\n\t"github.com/dedalus-labs/dedalus-go" // imported as SDK_PackageName\n)\n```\n\n\n\nOr to pin the version:\n\n\n\n```sh\ngo get -u \'github.com/dedalus-labs/dedalus-go@v0.0.1\'\n```\n\n\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("DEDALUS_API_KEY")\n\t)\n\tmachine, err := client.Machines.New(context.TODO(), dedalus.MachineNewParams{\n\t\tCreateParams: dedalus.CreateParams{\n\t\t\tMemoryMiB: 0,\n\t\t\tStorageGiB: 0,\n\t\t\tVCPU: 0,\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machine.MachineID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Machines.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/dedalus-labs/dedalus-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Machines.ListAutoPaging(context.TODO(), dedalus.MachineListParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tmachineListItem := iter.Current()\n\tfmt.Printf("%+v\\n", machineListItem)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Machines.List(context.TODO(), dedalus.MachineListParams{})\nfor page != nil {\n\tfor _, machine := range page.Items {\n\t\tfmt.Printf("%+v\\n", machine)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Machines.New(context.TODO(), dedalus.MachineNewParams{\n\tCreateParams: dedalus.CreateParams{\n\t\tMemoryMiB: 0,\n\t\tStorageGiB: 0,\n\t\tVCPU: 0,\n\t},\n})\nif err != nil {\n\tvar apierr *dedalus.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t\tprintln(apierr.ErrorCode) // IDEMPOTENCY_KEY_REUSED\n\t\tprintln(apierr.Message) // idempotency key reused with different request parameters\n\t\tprintln(apierr.Retryable) // false\n\t}\n\tpanic(err.Error()) // GET "/v1/machines": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Machines.New(\n\tctx,\n\tdedalus.MachineNewParams{\n\t\tCreateParams: dedalus.CreateParams{\n\t\t\tMemoryMiB: 0,\n\t\t\tStorageGiB: 0,\n\t\t\tVCPU: 0,\n\t\t},\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := dedalus.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Machines.New(\n\tcontext.TODO(),\n\tdedalus.MachineNewParams{\n\t\tCreateParams: dedalus.CreateParams{\n\t\t\tMemoryMiB: 0,\n\t\t\tStorageGiB: 0,\n\t\t\tVCPU: 0,\n\t\t},\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\nmachine, err := client.Machines.New(\n\tcontext.TODO(),\n\tdedalus.MachineNewParams{\n\t\tCreateParams: dedalus.CreateParams{\n\t\t\tMemoryMiB: 0,\n\t\t\tStorageGiB: 0,\n\t\t\tVCPU: 0,\n\t\t},\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", machine)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/dedalus-labs/dedalus-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, + { + language: 'java', + content: + '# Dedalus Java API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-java)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1)\n\n\nThe Dedalus Java SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1).\n\n## Installation\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-java\n 0.0.1\n\n~~~\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nMachine machine = client.machines().create(params);\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\n\nDedalusClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.async().machines().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.dedalus.api.client.DedalusClientAsync;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClientAsync client = DedalusOkHttpClientAsync.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.machines().create(params);\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```java\nimport com.dedalus.api.core.http.StreamResponse;\nimport com.dedalus.api.models.machines.Machine;\n\ntry (StreamResponse streamResponse = client.machines().watchStreaming(params)) {\n streamResponse.stream().forEach(chunk -> {\n System.out.println(chunk);\n });\n System.out.println("No more chunks!");\n}\n```\n\nOr [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt) for asynchronous clients:\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.Optional;\n\nclient.async().machines().watchStreaming(params).subscribe(chunk -> {\n System.out.println(chunk);\n});\n\n// If you need to handle errors or completion of the stream\nclient.async().machines().watchStreaming(params).subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(Machine chunk) {\n System.out.println(chunk);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more chunks!");\n }\n }\n});\n\n// Or use futures\nclient.async().machines().watchStreaming(params)\n .subscribe(chunk -> {\n System.out.println(chunk);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more chunks!");\n }\n });\n```\n\nAsync streaming uses a dedicated per-client cached thread pool [`Executor`](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html) to stream without blocking the current thread. This default is suitable for most purposes.\n\nTo use a different `Executor`, configure the subscription using the `executor` parameter:\n\n```java\nimport java.util.concurrent.Executor;\nimport java.util.concurrent.Executors;\n\nExecutor executor = Executors.newFixedThreadPool(4);\nclient.async().machines().watchStreaming(params).subscribe(\n chunk -> System.out.println(chunk), executor\n);\n```\n\nOr configure the client globally using the `streamHandlerExecutor` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.util.concurrent.Executors;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .streamHandlerExecutor(Executors.newFixedThreadPool(4))\n .build();\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.dedalus.api.core.http.Headers;\nimport com.dedalus.api.core.http.HttpResponseFor;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nHttpResponseFor machine = client.machines().withRawResponse().create(params);\n\nint statusCode = machine.statusCode();\nHeaders headers = machine.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine parsedMachine = machine.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\n\n// Process as an Iterable\nfor (MachineListItem machine : page.autoPager()) {\n System.out.println(machine);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(machine -> System.out.println(machine));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPageAsync;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture pageFuture = client.async().machines().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(machine -> {\n System.out.println(machine);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(MachineListItem machine) {\n System.out.println(machine);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(machine -> {\n System.out.println(machine);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\nwhile (true) {\n for (MachineListItem machine : page.items()) {\n System.out.println(machine);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.LogLevel;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-java-core` is published with a [configuration file](dedalus-java-core/src/main/resources/META-INF/proguard/dedalus-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.http.ProxyAuthenticator;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-java`\n - Depends on and exposes the APIs of both `dedalus-java-core` and `dedalus-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Copy `dedalus-java-client-okhttp`\'s [`OkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Write a class that implements the [`HttpClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```java\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build();\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```java\nimport com.dedalus.api.core.JsonMissing;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.Map;\n\nMap additionalProperties = client.machines().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.dedalus.api.core.JsonField;\nimport java.util.Optional;\n\nJsonField field = client.machines().create(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dedalus-java/issues) with questions, bugs, or suggestions.\n', + }, { language: 'python', content: From f89cb5d8535b9ba6e650bdda0cd2a6d836d071b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:45:04 +0000 Subject: [PATCH 02/16] chore: configure new SDK language --- .stats.yml | 4 +- packages/mcp-server/src/local-docs-search.ts | 169 +++++++++++++++++++ 2 files changed, 171 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5881d87..0c1f5e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-496eeda72044dcdea7432ae162e71388cc0010253739b4d517caea45a4a73278.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-255658cb585ca9e0e22d6522136a94c0a7ee92b2133cebc9d93b956d70ebc833.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: 1496c4ae7adec54338483c55916ef732 +config_hash: 469332dcd8ac2679070aaf2297c43d10 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index c6d46f9..213985f 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -79,6 +79,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.usage.OrgUsage;\nimport com.dedalus.api.models.usage.UsageRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n OrgUsage orgUsage = client.usage().retrieve();\n }\n}', }, + kotlin: { + method: 'usage().retrieve', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.usage.OrgUsage\nimport com.dedalus.api.models.usage.UsageRetrieveParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val orgUsage: OrgUsage = client.usage().retrieve()\n}', + }, go: { method: 'client.Usage.Get', example: @@ -128,6 +133,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.usage.MachineComputeUsage;\nimport com.dedalus.api.models.usage.UsageMachineComputeParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineComputeUsage machineComputeUsage = client.usage().machineCompute();\n }\n}', }, + kotlin: { + method: 'usage().machineCompute', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.usage.MachineComputeUsage\nimport com.dedalus.api.models.usage.UsageMachineComputeParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val machineComputeUsage: MachineComputeUsage = client.usage().machineCompute()\n}', + }, go: { method: 'client.Usage.MachineCompute', example: @@ -172,6 +182,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.usage.MachineStorageUsage;\nimport com.dedalus.api.models.usage.UsageMachineStorageParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineStorageUsage machineStorageUsage = client.usage().machineStorage();\n }\n}', }, + kotlin: { + method: 'usage().machineStorage', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.usage.MachineStorageUsage\nimport com.dedalus.api.models.usage.UsageMachineStorageParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val machineStorageUsage: MachineStorageUsage = client.usage().machineStorage()\n}', + }, go: { method: 'client.Usage.MachineStorage', example: @@ -216,6 +231,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.MachineListPage;\nimport com.dedalus.api.models.machines.MachineListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineListPage page = client.machines().list();\n }\n}', }, + kotlin: { + method: 'machines().list', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.MachineListPage\nimport com.dedalus.api.models.machines.MachineListParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val page: MachineListPage = client.machines().list()\n}', + }, go: { method: 'client.Machines.List', example: @@ -260,6 +280,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n CreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\n Machine machine = client.machines().create(params);\n }\n}', }, + kotlin: { + method: 'machines().create', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\n val machine: Machine = client.machines().create(params)\n}', + }, go: { method: 'client.Machines.New', example: @@ -305,6 +330,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineRetrieveParams params = MachineRetrieveParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().retrieve(params);\n }\n}', }, + kotlin: { + method: 'machines().retrieve', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.Machine\nimport com.dedalus.api.models.machines.MachineRetrieveParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: MachineRetrieveParams = MachineRetrieveParams.builder()\n .machineId("dm-3")\n .build()\n val machine: Machine = client.machines().retrieve(params)\n}', + }, go: { method: 'client.Machines.Get', example: @@ -355,6 +385,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineUpdateParams;\nimport com.dedalus.api.models.machines.UpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineUpdateParams params = MachineUpdateParams.builder()\n .machineId("dm-3")\n .updateParams(UpdateParams.builder().build())\n .build();\n Machine machine = client.machines().update(params);\n }\n}', }, + kotlin: { + method: 'machines().update', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.Machine\nimport com.dedalus.api.models.machines.MachineUpdateParams\nimport com.dedalus.api.models.machines.UpdateParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: MachineUpdateParams = MachineUpdateParams.builder()\n .machineId("dm-3")\n .updateParams(UpdateParams.builder().build())\n .build()\n val machine: Machine = client.machines().update(params)\n}', + }, go: { method: 'client.Machines.Update', example: @@ -399,6 +434,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineDeleteParams params = MachineDeleteParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().delete(params);\n }\n}', }, + kotlin: { + method: 'machines().delete', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.Machine\nimport com.dedalus.api.models.machines.MachineDeleteParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: MachineDeleteParams = MachineDeleteParams.builder()\n .machineId("dm-3")\n .build()\n val machine: Machine = client.machines().delete(params)\n}', + }, go: { method: 'client.Machines.Delete', example: @@ -444,6 +484,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.http.StreamResponse;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineWatchParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineWatchParams params = MachineWatchParams.builder()\n .machineId("dm-3")\n .build();\n StreamResponse machine = client.machines().watchStreaming(params);\n }\n}', }, + kotlin: { + method: 'machines().watchStreaming', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.http.StreamResponse\nimport com.dedalus.api.models.machines.Machine\nimport com.dedalus.api.models.machines.MachineWatchParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: MachineWatchParams = MachineWatchParams.builder()\n .machineId("dm-3")\n .build()\n val machine: StreamResponse = client.machines().watchStreaming(params)\n}', + }, go: { method: 'client.Machines.Watch', example: @@ -488,6 +533,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineSleepParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineSleepParams params = MachineSleepParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().sleep(params);\n }\n}', }, + kotlin: { + method: 'machines().sleep', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.Machine\nimport com.dedalus.api.models.machines.MachineSleepParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: MachineSleepParams = MachineSleepParams.builder()\n .machineId("dm-3")\n .build()\n val machine: Machine = client.machines().sleep(params)\n}', + }, go: { method: 'client.Machines.Sleep', example: @@ -532,6 +582,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.Machine;\nimport com.dedalus.api.models.machines.MachineWakeParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n MachineWakeParams params = MachineWakeParams.builder()\n .machineId("dm-3")\n .build();\n Machine machine = client.machines().wake(params);\n }\n}', }, + kotlin: { + method: 'machines().wake', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.Machine\nimport com.dedalus.api.models.machines.MachineWakeParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: MachineWakeParams = MachineWakeParams.builder()\n .machineId("dm-3")\n .build()\n val machine: Machine = client.machines().wake(params)\n}', + }, go: { method: 'client.Machines.Wake', example: @@ -576,6 +631,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.artifacts.ArtifactListPage;\nimport com.dedalus.api.models.machines.artifacts.ArtifactListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ArtifactListParams params = ArtifactListParams.builder()\n .machineId("dm-3")\n .build();\n ArtifactListPage page = client.machines().artifacts().list(params);\n }\n}', }, + kotlin: { + method: 'machines().artifacts().list', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.artifacts.ArtifactListPage\nimport com.dedalus.api.models.machines.artifacts.ArtifactListParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ArtifactListParams = ArtifactListParams.builder()\n .machineId("dm-3")\n .build()\n val page: ArtifactListPage = client.machines().artifacts().list(params)\n}', + }, go: { method: 'client.Machines.Artifacts.List', example: @@ -620,6 +680,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.artifacts.Artifact;\nimport com.dedalus.api.models.machines.artifacts.ArtifactRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ArtifactRetrieveParams params = ArtifactRetrieveParams.builder()\n .machineId("dm-3")\n .artifactId("artifact_id")\n .build();\n Artifact artifact = client.machines().artifacts().retrieve(params);\n }\n}', }, + kotlin: { + method: 'machines().artifacts().retrieve', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.artifacts.Artifact\nimport com.dedalus.api.models.machines.artifacts.ArtifactRetrieveParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ArtifactRetrieveParams = ArtifactRetrieveParams.builder()\n .machineId("dm-3")\n .artifactId("artifact_id")\n .build()\n val artifact: Artifact = client.machines().artifacts().retrieve(params)\n}', + }, go: { method: 'client.Machines.Artifacts.Get', example: @@ -665,6 +730,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.artifacts.Artifact;\nimport com.dedalus.api.models.machines.artifacts.ArtifactDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ArtifactDeleteParams params = ArtifactDeleteParams.builder()\n .machineId("dm-3")\n .artifactId("artifact_id")\n .build();\n Artifact artifact = client.machines().artifacts().delete(params);\n }\n}', }, + kotlin: { + method: 'machines().artifacts().delete', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.artifacts.Artifact\nimport com.dedalus.api.models.machines.artifacts.ArtifactDeleteParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ArtifactDeleteParams = ArtifactDeleteParams.builder()\n .machineId("dm-3")\n .artifactId("artifact_id")\n .build()\n val artifact: Artifact = client.machines().artifacts().delete(params)\n}', + }, go: { method: 'client.Machines.Artifacts.Delete', example: @@ -710,6 +780,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.PreviewListPage;\nimport com.dedalus.api.models.machines.previews.PreviewListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewListParams params = PreviewListParams.builder()\n .machineId("dm-3")\n .build();\n PreviewListPage page = client.machines().previews().list(params);\n }\n}', }, + kotlin: { + method: 'machines().previews().list', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.previews.PreviewListPage\nimport com.dedalus.api.models.machines.previews.PreviewListParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: PreviewListParams = PreviewListParams.builder()\n .machineId("dm-3")\n .build()\n val page: PreviewListPage = client.machines().previews().list(params)\n}', + }, go: { method: 'client.Machines.Previews.List', example: @@ -759,6 +834,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.Preview;\nimport com.dedalus.api.models.machines.previews.PreviewCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewCreateParams params = PreviewCreateParams.builder()\n .machineId("dm-3")\n .previewCreateParams(PreviewCreateParams.builder()\n .port(0L)\n .build())\n .build();\n Preview preview = client.machines().previews().create(params);\n }\n}', }, + kotlin: { + method: 'machines().previews().create', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.previews.Preview\nimport com.dedalus.api.models.machines.previews.PreviewCreateParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: PreviewCreateParams = PreviewCreateParams.builder()\n .machineId("dm-3")\n .previewCreateParams(PreviewCreateParams.builder()\n .port(0L)\n .build())\n .build()\n val preview: Preview = client.machines().previews().create(params)\n}', + }, go: { method: 'client.Machines.Previews.New', example: @@ -804,6 +884,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.Preview;\nimport com.dedalus.api.models.machines.previews.PreviewRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewRetrieveParams params = PreviewRetrieveParams.builder()\n .machineId("dm-3")\n .previewId("preview_id")\n .build();\n Preview preview = client.machines().previews().retrieve(params);\n }\n}', }, + kotlin: { + method: 'machines().previews().retrieve', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.previews.Preview\nimport com.dedalus.api.models.machines.previews.PreviewRetrieveParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: PreviewRetrieveParams = PreviewRetrieveParams.builder()\n .machineId("dm-3")\n .previewId("preview_id")\n .build()\n val preview: Preview = client.machines().previews().retrieve(params)\n}', + }, go: { method: 'client.Machines.Previews.Get', example: @@ -849,6 +934,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.previews.Preview;\nimport com.dedalus.api.models.machines.previews.PreviewDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n PreviewDeleteParams params = PreviewDeleteParams.builder()\n .machineId("dm-3")\n .previewId("preview_id")\n .build();\n Preview preview = client.machines().previews().delete(params);\n }\n}', }, + kotlin: { + method: 'machines().previews().delete', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.previews.Preview\nimport com.dedalus.api.models.machines.previews.PreviewDeleteParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: PreviewDeleteParams = PreviewDeleteParams.builder()\n .machineId("dm-3")\n .previewId("preview_id")\n .build()\n val preview: Preview = client.machines().previews().delete(params)\n}', + }, go: { method: 'client.Machines.Previews.Delete', example: @@ -894,6 +984,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshListPage;\nimport com.dedalus.api.models.machines.ssh.SshListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshListParams params = SshListParams.builder()\n .machineId("dm-3")\n .build();\n SshListPage page = client.machines().ssh().list(params);\n }\n}', }, + kotlin: { + method: 'machines().ssh().list', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.ssh.SshListPage\nimport com.dedalus.api.models.machines.ssh.SshListParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: SshListParams = SshListParams.builder()\n .machineId("dm-3")\n .build()\n val page: SshListPage = client.machines().ssh().list(params)\n}', + }, go: { method: 'client.Machines.SSH.List', example: @@ -938,6 +1033,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshCreateParams;\nimport com.dedalus.api.models.machines.ssh.SshSession;\nimport com.dedalus.api.models.machines.ssh.SshSessionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshCreateParams params = SshCreateParams.builder()\n .machineId("dm-3")\n .sshSessionCreateParams(SshSessionCreateParams.builder()\n .publicKey("public_key")\n .build())\n .build();\n SshSession sshSession = client.machines().ssh().create(params);\n }\n}', }, + kotlin: { + method: 'machines().ssh().create', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.ssh.SshCreateParams\nimport com.dedalus.api.models.machines.ssh.SshSession\nimport com.dedalus.api.models.machines.ssh.SshSessionCreateParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: SshCreateParams = SshCreateParams.builder()\n .machineId("dm-3")\n .sshSessionCreateParams(SshSessionCreateParams.builder()\n .publicKey("public_key")\n .build())\n .build()\n val sshSession: SshSession = client.machines().ssh().create(params)\n}', + }, go: { method: 'client.Machines.SSH.New', example: @@ -983,6 +1083,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshRetrieveParams;\nimport com.dedalus.api.models.machines.ssh.SshSession;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshRetrieveParams params = SshRetrieveParams.builder()\n .machineId("dm-3")\n .sessionId("session_id")\n .build();\n SshSession sshSession = client.machines().ssh().retrieve(params);\n }\n}', }, + kotlin: { + method: 'machines().ssh().retrieve', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.ssh.SshRetrieveParams\nimport com.dedalus.api.models.machines.ssh.SshSession\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: SshRetrieveParams = SshRetrieveParams.builder()\n .machineId("dm-3")\n .sessionId("session_id")\n .build()\n val sshSession: SshSession = client.machines().ssh().retrieve(params)\n}', + }, go: { method: 'client.Machines.SSH.Get', example: @@ -1028,6 +1133,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.ssh.SshDeleteParams;\nimport com.dedalus.api.models.machines.ssh.SshSession;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n SshDeleteParams params = SshDeleteParams.builder()\n .machineId("dm-3")\n .sessionId("session_id")\n .build();\n SshSession sshSession = client.machines().ssh().delete(params);\n }\n}', }, + kotlin: { + method: 'machines().ssh().delete', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.ssh.SshDeleteParams\nimport com.dedalus.api.models.machines.ssh.SshSession\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: SshDeleteParams = SshDeleteParams.builder()\n .machineId("dm-3")\n .sessionId("session_id")\n .build()\n val sshSession: SshSession = client.machines().ssh().delete(params)\n}', + }, go: { method: 'client.Machines.SSH.Delete', example: @@ -1073,6 +1183,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.ExecutionListPage;\nimport com.dedalus.api.models.machines.executions.ExecutionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionListParams params = ExecutionListParams.builder()\n .machineId("dm-3")\n .build();\n ExecutionListPage page = client.machines().executions().list(params);\n }\n}', }, + kotlin: { + method: 'machines().executions().list', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.executions.ExecutionListPage\nimport com.dedalus.api.models.machines.executions.ExecutionListParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ExecutionListParams = ExecutionListParams.builder()\n .machineId("dm-3")\n .build()\n val page: ExecutionListPage = client.machines().executions().list(params)\n}', + }, go: { method: 'client.Machines.Executions.List', example: @@ -1124,6 +1239,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.Execution;\nimport com.dedalus.api.models.machines.executions.ExecutionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionCreateParams params = ExecutionCreateParams.builder()\n .machineId("dm-3")\n .executionCreateParams(ExecutionCreateParams.builder()\n .addCommand("string")\n .build())\n .build();\n Execution execution = client.machines().executions().create(params);\n }\n}', }, + kotlin: { + method: 'machines().executions().create', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.executions.Execution\nimport com.dedalus.api.models.machines.executions.ExecutionCreateParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ExecutionCreateParams = ExecutionCreateParams.builder()\n .machineId("dm-3")\n .executionCreateParams(ExecutionCreateParams.builder()\n .addCommand("string")\n .build())\n .build()\n val execution: Execution = client.machines().executions().create(params)\n}', + }, go: { method: 'client.Machines.Executions.New', example: @@ -1169,6 +1289,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.Execution;\nimport com.dedalus.api.models.machines.executions.ExecutionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionRetrieveParams params = ExecutionRetrieveParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n Execution execution = client.machines().executions().retrieve(params);\n }\n}', }, + kotlin: { + method: 'machines().executions().retrieve', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.executions.Execution\nimport com.dedalus.api.models.machines.executions.ExecutionRetrieveParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ExecutionRetrieveParams = ExecutionRetrieveParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build()\n val execution: Execution = client.machines().executions().retrieve(params)\n}', + }, go: { method: 'client.Machines.Executions.Get', example: @@ -1214,6 +1339,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.Execution;\nimport com.dedalus.api.models.machines.executions.ExecutionDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionDeleteParams params = ExecutionDeleteParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n Execution execution = client.machines().executions().delete(params);\n }\n}', }, + kotlin: { + method: 'machines().executions().delete', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.executions.Execution\nimport com.dedalus.api.models.machines.executions.ExecutionDeleteParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ExecutionDeleteParams = ExecutionDeleteParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build()\n val execution: Execution = client.machines().executions().delete(params)\n}', + }, go: { method: 'client.Machines.Executions.Delete', example: @@ -1259,6 +1389,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.ExecutionOutput;\nimport com.dedalus.api.models.machines.executions.ExecutionOutputParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionOutputParams params = ExecutionOutputParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n ExecutionOutput executionOutput = client.machines().executions().output(params);\n }\n}', }, + kotlin: { + method: 'machines().executions().output', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.executions.ExecutionOutput\nimport com.dedalus.api.models.machines.executions.ExecutionOutputParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ExecutionOutputParams = ExecutionOutputParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build()\n val executionOutput: ExecutionOutput = client.machines().executions().output(params)\n}', + }, go: { method: 'client.Machines.Executions.Output', example: @@ -1304,6 +1439,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.executions.ExecutionEventsPage;\nimport com.dedalus.api.models.machines.executions.ExecutionEventsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n ExecutionEventsParams params = ExecutionEventsParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build();\n ExecutionEventsPage page = client.machines().executions().events(params);\n }\n}', }, + kotlin: { + method: 'machines().executions().events', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.executions.ExecutionEventsPage\nimport com.dedalus.api.models.machines.executions.ExecutionEventsParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: ExecutionEventsParams = ExecutionEventsParams.builder()\n .machineId("dm-3")\n .executionId("execution_id")\n .build()\n val page: ExecutionEventsPage = client.machines().executions().events(params)\n}', + }, go: { method: 'client.Machines.Executions.Events', example: @@ -1349,6 +1489,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.TerminalListPage;\nimport com.dedalus.api.models.machines.terminals.TerminalListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalListParams params = TerminalListParams.builder()\n .machineId("dm-3")\n .build();\n TerminalListPage page = client.machines().terminals().list(params);\n }\n}', }, + kotlin: { + method: 'machines().terminals().list', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.terminals.TerminalListPage\nimport com.dedalus.api.models.machines.terminals.TerminalListParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: TerminalListParams = TerminalListParams.builder()\n .machineId("dm-3")\n .build()\n val page: TerminalListPage = client.machines().terminals().list(params)\n}', + }, go: { method: 'client.Machines.Terminals.List', example: @@ -1400,6 +1545,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.Terminal;\nimport com.dedalus.api.models.machines.terminals.TerminalCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalCreateParams params = TerminalCreateParams.builder()\n .machineId("dm-3")\n .terminalCreateParams(TerminalCreateParams.builder()\n .height(0L)\n .width(0L)\n .build())\n .build();\n Terminal terminal = client.machines().terminals().create(params);\n }\n}', }, + kotlin: { + method: 'machines().terminals().create', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.terminals.Terminal\nimport com.dedalus.api.models.machines.terminals.TerminalCreateParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: TerminalCreateParams = TerminalCreateParams.builder()\n .machineId("dm-3")\n .terminalCreateParams(TerminalCreateParams.builder()\n .height(0L)\n .width(0L)\n .build())\n .build()\n val terminal: Terminal = client.machines().terminals().create(params)\n}', + }, go: { method: 'client.Machines.Terminals.New', example: @@ -1445,6 +1595,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.Terminal;\nimport com.dedalus.api.models.machines.terminals.TerminalRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalRetrieveParams params = TerminalRetrieveParams.builder()\n .machineId("dm-3")\n .terminalId("terminal_id")\n .build();\n Terminal terminal = client.machines().terminals().retrieve(params);\n }\n}', }, + kotlin: { + method: 'machines().terminals().retrieve', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.terminals.Terminal\nimport com.dedalus.api.models.machines.terminals.TerminalRetrieveParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: TerminalRetrieveParams = TerminalRetrieveParams.builder()\n .machineId("dm-3")\n .terminalId("terminal_id")\n .build()\n val terminal: Terminal = client.machines().terminals().retrieve(params)\n}', + }, go: { method: 'client.Machines.Terminals.Get', example: @@ -1490,6 +1645,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.Terminal;\nimport com.dedalus.api.models.machines.terminals.TerminalDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalDeleteParams params = TerminalDeleteParams.builder()\n .machineId("dm-3")\n .terminalId("terminal_id")\n .build();\n Terminal terminal = client.machines().terminals().delete(params);\n }\n}', }, + kotlin: { + method: 'machines().terminals().delete', + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.terminals.Terminal\nimport com.dedalus.api.models.machines.terminals.TerminalDeleteParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: TerminalDeleteParams = TerminalDeleteParams.builder()\n .machineId("dm-3")\n .terminalId("terminal_id")\n .build()\n val terminal: Terminal = client.machines().terminals().delete(params)\n}', + }, go: { method: 'client.Machines.Terminals.Delete', example: @@ -1529,6 +1689,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package com.dedalus.api.example;\n\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.terminals.TerminalConnectParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n DedalusClient client = DedalusOkHttpClient.fromEnv();\n\n TerminalConnectParams params = TerminalConnectParams.builder()\n .machineId("machine_id")\n .terminalId("terminal_id")\n .build();\n client.machines().terminals().connect(params);\n }\n}', }, + kotlin: { + example: + 'package com.dedalus.api.example\n\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.terminals.TerminalConnectParams\n\nfun main() {\n val client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\n val params: TerminalConnectParams = TerminalConnectParams.builder()\n .machineId("machine_id")\n .terminalId("terminal_id")\n .build()\n client.machines().terminals().connect(params)\n}', + }, go: { method: 'client.Machines.Terminals.Connect', example: @@ -1558,6 +1722,11 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ content: '# Dedalus Java API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-java)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1)\n\n\nThe Dedalus Java SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1).\n\n## Installation\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-java\n 0.0.1\n\n~~~\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nMachine machine = client.machines().create(params);\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\n\nDedalusClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.async().machines().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.dedalus.api.client.DedalusClientAsync;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClientAsync client = DedalusOkHttpClientAsync.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.machines().create(params);\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```java\nimport com.dedalus.api.core.http.StreamResponse;\nimport com.dedalus.api.models.machines.Machine;\n\ntry (StreamResponse streamResponse = client.machines().watchStreaming(params)) {\n streamResponse.stream().forEach(chunk -> {\n System.out.println(chunk);\n });\n System.out.println("No more chunks!");\n}\n```\n\nOr [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt) for asynchronous clients:\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.Optional;\n\nclient.async().machines().watchStreaming(params).subscribe(chunk -> {\n System.out.println(chunk);\n});\n\n// If you need to handle errors or completion of the stream\nclient.async().machines().watchStreaming(params).subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(Machine chunk) {\n System.out.println(chunk);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more chunks!");\n }\n }\n});\n\n// Or use futures\nclient.async().machines().watchStreaming(params)\n .subscribe(chunk -> {\n System.out.println(chunk);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more chunks!");\n }\n });\n```\n\nAsync streaming uses a dedicated per-client cached thread pool [`Executor`](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html) to stream without blocking the current thread. This default is suitable for most purposes.\n\nTo use a different `Executor`, configure the subscription using the `executor` parameter:\n\n```java\nimport java.util.concurrent.Executor;\nimport java.util.concurrent.Executors;\n\nExecutor executor = Executors.newFixedThreadPool(4);\nclient.async().machines().watchStreaming(params).subscribe(\n chunk -> System.out.println(chunk), executor\n);\n```\n\nOr configure the client globally using the `streamHandlerExecutor` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.util.concurrent.Executors;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .streamHandlerExecutor(Executors.newFixedThreadPool(4))\n .build();\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.dedalus.api.core.http.Headers;\nimport com.dedalus.api.core.http.HttpResponseFor;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nHttpResponseFor machine = client.machines().withRawResponse().create(params);\n\nint statusCode = machine.statusCode();\nHeaders headers = machine.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine parsedMachine = machine.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\n\n// Process as an Iterable\nfor (MachineListItem machine : page.autoPager()) {\n System.out.println(machine);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(machine -> System.out.println(machine));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPageAsync;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture pageFuture = client.async().machines().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(machine -> {\n System.out.println(machine);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(MachineListItem machine) {\n System.out.println(machine);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(machine -> {\n System.out.println(machine);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\nwhile (true) {\n for (MachineListItem machine : page.items()) {\n System.out.println(machine);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.LogLevel;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-java-core` is published with a [configuration file](dedalus-java-core/src/main/resources/META-INF/proguard/dedalus-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.http.ProxyAuthenticator;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-java`\n - Depends on and exposes the APIs of both `dedalus-java-core` and `dedalus-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Copy `dedalus-java-client-okhttp`\'s [`OkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Write a class that implements the [`HttpClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```java\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build();\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```java\nimport com.dedalus.api.core.JsonMissing;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.Map;\n\nMap additionalProperties = client.machines().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.dedalus.api.core.JsonField;\nimport java.util.Optional;\n\nJsonField field = client.machines().create(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dedalus-java/issues) with questions, bugs, or suggestions.\n', }, + { + language: 'kotlin', + content: + '# Dedalus Kotlin API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-kotlin)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-kotlin/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-kotlin/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1)\n\n\nThe Dedalus Kotlin SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Kotlin.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1).\n\n## Installation\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-kotlin:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-kotlin\n 0.0.1\n\n~~~\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n```\n\nOr manually:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build()\n```\n\nOr using a combination of the two approaches:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build()\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\n\nval clientWithOptions: DedalusClient = client.withOptions {\n it.baseUrl("https://example.com")\n it.maxRetries(42)\n}\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Kotlin class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.async().machines().create(params)\n```\n\nOr create an asynchronous client from the beginning:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClientAsync\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClientAsync = DedalusOkHttpClientAsync.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods are [suspending](https://kotlinlang.org/docs/coroutines-guide.html).\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```kotlin\nclient.machines().watchStreaming(params).use { response ->\n response.asSequence().forEach { println(it) }\n println("No more chunks!")\n}\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Kotlin classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```kotlin\nimport com.dedalus.api.core.http.Headers\nimport com.dedalus.api.core.http.HttpResponseFor\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: HttpResponseFor = client.machines().withRawResponse().create(params)\n\nval statusCode: Int = machine.statusCode()\nval headers: Headers = machine.headers()\n```\n\nYou can still deserialize the response into an instance of a Kotlin class if needed:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval parsedMachine: Machine = machine.parse()\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns a [`Sequence`](https://kotlinlang.org/docs/sequences.html)\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\nWhen using the asynchronous client, the method returns a [`Flow`](https://kotlinlang.org/docs/flow.html):\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPageAsync\n\nval page: MachineListPageAsync = client.async().machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListItem\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\nwhile (true) {\n for (machine in page.items()) {\n println(machine)\n }\n\n if (!page.hasNextPage()) {\n break\n }\n\n page = page.nextPage()\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.LogLevel\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build()\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-kotlin-core` is published with a [configuration file](dedalus-kotlin-core/src/main/resources/META-INF/proguard/dedalus-kotlin-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build()\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build()\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.net.InetSocketAddress\nimport java.net.Proxy\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(Proxy(\n Proxy.Type.HTTP, InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build()\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.http.ProxyAuthenticator\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build()\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build()\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build()\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-kotlin-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-kotlin-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-kotlin`\n - Depends on and exposes the APIs of both `dedalus-kotlin-core` and `dedalus-kotlin-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Copy `dedalus-kotlin-client-okhttp`\'s [`OkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Write a class that implements the [`HttpClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build()\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```kotlin\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build()\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\n\n// Create primitive JSON values\nval nullValue: JsonValue = JsonValue.from(null)\nval booleanValue: JsonValue = JsonValue.from(true)\nval numberValue: JsonValue = JsonValue.from(42)\nval stringValue: JsonValue = JsonValue.from("Hello World!")\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nval arrayValue: JsonValue = JsonValue.from(listOf(\n "Hello", "World"\n))\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nval objectValue: JsonValue = JsonValue.from(mapOf(\n "a" to 1, "b" to 2\n))\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nval complexValue: JsonValue = JsonValue.from(mapOf(\n "a" to listOf(\n 1, 2\n ), "b" to listOf(\n 3, 4\n )\n))\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```kotlin\nimport com.dedalus.api.core.JsonMissing\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build()\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonBoolean\nimport com.dedalus.api.core.JsonNull\nimport com.dedalus.api.core.JsonNumber\nimport com.dedalus.api.core.JsonValue\n\nval additionalProperties: Map = client.machines().create(params)._additionalProperties()\nval secretPropertyValue: JsonValue = additionalProperties.get("secretProperty")\n\nval result = when (secretPropertyValue) {\n is JsonNull -> "It\'s null!"\n is JsonBoolean -> "It\'s a boolean!"\n is JsonNumber -> "It\'s a number!"\n // Other types include `JsonMissing`, `JsonString`, `JsonArray`, and `JsonObject`\n else -> "It\'s something else!"\n}\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```kotlin\nimport com.dedalus.api.core.JsonField\n\nval field: JsonField = client.machines().create(params)._field()\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n val jsonString: String? = field.asString();\n\n // Try to deserialize into a custom type\n val myObject: MyClass = field.asUnknown()!!.convert(MyClass::class.java)\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(params).validate()\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build()\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nKotlin `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dedalus-kotlin/issues) with questions, bugs, or suggestions.\n', + }, { language: 'python', content: From 830796dae9595bfbddb62ca1d15ee2a100e69c39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:45:29 +0000 Subject: [PATCH 03/16] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0c1f5e5..671136c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-255658cb585ca9e0e22d6522136a94c0a7ee92b2133cebc9d93b956d70ebc833.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-ce9a5eb38a6a68ee96d0469cdfa54e45f08fcfff291c0eadfcf42670a226f984.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: 469332dcd8ac2679070aaf2297c43d10 +config_hash: 71e9d1855bb45e6638b5b0c495cf3c2c From e3842adbbad581256df3849241e71ba57d8ec386 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:46:39 +0000 Subject: [PATCH 04/16] chore: configure new SDK language --- .stats.yml | 4 +- packages/mcp-server/src/local-docs-search.ts | 169 +++++++++++++++++++ 2 files changed, 171 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 671136c..35dd697 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-ce9a5eb38a6a68ee96d0469cdfa54e45f08fcfff291c0eadfcf42670a226f984.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-06b427a6fe04776a3511029c8880058bb1776bbccf25141f4cd99f82ebb76823.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: 71e9d1855bb45e6638b5b0c495cf3c2c +config_hash: 5fa239988e76deec7821933d3360d19e diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 213985f..e3f1a24 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -93,6 +93,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'usage retrieve', example: "dedalus usage retrieve \\\n --api-key 'My API Key'", }, + csharp: { + method: 'Usage.Retrieve', + example: + 'UsageRetrieveParams parameters = new();\n\nvar orgUsage = await client.Usage.Retrieve(parameters);\n\nConsole.WriteLine(orgUsage);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/usage \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -147,6 +152,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'usage machine_compute', example: "dedalus usage machine-compute \\\n --api-key 'My API Key'", }, + csharp: { + method: 'Usage.MachineCompute', + example: + 'UsageMachineComputeParams parameters = new();\n\nvar machineComputeUsage = await client.Usage.MachineCompute(parameters);\n\nConsole.WriteLine(machineComputeUsage);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/usage/machines/compute \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -196,6 +206,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'usage machine_storage', example: "dedalus usage machine-storage \\\n --api-key 'My API Key'", }, + csharp: { + method: 'Usage.MachineStorage', + example: + 'UsageMachineStorageParams parameters = new();\n\nvar machineStorageUsage = await client.Usage.MachineStorage(parameters);\n\nConsole.WriteLine(machineStorageUsage);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/usage/machines/storage \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -245,6 +260,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines list', example: "dedalus machines list \\\n --api-key 'My API Key'", }, + csharp: { + method: 'Machines.List', + example: + 'MachineListParams parameters = new();\n\nvar page = await client.Machines.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -295,6 +315,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines create \\\n --api-key 'My API Key' \\\n --memory-mib 0 \\\n --storage-gib 0 \\\n --vcpu 0", }, + csharp: { + method: 'Machines.Create', + example: + 'MachineCreateParams parameters = new()\n{\n MemoryMiB = 0,\n StorageGiB = 0,\n Vcpu = 0,\n};\n\nvar machine = await client.Machines.Create(parameters);\n\nConsole.WriteLine(machine);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $DEDALUS_API_KEY" \\\n -d \'{\n "memory_mib": 0,\n "storage_gib": 0,\n "vcpu": 0\n }\'', @@ -344,6 +369,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines retrieve', example: "dedalus machines retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Retrieve', + example: + 'MachineRetrieveParams parameters = new() { MachineID = "dm-3" };\n\nvar machine = await client.Machines.Retrieve(parameters);\n\nConsole.WriteLine(machine);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -399,6 +429,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines update', example: "dedalus machines update \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Update', + example: + 'MachineUpdateParams parameters = new() { MachineID = "dm-3" };\n\nvar machine = await client.Machines.Update(parameters);\n\nConsole.WriteLine(machine);', + }, http: { example: "curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $DEDALUS_API_KEY\" \\\n -d '{}'", @@ -448,6 +483,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines delete', example: "dedalus machines delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Delete', + example: + 'MachineDeleteParams parameters = new() { MachineID = "dm-3" };\n\nvar machine = await client.Machines.Delete(parameters);\n\nConsole.WriteLine(machine);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -498,6 +538,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines watch', example: "dedalus machines watch \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.WatchStreaming', + example: + 'MachineWatchParams parameters = new() { MachineID = "dm-3" };\n\nawait foreach (var machine in client.Machines.WatchStreaming(parameters))\n{\n Console.WriteLine(machine);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/status/stream \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -547,6 +592,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines sleep', example: "dedalus machines sleep \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Sleep', + example: + 'MachineSleepParams parameters = new() { MachineID = "dm-3" };\n\nvar machine = await client.Machines.Sleep(parameters);\n\nConsole.WriteLine(machine);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/sleep \\\n -X POST \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -596,6 +646,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines wake', example: "dedalus machines wake \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Wake', + example: + 'MachineWakeParams parameters = new() { MachineID = "dm-3" };\n\nvar machine = await client.Machines.Wake(parameters);\n\nConsole.WriteLine(machine);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/wake \\\n -X POST \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -645,6 +700,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'artifacts list', example: "dedalus machines:artifacts list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Artifacts.List', + example: + 'ArtifactListParams parameters = new() { MachineID = "dm-3" };\n\nvar page = await client.Machines.Artifacts.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/artifacts \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -695,6 +755,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:artifacts retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --artifact-id artifact_id", }, + csharp: { + method: 'Machines.Artifacts.Retrieve', + example: + 'ArtifactRetrieveParams parameters = new()\n{\n MachineID = "dm-3",\n ArtifactID = "artifact_id",\n};\n\nvar artifact = await client.Machines.Artifacts.Retrieve(parameters);\n\nConsole.WriteLine(artifact);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/artifacts/$ARTIFACT_ID \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -745,6 +810,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:artifacts delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --artifact-id artifact_id", }, + csharp: { + method: 'Machines.Artifacts.Delete', + example: + 'ArtifactDeleteParams parameters = new()\n{\n MachineID = "dm-3",\n ArtifactID = "artifact_id",\n};\n\nvar artifact = await client.Machines.Artifacts.Delete(parameters);\n\nConsole.WriteLine(artifact);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/artifacts/$ARTIFACT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -794,6 +864,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'previews list', example: "dedalus machines:previews list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Previews.List', + example: + 'PreviewListParams parameters = new() { MachineID = "dm-3" };\n\nvar page = await client.Machines.Previews.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/previews \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -849,6 +924,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:previews create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --port 0", }, + csharp: { + method: 'Machines.Previews.Create', + example: + 'PreviewCreateParams parameters = new()\n{\n MachineID = "dm-3",\n Port = 0,\n};\n\nvar preview = await client.Machines.Previews.Create(parameters);\n\nConsole.WriteLine(preview);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/previews \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $DEDALUS_API_KEY" \\\n -d \'{\n "port": 0\n }\'', @@ -899,6 +979,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:previews retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --preview-id preview_id", }, + csharp: { + method: 'Machines.Previews.Retrieve', + example: + 'PreviewRetrieveParams parameters = new()\n{\n MachineID = "dm-3",\n PreviewID = "preview_id",\n};\n\nvar preview = await client.Machines.Previews.Retrieve(parameters);\n\nConsole.WriteLine(preview);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/previews/$PREVIEW_ID \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -949,6 +1034,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:previews delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --preview-id preview_id", }, + csharp: { + method: 'Machines.Previews.Delete', + example: + 'PreviewDeleteParams parameters = new()\n{\n MachineID = "dm-3",\n PreviewID = "preview_id",\n};\n\nvar preview = await client.Machines.Previews.Delete(parameters);\n\nConsole.WriteLine(preview);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/previews/$PREVIEW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -998,6 +1088,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'ssh list', example: "dedalus machines:ssh list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Ssh.List', + example: + 'SshListParams parameters = new() { MachineID = "dm-3" };\n\nvar page = await client.Machines.Ssh.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/ssh \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1048,6 +1143,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:ssh create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --public-key public_key", }, + csharp: { + method: 'Machines.Ssh.Create', + example: + 'SshCreateParams parameters = new()\n{\n MachineID = "dm-3",\n PublicKey = "public_key",\n};\n\nvar sshSession = await client.Machines.Ssh.Create(parameters);\n\nConsole.WriteLine(sshSession);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/ssh \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $DEDALUS_API_KEY" \\\n -d \'{\n "public_key": "public_key"\n }\'', @@ -1098,6 +1198,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:ssh retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --session-id session_id", }, + csharp: { + method: 'Machines.Ssh.Retrieve', + example: + 'SshRetrieveParams parameters = new()\n{\n MachineID = "dm-3",\n SessionID = "session_id",\n};\n\nvar sshSession = await client.Machines.Ssh.Retrieve(parameters);\n\nConsole.WriteLine(sshSession);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/ssh/$SESSION_ID \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1148,6 +1253,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:ssh delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --session-id session_id", }, + csharp: { + method: 'Machines.Ssh.Delete', + example: + 'SshDeleteParams parameters = new()\n{\n MachineID = "dm-3",\n SessionID = "session_id",\n};\n\nvar sshSession = await client.Machines.Ssh.Delete(parameters);\n\nConsole.WriteLine(sshSession);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/ssh/$SESSION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1197,6 +1307,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'executions list', example: "dedalus machines:executions list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Executions.List', + example: + 'ExecutionListParams parameters = new() { MachineID = "dm-3" };\n\nvar page = await client.Machines.Executions.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/executions \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1254,6 +1369,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --command string", }, + csharp: { + method: 'Machines.Executions.Create', + example: + 'ExecutionCreateParams parameters = new()\n{\n MachineID = "dm-3",\n Command =\n [\n "string"\n ],\n};\n\nvar execution = await client.Machines.Executions.Create(parameters);\n\nConsole.WriteLine(execution);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/executions \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $DEDALUS_API_KEY" \\\n -d \'{\n "command": [\n "string"\n ]\n }\'', @@ -1304,6 +1424,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + csharp: { + method: 'Machines.Executions.Retrieve', + example: + 'ExecutionRetrieveParams parameters = new()\n{\n MachineID = "dm-3",\n ExecutionID = "execution_id",\n};\n\nvar execution = await client.Machines.Executions.Retrieve(parameters);\n\nConsole.WriteLine(execution);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/executions/$EXECUTION_ID \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1354,6 +1479,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + csharp: { + method: 'Machines.Executions.Delete', + example: + 'ExecutionDeleteParams parameters = new()\n{\n MachineID = "dm-3",\n ExecutionID = "execution_id",\n};\n\nvar execution = await client.Machines.Executions.Delete(parameters);\n\nConsole.WriteLine(execution);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/executions/$EXECUTION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1404,6 +1534,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions output \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + csharp: { + method: 'Machines.Executions.Output', + example: + 'ExecutionOutputParams parameters = new()\n{\n MachineID = "dm-3",\n ExecutionID = "execution_id",\n};\n\nvar executionOutput = await client.Machines.Executions.Output(parameters);\n\nConsole.WriteLine(executionOutput);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/executions/$EXECUTION_ID/output \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1454,6 +1589,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions events \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + csharp: { + method: 'Machines.Executions.Events', + example: + 'ExecutionEventsParams parameters = new()\n{\n MachineID = "dm-3",\n ExecutionID = "execution_id",\n};\n\nvar page = await client.Machines.Executions.Events(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/executions/$EXECUTION_ID/events \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1503,6 +1643,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'terminals list', example: "dedalus machines:terminals list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + csharp: { + method: 'Machines.Terminals.List', + example: + 'TerminalListParams parameters = new() { MachineID = "dm-3" };\n\nvar page = await client.Machines.Terminals.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/terminals \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1560,6 +1705,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --height 0 \\\n --width 0", }, + csharp: { + method: 'Machines.Terminals.Create', + example: + 'TerminalCreateParams parameters = new()\n{\n MachineID = "dm-3",\n Height = 0,\n Width = 0,\n};\n\nvar terminal = await client.Machines.Terminals.Create(parameters);\n\nConsole.WriteLine(terminal);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/terminals \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $DEDALUS_API_KEY" \\\n -d \'{\n "height": 0,\n "width": 0\n }\'', @@ -1610,6 +1760,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --terminal-id terminal_id", }, + csharp: { + method: 'Machines.Terminals.Retrieve', + example: + 'TerminalRetrieveParams parameters = new()\n{\n MachineID = "dm-3",\n TerminalID = "terminal_id",\n};\n\nvar terminal = await client.Machines.Terminals.Retrieve(parameters);\n\nConsole.WriteLine(terminal);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/terminals/$TERMINAL_ID \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1660,6 +1815,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --terminal-id terminal_id", }, + csharp: { + method: 'Machines.Terminals.Delete', + example: + 'TerminalDeleteParams parameters = new()\n{\n MachineID = "dm-3",\n TerminalID = "terminal_id",\n};\n\nvar terminal = await client.Machines.Terminals.Delete(parameters);\n\nConsole.WriteLine(terminal);', + }, http: { example: 'curl https://dcs.dedaluslabs.ai/v1/machines/$MACHINE_ID/terminals/$TERMINAL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $DEDALUS_API_KEY"', @@ -1702,6 +1862,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals connect \\\n --api-key 'My API Key' \\\n --machine-id machine_id \\\n --terminal-id terminal_id", }, + csharp: { + example: + 'TerminalConnectParams parameters = new()\n{\n MachineID = "machine_id",\n TerminalID = "terminal_id",\n};\n\nawait client.Machines.Terminals.Connect(parameters);', + }, }, }, ]; @@ -1712,6 +1876,11 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ content: "# Dedalus CLI\n\nThe official CLI for the [Dedalus REST API](https://docs.dedaluslabs.ai).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install dedalus-labs/tap/dedalus\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/dedalus-labs/dedalus-cli/cmd/dedalus@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\ndedalus [resource] [flags...]\n~~~\n\n~~~sh\ndedalus machines create \\\n --api-key 'My API Key' \\\n --memory-mib 2048 \\\n --storage-gib 10 \\\n --vcpu 1\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Description | Required | Default value |\n| -------------------- | --------------------------------------------- | -------- | ------------- |\n| `DEDALUS_API_KEY` | Dedalus API key sent as Authorization Bearer. | no | `null` |\n| `DEDALUS_X_API_KEY` | Dedalus API key sent as x-api-key header. | no | `null` |\n| `DEDALUS_ORG_ID` | Organization ID header for all DCS requests. | no | `null` |\n\n### Global flags\n\n- `--api-key` - Dedalus API key sent as Authorization Bearer. (can also be set with `DEDALUS_API_KEY` env var)\n- `--x-api-key` - Dedalus API key sent as x-api-key header. (can also be set with `DEDALUS_X_API_KEY` env var)\n- `--dedalus-org-id` - Organization ID header for all DCS requests. (can also be set with `DEDALUS_ORG_ID` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\ndedalus --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\ndedalus --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\ndedalus < --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\ndedalus --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Dedalus Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/dedalus-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../dedalus-go`.\n", }, + { + language: 'csharp', + content: + '# Dedalus C# API Library\n\nThe Dedalus C# SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in C#.\n\n## Installation\n\n```bash\ngit clone git@github.com:stainless-sdks/dedalus-csharp.git\ndotnet add reference dedalus-csharp/src/Dedalus\n```\n\n## Requirements\n\nThis library requires .NET Standard 2.0 or later.\n\n## Usage\n\nSee the [`examples`](examples) directory for complete and runnable examples.\n\n```csharp\nDedalusClient client = new();\n\nMachineCreateParams parameters = new()\n{\n MemoryMiB = 2048,\n StorageGiB = 10,\n Vcpu = 1,\n};\n\nvar machine = await client.Machines.Create(parameters);\n\nConsole.WriteLine(machine);\n```', + }, { language: 'go', content: From 1d18b8da20cc77e9bd527a3c3ea87a8a63d4470a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:47:05 +0000 Subject: [PATCH 05/16] chore: configure new SDK language --- .stats.yml | 4 +- packages/mcp-server/src/local-docs-search.ts | 170 +++++++++++++++++++ 2 files changed, 172 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 35dd697..c162152 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-06b427a6fe04776a3511029c8880058bb1776bbccf25141f4cd99f82ebb76823.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-9c86c604b59def4ceca916b9a9673fe2b5d03479ad4494077dbb9dffa9ccf513.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: 5fa239988e76deec7821933d3360d19e +config_hash: f28655c695f7aa7c5aa2fec40b3861cf diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index e3f1a24..e5ee8c6 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -89,6 +89,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torgUsage, err := client.Usage.Get(context.TODO(), dedalus.UsageGetParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", orgUsage.BilledAwakeSeconds)\n}\n', }, + ruby: { + method: 'usage.retrieve', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\norg_usage = dedalus.usage.retrieve\n\nputs(org_usage)', + }, cli: { method: 'usage retrieve', example: "dedalus usage retrieve \\\n --api-key 'My API Key'", @@ -148,6 +153,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachineComputeUsage, err := client.Usage.MachineCompute(context.TODO(), dedalus.UsageMachineComputeParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machineComputeUsage.Granularity)\n}\n', }, + ruby: { + method: 'usage.machine_compute', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine_compute_usage = dedalus.usage.machine_compute\n\nputs(machine_compute_usage)', + }, cli: { method: 'usage machine_compute', example: "dedalus usage machine-compute \\\n --api-key 'My API Key'", @@ -202,6 +212,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachineStorageUsage, err := client.Usage.MachineStorage(context.TODO(), dedalus.UsageMachineStorageParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machineStorageUsage.PeriodEnd)\n}\n', }, + ruby: { + method: 'usage.machine_storage', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine_storage_usage = dedalus.usage.machine_storage\n\nputs(machine_storage_usage)', + }, cli: { method: 'usage machine_storage', example: "dedalus usage machine-storage \\\n --api-key 'My API Key'", @@ -256,6 +271,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Machines.List(context.TODO(), dedalus.MachineListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, + ruby: { + method: 'machines.list', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npage = dedalus.machines.list\n\nputs(page)', + }, cli: { method: 'machines list', example: "dedalus machines list \\\n --api-key 'My API Key'", @@ -310,6 +330,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachine, err := client.Machines.New(context.TODO(), dedalus.MachineNewParams{\n\t\tCreateParams: dedalus.CreateParams{\n\t\t\tMemoryMiB: 0,\n\t\t\tStorageGiB: 0,\n\t\t\tVCPU: 0,\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machine.MachineID)\n}\n', }, + ruby: { + method: 'machines.create', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine = dedalus.machines.create(memory_mib: 0, storage_gib: 0, vcpu: 0)\n\nputs(machine)', + }, cli: { method: 'machines create', example: @@ -365,6 +390,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachine, err := client.Machines.Get(context.TODO(), dedalus.MachineGetParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machine.MachineID)\n}\n', }, + ruby: { + method: 'machines.retrieve', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine = dedalus.machines.retrieve(machine_id: "dm-3")\n\nputs(machine)', + }, cli: { method: 'machines retrieve', example: "dedalus machines retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -425,6 +455,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachine, err := client.Machines.Update(context.TODO(), dedalus.MachineUpdateParams{\n\t\tMachineID: "dm-3",\n\t\tUpdateParams: dedalus.UpdateParams{},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machine.MachineID)\n}\n', }, + ruby: { + method: 'machines.update', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine = dedalus.machines.update(machine_id: "dm-3")\n\nputs(machine)', + }, cli: { method: 'machines update', example: "dedalus machines update \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -479,6 +514,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachine, err := client.Machines.Delete(context.TODO(), dedalus.MachineDeleteParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machine.MachineID)\n}\n', }, + ruby: { + method: 'machines.delete', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine = dedalus.machines.delete(machine_id: "dm-3")\n\nputs(machine)', + }, cli: { method: 'machines delete', example: "dedalus machines delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -534,6 +574,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tstream := client.Machines.WatchStreaming(context.TODO(), dedalus.MachineWatchParams{\n\t\tMachineID: "dm-3",\n\t})\n\tfor stream.Next() {\n\t\tfmt.Printf("%+v\\n", stream.Current())\n\t}\n\terr := stream.Err()\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, + ruby: { + method: 'machines.watch', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine = dedalus.machines.watch(machine_id: "dm-3")\n\nputs(machine)', + }, cli: { method: 'machines watch', example: "dedalus machines watch \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -588,6 +633,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachine, err := client.Machines.Sleep(context.TODO(), dedalus.MachineSleepParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machine.MachineID)\n}\n', }, + ruby: { + method: 'machines.sleep_', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine = dedalus.machines.sleep_(machine_id: "dm-3")\n\nputs(machine)', + }, cli: { method: 'machines sleep', example: "dedalus machines sleep \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -642,6 +692,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmachine, err := client.Machines.Wake(context.TODO(), dedalus.MachineWakeParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", machine.MachineID)\n}\n', }, + ruby: { + method: 'machines.wake', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nmachine = dedalus.machines.wake(machine_id: "dm-3")\n\nputs(machine)', + }, cli: { method: 'machines wake', example: "dedalus machines wake \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -696,6 +751,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Machines.Artifacts.List(context.TODO(), dedalus.MachineArtifactListParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, + ruby: { + method: 'machines.artifacts.list', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npage = dedalus.machines.artifacts.list(machine_id: "dm-3")\n\nputs(page)', + }, cli: { method: 'artifacts list', example: "dedalus machines:artifacts list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -750,6 +810,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tartifact, err := client.Machines.Artifacts.Get(context.TODO(), dedalus.MachineArtifactGetParams{\n\t\tMachineID: "dm-3",\n\t\tArtifactID: "artifact_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", artifact.ArtifactID)\n}\n', }, + ruby: { + method: 'machines.artifacts.retrieve', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nartifact = dedalus.machines.artifacts.retrieve(machine_id: "dm-3", artifact_id: "artifact_id")\n\nputs(artifact)', + }, cli: { method: 'artifacts retrieve', example: @@ -805,6 +870,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tartifact, err := client.Machines.Artifacts.Delete(context.TODO(), dedalus.MachineArtifactDeleteParams{\n\t\tMachineID: "dm-3",\n\t\tArtifactID: "artifact_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", artifact.ArtifactID)\n}\n', }, + ruby: { + method: 'machines.artifacts.delete', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nartifact = dedalus.machines.artifacts.delete(machine_id: "dm-3", artifact_id: "artifact_id")\n\nputs(artifact)', + }, cli: { method: 'artifacts delete', example: @@ -860,6 +930,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Machines.Previews.List(context.TODO(), dedalus.MachinePreviewListParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, + ruby: { + method: 'machines.previews.list', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npage = dedalus.machines.previews.list(machine_id: "dm-3")\n\nputs(page)', + }, cli: { method: 'previews list', example: "dedalus machines:previews list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -919,6 +994,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpreview, err := client.Machines.Previews.New(context.TODO(), dedalus.MachinePreviewNewParams{\n\t\tMachineID: "dm-3",\n\t\tPreviewCreateParams: dedalus.PreviewCreateParams{\n\t\t\tPort: 0,\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", preview.PreviewID)\n}\n', }, + ruby: { + method: 'machines.previews.create', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npreview = dedalus.machines.previews.create(machine_id: "dm-3", port: 0)\n\nputs(preview)', + }, cli: { method: 'previews create', example: @@ -974,6 +1054,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpreview, err := client.Machines.Previews.Get(context.TODO(), dedalus.MachinePreviewGetParams{\n\t\tMachineID: "dm-3",\n\t\tPreviewID: "preview_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", preview.PreviewID)\n}\n', }, + ruby: { + method: 'machines.previews.retrieve', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npreview = dedalus.machines.previews.retrieve(machine_id: "dm-3", preview_id: "preview_id")\n\nputs(preview)', + }, cli: { method: 'previews retrieve', example: @@ -1029,6 +1114,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpreview, err := client.Machines.Previews.Delete(context.TODO(), dedalus.MachinePreviewDeleteParams{\n\t\tMachineID: "dm-3",\n\t\tPreviewID: "preview_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", preview.PreviewID)\n}\n', }, + ruby: { + method: 'machines.previews.delete', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npreview = dedalus.machines.previews.delete(machine_id: "dm-3", preview_id: "preview_id")\n\nputs(preview)', + }, cli: { method: 'previews delete', example: @@ -1084,6 +1174,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Machines.SSH.List(context.TODO(), dedalus.MachineSSHListParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, + ruby: { + method: 'machines.ssh.list', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npage = dedalus.machines.ssh.list(machine_id: "dm-3")\n\nputs(page)', + }, cli: { method: 'ssh list', example: "dedalus machines:ssh list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -1138,6 +1233,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsshSession, err := client.Machines.SSH.New(context.TODO(), dedalus.MachineSSHNewParams{\n\t\tMachineID: "dm-3",\n\t\tSSHSessionCreateParams: dedalus.SSHSessionCreateParams{\n\t\t\tPublicKey: "public_key",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sshSession.SessionID)\n}\n', }, + ruby: { + method: 'machines.ssh.create', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nssh_session = dedalus.machines.ssh.create(machine_id: "dm-3", public_key: "public_key")\n\nputs(ssh_session)', + }, cli: { method: 'ssh create', example: @@ -1193,6 +1293,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsshSession, err := client.Machines.SSH.Get(context.TODO(), dedalus.MachineSSHGetParams{\n\t\tMachineID: "dm-3",\n\t\tSessionID: "session_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sshSession.SessionID)\n}\n', }, + ruby: { + method: 'machines.ssh.retrieve', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nssh_session = dedalus.machines.ssh.retrieve(machine_id: "dm-3", session_id: "session_id")\n\nputs(ssh_session)', + }, cli: { method: 'ssh retrieve', example: @@ -1248,6 +1353,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsshSession, err := client.Machines.SSH.Delete(context.TODO(), dedalus.MachineSSHDeleteParams{\n\t\tMachineID: "dm-3",\n\t\tSessionID: "session_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sshSession.SessionID)\n}\n', }, + ruby: { + method: 'machines.ssh.delete', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nssh_session = dedalus.machines.ssh.delete(machine_id: "dm-3", session_id: "session_id")\n\nputs(ssh_session)', + }, cli: { method: 'ssh delete', example: @@ -1303,6 +1413,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Machines.Executions.List(context.TODO(), dedalus.MachineExecutionListParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, + ruby: { + method: 'machines.executions.list', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npage = dedalus.machines.executions.list(machine_id: "dm-3")\n\nputs(page)', + }, cli: { method: 'executions list', example: "dedalus machines:executions list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -1364,6 +1479,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\texecution, err := client.Machines.Executions.New(context.TODO(), dedalus.MachineExecutionNewParams{\n\t\tMachineID: "dm-3",\n\t\tExecutionCreateParams: dedalus.ExecutionCreateParams{\n\t\t\tCommand: []string{"string"},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", execution.ExecutionID)\n}\n', }, + ruby: { + method: 'machines.executions.create', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nexecution = dedalus.machines.executions.create(machine_id: "dm-3", command: ["string"])\n\nputs(execution)', + }, cli: { method: 'executions create', example: @@ -1419,6 +1539,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\texecution, err := client.Machines.Executions.Get(context.TODO(), dedalus.MachineExecutionGetParams{\n\t\tMachineID: "dm-3",\n\t\tExecutionID: "execution_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", execution.ExecutionID)\n}\n', }, + ruby: { + method: 'machines.executions.retrieve', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nexecution = dedalus.machines.executions.retrieve(machine_id: "dm-3", execution_id: "execution_id")\n\nputs(execution)', + }, cli: { method: 'executions retrieve', example: @@ -1474,6 +1599,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\texecution, err := client.Machines.Executions.Delete(context.TODO(), dedalus.MachineExecutionDeleteParams{\n\t\tMachineID: "dm-3",\n\t\tExecutionID: "execution_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", execution.ExecutionID)\n}\n', }, + ruby: { + method: 'machines.executions.delete', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nexecution = dedalus.machines.executions.delete(machine_id: "dm-3", execution_id: "execution_id")\n\nputs(execution)', + }, cli: { method: 'executions delete', example: @@ -1529,6 +1659,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\texecutionOutput, err := client.Machines.Executions.Output(context.TODO(), dedalus.MachineExecutionOutputParams{\n\t\tMachineID: "dm-3",\n\t\tExecutionID: "execution_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", executionOutput.ExecutionID)\n}\n', }, + ruby: { + method: 'machines.executions.output', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nexecution_output = dedalus.machines.executions.output(machine_id: "dm-3", execution_id: "execution_id")\n\nputs(execution_output)', + }, cli: { method: 'executions output', example: @@ -1584,6 +1719,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Machines.Executions.Events(context.TODO(), dedalus.MachineExecutionEventsParams{\n\t\tMachineID: "dm-3",\n\t\tExecutionID: "execution_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, + ruby: { + method: 'machines.executions.events', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npage = dedalus.machines.executions.events(machine_id: "dm-3", execution_id: "execution_id")\n\nputs(page)', + }, cli: { method: 'executions events', example: @@ -1639,6 +1779,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Machines.Terminals.List(context.TODO(), dedalus.MachineTerminalListParams{\n\t\tMachineID: "dm-3",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, + ruby: { + method: 'machines.terminals.list', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\npage = dedalus.machines.terminals.list(machine_id: "dm-3")\n\nputs(page)', + }, cli: { method: 'terminals list', example: "dedalus machines:terminals list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", @@ -1700,6 +1845,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tterminal, err := client.Machines.Terminals.New(context.TODO(), dedalus.MachineTerminalNewParams{\n\t\tMachineID: "dm-3",\n\t\tTerminalCreateParams: dedalus.TerminalCreateParams{\n\t\t\tHeight: 0,\n\t\t\tWidth: 0,\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", terminal.TerminalID)\n}\n', }, + ruby: { + method: 'machines.terminals.create', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nterminal = dedalus.machines.terminals.create(machine_id: "dm-3", height: 0, width: 0)\n\nputs(terminal)', + }, cli: { method: 'terminals create', example: @@ -1755,6 +1905,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tterminal, err := client.Machines.Terminals.Get(context.TODO(), dedalus.MachineTerminalGetParams{\n\t\tMachineID: "dm-3",\n\t\tTerminalID: "terminal_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", terminal.TerminalID)\n}\n', }, + ruby: { + method: 'machines.terminals.retrieve', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nterminal = dedalus.machines.terminals.retrieve(machine_id: "dm-3", terminal_id: "terminal_id")\n\nputs(terminal)', + }, cli: { method: 'terminals retrieve', example: @@ -1810,6 +1965,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tterminal, err := client.Machines.Terminals.Delete(context.TODO(), dedalus.MachineTerminalDeleteParams{\n\t\tMachineID: "dm-3",\n\t\tTerminalID: "terminal_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", terminal.TerminalID)\n}\n', }, + ruby: { + method: 'machines.terminals.delete', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nterminal = dedalus.machines.terminals.delete(machine_id: "dm-3", terminal_id: "terminal_id")\n\nputs(terminal)', + }, cli: { method: 'terminals delete', example: @@ -1858,6 +2018,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/dedalus-labs/dedalus-go"\n\t"github.com/dedalus-labs/dedalus-go/option"\n)\n\nfunc main() {\n\tclient := dedalus.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Machines.Terminals.Connect(context.TODO(), dedalus.MachineTerminalConnectParams{\n\t\tMachineID: "machine_id",\n\t\tTerminalID: "terminal_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, + ruby: { + method: 'machines.terminals.connect', + example: + 'require "dedalus"\n\ndedalus = Dedalus::Client.new(api_key: "My API Key")\n\nresult = dedalus.machines.terminals.connect(machine_id: "machine_id", terminal_id: "terminal_id")\n\nputs(result)', + }, cli: { example: "dedalus machines:terminals connect \\\n --api-key 'My API Key' \\\n --machine-id machine_id \\\n --terminal-id terminal_id", @@ -1901,6 +2066,11 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ content: '# Dedalus Python API library\n\n\n[![PyPI version](https://img.shields.io/pypi/v/dedalus-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/dedalus-sdk/)\n\nThe Dedalus Python library provides convenient access to the Dedalus REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install dedalus-sdk\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\n\nmachine = client.machines.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n)\nprint(machine.machine_id)\n```\n\nWhile you can provide a `x_api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `DEDALUS_X_API_KEY="My X API Key"` to your `.env` file\nso that your X API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncDedalus` instead of `Dedalus` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom dedalus_sdk import AsyncDedalus\n\nclient = AsyncDedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n machine = await client.machines.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n )\n print(machine.machine_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install dedalus-sdk[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom dedalus_sdk import DefaultAioHttpClient\nfrom dedalus_sdk import AsyncDedalus\n\nasync def main() -> None:\n async with AsyncDedalus(\n api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n machine = await client.machines.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n )\n print(machine.machine_id)\n\nasyncio.run(main())\n```\n\n## Streaming responses\n\nWe provide support for streaming responses using Server Side Events (SSE).\n\n```python\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus()\n\nstream = client.machines.watch(\n machine_id="dm-3",\n)\nfor machine in stream:\n print(machine.machine_id)\n```\n\nThe async client uses the exact same interface.\n\n```python\nfrom dedalus_sdk import AsyncDedalus\n\nclient = AsyncDedalus()\n\nstream = await client.machines.watch(\n machine_id="dm-3",\n)\nasync for machine in stream:\n print(machine.machine_id)\n```\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Dedalus API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus()\n\nall_machines = []\n# Automatically fetches more pages as needed.\nfor machine in client.machines.list():\n # Do something with machine here\n all_machines.append(machine)\nprint(all_machines)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom dedalus_sdk import AsyncDedalus\n\nclient = AsyncDedalus()\n\nasync def main() -> None:\n all_machines = []\n # Iterate through items across all pages, issuing requests as needed.\n async for machine in client.machines.list():\n all_machines.append(machine)\n print(all_machines)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.machines.list()\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.items)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.machines.list()\n\nprint(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..."\nfor machine in first_page.items:\n print(machine.machine_id)\n\n# Remove `await` for non-async usage.\n```\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `dedalus_sdk.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `dedalus_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `dedalus_sdk.APIError`.\n\n```python\nimport dedalus_sdk\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus()\n\ntry:\n client.machines.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n )\nexcept dedalus_sdk.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept dedalus_sdk.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept dedalus_sdk.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom dedalus_sdk import Dedalus\n\n# Configure the default for all requests:\nclient = Dedalus(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).machines.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom dedalus_sdk import Dedalus\n\n# Configure the default for all requests:\nclient = Dedalus(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Dedalus(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).machines.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `DEDALUS_LOG` to `info`.\n\n```shell\n$ export DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom dedalus_sdk import Dedalus\n\nclient = Dedalus()\nresponse = client.machines.with_raw_response.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nmachine = response.parse() # get the object that `machines.create()` would have returned\nprint(machine.machine_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/dedalus-labs/dedalus-python/tree/main/src/dedalus_sdk/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/dedalus-labs/dedalus-python/tree/main/src/dedalus_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.machines.with_streaming_response.create(\n memory_mib=2048,\n storage_gib=10,\n vcpu=1,\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom dedalus_sdk import Dedalus, DefaultHttpxClient\n\nclient = Dedalus(\n # Or use the `DEDALUS_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom dedalus_sdk import Dedalus\n\nwith Dedalus() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/dedalus-labs/dedalus-python/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport dedalus_sdk\nprint(dedalus_sdk.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, + { + language: 'ruby', + content: + '# Dedalus Ruby API library\n\nThe Dedalus Ruby library provides convenient access to the Dedalus REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/stainless-sdks/dedalus-ruby#Sorbet) for usage with Sorbet. The standard library\'s `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nDocumentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/dedalus).\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai).\n\n## Installation\n\nTo use this gem, install via Bundler by adding the following to your application\'s `Gemfile`:\n\n```ruby\ngem "dedalus", "~> 0.0.1"\n```\n\n## Usage\n\n```ruby\nrequire "bundler/setup"\nrequire "dedalus"\n\ndedalus = Dedalus::Client.new(\n api_key: ENV["DEDALUS_API_KEY"] # This is the default and can be omitted\n)\n\nmachine = dedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n\nputs(machine.machine_id)\n```\n\n### Streaming\n\nWe provide support for streaming responses using Server-Sent Events (SSE).\n\n```ruby\nstream = dedalus.machines.watch_streaming\n\nstream.each do |machine|\n puts(machine.machine_id)\nend\n```\n\n### Pagination\n\nList methods in the Dedalus API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```ruby\npage = dedalus.machines.list\n\n# Fetch single item from page.\nmachine = page.items[0]\nputs(machine.machine_id)\n\n# Automatically fetches more pages as needed.\npage.auto_paging_each do |machine|\n puts(machine.machine_id)\nend\n```\n\nAlternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.\n\n```ruby\nif page.next_page?\n new_page = page.next_page\n puts(new_page.items[0].machine_id)\nend\n```\n\n\n\n### Handling errors\n\nWhen the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Dedalus::Errors::APIError` will be thrown:\n\n```ruby\nbegin\n machine = dedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\nrescue Dedalus::Errors::APIConnectionError => e\n puts("The server could not be reached")\n puts(e.cause) # an underlying Exception, likely raised within `net/http`\nrescue Dedalus::Errors::RateLimitError => e\n puts("A 429 status code was received; we should back off a bit.")\nrescue Dedalus::Errors::APIStatusError => e\n puts("Another non-200-range status code was received")\n puts(e.status)\nend\n```\n\nError codes are as follows:\n\n| Cause | Error Type |\n| ---------------- | -------------------------- |\n| HTTP 400 | `BadRequestError` |\n| HTTP 401 | `AuthenticationError` |\n| HTTP 403 | `PermissionDeniedError` |\n| HTTP 404 | `NotFoundError` |\n| HTTP 409 | `ConflictError` |\n| HTTP 422 | `UnprocessableEntityError` |\n| HTTP 429 | `RateLimitError` |\n| HTTP >= 500 | `InternalServerError` |\n| Other HTTP error | `APIStatusError` |\n| Timeout | `APITimeoutError` |\n| Network error | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\n\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.\n\nYou can use the `max_retries` option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\ndedalus = Dedalus::Client.new(\n max_retries: 0 # default is 2\n)\n\n# Or, configure per-request:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1, request_options: {max_retries: 5})\n```\n\n### Timeouts\n\nBy default, requests will time out after 60 seconds. You can use the timeout option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\ndedalus = Dedalus::Client.new(\n timeout: nil # default is 60\n)\n\n# Or, configure per-request:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1, request_options: {timeout: 5})\n```\n\nOn timeout, `Dedalus::Errors::APITimeoutError` is raised.\n\nNote that requests that time out are retried by default.\n\n## Advanced concepts\n\n### BaseModel\n\nAll parameter and response objects inherit from `Dedalus::Internal::Type::BaseModel`, which provides several conveniences, including:\n\n1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.\n\n2. Structural equivalence for equality; if two API calls return the same values, comparing the responses with == will return true.\n\n3. Both instances and the classes themselves can be pretty-printed.\n\n4. Helpers such as `#to_h`, `#deep_to_h`, `#to_json`, and `#to_yaml`.\n\n### Making custom or undocumented requests\n\n#### Undocumented properties\n\nYou can send undocumented parameters to any endpoint, and read undocumented response properties, like so:\n\nNote: the `extra_` parameters of the same name overrides the documented parameters.\n\n```ruby\nmachine =\n dedalus.machines.create(\n memory_mib: 2048,\n storage_gib: 10,\n vcpu: 1,\n request_options: {\n extra_query: {my_query_parameter: value},\n extra_body: {my_body_parameter: value},\n extra_headers: {"my-header": value}\n }\n )\n\nputs(machine[:my_undocumented_property])\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:\n\n```ruby\nresponse = client.request(\n method: :post,\n path: \'/undocumented/endpoint\',\n query: {"dog": "woof"},\n headers: {"useful-header": "interesting-value"},\n body: {"hello": "world"}\n)\n```\n\n### Concurrency & connection pooling\n\nThe `Dedalus::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.\n\nEach instance of `Dedalus::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.\n\nWhen all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.\n\nUnless otherwise specified, other classes in the SDK do not have locks protecting their underlying data structure.\n\n## Sorbet\n\nThis library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.\n\nYou can provide typesafe request parameters like so:\n\n```ruby\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n```\n\nOr, equivalently:\n\n```ruby\n# Hashes work, but are not typesafe:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n\n# You can also splat a full Params class:\nparams = Dedalus::MachineCreateParams.new(memory_mib: 2048, storage_gib: 10, vcpu: 1)\ndedalus.machines.create(**params)\n```\n\n### Enums\n\nSince this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:\n\n```ruby\n# :http\nputs(Dedalus::Machines::PreviewCreateParams::Protocol::HTTP)\n\n# Revealed type: `T.all(Dedalus::Machines::PreviewCreateParams::Protocol, Symbol)`\nT.reveal_type(Dedalus::Machines::PreviewCreateParams::Protocol::HTTP)\n```\n\nEnum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:\n\n```ruby\n# Using the enum constants preserves the tagged type information:\ndedalus.machines.previews.create(\n protocol: Dedalus::Machines::PreviewCreateParams::Protocol::HTTP,\n # …\n)\n\n# Literal values are also permissible:\ndedalus.machines.previews.create(\n protocol: :http,\n # …\n)\n```\n\n## Versioning\n\nThis package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.\n\nThis package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.\n\n## Requirements\n\nRuby 3.2.0 or higher.\n\n## Contributing\n\nSee [the contributing documentation](https://github.com/stainless-sdks/dedalus-ruby/tree/main/CONTRIBUTING.md).\n', + }, { language: 'terraform', content: From 6b68956600107ed25ea17d5262d961d0164a9dd9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:47:52 +0000 Subject: [PATCH 06/16] chore: configure new SDK language --- .stats.yml | 4 +- packages/mcp-server/src/local-docs-search.ts | 170 +++++++++++++++++++ 2 files changed, 172 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c162152..3478eb5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-9c86c604b59def4ceca916b9a9673fe2b5d03479ad4494077dbb9dffa9ccf513.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-8612890eae5e55f9236ad984991f4dc3712138acaa0005be3de43dabc6cd54d4.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: f28655c695f7aa7c5aa2fec40b3861cf +config_hash: 8b2f74aaf8a9b5a01242e7c23f721082 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index e5ee8c6..b6bc6c4 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -98,6 +98,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'usage retrieve', example: "dedalus usage retrieve \\\n --api-key 'My API Key'", }, + php: { + method: 'usage->retrieve', + example: + "usage->retrieve(periodStart: 'period_start');\n\nvar_dump($orgUsage);", + }, csharp: { method: 'Usage.Retrieve', example: @@ -162,6 +167,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'usage machine_compute', example: "dedalus usage machine-compute \\\n --api-key 'My API Key'", }, + php: { + method: 'usage->machineCompute', + example: + "usage->machineCompute(\n granularity: 'granularity',\n machineID: 'machine_id',\n periodEnd: 'period_end',\n periodStart: 'period_start',\n);\n\nvar_dump($machineComputeUsage);", + }, csharp: { method: 'Usage.MachineCompute', example: @@ -221,6 +231,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'usage machine_storage', example: "dedalus usage machine-storage \\\n --api-key 'My API Key'", }, + php: { + method: 'usage->machineStorage', + example: + "usage->machineStorage(\n machineID: 'machine_id', periodEnd: 'period_end', periodStart: 'period_start'\n);\n\nvar_dump($machineStorageUsage);", + }, csharp: { method: 'Usage.MachineStorage', example: @@ -280,6 +295,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines list', example: "dedalus machines list \\\n --api-key 'My API Key'", }, + php: { + method: 'machines->list', + example: + "machines->list(cursor: 'cursor', limit: 0);\n\nvar_dump($page);", + }, csharp: { method: 'Machines.List', example: @@ -340,6 +360,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines create \\\n --api-key 'My API Key' \\\n --memory-mib 0 \\\n --storage-gib 0 \\\n --vcpu 0", }, + php: { + method: 'machines->create', + example: + "machines->create(\n memoryMiB: 0, storageGiB: 0, vcpu: 0, autosleep: 'autosleep'\n);\n\nvar_dump($machine);", + }, csharp: { method: 'Machines.Create', example: @@ -399,6 +424,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines retrieve', example: "dedalus machines retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->retrieve', + example: + "machines->retrieve(machineID: 'dm-3');\n\nvar_dump($machine);", + }, csharp: { method: 'Machines.Retrieve', example: @@ -464,6 +494,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines update', example: "dedalus machines update \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->update', + example: + "machines->update(\n machineID: 'dm-3',\n autosleep: 'autosleep',\n memoryMiB: 0,\n storageGiB: 0,\n vcpu: 0,\n);\n\nvar_dump($machine);", + }, csharp: { method: 'Machines.Update', example: @@ -523,6 +558,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines delete', example: "dedalus machines delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->delete', + example: + "machines->delete(machineID: 'dm-3');\n\nvar_dump($machine);", + }, csharp: { method: 'Machines.Delete', example: @@ -583,6 +623,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines watch', example: "dedalus machines watch \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->watch', + example: + "machines->watchStream(\n machineID: 'dm-3', lastEventID: 'Last-Event-ID'\n);\n\nvar_dump($machine);", + }, csharp: { method: 'Machines.WatchStreaming', example: @@ -642,6 +687,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines sleep', example: "dedalus machines sleep \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->sleep', + example: + "machines->sleep(machineID: 'dm-3');\n\nvar_dump($machine);", + }, csharp: { method: 'Machines.Sleep', example: @@ -701,6 +751,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'machines wake', example: "dedalus machines wake \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->wake', + example: + "machines->wake(machineID: 'dm-3');\n\nvar_dump($machine);", + }, csharp: { method: 'Machines.Wake', example: @@ -760,6 +815,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'artifacts list', example: "dedalus machines:artifacts list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->artifacts->list', + example: + "machines->artifacts->list(\n machineID: 'dm-3', cursor: 'cursor', limit: 0\n);\n\nvar_dump($page);", + }, csharp: { method: 'Machines.Artifacts.List', example: @@ -820,6 +880,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:artifacts retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --artifact-id artifact_id", }, + php: { + method: 'machines->artifacts->retrieve', + example: + "machines->artifacts->retrieve(\n machineID: 'dm-3', artifactID: 'artifact_id'\n);\n\nvar_dump($artifact);", + }, csharp: { method: 'Machines.Artifacts.Retrieve', example: @@ -880,6 +945,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:artifacts delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --artifact-id artifact_id", }, + php: { + method: 'machines->artifacts->delete', + example: + "machines->artifacts->delete(\n machineID: 'dm-3', artifactID: 'artifact_id'\n);\n\nvar_dump($artifact);", + }, csharp: { method: 'Machines.Artifacts.Delete', example: @@ -939,6 +1009,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'previews list', example: "dedalus machines:previews list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->previews->list', + example: + "machines->previews->list(\n machineID: 'dm-3', cursor: 'cursor', limit: 0\n);\n\nvar_dump($page);", + }, csharp: { method: 'Machines.Previews.List', example: @@ -1004,6 +1079,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:previews create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --port 0", }, + php: { + method: 'machines->previews->create', + example: + "machines->previews->create(\n machineID: 'dm-3', port: 0, protocol: 'http', visibility: 'public'\n);\n\nvar_dump($preview);", + }, csharp: { method: 'Machines.Previews.Create', example: @@ -1064,6 +1144,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:previews retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --preview-id preview_id", }, + php: { + method: 'machines->previews->retrieve', + example: + "machines->previews->retrieve(\n machineID: 'dm-3', previewID: 'preview_id'\n);\n\nvar_dump($preview);", + }, csharp: { method: 'Machines.Previews.Retrieve', example: @@ -1124,6 +1209,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:previews delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --preview-id preview_id", }, + php: { + method: 'machines->previews->delete', + example: + "machines->previews->delete(\n machineID: 'dm-3', previewID: 'preview_id'\n);\n\nvar_dump($preview);", + }, csharp: { method: 'Machines.Previews.Delete', example: @@ -1183,6 +1273,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'ssh list', example: "dedalus machines:ssh list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->ssh->list', + example: + "machines->ssh->list(\n machineID: 'dm-3', cursor: 'cursor', limit: 0\n);\n\nvar_dump($page);", + }, csharp: { method: 'Machines.Ssh.List', example: @@ -1243,6 +1338,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:ssh create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --public-key public_key", }, + php: { + method: 'machines->ssh->create', + example: + "machines->ssh->create(\n machineID: 'dm-3', publicKey: 'public_key'\n);\n\nvar_dump($sshSession);", + }, csharp: { method: 'Machines.Ssh.Create', example: @@ -1303,6 +1403,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:ssh retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --session-id session_id", }, + php: { + method: 'machines->ssh->retrieve', + example: + "machines->ssh->retrieve(\n machineID: 'dm-3', sessionID: 'session_id'\n);\n\nvar_dump($sshSession);", + }, csharp: { method: 'Machines.Ssh.Retrieve', example: @@ -1363,6 +1468,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:ssh delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --session-id session_id", }, + php: { + method: 'machines->ssh->delete', + example: + "machines->ssh->delete(\n machineID: 'dm-3', sessionID: 'session_id'\n);\n\nvar_dump($sshSession);", + }, csharp: { method: 'Machines.Ssh.Delete', example: @@ -1422,6 +1532,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'executions list', example: "dedalus machines:executions list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->executions->list', + example: + "machines->executions->list(\n machineID: 'dm-3', cursor: 'cursor', limit: 0\n);\n\nvar_dump($page);", + }, csharp: { method: 'Machines.Executions.List', example: @@ -1489,6 +1604,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --command string", }, + php: { + method: 'machines->executions->create', + example: + "machines->executions->create(\n machineID: 'dm-3',\n command: ['string'],\n cwd: 'cwd',\n env: ['foo' => 'string'],\n stdin: 'stdin',\n timeoutMs: 0,\n);\n\nvar_dump($execution);", + }, csharp: { method: 'Machines.Executions.Create', example: @@ -1549,6 +1669,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + php: { + method: 'machines->executions->retrieve', + example: + "machines->executions->retrieve(\n machineID: 'dm-3', executionID: 'execution_id'\n);\n\nvar_dump($execution);", + }, csharp: { method: 'Machines.Executions.Retrieve', example: @@ -1609,6 +1734,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + php: { + method: 'machines->executions->delete', + example: + "machines->executions->delete(\n machineID: 'dm-3', executionID: 'execution_id'\n);\n\nvar_dump($execution);", + }, csharp: { method: 'Machines.Executions.Delete', example: @@ -1669,6 +1799,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions output \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + php: { + method: 'machines->executions->output', + example: + "machines->executions->output(\n machineID: 'dm-3', executionID: 'execution_id'\n);\n\nvar_dump($executionOutput);", + }, csharp: { method: 'Machines.Executions.Output', example: @@ -1729,6 +1864,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:executions events \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --execution-id execution_id", }, + php: { + method: 'machines->executions->events', + example: + "machines->executions->events(\n machineID: 'dm-3', executionID: 'execution_id', cursor: 'cursor', limit: 0\n);\n\nvar_dump($page);", + }, csharp: { method: 'Machines.Executions.Events', example: @@ -1788,6 +1928,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ method: 'terminals list', example: "dedalus machines:terminals list \\\n --api-key 'My API Key' \\\n --machine-id dm-3", }, + php: { + method: 'machines->terminals->list', + example: + "machines->terminals->list(\n machineID: 'dm-3', cursor: 'cursor', limit: 0\n);\n\nvar_dump($page);", + }, csharp: { method: 'Machines.Terminals.List', example: @@ -1855,6 +2000,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals create \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --height 0 \\\n --width 0", }, + php: { + method: 'machines->terminals->create', + example: + "machines->terminals->create(\n machineID: 'dm-3',\n height: 0,\n width: 0,\n cwd: 'cwd',\n env: ['foo' => 'string'],\n shell: 'shell',\n);\n\nvar_dump($terminal);", + }, csharp: { method: 'Machines.Terminals.Create', example: @@ -1915,6 +2065,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals retrieve \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --terminal-id terminal_id", }, + php: { + method: 'machines->terminals->retrieve', + example: + "machines->terminals->retrieve(\n machineID: 'dm-3', terminalID: 'terminal_id'\n);\n\nvar_dump($terminal);", + }, csharp: { method: 'Machines.Terminals.Retrieve', example: @@ -1975,6 +2130,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals delete \\\n --api-key 'My API Key' \\\n --machine-id dm-3 \\\n --terminal-id terminal_id", }, + php: { + method: 'machines->terminals->delete', + example: + "machines->terminals->delete(\n machineID: 'dm-3', terminalID: 'terminal_id'\n);\n\nvar_dump($terminal);", + }, csharp: { method: 'Machines.Terminals.Delete', example: @@ -2027,6 +2187,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: "dedalus machines:terminals connect \\\n --api-key 'My API Key' \\\n --machine-id machine_id \\\n --terminal-id terminal_id", }, + php: { + method: 'machines->terminals->connect', + example: + "machines->terminals->connect(\n machineID: 'machine_id', terminalID: 'terminal_id'\n);\n\nvar_dump($result);", + }, csharp: { example: 'TerminalConnectParams parameters = new()\n{\n MachineID = "machine_id",\n TerminalID = "terminal_id",\n};\n\nawait client.Machines.Terminals.Connect(parameters);', @@ -2061,6 +2226,11 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ content: '# Dedalus Kotlin API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-kotlin)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-kotlin/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-kotlin/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1)\n\n\nThe Dedalus Kotlin SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Kotlin.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1).\n\n## Installation\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-kotlin:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-kotlin\n 0.0.1\n\n~~~\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n```\n\nOr manually:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build()\n```\n\nOr using a combination of the two approaches:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build()\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\n\nval clientWithOptions: DedalusClient = client.withOptions {\n it.baseUrl("https://example.com")\n it.maxRetries(42)\n}\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Kotlin class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.async().machines().create(params)\n```\n\nOr create an asynchronous client from the beginning:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClientAsync\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClientAsync = DedalusOkHttpClientAsync.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods are [suspending](https://kotlinlang.org/docs/coroutines-guide.html).\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```kotlin\nclient.machines().watchStreaming(params).use { response ->\n response.asSequence().forEach { println(it) }\n println("No more chunks!")\n}\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Kotlin classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```kotlin\nimport com.dedalus.api.core.http.Headers\nimport com.dedalus.api.core.http.HttpResponseFor\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: HttpResponseFor = client.machines().withRawResponse().create(params)\n\nval statusCode: Int = machine.statusCode()\nval headers: Headers = machine.headers()\n```\n\nYou can still deserialize the response into an instance of a Kotlin class if needed:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval parsedMachine: Machine = machine.parse()\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns a [`Sequence`](https://kotlinlang.org/docs/sequences.html)\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\nWhen using the asynchronous client, the method returns a [`Flow`](https://kotlinlang.org/docs/flow.html):\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPageAsync\n\nval page: MachineListPageAsync = client.async().machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListItem\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\nwhile (true) {\n for (machine in page.items()) {\n println(machine)\n }\n\n if (!page.hasNextPage()) {\n break\n }\n\n page = page.nextPage()\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.LogLevel\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build()\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-kotlin-core` is published with a [configuration file](dedalus-kotlin-core/src/main/resources/META-INF/proguard/dedalus-kotlin-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build()\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build()\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.net.InetSocketAddress\nimport java.net.Proxy\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(Proxy(\n Proxy.Type.HTTP, InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build()\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.http.ProxyAuthenticator\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build()\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build()\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build()\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-kotlin-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-kotlin-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-kotlin`\n - Depends on and exposes the APIs of both `dedalus-kotlin-core` and `dedalus-kotlin-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Copy `dedalus-kotlin-client-okhttp`\'s [`OkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Write a class that implements the [`HttpClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build()\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```kotlin\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build()\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\n\n// Create primitive JSON values\nval nullValue: JsonValue = JsonValue.from(null)\nval booleanValue: JsonValue = JsonValue.from(true)\nval numberValue: JsonValue = JsonValue.from(42)\nval stringValue: JsonValue = JsonValue.from("Hello World!")\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nval arrayValue: JsonValue = JsonValue.from(listOf(\n "Hello", "World"\n))\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nval objectValue: JsonValue = JsonValue.from(mapOf(\n "a" to 1, "b" to 2\n))\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nval complexValue: JsonValue = JsonValue.from(mapOf(\n "a" to listOf(\n 1, 2\n ), "b" to listOf(\n 3, 4\n )\n))\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```kotlin\nimport com.dedalus.api.core.JsonMissing\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build()\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonBoolean\nimport com.dedalus.api.core.JsonNull\nimport com.dedalus.api.core.JsonNumber\nimport com.dedalus.api.core.JsonValue\n\nval additionalProperties: Map = client.machines().create(params)._additionalProperties()\nval secretPropertyValue: JsonValue = additionalProperties.get("secretProperty")\n\nval result = when (secretPropertyValue) {\n is JsonNull -> "It\'s null!"\n is JsonBoolean -> "It\'s a boolean!"\n is JsonNumber -> "It\'s a number!"\n // Other types include `JsonMissing`, `JsonString`, `JsonArray`, and `JsonObject`\n else -> "It\'s something else!"\n}\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```kotlin\nimport com.dedalus.api.core.JsonField\n\nval field: JsonField = client.machines().create(params)._field()\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n val jsonString: String? = field.asString();\n\n // Try to deserialize into a custom type\n val myObject: MyClass = field.asUnknown()!!.convert(MyClass::class.java)\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(params).validate()\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build()\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nKotlin `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dedalus-kotlin/issues) with questions, bugs, or suggestions.\n', }, + { + language: 'php', + content: + '# Dedalus PHP API Library\n\nThe Dedalus PHP library provides convenient access to the Dedalus REST API from any PHP 8.1.0+ application.\n\n## Installation\n\nTo use this package, install via Composer by adding the following to your application\'s `composer.json`:\n\n```json\n{\n "repositories": [\n {\n "type": "vcs",\n "url": "git@github.com:stainless-sdks/dedalus-php.git"\n }\n ],\n "require": {\n "org-placeholder/dedalus": "dev-main"\n }\n}\n```\n\n## Usage\n\n```php\nmachines->create(memoryMiB: 2048, storageGiB: 10, vcpu: 1);\n\nvar_dump($machine->machine_id);\n```', + }, { language: 'python', content: From 6ce506a7697e83c99ab5f6baf82d648c8500bdec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:55:42 +0000 Subject: [PATCH 07/16] chore: update SDK settings --- .stats.yml | 4 ++-- packages/mcp-server/src/local-docs-search.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3478eb5..b3016f2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-8612890eae5e55f9236ad984991f4dc3712138acaa0005be3de43dabc6cd54d4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-612bc4e434529d5007d868e94cb7951ad9b13d2c6751b21dbe03f66fecae071c.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: 8b2f74aaf8a9b5a01242e7c23f721082 +config_hash: cce16da42a2fc50117c5b029105bfed4 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index b6bc6c4..2f6acfb 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -2239,7 +2239,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'ruby', content: - '# Dedalus Ruby API library\n\nThe Dedalus Ruby library provides convenient access to the Dedalus REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/stainless-sdks/dedalus-ruby#Sorbet) for usage with Sorbet. The standard library\'s `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nDocumentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/dedalus).\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai).\n\n## Installation\n\nTo use this gem, install via Bundler by adding the following to your application\'s `Gemfile`:\n\n```ruby\ngem "dedalus", "~> 0.0.1"\n```\n\n## Usage\n\n```ruby\nrequire "bundler/setup"\nrequire "dedalus"\n\ndedalus = Dedalus::Client.new(\n api_key: ENV["DEDALUS_API_KEY"] # This is the default and can be omitted\n)\n\nmachine = dedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n\nputs(machine.machine_id)\n```\n\n### Streaming\n\nWe provide support for streaming responses using Server-Sent Events (SSE).\n\n```ruby\nstream = dedalus.machines.watch_streaming\n\nstream.each do |machine|\n puts(machine.machine_id)\nend\n```\n\n### Pagination\n\nList methods in the Dedalus API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```ruby\npage = dedalus.machines.list\n\n# Fetch single item from page.\nmachine = page.items[0]\nputs(machine.machine_id)\n\n# Automatically fetches more pages as needed.\npage.auto_paging_each do |machine|\n puts(machine.machine_id)\nend\n```\n\nAlternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.\n\n```ruby\nif page.next_page?\n new_page = page.next_page\n puts(new_page.items[0].machine_id)\nend\n```\n\n\n\n### Handling errors\n\nWhen the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Dedalus::Errors::APIError` will be thrown:\n\n```ruby\nbegin\n machine = dedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\nrescue Dedalus::Errors::APIConnectionError => e\n puts("The server could not be reached")\n puts(e.cause) # an underlying Exception, likely raised within `net/http`\nrescue Dedalus::Errors::RateLimitError => e\n puts("A 429 status code was received; we should back off a bit.")\nrescue Dedalus::Errors::APIStatusError => e\n puts("Another non-200-range status code was received")\n puts(e.status)\nend\n```\n\nError codes are as follows:\n\n| Cause | Error Type |\n| ---------------- | -------------------------- |\n| HTTP 400 | `BadRequestError` |\n| HTTP 401 | `AuthenticationError` |\n| HTTP 403 | `PermissionDeniedError` |\n| HTTP 404 | `NotFoundError` |\n| HTTP 409 | `ConflictError` |\n| HTTP 422 | `UnprocessableEntityError` |\n| HTTP 429 | `RateLimitError` |\n| HTTP >= 500 | `InternalServerError` |\n| Other HTTP error | `APIStatusError` |\n| Timeout | `APITimeoutError` |\n| Network error | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\n\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.\n\nYou can use the `max_retries` option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\ndedalus = Dedalus::Client.new(\n max_retries: 0 # default is 2\n)\n\n# Or, configure per-request:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1, request_options: {max_retries: 5})\n```\n\n### Timeouts\n\nBy default, requests will time out after 60 seconds. You can use the timeout option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\ndedalus = Dedalus::Client.new(\n timeout: nil # default is 60\n)\n\n# Or, configure per-request:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1, request_options: {timeout: 5})\n```\n\nOn timeout, `Dedalus::Errors::APITimeoutError` is raised.\n\nNote that requests that time out are retried by default.\n\n## Advanced concepts\n\n### BaseModel\n\nAll parameter and response objects inherit from `Dedalus::Internal::Type::BaseModel`, which provides several conveniences, including:\n\n1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.\n\n2. Structural equivalence for equality; if two API calls return the same values, comparing the responses with == will return true.\n\n3. Both instances and the classes themselves can be pretty-printed.\n\n4. Helpers such as `#to_h`, `#deep_to_h`, `#to_json`, and `#to_yaml`.\n\n### Making custom or undocumented requests\n\n#### Undocumented properties\n\nYou can send undocumented parameters to any endpoint, and read undocumented response properties, like so:\n\nNote: the `extra_` parameters of the same name overrides the documented parameters.\n\n```ruby\nmachine =\n dedalus.machines.create(\n memory_mib: 2048,\n storage_gib: 10,\n vcpu: 1,\n request_options: {\n extra_query: {my_query_parameter: value},\n extra_body: {my_body_parameter: value},\n extra_headers: {"my-header": value}\n }\n )\n\nputs(machine[:my_undocumented_property])\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:\n\n```ruby\nresponse = client.request(\n method: :post,\n path: \'/undocumented/endpoint\',\n query: {"dog": "woof"},\n headers: {"useful-header": "interesting-value"},\n body: {"hello": "world"}\n)\n```\n\n### Concurrency & connection pooling\n\nThe `Dedalus::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.\n\nEach instance of `Dedalus::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.\n\nWhen all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.\n\nUnless otherwise specified, other classes in the SDK do not have locks protecting their underlying data structure.\n\n## Sorbet\n\nThis library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.\n\nYou can provide typesafe request parameters like so:\n\n```ruby\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n```\n\nOr, equivalently:\n\n```ruby\n# Hashes work, but are not typesafe:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n\n# You can also splat a full Params class:\nparams = Dedalus::MachineCreateParams.new(memory_mib: 2048, storage_gib: 10, vcpu: 1)\ndedalus.machines.create(**params)\n```\n\n### Enums\n\nSince this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:\n\n```ruby\n# :http\nputs(Dedalus::Machines::PreviewCreateParams::Protocol::HTTP)\n\n# Revealed type: `T.all(Dedalus::Machines::PreviewCreateParams::Protocol, Symbol)`\nT.reveal_type(Dedalus::Machines::PreviewCreateParams::Protocol::HTTP)\n```\n\nEnum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:\n\n```ruby\n# Using the enum constants preserves the tagged type information:\ndedalus.machines.previews.create(\n protocol: Dedalus::Machines::PreviewCreateParams::Protocol::HTTP,\n # …\n)\n\n# Literal values are also permissible:\ndedalus.machines.previews.create(\n protocol: :http,\n # …\n)\n```\n\n## Versioning\n\nThis package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.\n\nThis package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.\n\n## Requirements\n\nRuby 3.2.0 or higher.\n\n## Contributing\n\nSee [the contributing documentation](https://github.com/stainless-sdks/dedalus-ruby/tree/main/CONTRIBUTING.md).\n', + '# Dedalus Ruby API library\n\nThe Dedalus Ruby library provides convenient access to the Dedalus REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/dedalus-labs/dedalus-ruby#Sorbet) for usage with Sorbet. The standard library\'s `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nDocumentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/dedalus).\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai).\n\n## Installation\n\nTo use this gem, install via Bundler by adding the following to your application\'s `Gemfile`:\n\n\n\n```ruby\ngem "dedalus", "~> 0.0.1"\n```\n\n\n\n## Usage\n\n```ruby\nrequire "bundler/setup"\nrequire "dedalus"\n\ndedalus = Dedalus::Client.new(\n api_key: ENV["DEDALUS_API_KEY"] # This is the default and can be omitted\n)\n\nmachine = dedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n\nputs(machine.machine_id)\n```\n\n### Streaming\n\nWe provide support for streaming responses using Server-Sent Events (SSE).\n\n```ruby\nstream = dedalus.machines.watch_streaming\n\nstream.each do |machine|\n puts(machine.machine_id)\nend\n```\n\n### Pagination\n\nList methods in the Dedalus API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```ruby\npage = dedalus.machines.list\n\n# Fetch single item from page.\nmachine = page.items[0]\nputs(machine.machine_id)\n\n# Automatically fetches more pages as needed.\npage.auto_paging_each do |machine|\n puts(machine.machine_id)\nend\n```\n\nAlternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.\n\n```ruby\nif page.next_page?\n new_page = page.next_page\n puts(new_page.items[0].machine_id)\nend\n```\n\n\n\n### Handling errors\n\nWhen the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Dedalus::Errors::APIError` will be thrown:\n\n```ruby\nbegin\n machine = dedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\nrescue Dedalus::Errors::APIConnectionError => e\n puts("The server could not be reached")\n puts(e.cause) # an underlying Exception, likely raised within `net/http`\nrescue Dedalus::Errors::RateLimitError => e\n puts("A 429 status code was received; we should back off a bit.")\nrescue Dedalus::Errors::APIStatusError => e\n puts("Another non-200-range status code was received")\n puts(e.status)\nend\n```\n\nError codes are as follows:\n\n| Cause | Error Type |\n| ---------------- | -------------------------- |\n| HTTP 400 | `BadRequestError` |\n| HTTP 401 | `AuthenticationError` |\n| HTTP 403 | `PermissionDeniedError` |\n| HTTP 404 | `NotFoundError` |\n| HTTP 409 | `ConflictError` |\n| HTTP 422 | `UnprocessableEntityError` |\n| HTTP 429 | `RateLimitError` |\n| HTTP >= 500 | `InternalServerError` |\n| Other HTTP error | `APIStatusError` |\n| Timeout | `APITimeoutError` |\n| Network error | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\n\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.\n\nYou can use the `max_retries` option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\ndedalus = Dedalus::Client.new(\n max_retries: 0 # default is 2\n)\n\n# Or, configure per-request:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1, request_options: {max_retries: 5})\n```\n\n### Timeouts\n\nBy default, requests will time out after 60 seconds. You can use the timeout option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\ndedalus = Dedalus::Client.new(\n timeout: nil # default is 60\n)\n\n# Or, configure per-request:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1, request_options: {timeout: 5})\n```\n\nOn timeout, `Dedalus::Errors::APITimeoutError` is raised.\n\nNote that requests that time out are retried by default.\n\n## Advanced concepts\n\n### BaseModel\n\nAll parameter and response objects inherit from `Dedalus::Internal::Type::BaseModel`, which provides several conveniences, including:\n\n1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.\n\n2. Structural equivalence for equality; if two API calls return the same values, comparing the responses with == will return true.\n\n3. Both instances and the classes themselves can be pretty-printed.\n\n4. Helpers such as `#to_h`, `#deep_to_h`, `#to_json`, and `#to_yaml`.\n\n### Making custom or undocumented requests\n\n#### Undocumented properties\n\nYou can send undocumented parameters to any endpoint, and read undocumented response properties, like so:\n\nNote: the `extra_` parameters of the same name overrides the documented parameters.\n\n```ruby\nmachine =\n dedalus.machines.create(\n memory_mib: 2048,\n storage_gib: 10,\n vcpu: 1,\n request_options: {\n extra_query: {my_query_parameter: value},\n extra_body: {my_body_parameter: value},\n extra_headers: {"my-header": value}\n }\n )\n\nputs(machine[:my_undocumented_property])\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:\n\n```ruby\nresponse = client.request(\n method: :post,\n path: \'/undocumented/endpoint\',\n query: {"dog": "woof"},\n headers: {"useful-header": "interesting-value"},\n body: {"hello": "world"}\n)\n```\n\n### Concurrency & connection pooling\n\nThe `Dedalus::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.\n\nEach instance of `Dedalus::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.\n\nWhen all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.\n\nUnless otherwise specified, other classes in the SDK do not have locks protecting their underlying data structure.\n\n## Sorbet\n\nThis library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.\n\nYou can provide typesafe request parameters like so:\n\n```ruby\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n```\n\nOr, equivalently:\n\n```ruby\n# Hashes work, but are not typesafe:\ndedalus.machines.create(memory_mib: 2048, storage_gib: 10, vcpu: 1)\n\n# You can also splat a full Params class:\nparams = Dedalus::MachineCreateParams.new(memory_mib: 2048, storage_gib: 10, vcpu: 1)\ndedalus.machines.create(**params)\n```\n\n### Enums\n\nSince this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:\n\n```ruby\n# :http\nputs(Dedalus::Machines::PreviewCreateParams::Protocol::HTTP)\n\n# Revealed type: `T.all(Dedalus::Machines::PreviewCreateParams::Protocol, Symbol)`\nT.reveal_type(Dedalus::Machines::PreviewCreateParams::Protocol::HTTP)\n```\n\nEnum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:\n\n```ruby\n# Using the enum constants preserves the tagged type information:\ndedalus.machines.previews.create(\n protocol: Dedalus::Machines::PreviewCreateParams::Protocol::HTTP,\n # …\n)\n\n# Literal values are also permissible:\ndedalus.machines.previews.create(\n protocol: :http,\n # …\n)\n```\n\n## Versioning\n\nThis package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.\n\nThis package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.\n\n## Requirements\n\nRuby 3.2.0 or higher.\n\n## Contributing\n\nSee [the contributing documentation](https://github.com/dedalus-labs/dedalus-ruby/tree/main/CONTRIBUTING.md).\n', }, { language: 'terraform', From 57f24ae07c7acb0fb28b667dc267eb1c73aa205d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:56:10 +0000 Subject: [PATCH 08/16] chore: update SDK settings --- .stats.yml | 4 ++-- packages/mcp-server/src/local-docs-search.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index b3016f2..dba28b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-612bc4e434529d5007d868e94cb7951ad9b13d2c6751b21dbe03f66fecae071c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-1146618a914ccbc1ea9f140f6cfcd2afb2e6a4d76a893f08544cdc97ac9675ad.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: cce16da42a2fc50117c5b029105bfed4 +config_hash: b0eb655326acff151a95e2ea086d31d8 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 2f6acfb..867dada 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -2219,7 +2219,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'java', content: - '# Dedalus Java API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-java)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1)\n\n\nThe Dedalus Java SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1).\n\n## Installation\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-java\n 0.0.1\n\n~~~\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nMachine machine = client.machines().create(params);\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\n\nDedalusClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.async().machines().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.dedalus.api.client.DedalusClientAsync;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClientAsync client = DedalusOkHttpClientAsync.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.machines().create(params);\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```java\nimport com.dedalus.api.core.http.StreamResponse;\nimport com.dedalus.api.models.machines.Machine;\n\ntry (StreamResponse streamResponse = client.machines().watchStreaming(params)) {\n streamResponse.stream().forEach(chunk -> {\n System.out.println(chunk);\n });\n System.out.println("No more chunks!");\n}\n```\n\nOr [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt) for asynchronous clients:\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.Optional;\n\nclient.async().machines().watchStreaming(params).subscribe(chunk -> {\n System.out.println(chunk);\n});\n\n// If you need to handle errors or completion of the stream\nclient.async().machines().watchStreaming(params).subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(Machine chunk) {\n System.out.println(chunk);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more chunks!");\n }\n }\n});\n\n// Or use futures\nclient.async().machines().watchStreaming(params)\n .subscribe(chunk -> {\n System.out.println(chunk);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more chunks!");\n }\n });\n```\n\nAsync streaming uses a dedicated per-client cached thread pool [`Executor`](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html) to stream without blocking the current thread. This default is suitable for most purposes.\n\nTo use a different `Executor`, configure the subscription using the `executor` parameter:\n\n```java\nimport java.util.concurrent.Executor;\nimport java.util.concurrent.Executors;\n\nExecutor executor = Executors.newFixedThreadPool(4);\nclient.async().machines().watchStreaming(params).subscribe(\n chunk -> System.out.println(chunk), executor\n);\n```\n\nOr configure the client globally using the `streamHandlerExecutor` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.util.concurrent.Executors;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .streamHandlerExecutor(Executors.newFixedThreadPool(4))\n .build();\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.dedalus.api.core.http.Headers;\nimport com.dedalus.api.core.http.HttpResponseFor;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nHttpResponseFor machine = client.machines().withRawResponse().create(params);\n\nint statusCode = machine.statusCode();\nHeaders headers = machine.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine parsedMachine = machine.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\n\n// Process as an Iterable\nfor (MachineListItem machine : page.autoPager()) {\n System.out.println(machine);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(machine -> System.out.println(machine));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPageAsync;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture pageFuture = client.async().machines().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(machine -> {\n System.out.println(machine);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(MachineListItem machine) {\n System.out.println(machine);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(machine -> {\n System.out.println(machine);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\nwhile (true) {\n for (MachineListItem machine : page.items()) {\n System.out.println(machine);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.LogLevel;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-java-core` is published with a [configuration file](dedalus-java-core/src/main/resources/META-INF/proguard/dedalus-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.http.ProxyAuthenticator;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-java`\n - Depends on and exposes the APIs of both `dedalus-java-core` and `dedalus-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Copy `dedalus-java-client-okhttp`\'s [`OkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Write a class that implements the [`HttpClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```java\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build();\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```java\nimport com.dedalus.api.core.JsonMissing;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.Map;\n\nMap additionalProperties = client.machines().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.dedalus.api.core.JsonField;\nimport java.util.Optional;\n\nJsonField field = client.machines().create(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dedalus-java/issues) with questions, bugs, or suggestions.\n', + '# Dedalus Java API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-java)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1)\n\n\nThe Dedalus Java SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-java/0.0.1).\n\n\n\n## Installation\n\n\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-java\n 0.0.1\n\n~~~\n\n\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nMachine machine = client.machines().create(params);\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\n\nDedalusClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClient client = DedalusOkHttpClient.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.async().machines().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.dedalus.api.client.DedalusClientAsync;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nDedalusClientAsync client = DedalusOkHttpClientAsync.fromEnv();\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nCompletableFuture machine = client.machines().create(params);\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```java\nimport com.dedalus.api.core.http.StreamResponse;\nimport com.dedalus.api.models.machines.Machine;\n\ntry (StreamResponse streamResponse = client.machines().watchStreaming(params)) {\n streamResponse.stream().forEach(chunk -> {\n System.out.println(chunk);\n });\n System.out.println("No more chunks!");\n}\n```\n\nOr [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt) for asynchronous clients:\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.Machine;\nimport java.util.Optional;\n\nclient.async().machines().watchStreaming(params).subscribe(chunk -> {\n System.out.println(chunk);\n});\n\n// If you need to handle errors or completion of the stream\nclient.async().machines().watchStreaming(params).subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(Machine chunk) {\n System.out.println(chunk);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more chunks!");\n }\n }\n});\n\n// Or use futures\nclient.async().machines().watchStreaming(params)\n .subscribe(chunk -> {\n System.out.println(chunk);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more chunks!");\n }\n });\n```\n\nAsync streaming uses a dedicated per-client cached thread pool [`Executor`](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html) to stream without blocking the current thread. This default is suitable for most purposes.\n\nTo use a different `Executor`, configure the subscription using the `executor` parameter:\n\n```java\nimport java.util.concurrent.Executor;\nimport java.util.concurrent.Executors;\n\nExecutor executor = Executors.newFixedThreadPool(4);\nclient.async().machines().watchStreaming(params).subscribe(\n chunk -> System.out.println(chunk), executor\n);\n```\n\nOr configure the client globally using the `streamHandlerExecutor` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.util.concurrent.Executors;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .streamHandlerExecutor(Executors.newFixedThreadPool(4))\n .build();\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.dedalus.api.core.http.Headers;\nimport com.dedalus.api.core.http.HttpResponseFor;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.Machine;\n\nCreateParams params = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build();\nHttpResponseFor machine = client.machines().withRawResponse().create(params);\n\nint statusCode = machine.statusCode();\nHeaders headers = machine.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine parsedMachine = machine.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\n\n// Process as an Iterable\nfor (MachineListItem machine : page.autoPager()) {\n System.out.println(machine);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(machine -> System.out.println(machine));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.dedalus.api.core.http.AsyncStreamResponse;\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPageAsync;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture pageFuture = client.async().machines().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(machine -> {\n System.out.println(machine);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(MachineListItem machine) {\n System.out.println(machine);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(machine -> {\n System.out.println(machine);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.dedalus.api.models.machines.MachineListItem;\nimport com.dedalus.api.models.machines.MachineListPage;\n\nMachineListPage page = client.machines().list();\nwhile (true) {\n for (MachineListItem machine : page.items()) {\n System.out.println(machine);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.LogLevel;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-java-core` is published with a [configuration file](dedalus-java-core/src/main/resources/META-INF/proguard/dedalus-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport com.dedalus.api.core.http.ProxyAuthenticator;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\nimport java.time.Duration;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-java`\n - Depends on and exposes the APIs of both `dedalus-java-core` and `dedalus-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Copy `dedalus-java-client-okhttp`\'s [`OkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-java` dependency](#installation) with `dedalus-java-core`\n2. Write a class that implements the [`HttpClient`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-java-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-java-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```java\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build();\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-java-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```java\nimport com.dedalus.api.core.JsonMissing;\nimport com.dedalus.api.models.machines.CreateParams;\nimport com.dedalus.api.models.machines.MachineCreateParams;\n\nMachineCreateParams params = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.dedalus.api.core.JsonValue;\nimport java.util.Map;\n\nMap additionalProperties = client.machines().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.dedalus.api.core.JsonField;\nimport java.util.Optional;\n\nJsonField field = client.machines().create(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-java-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.dedalus.api.models.machines.Machine;\n\nMachine machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.dedalus.api.client.DedalusClient;\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient;\n\nDedalusClient client = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/dedalus-labs/dedalus-java/issues) with questions, bugs, or suggestions.\n', }, { language: 'kotlin', From d8273e83c4494fbab6407584929adfa4c28b0cce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:56:38 +0000 Subject: [PATCH 09/16] chore: update SDK settings --- .stats.yml | 4 ++-- packages/mcp-server/src/local-docs-search.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index dba28b8..f978da4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-1146618a914ccbc1ea9f140f6cfcd2afb2e6a4d76a893f08544cdc97ac9675ad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-5d397081e492cd0e3832b7065574c06c90a67312c1c4caed119aa6c7c53c4d28.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: b0eb655326acff151a95e2ea086d31d8 +config_hash: f3b61260a0c9a88977fb5fc3b355047b diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 867dada..bbe0a4c 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -2224,7 +2224,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'kotlin', content: - '# Dedalus Kotlin API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-kotlin)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-kotlin/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-kotlin/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1)\n\n\nThe Dedalus Kotlin SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Kotlin.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1).\n\n## Installation\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-kotlin:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-kotlin\n 0.0.1\n\n~~~\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n```\n\nOr manually:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build()\n```\n\nOr using a combination of the two approaches:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build()\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\n\nval clientWithOptions: DedalusClient = client.withOptions {\n it.baseUrl("https://example.com")\n it.maxRetries(42)\n}\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Kotlin class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.async().machines().create(params)\n```\n\nOr create an asynchronous client from the beginning:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClientAsync\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClientAsync = DedalusOkHttpClientAsync.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods are [suspending](https://kotlinlang.org/docs/coroutines-guide.html).\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```kotlin\nclient.machines().watchStreaming(params).use { response ->\n response.asSequence().forEach { println(it) }\n println("No more chunks!")\n}\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Kotlin classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```kotlin\nimport com.dedalus.api.core.http.Headers\nimport com.dedalus.api.core.http.HttpResponseFor\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: HttpResponseFor = client.machines().withRawResponse().create(params)\n\nval statusCode: Int = machine.statusCode()\nval headers: Headers = machine.headers()\n```\n\nYou can still deserialize the response into an instance of a Kotlin class if needed:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval parsedMachine: Machine = machine.parse()\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns a [`Sequence`](https://kotlinlang.org/docs/sequences.html)\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\nWhen using the asynchronous client, the method returns a [`Flow`](https://kotlinlang.org/docs/flow.html):\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPageAsync\n\nval page: MachineListPageAsync = client.async().machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListItem\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\nwhile (true) {\n for (machine in page.items()) {\n println(machine)\n }\n\n if (!page.hasNextPage()) {\n break\n }\n\n page = page.nextPage()\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.LogLevel\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build()\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-kotlin-core` is published with a [configuration file](dedalus-kotlin-core/src/main/resources/META-INF/proguard/dedalus-kotlin-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build()\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build()\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.net.InetSocketAddress\nimport java.net.Proxy\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(Proxy(\n Proxy.Type.HTTP, InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build()\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.http.ProxyAuthenticator\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build()\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build()\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build()\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-kotlin-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-kotlin-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-kotlin`\n - Depends on and exposes the APIs of both `dedalus-kotlin-core` and `dedalus-kotlin-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Copy `dedalus-kotlin-client-okhttp`\'s [`OkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Write a class that implements the [`HttpClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build()\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```kotlin\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build()\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\n\n// Create primitive JSON values\nval nullValue: JsonValue = JsonValue.from(null)\nval booleanValue: JsonValue = JsonValue.from(true)\nval numberValue: JsonValue = JsonValue.from(42)\nval stringValue: JsonValue = JsonValue.from("Hello World!")\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nval arrayValue: JsonValue = JsonValue.from(listOf(\n "Hello", "World"\n))\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nval objectValue: JsonValue = JsonValue.from(mapOf(\n "a" to 1, "b" to 2\n))\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nval complexValue: JsonValue = JsonValue.from(mapOf(\n "a" to listOf(\n 1, 2\n ), "b" to listOf(\n 3, 4\n )\n))\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```kotlin\nimport com.dedalus.api.core.JsonMissing\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build()\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonBoolean\nimport com.dedalus.api.core.JsonNull\nimport com.dedalus.api.core.JsonNumber\nimport com.dedalus.api.core.JsonValue\n\nval additionalProperties: Map = client.machines().create(params)._additionalProperties()\nval secretPropertyValue: JsonValue = additionalProperties.get("secretProperty")\n\nval result = when (secretPropertyValue) {\n is JsonNull -> "It\'s null!"\n is JsonBoolean -> "It\'s a boolean!"\n is JsonNumber -> "It\'s a number!"\n // Other types include `JsonMissing`, `JsonString`, `JsonArray`, and `JsonObject`\n else -> "It\'s something else!"\n}\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```kotlin\nimport com.dedalus.api.core.JsonField\n\nval field: JsonField = client.machines().create(params)._field()\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n val jsonString: String? = field.asString();\n\n // Try to deserialize into a custom type\n val myObject: MyClass = field.asUnknown()!!.convert(MyClass::class.java)\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(params).validate()\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build()\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nKotlin `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dedalus-kotlin/issues) with questions, bugs, or suggestions.\n', + '# Dedalus Kotlin API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dedalus.api/dedalus-kotlin)](https://central.sonatype.com/artifact/com.dedalus.api/dedalus-kotlin/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.dedalus.api/dedalus-kotlin/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1)\n\n\nThe Dedalus Kotlin SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in Kotlin.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Dedalus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=dedalus-mcp&config=eyJuYW1lIjoiZGVkYWx1cy1tY3AiLCJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9kZWRhbHVzLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtYXBpLWtleSI6Ik15IFggQVBJIEtleSIsIngtZGVkYWx1cy1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dedalus-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdedalus.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20X%20API%20Key%22%2C%22x-dedalus-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n\n\nThe REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.dedalus.api/dedalus-kotlin/0.0.1).\n\n\n\n## Installation\n\n\n\n### Gradle\n\n~~~kotlin\nimplementation("com.dedalus.api:dedalus-kotlin:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.dedalus.api\n dedalus-kotlin\n 0.0.1\n\n~~~\n\n\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n```\n\nOr manually:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .apiKey("My API Key")\n .build()\n```\n\nOr using a combination of the two approaches:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n // Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n // Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build()\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| -------------- | ----------------- | -------------------- | -------- | ------------------------------ |\n| `apiKey` | `dedalus.apiKey` | `DEDALUS_API_KEY` | false | - |\n| `xApiKey` | `dedalus.xApiKey` | `DEDALUS_X_API_KEY` | false | - |\n| `dedalusOrgId` | `dedalus.orgId` | `DEDALUS_ORG_ID` | false | - |\n| `baseUrl` | `dedalus.baseUrl` | `DEDALUS_BASE_URL` | true | `"https://dcs.dedaluslabs.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\n\nval clientWithOptions: DedalusClient = client.withOptions {\n it.baseUrl("https://example.com")\n it.maxRetries(42)\n}\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Dedalus API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Kotlin class.\n\nFor example, `client.machines().create(...)` should be called with an instance of `MachineCreateParams`, and it will return an instance of `Machine`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClient = DedalusOkHttpClient.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.async().machines().create(params)\n```\n\nOr create an asynchronous client from the beginning:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClientAsync\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClientAsync\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\n// Configures using the `dedalus.apiKey`, `dedalus.xApiKey`, `dedalus.orgId` and `dedalus.baseUrl` system properties\n// Or configures using the `DEDALUS_API_KEY`, `DEDALUS_X_API_KEY`, `DEDALUS_ORG_ID` and `DEDALUS_BASE_URL` environment variables\nval client: DedalusClientAsync = DedalusOkHttpClientAsync.fromEnv()\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: Machine = client.machines().create(params)\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods are [suspending](https://kotlinlang.org/docs/coroutines-guide.html).\n\n## Streaming\n\nThe SDK defines methods that return response "chunk" streams, where each chunk can be individually processed as soon as it arrives instead of waiting on the full response. Streaming methods generally correspond to [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) or [JSONL](https://jsonlines.org) responses.\n\nSome of these methods may have streaming and non-streaming variants, but a streaming method will always have a `Streaming` suffix in its name, even if it doesn\'t have a non-streaming variant.\n\nThese streaming methods return [`StreamResponse`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/StreamResponse.kt) for synchronous clients:\n\n```kotlin\nclient.machines().watchStreaming(params).use { response ->\n response.asSequence().forEach { println(it) }\n println("No more chunks!")\n}\n```\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Kotlin classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```kotlin\nimport com.dedalus.api.core.http.Headers\nimport com.dedalus.api.core.http.HttpResponseFor\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.Machine\n\nval params: CreateParams = CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build()\nval machine: HttpResponseFor = client.machines().withRawResponse().create(params)\n\nval statusCode: Int = machine.statusCode()\nval headers: Headers = machine.headers()\n```\n\nYou can still deserialize the response into an instance of a Kotlin class if needed:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval parsedMachine: Machine = machine.parse()\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`DedalusServiceException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/UnexpectedStatusCodeException.kt) |\n\n [`SseException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/SseException.kt) is thrown for errors encountered during [SSE streaming](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) after a successful initial HTTP response.\n\n- [`DedalusIoException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusIoException.kt): I/O networking errors.\n\n- [`DedalusRetryableException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`DedalusException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns a [`Sequence`](https://kotlinlang.org/docs/sequences.html)\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\nWhen using the asynchronous client, the method returns a [`Flow`](https://kotlinlang.org/docs/flow.html):\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListPageAsync\n\nval page: MachineListPageAsync = client.async().machines().list()\npage.autoPager()\n .take(50)\n .forEach { machine -> println(machine) }\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```kotlin\nimport com.dedalus.api.models.machines.MachineListItem\nimport com.dedalus.api.models.machines.MachineListPage\n\nval page: MachineListPage = client.machines().list()\nwhile (true) {\n for (machine in page.items()) {\n println(machine)\n }\n\n if (!page.hasNextPage()) {\n break\n }\n\n page = page.nextPage()\n}\n```\n\n## Logging\n\nEnable logging by setting the `DEDALUS_LOG` environment variable to `info`:\n\n```sh\nexport DEDALUS_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport DEDALUS_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.LogLevel\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build()\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `dedalus-kotlin-core` is published with a [configuration file](dedalus-kotlin-core/src/main/resources/META-INF/proguard/dedalus-kotlin-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build()\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build()\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.net.InetSocketAddress\nimport java.net.Proxy\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(Proxy(\n Proxy.Type.HTTP, InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build()\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport com.dedalus.api.core.http.ProxyAuthenticator\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build()\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\nimport java.time.Duration\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build()\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build()\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `dedalus-kotlin-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClient.kt), [`DedalusClientAsync`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsync.kt), [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt), and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), all of which can work with any HTTP client\n- `dedalus-kotlin-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) and [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), which provide a way to construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) and [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), respectively, using OkHttp\n- `dedalus-kotlin`\n - Depends on and exposes the APIs of both `dedalus-kotlin-core` and `dedalus-kotlin-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Copy `dedalus-kotlin-client-okhttp`\'s [`OkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`dedalus-kotlin` dependency](#installation) with `dedalus-kotlin-core`\n2. Write a class that implements the [`HttpClient`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/http/HttpClient.kt) interface\n3. Construct [`DedalusClientImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientImpl.kt) or [`DedalusClientAsyncImpl`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/client/DedalusClientAsyncImpl.kt), similarly to [`DedalusOkHttpClient`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClient.kt) or [`DedalusOkHttpClientAsync`](dedalus-kotlin-client-okhttp/src/main/kotlin/com/dedalus/api/client/okhttp/DedalusOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build()\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) object to its setter:\n\n```kotlin\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .build()\n```\n\nThe most straightforward way to create a [`JsonValue`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt) is using its `from(...)` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonValue\n\n// Create primitive JSON values\nval nullValue: JsonValue = JsonValue.from(null)\nval booleanValue: JsonValue = JsonValue.from(true)\nval numberValue: JsonValue = JsonValue.from(42)\nval stringValue: JsonValue = JsonValue.from("Hello World!")\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nval arrayValue: JsonValue = JsonValue.from(listOf(\n "Hello", "World"\n))\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nval objectValue: JsonValue = JsonValue.from(mapOf(\n "a" to 1, "b" to 2\n))\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nval complexValue: JsonValue = JsonValue.from(mapOf(\n "a" to listOf(\n 1, 2\n ), "b" to listOf(\n 3, 4\n )\n))\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/core/Values.kt):\n\n```kotlin\nimport com.dedalus.api.core.JsonMissing\nimport com.dedalus.api.models.machines.CreateParams\nimport com.dedalus.api.models.machines.MachineCreateParams\n\nval params: MachineCreateParams = MachineCreateParams.builder()\n .createParams(CreateParams.builder()\n .memoryMiB(0L)\n .storageGiB(0L)\n .vcpu(0.0)\n .build())\n .memoryMiB(JsonMissing.of())\n .build()\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```kotlin\nimport com.dedalus.api.core.JsonBoolean\nimport com.dedalus.api.core.JsonNull\nimport com.dedalus.api.core.JsonNumber\nimport com.dedalus.api.core.JsonValue\n\nval additionalProperties: Map = client.machines().create(params)._additionalProperties()\nval secretPropertyValue: JsonValue = additionalProperties.get("secretProperty")\n\nval result = when (secretPropertyValue) {\n is JsonNull -> "It\'s null!"\n is JsonBoolean -> "It\'s a boolean!"\n is JsonNumber -> "It\'s a number!"\n // Other types include `JsonMissing`, `JsonString`, `JsonArray`, and `JsonObject`\n else -> "It\'s something else!"\n}\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```kotlin\nimport com.dedalus.api.core.JsonField\n\nval field: JsonField = client.machines().create(params)._field()\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n val jsonString: String? = field.asString();\n\n // Try to deserialize into a custom type\n val myObject: MyClass = field.asUnknown()!!.convert(MyClass::class.java)\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`DedalusInvalidDataException`](dedalus-kotlin-core/src/main/kotlin/com/dedalus/api/errors/DedalusInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(params).validate()\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```kotlin\nimport com.dedalus.api.models.machines.Machine\n\nval machine: Machine = client.machines().create(\n params, RequestOptions.builder().responseValidation(true).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.dedalus.api.client.DedalusClient\nimport com.dedalus.api.client.okhttp.DedalusOkHttpClient\n\nval client: DedalusClient = DedalusOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build()\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nKotlin `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/dedalus-labs/dedalus-kotlin/issues) with questions, bugs, or suggestions.\n', }, { language: 'php', From b84a9d911a60f81d25ee69f4dabb5c46f3ce45a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:57:07 +0000 Subject: [PATCH 10/16] chore: update SDK settings --- .stats.yml | 4 ++-- packages/mcp-server/src/local-docs-search.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index f978da4..0d2495a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-5d397081e492cd0e3832b7065574c06c90a67312c1c4caed119aa6c7c53c4d28.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-2dccfe89b18a8eeb1379dc7286bb65448973493b17fc1cc2af1f08ba674c216a.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: f3b61260a0c9a88977fb5fc3b355047b +config_hash: ca162ca77845038c30f4074f237ae257 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index bbe0a4c..725c828 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -2229,7 +2229,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'php', content: - '# Dedalus PHP API Library\n\nThe Dedalus PHP library provides convenient access to the Dedalus REST API from any PHP 8.1.0+ application.\n\n## Installation\n\nTo use this package, install via Composer by adding the following to your application\'s `composer.json`:\n\n```json\n{\n "repositories": [\n {\n "type": "vcs",\n "url": "git@github.com:stainless-sdks/dedalus-php.git"\n }\n ],\n "require": {\n "org-placeholder/dedalus": "dev-main"\n }\n}\n```\n\n## Usage\n\n```php\nmachines->create(memoryMiB: 2048, storageGiB: 10, vcpu: 1);\n\nvar_dump($machine->machine_id);\n```', + '# Dedalus PHP API Library\n\nThe Dedalus PHP library provides convenient access to the Dedalus REST API from any PHP 8.1.0+ application.\n\n## Installation\n\nTo use this package, install via Composer by adding the following to your application\'s `composer.json`:\n\n\n```json\n{\n "repositories": [\n {\n "type": "vcs",\n "url": "git@github.com:dedalus-labs/dedalus-php.git"\n }\n ],\n "require": {\n "org-placeholder/dedalus": "dev-main"\n }\n}\n```\n\n\n## Usage\n\n```php\nmachines->create(memoryMiB: 2048, storageGiB: 10, vcpu: 1);\n\nvar_dump($machine->machine_id);\n```', }, { language: 'python', From 66989d7653c0e287fc849986884fd4cd3f60ddf3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:57:33 +0000 Subject: [PATCH 11/16] chore: update SDK settings --- .stats.yml | 4 ++-- packages/mcp-server/src/local-docs-search.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0d2495a..97d2606 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-2dccfe89b18a8eeb1379dc7286bb65448973493b17fc1cc2af1f08ba674c216a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-918ae3967dc06a6b31d32b88cf02e77784d8234c1a9baf78763de249b7f8928a.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: ca162ca77845038c30f4074f237ae257 +config_hash: 9cc9389d5c9a7e611f3544ede6b6263a diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 725c828..8a60796 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -2209,7 +2209,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'csharp', content: - '# Dedalus C# API Library\n\nThe Dedalus C# SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in C#.\n\n## Installation\n\n```bash\ngit clone git@github.com:stainless-sdks/dedalus-csharp.git\ndotnet add reference dedalus-csharp/src/Dedalus\n```\n\n## Requirements\n\nThis library requires .NET Standard 2.0 or later.\n\n## Usage\n\nSee the [`examples`](examples) directory for complete and runnable examples.\n\n```csharp\nDedalusClient client = new();\n\nMachineCreateParams parameters = new()\n{\n MemoryMiB = 2048,\n StorageGiB = 10,\n Vcpu = 1,\n};\n\nvar machine = await client.Machines.Create(parameters);\n\nConsole.WriteLine(machine);\n```', + '# Dedalus C# API Library\n\nThe Dedalus C# SDK provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from applications written in C#.\n\n## Installation\n\n```bash\ngit clone git@github.com:dedalus-labs/dedalus-csharp.git\ndotnet add reference dedalus-csharp/src/Dedalus\n```\n\n## Requirements\n\nThis library requires .NET Standard 2.0 or later.\n\n## Usage\n\nSee the [`examples`](examples) directory for complete and runnable examples.\n\n```csharp\nDedalusClient client = new();\n\nMachineCreateParams parameters = new()\n{\n MemoryMiB = 2048,\n StorageGiB = 10,\n Vcpu = 1,\n};\n\nvar machine = await client.Machines.Create(parameters);\n\nConsole.WriteLine(machine);\n```', }, { language: 'go', From 9aa47165181f114ccf774bf9679f1c7f11340a32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 19:34:32 +0000 Subject: [PATCH 12/16] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 97d2606..dcb3502 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-918ae3967dc06a6b31d32b88cf02e77784d8234c1a9baf78763de249b7f8928a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-32ccb3c17674e0ee68fd6eafbdd0f210bccfd09fce0702e28b8278e06678deec.yml openapi_spec_hash: ccb02923079d91569a17162c88da590b -config_hash: 9cc9389d5c9a7e611f3544ede6b6263a +config_hash: 3b16603a18779d453842a0d56638384d From 72261254409c99fbb91ac8ae19b0220f2aaffbff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 20:23:30 +0000 Subject: [PATCH 13/16] chore(tests): remove redundant File import --- tests/uploads.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/uploads.test.ts b/tests/uploads.test.ts index 79fc2b4..7b3b4f7 100644 --- a/tests/uploads.test.ts +++ b/tests/uploads.test.ts @@ -1,7 +1,6 @@ import fs from 'fs'; import type { ResponseLike } from 'dedalus/internal/to-file'; import { toFile } from 'dedalus/core/uploads'; -import { File } from 'node:buffer'; class MyClass { name: string = 'foo'; From 6e1859c8b2debbae5427c282744e706e8c02dd7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 21:19:11 +0000 Subject: [PATCH 14/16] fix(typescript): upgrade tsc-multi so that it works with Node 26 --- package.json | 2 +- packages/mcp-server/package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index dc3d11b..88a87b3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/ws": "^8.5.13", "ts-jest": "^29.1.0", "ts-node": "^10.5.0", - "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz", + "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz", "tsconfig-paths": "^4.0.0", "tslib": "^2.8.1", "typescript": "5.8.3", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 2aabcee..4136e83 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -73,7 +73,7 @@ "ts-jest": "^29.1.0", "ts-morph": "^19.0.0", "ts-node": "^10.5.0", - "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz", + "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz", "tsconfig-paths": "^4.0.0" }, "imports": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b0d3b7b..0580613 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,8 +59,8 @@ importers: specifier: ^10.5.0 version: 10.7.0(@swc/core@1.4.16)(@types/node@20.19.11)(typescript@5.8.3) tsc-multi: - specifier: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz - version: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz(typescript@5.8.3) + specifier: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz + version: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz(typescript@5.8.3) tsconfig-paths: specifier: ^4.0.0 version: 4.2.0 @@ -198,8 +198,8 @@ importers: specifier: ^10.5.0 version: 10.7.0(@swc/core@1.4.16)(@types/node@22.19.1)(typescript@5.8.3) tsc-multi: - specifier: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz - version: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz(typescript@5.8.3) + specifier: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz + version: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz(typescript@5.8.3) tsconfig-paths: specifier: ^4.0.0 version: 4.2.0 @@ -4356,13 +4356,13 @@ packages: '@swc/wasm': optional: true - tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz: + tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz: resolution: { - integrity: sha512-tWyCXnx0WqCkVlo5s+4KMj7HC0/0YrCZY0PustUwX9F2lNwd8Kp07q/Q56uGvV9q80XaSDrhy0YqBmrX5TDNpQ==, - tarball: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz, + integrity: sha512-LrjLRdfDnJ6UcZPSsxxY8QDnZmS3ZpPyvzgjUlNMjjRoTAUVqeL+IWrIzEU3Z+CwVrpVI97PePRLenEfCtR/UQ==, + tarball: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz, } - version: 1.1.9 + version: 1.1.11 engines: { node: '>=14' } hasBin: true peerDependencies: @@ -7630,7 +7630,7 @@ snapshots: optionalDependencies: '@swc/core': 1.4.16 - tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz(typescript@5.8.3): + tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz(typescript@5.8.3): dependencies: debug: 4.4.1 fast-glob: 3.3.2 From aaa71fa0a6d605ae2df82dcd214f48791f759e7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:47:25 +0000 Subject: [PATCH 15/16] fix(client): send content-type header for requests with an omitted optional body --- src/client.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 7743390..1e7ba70 100644 --- a/src/client.ts +++ b/src/client.ts @@ -775,11 +775,19 @@ export class Dedalus { return () => controller.abort(); } - private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { + private buildBody({ options }: { options: FinalRequestOptions }): { bodyHeaders: HeadersLike; body: BodyInit | undefined; } { + const { body, headers: rawHeaders } = options; if (!body) { + // A resource method always passes a `body` key when its operation defines a + // request body, even if the caller omitted an optional body param. Keep the + // content-type for those, and only elide it for operations with no body at + // all (e.g. GET/DELETE). + if (body == null && 'body' in options) { + return this.#encoder({ body, headers: buildHeaders([rawHeaders]) }); + } return { bodyHeaders: undefined, body: undefined }; } const headers = buildHeaders([rawHeaders]); From 46f7a6f18c2631f2af3512437a4377ef23c002bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:47:57 +0000 Subject: [PATCH 16/16] release: 0.4.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 24 ++++++++++++++++++++++++ package.json | 2 +- packages/mcp-server/manifest.json | 2 +- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/server.ts | 2 +- src/version.ts | 2 +- 7 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2537c1f..218393f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.0" + ".": "0.4.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index de303f6..4e76536 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## 0.4.1 (2026-06-16) + +Full Changelog: [v0.4.0...v0.4.1](https://github.com/dedalus-labs/dedalus-typescript/compare/v0.4.0...v0.4.1) + +### Bug Fixes + +* **client:** send content-type header for requests with an omitted optional body ([aaa71fa](https://github.com/dedalus-labs/dedalus-typescript/commit/aaa71fa0a6d605ae2df82dcd214f48791f759e7a)) +* **typescript:** upgrade tsc-multi so that it works with Node 26 ([6e1859c](https://github.com/dedalus-labs/dedalus-typescript/commit/6e1859c8b2debbae5427c282744e706e8c02dd7b)) + + +### Chores + +* configure new SDK language ([6b68956](https://github.com/dedalus-labs/dedalus-typescript/commit/6b68956600107ed25ea17d5262d961d0164a9dd9)) +* configure new SDK language ([1d18b8d](https://github.com/dedalus-labs/dedalus-typescript/commit/1d18b8da20cc77e9bd527a3c3ea87a8a63d4470a)) +* configure new SDK language ([e3842ad](https://github.com/dedalus-labs/dedalus-typescript/commit/e3842adbbad581256df3849241e71ba57d8ec386)) +* configure new SDK language ([f89cb5d](https://github.com/dedalus-labs/dedalus-typescript/commit/f89cb5d8535b9ba6e650bdda0cd2a6d836d071b2)) +* configure new SDK language ([84cbe52](https://github.com/dedalus-labs/dedalus-typescript/commit/84cbe5246bf596d6ae65b8900bd71ea778d91f05)) +* **tests:** remove redundant File import ([7226125](https://github.com/dedalus-labs/dedalus-typescript/commit/72261254409c99fbb91ac8ae19b0220f2aaffbff)) +* update SDK settings ([66989d7](https://github.com/dedalus-labs/dedalus-typescript/commit/66989d7653c0e287fc849986884fd4cd3f60ddf3)) +* update SDK settings ([b84a9d9](https://github.com/dedalus-labs/dedalus-typescript/commit/b84a9d911a60f81d25ee69f4dabb5c46f3ce45a3)) +* update SDK settings ([d8273e8](https://github.com/dedalus-labs/dedalus-typescript/commit/d8273e83c4494fbab6407584929adfa4c28b0cce)) +* update SDK settings ([57f24ae](https://github.com/dedalus-labs/dedalus-typescript/commit/57f24ae07c7acb0fb28b667dc267eb1c73aa205d)) +* update SDK settings ([6ce506a](https://github.com/dedalus-labs/dedalus-typescript/commit/6ce506a7697e83c99ab5f6baf82d648c8500bdec)) + ## 0.4.0 (2026-05-12) Full Changelog: [v0.3.0...v0.4.0](https://github.com/dedalus-labs/dedalus-typescript/compare/v0.3.0...v0.4.0) diff --git a/package.json b/package.json index 88a87b3..3a2b7ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dedalus", - "version": "0.4.0", + "version": "0.4.1", "description": "The official TypeScript library for the Dedalus API", "author": "Dedalus ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index e60fd1e..f844680 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "dedalus-mcp", - "version": "0.4.0", + "version": "0.4.1", "description": "The official MCP Server for the Dedalus API", "author": { "name": "Dedalus", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 4136e83..8dd777b 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "dedalus-mcp", - "version": "0.4.0", + "version": "0.4.1", "description": "The official MCP Server for the Dedalus API", "author": "Dedalus ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 235b392..155c737 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -28,7 +28,7 @@ export const newMcpServer = async ({ new McpServer( { name: 'dedalus_api', - version: '0.4.0', + version: '0.4.1', }, { instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }), diff --git a/src/version.ts b/src/version.ts index 4e7f788..99a0031 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.4.0'; // x-release-please-version +export const VERSION = '0.4.1'; // x-release-please-version