Frank 4 месяцев назад
Родитель
Сommit
037e8d4555

+ 1 - 1
github/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 7 - 4
infra/console.ts

@@ -97,8 +97,12 @@ export const stripeWebhook = new stripe.WebhookEndpoint("StripeWebhookEndpoint",
   ],
 })
 
-const ZEN_MODELS1 = new sst.Secret("ZEN_MODELS1")
-const ZEN_MODELS2 = new sst.Secret("ZEN_MODELS2")
+const ZEN_MODELS = [
+  new sst.Secret("ZEN_MODELS1"),
+  new sst.Secret("ZEN_MODELS2"),
+  new sst.Secret("ZEN_MODELS3"),
+  new sst.Secret("ZEN_MODELS4"),
+]
 const STRIPE_SECRET_KEY = new sst.Secret("STRIPE_SECRET_KEY")
 const AUTH_API_URL = new sst.Linkable("AUTH_API_URL", {
   properties: { value: auth.url.apply((url) => url!) },
@@ -132,11 +136,10 @@ new sst.cloudflare.x.SolidStart("Console", {
     AUTH_API_URL,
     STRIPE_WEBHOOK_SECRET,
     STRIPE_SECRET_KEY,
-    ZEN_MODELS1,
-    ZEN_MODELS2,
     EMAILOCTOPUS_API_KEY,
     AWS_SES_ACCESS_KEY_ID,
     AWS_SES_SECRET_ACCESS_KEY,
+    ...ZEN_MODELS,
     ...($dev
       ? [
           new sst.Secret("CLOUDFLARE_DEFAULT_ACCOUNT_ID", process.env.CLOUDFLARE_DEFAULT_ACCOUNT_ID!),

+ 1 - 1
packages/console/app/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 10 - 9
packages/console/core/script/promote-models.ts

@@ -11,20 +11,21 @@ const root = path.resolve(process.cwd(), "..", "..", "..")
 
 // read the secret
 const ret = await $`bun sst secret list`.cwd(root).text()
-const value1 = ret
-  .split("\n")
-  .find((line) => line.startsWith("ZEN_MODELS1"))
-  ?.split("=")[1]
-const value2 = ret
-  .split("\n")
-  .find((line) => line.startsWith("ZEN_MODELS2"))
-  ?.split("=")[1]
+const lines = ret.split("\n")
+const value1 = lines.find((line) => line.startsWith("ZEN_MODELS1"))?.split("=")[1]
+const value2 = lines.find((line) => line.startsWith("ZEN_MODELS2"))?.split("=")[1]
+const value3 = lines.find((line) => line.startsWith("ZEN_MODELS3"))?.split("=")[1]
+const value4 = lines.find((line) => line.startsWith("ZEN_MODELS4"))?.split("=")[1]
 if (!value1) throw new Error("ZEN_MODELS1 not found")
 if (!value2) throw new Error("ZEN_MODELS2 not found")
+if (!value3) throw new Error("ZEN_MODELS3 not found")
+if (!value4) throw new Error("ZEN_MODELS4 not found")
 
 // validate value
-ZenData.validate(JSON.parse(value1 + value2))
+ZenData.validate(JSON.parse(value1 + value2 + value3 + value4))
 
 // update the secret
 await $`bun sst secret set ZEN_MODELS1 ${value1} --stage ${stage}`
 await $`bun sst secret set ZEN_MODELS2 ${value2} --stage ${stage}`
+await $`bun sst secret set ZEN_MODELS3 ${value3} --stage ${stage}`
+await $`bun sst secret set ZEN_MODELS4 ${value4} --stage ${stage}`

+ 17 - 12
packages/console/core/script/update-models.ts

@@ -9,21 +9,20 @@ const root = path.resolve(process.cwd(), "..", "..", "..")
 const models = await $`bun sst secret list`.cwd(root).text()
 
 // read the line starting with "ZEN_MODELS"
-const oldValue1 = models
-  .split("\n")
-  .find((line) => line.startsWith("ZEN_MODELS1"))
-  ?.split("=")[1]
-const oldValue2 = models
-  .split("\n")
-  .find((line) => line.startsWith("ZEN_MODELS2"))
-  ?.split("=")[1]
+const lines = models.split("\n")
+const oldValue1 = lines.find((line) => line.startsWith("ZEN_MODELS1"))?.split("=")[1]
+const oldValue2 = lines.find((line) => line.startsWith("ZEN_MODELS2"))?.split("=")[1]
+const oldValue3 = lines.find((line) => line.startsWith("ZEN_MODELS3"))?.split("=")[1]
+const oldValue4 = lines.find((line) => line.startsWith("ZEN_MODELS4"))?.split("=")[1]
 if (!oldValue1) throw new Error("ZEN_MODELS1 not found")
 if (!oldValue2) throw new Error("ZEN_MODELS2 not found")
+if (!oldValue3) throw new Error("ZEN_MODELS3 not found")
+if (!oldValue4) throw new Error("ZEN_MODELS4 not found")
 
 // store the prettified json to a temp file
 const filename = `models-${Date.now()}.json`
 const tempFile = Bun.file(path.join(os.tmpdir(), filename))
-await tempFile.write(JSON.stringify(JSON.parse(oldValue1 + oldValue2), null, 2))
+await tempFile.write(JSON.stringify(JSON.parse(oldValue1 + oldValue2 + oldValue3 + oldValue4), null, 2))
 console.log("tempFile", tempFile.name)
 
 // open temp file in vim and read the file on close
@@ -32,6 +31,12 @@ const newValue = JSON.stringify(JSON.parse(await tempFile.text()))
 ZenData.validate(JSON.parse(newValue))
 
 // update the secret
-const mid = Math.floor(newValue.length / 2)
-await $`bun sst secret set ZEN_MODELS1 ${newValue.slice(0, mid)}`
-await $`bun sst secret set ZEN_MODELS2 ${newValue.slice(mid)}`
+const chunk = Math.ceil(newValue.length / 4)
+const newValue1 = newValue.slice(0, chunk)
+const newValue2 = newValue.slice(chunk, chunk * 2)
+const newValue3 = newValue.slice(chunk * 2, chunk * 3)
+const newValue4 = newValue.slice(chunk * 3)
+await $`bun sst secret set ZEN_MODELS1 ${newValue1}`
+await $`bun sst secret set ZEN_MODELS2 ${newValue2}`
+await $`bun sst secret set ZEN_MODELS3 ${newValue3}`
+await $`bun sst secret set ZEN_MODELS4 ${newValue4}`

+ 3 - 1
packages/console/core/src/model.ts

@@ -53,7 +53,9 @@ export namespace ZenData {
   })
 
   export const list = fn(z.void(), () => {
-    const json = JSON.parse(Resource.ZEN_MODELS1.value + Resource.ZEN_MODELS2.value)
+    const json = JSON.parse(
+      Resource.ZEN_MODELS1.value + Resource.ZEN_MODELS2.value + Resource.ZEN_MODELS3.value + Resource.ZEN_MODELS4.value,
+    )
     return ModelsSchema.parse(json)
   })
 }

+ 104 - 96
packages/console/core/sst-env.d.ts

@@ -6,108 +6,116 @@
 import "sst"
 declare module "sst" {
   export interface Resource {
-    ADMIN_SECRET: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AUTH_API_URL: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    AWS_SES_ACCESS_KEY_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AWS_SES_SECRET_ACCESS_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_API_TOKEN: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_DEFAULT_ACCOUNT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    Console: {
-      type: "sst.cloudflare.SolidStart"
-      url: string
-    }
-    Database: {
-      database: string
-      host: string
-      password: string
-      port: number
-      type: "sst.sst.Linkable"
-      username: string
-    }
-    Desktop: {
-      type: "sst.cloudflare.StaticSite"
-      url: string
-    }
-    EMAILOCTOPUS_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_PRIVATE_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_ID_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_SECRET_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GOOGLE_CLIENT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    HONEYCOMB_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_SECRET_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_WEBHOOK_SECRET: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    Web: {
-      type: "sst.cloudflare.Astro"
-      url: string
-    }
-    ZEN_MODELS1: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    ZEN_MODELS2: {
-      type: "sst.sst.Secret"
-      value: string
+    "ADMIN_SECRET": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AUTH_API_URL": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "AWS_SES_ACCESS_KEY_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AWS_SES_SECRET_ACCESS_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_API_TOKEN": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_DEFAULT_ACCOUNT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "Console": {
+      "type": "sst.cloudflare.SolidStart"
+      "url": string
+    }
+    "Database": {
+      "database": string
+      "host": string
+      "password": string
+      "port": number
+      "type": "sst.sst.Linkable"
+      "username": string
+    }
+    "Desktop": {
+      "type": "sst.cloudflare.StaticSite"
+      "url": string
+    }
+    "EMAILOCTOPUS_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_PRIVATE_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_ID_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_SECRET_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GOOGLE_CLIENT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "HONEYCOMB_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_SECRET_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_WEBHOOK_SECRET": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "Web": {
+      "type": "sst.cloudflare.Astro"
+      "url": string
+    }
+    "ZEN_MODELS1": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS2": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS3": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS4": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
   }
 }
-// cloudflare
-import * as cloudflare from "@cloudflare/workers-types"
+// cloudflare 
+import * as cloudflare from "@cloudflare/workers-types";
 declare module "sst" {
   export interface Resource {
-    Api: cloudflare.Service
-    AuthApi: cloudflare.Service
-    AuthStorage: cloudflare.KVNamespace
-    Bucket: cloudflare.R2Bucket
-    GatewayKv: cloudflare.KVNamespace
-    LogProcessor: cloudflare.Service
+    "Api": cloudflare.Service
+    "AuthApi": cloudflare.Service
+    "AuthStorage": cloudflare.KVNamespace
+    "Bucket": cloudflare.R2Bucket
+    "GatewayKv": cloudflare.KVNamespace
+    "LogProcessor": cloudflare.Service
   }
 }
 
 import "sst"
-export {}
+export {}

+ 104 - 96
packages/console/function/sst-env.d.ts

@@ -6,108 +6,116 @@
 import "sst"
 declare module "sst" {
   export interface Resource {
-    ADMIN_SECRET: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AUTH_API_URL: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    AWS_SES_ACCESS_KEY_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AWS_SES_SECRET_ACCESS_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_API_TOKEN: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_DEFAULT_ACCOUNT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    Console: {
-      type: "sst.cloudflare.SolidStart"
-      url: string
-    }
-    Database: {
-      database: string
-      host: string
-      password: string
-      port: number
-      type: "sst.sst.Linkable"
-      username: string
-    }
-    Desktop: {
-      type: "sst.cloudflare.StaticSite"
-      url: string
-    }
-    EMAILOCTOPUS_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_PRIVATE_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_ID_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_SECRET_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GOOGLE_CLIENT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    HONEYCOMB_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_SECRET_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_WEBHOOK_SECRET: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    Web: {
-      type: "sst.cloudflare.Astro"
-      url: string
-    }
-    ZEN_MODELS1: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    ZEN_MODELS2: {
-      type: "sst.sst.Secret"
-      value: string
+    "ADMIN_SECRET": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AUTH_API_URL": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "AWS_SES_ACCESS_KEY_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AWS_SES_SECRET_ACCESS_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_API_TOKEN": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_DEFAULT_ACCOUNT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "Console": {
+      "type": "sst.cloudflare.SolidStart"
+      "url": string
+    }
+    "Database": {
+      "database": string
+      "host": string
+      "password": string
+      "port": number
+      "type": "sst.sst.Linkable"
+      "username": string
+    }
+    "Desktop": {
+      "type": "sst.cloudflare.StaticSite"
+      "url": string
+    }
+    "EMAILOCTOPUS_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_PRIVATE_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_ID_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_SECRET_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GOOGLE_CLIENT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "HONEYCOMB_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_SECRET_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_WEBHOOK_SECRET": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "Web": {
+      "type": "sst.cloudflare.Astro"
+      "url": string
+    }
+    "ZEN_MODELS1": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS2": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS3": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS4": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
   }
 }
-// cloudflare
-import * as cloudflare from "@cloudflare/workers-types"
+// cloudflare 
+import * as cloudflare from "@cloudflare/workers-types";
 declare module "sst" {
   export interface Resource {
-    Api: cloudflare.Service
-    AuthApi: cloudflare.Service
-    AuthStorage: cloudflare.KVNamespace
-    Bucket: cloudflare.R2Bucket
-    GatewayKv: cloudflare.KVNamespace
-    LogProcessor: cloudflare.Service
+    "Api": cloudflare.Service
+    "AuthApi": cloudflare.Service
+    "AuthStorage": cloudflare.KVNamespace
+    "Bucket": cloudflare.R2Bucket
+    "GatewayKv": cloudflare.KVNamespace
+    "LogProcessor": cloudflare.Service
   }
 }
 
 import "sst"
-export {}
+export {}

+ 1 - 1
packages/console/mail/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 104 - 96
packages/console/resource/sst-env.d.ts

@@ -6,108 +6,116 @@
 import "sst"
 declare module "sst" {
   export interface Resource {
-    ADMIN_SECRET: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AUTH_API_URL: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    AWS_SES_ACCESS_KEY_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AWS_SES_SECRET_ACCESS_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_API_TOKEN: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_DEFAULT_ACCOUNT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    Console: {
-      type: "sst.cloudflare.SolidStart"
-      url: string
-    }
-    Database: {
-      database: string
-      host: string
-      password: string
-      port: number
-      type: "sst.sst.Linkable"
-      username: string
-    }
-    Desktop: {
-      type: "sst.cloudflare.StaticSite"
-      url: string
-    }
-    EMAILOCTOPUS_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_PRIVATE_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_ID_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_SECRET_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GOOGLE_CLIENT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    HONEYCOMB_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_SECRET_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_WEBHOOK_SECRET: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    Web: {
-      type: "sst.cloudflare.Astro"
-      url: string
-    }
-    ZEN_MODELS1: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    ZEN_MODELS2: {
-      type: "sst.sst.Secret"
-      value: string
+    "ADMIN_SECRET": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AUTH_API_URL": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "AWS_SES_ACCESS_KEY_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AWS_SES_SECRET_ACCESS_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_API_TOKEN": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_DEFAULT_ACCOUNT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "Console": {
+      "type": "sst.cloudflare.SolidStart"
+      "url": string
+    }
+    "Database": {
+      "database": string
+      "host": string
+      "password": string
+      "port": number
+      "type": "sst.sst.Linkable"
+      "username": string
+    }
+    "Desktop": {
+      "type": "sst.cloudflare.StaticSite"
+      "url": string
+    }
+    "EMAILOCTOPUS_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_PRIVATE_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_ID_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_SECRET_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GOOGLE_CLIENT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "HONEYCOMB_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_SECRET_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_WEBHOOK_SECRET": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "Web": {
+      "type": "sst.cloudflare.Astro"
+      "url": string
+    }
+    "ZEN_MODELS1": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS2": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS3": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS4": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
   }
 }
-// cloudflare
-import * as cloudflare from "@cloudflare/workers-types"
+// cloudflare 
+import * as cloudflare from "@cloudflare/workers-types";
 declare module "sst" {
   export interface Resource {
-    Api: cloudflare.Service
-    AuthApi: cloudflare.Service
-    AuthStorage: cloudflare.KVNamespace
-    Bucket: cloudflare.R2Bucket
-    GatewayKv: cloudflare.KVNamespace
-    LogProcessor: cloudflare.Service
+    "Api": cloudflare.Service
+    "AuthApi": cloudflare.Service
+    "AuthStorage": cloudflare.KVNamespace
+    "Bucket": cloudflare.R2Bucket
+    "GatewayKv": cloudflare.KVNamespace
+    "LogProcessor": cloudflare.Service
   }
 }
 
 import "sst"
-export {}
+export {}

+ 4 - 2
packages/desktop/src/sst-env.d.ts

@@ -2,7 +2,9 @@
 /* tslint:disable */
 /* eslint-disable */
 /// <reference types="vite/client" />
-interface ImportMetaEnv {}
+interface ImportMetaEnv {
+
+}
 interface ImportMeta {
   readonly env: ImportMetaEnv
-}
+}

+ 1 - 1
packages/desktop/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 104 - 96
packages/function/sst-env.d.ts

@@ -6,108 +6,116 @@
 import "sst"
 declare module "sst" {
   export interface Resource {
-    ADMIN_SECRET: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AUTH_API_URL: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    AWS_SES_ACCESS_KEY_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AWS_SES_SECRET_ACCESS_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_API_TOKEN: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    CLOUDFLARE_DEFAULT_ACCOUNT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    Console: {
-      type: "sst.cloudflare.SolidStart"
-      url: string
-    }
-    Database: {
-      database: string
-      host: string
-      password: string
-      port: number
-      type: "sst.sst.Linkable"
-      username: string
-    }
-    Desktop: {
-      type: "sst.cloudflare.StaticSite"
-      url: string
-    }
-    EMAILOCTOPUS_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_APP_PRIVATE_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_ID_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GITHUB_CLIENT_SECRET_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    GOOGLE_CLIENT_ID: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    HONEYCOMB_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_SECRET_KEY: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    STRIPE_WEBHOOK_SECRET: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    Web: {
-      type: "sst.cloudflare.Astro"
-      url: string
-    }
-    ZEN_MODELS1: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    ZEN_MODELS2: {
-      type: "sst.sst.Secret"
-      value: string
+    "ADMIN_SECRET": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AUTH_API_URL": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "AWS_SES_ACCESS_KEY_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AWS_SES_SECRET_ACCESS_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_API_TOKEN": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "CLOUDFLARE_DEFAULT_ACCOUNT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "Console": {
+      "type": "sst.cloudflare.SolidStart"
+      "url": string
+    }
+    "Database": {
+      "database": string
+      "host": string
+      "password": string
+      "port": number
+      "type": "sst.sst.Linkable"
+      "username": string
+    }
+    "Desktop": {
+      "type": "sst.cloudflare.StaticSite"
+      "url": string
+    }
+    "EMAILOCTOPUS_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_APP_PRIVATE_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_ID_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GITHUB_CLIENT_SECRET_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "GOOGLE_CLIENT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "HONEYCOMB_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_SECRET_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "STRIPE_WEBHOOK_SECRET": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "Web": {
+      "type": "sst.cloudflare.Astro"
+      "url": string
+    }
+    "ZEN_MODELS1": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS2": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS3": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "ZEN_MODELS4": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
   }
 }
-// cloudflare
-import * as cloudflare from "@cloudflare/workers-types"
+// cloudflare 
+import * as cloudflare from "@cloudflare/workers-types";
 declare module "sst" {
   export interface Resource {
-    Api: cloudflare.Service
-    AuthApi: cloudflare.Service
-    AuthStorage: cloudflare.KVNamespace
-    Bucket: cloudflare.R2Bucket
-    GatewayKv: cloudflare.KVNamespace
-    LogProcessor: cloudflare.Service
+    "Api": cloudflare.Service
+    "AuthApi": cloudflare.Service
+    "AuthStorage": cloudflare.KVNamespace
+    "Bucket": cloudflare.R2Bucket
+    "GatewayKv": cloudflare.KVNamespace
+    "LogProcessor": cloudflare.Service
   }
 }
 
 import "sst"
-export {}
+export {}

+ 1 - 1
packages/opencode/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 1 - 1
packages/plugin/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 1 - 1
packages/script/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 1 - 1
packages/sdk/js/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 6 - 0
packages/sdk/python/sst.pyi

@@ -90,4 +90,10 @@ class Resource:
     class ZEN_MODELS2:
         type: str
         value: str
+    class ZEN_MODELS3:
+        type: str
+        value: str
+    class ZEN_MODELS4:
+        type: str
+        value: str
 

+ 1 - 1
packages/slack/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 1 - 1
packages/ui/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 9 - 0
packages/util/sst-env.d.ts

@@ -0,0 +1,9 @@
+/* This file is auto-generated by SST. Do not edit. */
+/* tslint:disable */
+/* eslint-disable */
+/* deno-fmt-ignore-file */
+
+/// <reference path="../../sst-env.d.ts" />
+
+import "sst"
+export {}

+ 1 - 1
packages/web/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 1 - 1
sdks/vscode/sst-env.d.ts

@@ -6,4 +6,4 @@
 /// <reference path="../../sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}

+ 95 - 87
sst-env.d.ts

@@ -5,120 +5,128 @@
 
 declare module "sst" {
   export interface Resource {
-    ADMIN_SECRET: {
-      type: "sst.sst.Secret"
-      value: string
-    }
-    AUTH_API_URL: {
-      type: "sst.sst.Linkable"
-      value: string
-    }
-    AWS_SES_ACCESS_KEY_ID: {
-      type: "sst.sst.Secret"
-      value: string
+    "ADMIN_SECRET": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AUTH_API_URL": {
+      "type": "sst.sst.Linkable"
+      "value": string
+    }
+    "AWS_SES_ACCESS_KEY_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "AWS_SES_SECRET_ACCESS_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
+    }
+    "Api": {
+      "type": "sst.cloudflare.Worker"
+      "url": string
     }
-    AWS_SES_SECRET_ACCESS_KEY: {
-      type: "sst.sst.Secret"
-      value: string
+    "AuthApi": {
+      "type": "sst.cloudflare.Worker"
+      "url": string
     }
-    Api: {
-      type: "sst.cloudflare.Worker"
-      url: string
+    "AuthStorage": {
+      "namespaceId": string
+      "type": "sst.cloudflare.Kv"
     }
-    AuthApi: {
-      type: "sst.cloudflare.Worker"
-      url: string
+    "Bucket": {
+      "name": string
+      "type": "sst.cloudflare.Bucket"
     }
-    AuthStorage: {
-      namespaceId: string
-      type: "sst.cloudflare.Kv"
+    "CLOUDFLARE_API_TOKEN": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    Bucket: {
-      name: string
-      type: "sst.cloudflare.Bucket"
+    "CLOUDFLARE_DEFAULT_ACCOUNT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    CLOUDFLARE_API_TOKEN: {
-      type: "sst.sst.Secret"
-      value: string
+    "Console": {
+      "type": "sst.cloudflare.SolidStart"
+      "url": string
     }
-    CLOUDFLARE_DEFAULT_ACCOUNT_ID: {
-      type: "sst.sst.Secret"
-      value: string
+    "Database": {
+      "database": string
+      "host": string
+      "password": string
+      "port": number
+      "type": "sst.sst.Linkable"
+      "username": string
     }
-    Console: {
-      type: "sst.cloudflare.SolidStart"
-      url: string
+    "Desktop": {
+      "type": "sst.cloudflare.StaticSite"
+      "url": string
     }
-    Database: {
-      database: string
-      host: string
-      password: string
-      port: number
-      type: "sst.sst.Linkable"
-      username: string
+    "EMAILOCTOPUS_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    Desktop: {
-      type: "sst.cloudflare.StaticSite"
-      url: string
+    "GITHUB_APP_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    EMAILOCTOPUS_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
+    "GITHUB_APP_PRIVATE_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    GITHUB_APP_ID: {
-      type: "sst.sst.Secret"
-      value: string
+    "GITHUB_CLIENT_ID_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    GITHUB_APP_PRIVATE_KEY: {
-      type: "sst.sst.Secret"
-      value: string
+    "GITHUB_CLIENT_SECRET_CONSOLE": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    GITHUB_CLIENT_ID_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
+    "GOOGLE_CLIENT_ID": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    GITHUB_CLIENT_SECRET_CONSOLE: {
-      type: "sst.sst.Secret"
-      value: string
+    "GatewayKv": {
+      "namespaceId": string
+      "type": "sst.cloudflare.Kv"
     }
-    GOOGLE_CLIENT_ID: {
-      type: "sst.sst.Secret"
-      value: string
+    "HONEYCOMB_API_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    GatewayKv: {
-      namespaceId: string
-      type: "sst.cloudflare.Kv"
+    "LogProcessor": {
+      "type": "sst.cloudflare.Worker"
     }
-    HONEYCOMB_API_KEY: {
-      type: "sst.sst.Secret"
-      value: string
+    "STRIPE_SECRET_KEY": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    LogProcessor: {
-      type: "sst.cloudflare.Worker"
+    "STRIPE_WEBHOOK_SECRET": {
+      "type": "sst.sst.Linkable"
+      "value": string
     }
-    STRIPE_SECRET_KEY: {
-      type: "sst.sst.Secret"
-      value: string
+    "Web": {
+      "type": "sst.cloudflare.Astro"
+      "url": string
     }
-    STRIPE_WEBHOOK_SECRET: {
-      type: "sst.sst.Linkable"
-      value: string
+    "ZEN_MODELS1": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    Web: {
-      type: "sst.cloudflare.Astro"
-      url: string
+    "ZEN_MODELS2": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    ZEN_MODELS1: {
-      type: "sst.sst.Secret"
-      value: string
+    "ZEN_MODELS3": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
-    ZEN_MODELS2: {
-      type: "sst.sst.Secret"
-      value: string
+    "ZEN_MODELS4": {
+      "type": "sst.sst.Secret"
+      "value": string
     }
   }
 }
 /// <reference path="sst-env.d.ts" />
 
 import "sst"
-export {}
+export {}