GitHub Action 1 месяц назад
Родитель
Сommit
54588b4570
2 измененных файлов с 43 добавлено и 0 удалено
  1. 19 0
      packages/sdk/js/src/v2/gen/types.gen.ts
  2. 24 0
      packages/sdk/openapi.json

+ 19 - 0
packages/sdk/js/src/v2/gen/types.gen.ts

@@ -1151,6 +1151,24 @@ export type KeybindsConfig = {
   tips_toggle?: string
 }
 
+/**
+ * Server configuration for opencode serve and web commands
+ */
+export type ServerConfig = {
+  /**
+   * Port to listen on
+   */
+  port?: number
+  /**
+   * Hostname to listen on
+   */
+  hostname?: string
+  /**
+   * Enable mDNS service discovery
+   */
+  mdns?: boolean
+}
+
 export type AgentConfig = {
   model?: string
   temperature?: number
@@ -1410,6 +1428,7 @@ export type Config = {
      */
     diff_style?: "auto" | "stacked"
   }
+  server?: ServerConfig
   /**
    * Command configuration, see https://opencode.ai/docs/commands
    */

+ 24 - 0
packages/sdk/openapi.json

@@ -7687,6 +7687,27 @@
         },
         "additionalProperties": false
       },
+      "ServerConfig": {
+        "description": "Server configuration for opencode serve and web commands",
+        "type": "object",
+        "properties": {
+          "port": {
+            "description": "Port to listen on",
+            "type": "integer",
+            "exclusiveMinimum": 0,
+            "maximum": 9007199254740991
+          },
+          "hostname": {
+            "description": "Hostname to listen on",
+            "type": "string"
+          },
+          "mdns": {
+            "description": "Enable mDNS service discovery",
+            "type": "boolean"
+          }
+        },
+        "additionalProperties": false
+      },
       "AgentConfig": {
         "type": "object",
         "properties": {
@@ -8170,6 +8191,9 @@
               }
             }
           },
+          "server": {
+            "$ref": "#/components/schemas/ServerConfig"
+          },
           "command": {
             "description": "Command configuration, see https://opencode.ai/docs/commands",
             "type": "object",