Dax Raad 8 месяцев назад
Родитель
Сommit
9c6aa82ac1

+ 1 - 1
README.md

@@ -51,7 +51,7 @@ Project configuration is optional. You can place an `opencode.json` file in the
 
 ```json title="opencode.json"
 {
-  "$schema": "https://opencode.ai/schemas/opencode.json"
+  "$schema": "http://opencode.ai/config.json"
 }
 ```
 

+ 3 - 0
opencode.json

@@ -0,0 +1,3 @@
+{
+  "$schema": "http://opencode.ai/config.json"
+}

+ 19 - 6
packages/opencode/config.schema.json

@@ -1,6 +1,9 @@
 {
   "type": "object",
   "properties": {
+    "$schema": {
+      "type": "string"
+    },
     "provider": {
       "type": "object",
       "additionalProperties": {
@@ -69,7 +72,10 @@
                       "type": "number"
                     }
                   },
-                  "required": ["context", "output"],
+                  "required": [
+                    "context",
+                    "output"
+                  ],
                   "additionalProperties": false
                 },
                 "id": {
@@ -84,7 +90,9 @@
             "additionalProperties": {}
           }
         },
-        "required": ["models"],
+        "required": [
+          "models"
+        ],
         "additionalProperties": false
       }
     },
@@ -112,7 +120,10 @@
                 }
               }
             },
-            "required": ["type", "command"],
+            "required": [
+              "type",
+              "command"
+            ],
             "additionalProperties": false
           },
           {
@@ -126,7 +137,10 @@
                 "type": "string"
               }
             },
-            "required": ["type", "url"],
+            "required": [
+              "type",
+              "url"
+            ],
             "additionalProperties": false
           }
         ]
@@ -135,5 +149,4 @@
   },
   "additionalProperties": false,
   "$schema": "http://json-schema.org/draft-07/schema#"
-}
-
+}

+ 1 - 1
packages/opencode/script/publish.ts

@@ -111,7 +111,7 @@ if (!snapshot) {
         !lower.includes("chore:") &&
         !lower.includes("ci:") &&
         !lower.includes("docs:") &&
-        !lower.includes("doc:") &&
+        !lower.includes("doc:")
       )
     })
     .join("\n")

+ 1 - 0
packages/opencode/src/config/config.ts

@@ -50,6 +50,7 @@ export namespace Config {
 
   export const Info = z
     .object({
+      $schema: z.string().optional(),
       provider: z
         .record(
           ModelsDev.Provider.partial().extend({