Documentation
¶
Overview ¶
Package studio composes Facet's browser workbench and embedded agent runtime.
Index ¶
- func GetCatalogPath(rootDir ...string) string
- func GetDefaultProductionsRoot() string
- func InitializeApplication() error
- func OpenBrowser(targetURL string)
- func Run(addr, dir string) error
- func RunWithBundleOption(addr, dir, bundleDir string, autoOpen bool) error
- func RunWithOption(addr, dir string, autoOpen bool) error
- func SaveCatalog(cat *Catalog, rootDir ...string) error
- type BeatItem
- type Catalog
- type CatalogProject
- func CreateNewProject(name, slug, baseDir, engine string, packs []string, rootDir ...string) (*CatalogProject, error)
- func OpenExistingProject(targetPath, engine string, rootDir ...string) (*CatalogProject, error)
- func RegisterOrUpdateProject(name, targetPath, engine string, packs []string, rootDir ...string) (*CatalogProject, error)
- type MediaFile
- type PackInfo
- type ProjectDetails
- type ProjectSummary
- type Server
- type Session
- type StageStatuses
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCatalogPath ¶
GetCatalogPath returns the absolute path to catalog.json.
func GetDefaultProductionsRoot ¶
func GetDefaultProductionsRoot() string
GetDefaultProductionsRoot returns the default path for new productions.
func InitializeApplication ¶ added in v1.0.2
func InitializeApplication() error
InitializeApplication is called once by the standalone composition root. Kernel config, catalogs and auth all agree on Facet's home; a separate Compa installation is neither read nor modified implicitly.
func OpenBrowser ¶
func OpenBrowser(targetURL string)
OpenBrowser launches the user's default browser to targetURL.
func Run ¶
Run starts the Studio server on addr for the given root directory and auto-opens browser.
func RunWithBundleOption ¶ added in v1.1.0
RunWithBundleOption starts Studio with an explicit installed capability bundle. An empty path uses FACET_BUNDLE_DIR or the standard user location.
func RunWithOption ¶
RunWithOption starts the Studio server with optional browser opening.
func SaveCatalog ¶
SaveCatalog writes the catalog atomically to disk.
Types ¶
type BeatItem ¶
type BeatItem struct {
Index string `json:"index,omitempty"`
TimeRange string `json:"time_range,omitempty"`
Title string `json:"title,omitempty"`
Visual string `json:"visual,omitempty"`
Narration string `json:"narration,omitempty"`
Type string `json:"type,omitempty"`
Raw map[string]string `json:"raw,omitempty"`
}
BeatItem represents a single editorial or visual beat from script or composition.
type Catalog ¶
type Catalog struct {
Version string `json:"version"`
DefaultRoot string `json:"default_root"`
Projects []CatalogProject `json:"projects"`
}
Catalog tracks recent and managed Facet projects.
func LoadCatalog ¶
LoadCatalog reads the catalog from disk or initializes a default.
type CatalogProject ¶
type CatalogProject struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Engine string `json:"engine"`
Packs []string `json:"packs"`
CreatedAt time.Time `json:"created_at"`
LastOpenedAt time.Time `json:"last_opened_at"`
Exists bool `json:"exists"`
}
CatalogProject represents a single production entry in the catalog.
func CreateNewProject ¶
func CreateNewProject(name, slug, baseDir, engine string, packs []string, rootDir ...string) (*CatalogProject, error)
CreateNewProject handles the backend creation and initialization of a new project.
func OpenExistingProject ¶
func OpenExistingProject(targetPath, engine string, rootDir ...string) (*CatalogProject, error)
OpenExistingProject registers an existing folder and refreshes its projections.
func RegisterOrUpdateProject ¶
func RegisterOrUpdateProject(name, targetPath, engine string, packs []string, rootDir ...string) (*CatalogProject, error)
RegisterOrUpdateProject adds or touches a project in the catalog.
type MediaFile ¶
type MediaFile struct {
Name string `json:"name"`
Path string `json:"path"`
RelativePath string `json:"relative_path"`
URL string `json:"url"`
Size int64 `json:"size"`
LastModified time.Time `json:"last_modified"`
}
MediaFile represents an audio, image, or video file inside a project.
type PackInfo ¶
type PackInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Skills []string `json:"skills"`
Installed bool `json:"installed"`
}
PackInfo describes an available capability pack.
func DiscoverAvailablePacks ¶
DiscoverAvailablePacks inspects both repository packs and central app data.
type ProjectDetails ¶
type ProjectDetails struct {
Assets []MediaFile `json:"assets,omitempty"`
Artifacts []MediaFile `json:"artifacts,omitempty"`
Slug string `json:"slug"`
Name string `json:"name"`
Path string `json:"path"`
Engine string `json:"engine,omitempty"`
LastModified time.Time `json:"last_modified"`
Stages StageStatuses `json:"stages"`
Brief string `json:"brief,omitempty"`
BriefPath string `json:"brief_path,omitempty"`
BriefURL string `json:"brief_url,omitempty"`
Script string `json:"script,omitempty"`
ScriptPath string `json:"script_path,omitempty"`
ScriptURL string `json:"script_url,omitempty"`
Beats []BeatItem `json:"beats,omitempty"`
Narration []MediaFile `json:"narration,omitempty"`
ReviewFrames []MediaFile `json:"review_frames,omitempty"`
QAFrames []MediaFile `json:"qa_frames,omitempty"`
ReviewReport any `json:"review_report,omitempty"`
ReviewReportPath string `json:"review_report_path,omitempty"`
ReviewReportURL string `json:"review_report_url,omitempty"`
RemotionProps any `json:"remotion_props,omitempty"`
CompositionPath string `json:"composition_path,omitempty"`
CompositionURL string `json:"composition_url,omitempty"`
VideoPath string `json:"video_path,omitempty"`
VideoURL string `json:"video_url,omitempty"`
PreviewVideoPath string `json:"preview_video_path,omitempty"`
PreviewVideoURL string `json:"preview_video_url,omitempty"`
VideoVersion string `json:"video_version,omitempty"`
ThumbnailPath string `json:"thumbnail_path,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
}
ProjectDetails provides deep inspection data for a project.
func GetProjectDetails ¶
func GetProjectDetails(rootDir, slug string) (*ProjectDetails, error)
GetProjectDetails reads deep project artifacts and metadata.
type ProjectSummary ¶
type ProjectSummary struct {
Slug string `json:"slug"`
Name string `json:"name"`
Path string `json:"path"`
Engine string `json:"engine,omitempty"`
LastModified time.Time `json:"last_modified"`
Stages StageStatuses `json:"stages"`
BriefPath string `json:"brief_path,omitempty"`
BriefURL string `json:"brief_url,omitempty"`
ScriptPath string `json:"script_path,omitempty"`
ScriptURL string `json:"script_url,omitempty"`
CompositionPath string `json:"composition_path,omitempty"`
CompositionURL string `json:"composition_url,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
VideoURL string `json:"video_url,omitempty"`
PreviewVideoPath string `json:"preview_video_path,omitempty"`
PreviewVideoURL string `json:"preview_video_url,omitempty"`
VideoVersion string `json:"video_version,omitempty"`
}
ProjectSummary provides lightweight metadata for list views.
func ListProjects ¶
func ListProjects(rootDir string) ([]ProjectSummary, error)
ListProjects scans projects/ under rootDir and returns summaries.
func ListProjectsWithCatalog ¶
func ListProjectsWithCatalog(rootDir string) ([]ProjectSummary, error)
ListProjectsWithCatalog scans rootDir projects and merges catalog projects.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server coordinates the Studio web UI, REST API, and CLI session manager.
type Session ¶
type Session struct {
ID string
NativeID string
Dir string
Mode string
Engine string
// contains filtered or unexported fields
}
Session is a durable Studio conversation. Each turn uses a fresh CLI process or in-process native loop.
type StageStatuses ¶
type StageStatuses struct {
Brief bool `json:"brief"`
Script bool `json:"script"`
Voiceover bool `json:"voiceover"`
Composition bool `json:"composition"`
Review bool `json:"review"`
Master bool `json:"master"`
}
StageStatuses indicates which production stages are completed or active.