zen: track session in usage

This commit is contained in:
Frank
2026-02-22 18:41:34 -05:00
parent ee754c46f9
commit 5712cff5c4
187 changed files with 87618 additions and 47656 deletions

View File

@@ -0,0 +1,28 @@
import { z } from "zod"
import { fn } from "./util/fn"
import { Resource } from "@opencode-ai/console-resource"
export namespace LiteData {
const Schema = z.object({
fixedLimit: z.number().int(),
rollingLimit: z.number().int(),
rollingWindow: z.number().int(),
})
export const validate = fn(Schema, (input) => {
return input
})
export const getLimits = fn(z.void(), () => {
const json = JSON.parse(Resource.ZEN_LITE_LIMITS.value)
return Schema.parse(json)
})
export const planToPriceID = fn(z.void(), () => {
return Resource.ZEN_LITE_PRICE.price
})
export const priceIDToPlan = fn(z.void(), () => {
return "lite"
})
}