code: stream,packages,lua (3 files)

This commit is contained in:
2025-12-26 01:05:24 +00:00
parent b28488641c
commit 4821b35e9a
3 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
export type CodegenRuntime = 'web' | 'cli' | 'desktop' | 'hybrid' | 'server'
export interface CodegenSpec {
projectName: string
packageId: string
runtime: CodegenRuntime
tone?: string
brief?: string
}
export interface CodegenTemplateFile {
path: string
contents: string
}
export interface CodegenManifest {
projectName: string
packageId: string
runtime: CodegenRuntime
tone?: string
brief?: string
generatedAt: string
}
export interface CodegenProjectTemplate {
zipName: string
rootDir: string
manifest: CodegenManifest
files: CodegenTemplateFile[]
}

View File

@@ -0,0 +1,13 @@
local M = {}
function M.can_publish(user)
local role = user.role or "public"
return role == "admin" or role == "god" or role == "supergod"
end
function M.can_moderate(user)
local role = user.role or "public"
return role == "admin" or role == "god" or role == "supergod"
end
return M

View File

@@ -0,0 +1,13 @@
local M = {}
local routes = {
intro = "studio_a",
main = "studio_b",
qa = "studio_c"
}
function M.route(scene)
return routes[scene] or "studio_b"
end
return M