Versions in this module Expand all Collapse all v0 v0.3.4 Nov 5, 2026 v0.3.3 Nov 4, 2026 Changes in this version + const DefaultChannelProbes + const DefaultEventDays + const DefaultEventLimit + const DefaultListPages + const DefaultRankingTraces + const DefaultReplayTimeout + const MaxChangedPreview + const MaxChannelProbes + const MaxEventDays + const MaxEventLimit + const MaxListPages + const MaxListPreview + const MaxRankingTraces + const MaxReplayTimeout + var ErrNotEditable = errors.New("studio: this plugin runs on another device; its code is not on this server") + var ErrProjectNotFound = errors.New("studio: project not found") + func ProjectTools(s *Studio) []tools.Tool + func RedactJSON(raw json.RawMessage) string + func RegisterTools(cat *tools.Catalogue, deps ToolDeps) error + func Tools(deps ToolDeps) []tools.Tool + type ChangedPick struct + AfterPluginKey int64 + AfterReleaseID string + AfterReleaseName string + BeforePluginKey int64 + BeforeReleaseID string + BeforeReleaseName string + HistoryID int64 + Profile string + TitleKey string + TitleName string + type ChannelReplayReport struct + ChannelCount int + GuideCoverage float64 + Probes []StreamProbeResult + ProbesAttempted int + ProbesOK int + TotalPrograms int + TotalUnits int64 + WithGuideCount int + type CheckItem struct + Category string + Fix string + ID string + Label string + Message string + Status string + type CheckReport struct + Checks []CheckItem + Diagnostics []wasm.Diagnostic + OK bool + type CheckRequest struct + Files map[string]string + Manifest json.RawMessage + type CompileResult struct + Diagnostics []wasm.Diagnostic + JSSize int + OK bool + SourcemapSize int + type CreateProjectOptions struct + Name string + PluginID string + Slot string + StremioURL string + Template string + type Deps struct + Engine *wasm.Engine + Installed func(ctx context.Context, rec plugins.Record) + Logger *slog.Logger + Manager *plugins.Manager + Now func() time.Time + Publish func(ctx context.Context, typ string, data any) error + type DevInstance struct + Entry string + Files map[string]string + Grants plugins.Grants + Manifest json.RawMessage + Secrets map[string]string + Settings map[string]any + type EventReplayReport struct + Batches int + Days int + EventsAcked int + EventsDelivered int + EventsLoaded int + EventsMatched int + Logs []RecordedLog + Notifications []RecordedNotification + OutboundCalls []RecordedOutbound + TotalUnits int64 + Writes []RecordedWrite + type ListItem struct + ID string + IMDbID string + TMDBID int + Title string + Type string + Year int + type ListReplayReport struct + Catalog string + MatchRate float64 + MatchedItems int + MediaType string + PagesFetched int + Preview []MatchedTitle + SourceKey string + TotalItems int + TotalUnits int64 + UnmatchedItems int + UnmatchedSample []string + type MatchedTitle struct + ExternalID string + RatingKey string + Title string + Type string + Year int + type PreviewResponse struct + Body json.RawMessage + Data json.RawMessage + Errors []string + Hints []ValidationHint + Kind string + MS int64 + Page string + Route string + Spec json.RawMessage + Title string + Valid bool + type Project struct + AddonOf string + CreatedAt time.Time + DefaultPage string + DefaultPath string + Diagnostics []wasm.Diagnostic + Files map[string]string + ID string + Installed bool + Name string + PluginID string + Settings map[string]any + Shadow bool + Slot string + Template string + UpdatedAt time.Time + type ProjectSummary struct + AddonOf string + Errors int + ID string + Installed bool + Name string + PluginID string + Shadow bool + Slot string + Template string + UpdatedAt time.Time + type RankingBudgetStats struct + BatchLimitMS float64 + MaxBatchUnits int64 + MemoHits int + PerCandidateLimitMS float64 + SlowCandidates int + Timeouts int + TotalUnits int64 + Traps int + type RankingReplayReport struct + Budget RankingBudgetStats + CandidatesEvaluated int + Changed []ChangedPick + ChangedCount int + ConditionKey string + LadderAfter []string + LadderBefore []string + Mode string + Position int + StepKey string + Timings RankingTimings + TracesEvaluated int + TracesLoaded int + UnchangedCount int + type RankingTimings struct + AvgBatchUS int64 + AvgCandidateUS int64 + MaxBatchUS int64 + PluginUS int64 + TotalMS int64 + type RecordedLog struct + Attrs map[string]any + Level string + Message string + type RecordedNotification struct + EventID string + Format string + Kind string + Payload json.RawMessage + Target string + Text string + Title string + type RecordedOutbound struct + Body string + Method string + URL string + type RecordedWrite struct + Op string + Target string + Value json.RawMessage + ViewerID int64 + Watched *bool + type ReplayDeps struct + CatalogMatch func(ctx context.Context, item ListItem) (MatchedTitle, bool) + DB *sql.DB + Engine *wasm.Engine + HTTPClient *http.Client + Logger *slog.Logger + Manager *plugins.Manager + Now func() time.Time + ProbeStream func(ctx context.Context, rawURL string, headers map[string]string) StreamProbeResult + Profiles func() []core.QualityProfile + Timeout time.Duration + type ReplayKind string + const ReplayChannels + const ReplayEvents + const ReplayList + const ReplayRanking + type ReplayParams struct + Action string + AfterStep string + Catalog string + ConditionKey string + Config json.RawMessage + Days int + Events []string + Limit int + MediaType string + Operator string + Pages int + Position *int + ProbeLimit int + Profile *core.QualityProfile + SourceKey string + StepKey string + Value json.RawMessage + type ReplayReport struct + Channels *ChannelReplayReport + DurationMS int64 + Events *EventReplayReport + Kind ReplayKind + List *ListReplayReport + PluginID string + Ranking *RankingReplayReport + TimedOut bool + type ReplayRequest struct + DevInstance *DevInstance + Kind ReplayKind + Params ReplayParams + Plugin string + type RunRequest struct + Body json.RawMessage + Candidate *plugins.CandidateFacts + Config json.RawMessage + Headers map[string]string + HotPath string + Locale string + Method string + Operator string + Path string + Query map[string]string + Value json.RawMessage + type RunResponse struct + Body json.RawMessage + Call plugins.CallRecord + Headers map[string]string + Hints []ValidationHint + Journal []plugins.JournalEntry + Logs []string + MS int64 + Status int + Units int64 + type Runner struct + func NewRunner(deps ReplayDeps) *Runner + func (r *Runner) Close() error + func (r *Runner) HandleReplay(w http.ResponseWriter, req *http.Request) + func (r *Runner) Handler() http.Handler + func (r *Runner) Replay(ctx context.Context, req ReplayRequest) (ReplayReport, error) + type ScaffoldRequest struct + Capabilities []string + ID string + Kind string + Name string + Summary string + type ScaffoldResult struct + Files map[string]string + Manifest plugins.Manifest + func Scaffold(req ScaffoldRequest) (ScaffoldResult, error) + type StreamProbeResult struct + ChannelID string + ChannelName string + ContentType string + Error string + Kind string + LatencyMS int64 + OK bool + Status int + URL string + type Studio struct + func New(deps Deps) *Studio + func (s *Studio) Calls(_ context.Context, id string) ([]plugins.CallRecord, []ValidationHint, error) + func (s *Studio) CheckFiles(ctx context.Context, projectID string, files map[string]string) CheckReport + func (s *Studio) CheckProject(ctx context.Context, id string) (CheckReport, error) + func (s *Studio) Close() error + func (s *Studio) CompileFiles(files map[string]string, entryOverride string) CompileResult + func (s *Studio) CreateProject(ctx context.Context, opts CreateProjectOptions) (*Project, error) + func (s *Studio) DeleteProject(ctx context.Context, id string) error + func (s *Studio) ForgetPlugin(ctx context.Context, pluginID string) + func (s *Studio) GetProject(_ context.Context, id string) (*Project, error) + func (s *Studio) Handler() http.Handler + func (s *Studio) ImportPlugin(ctx context.Context, pluginID string) (*Project, error) + func (s *Studio) InstallProject(ctx context.Context, id string, opts plugins.InstallOptions) (plugins.Record, error) + func (s *Studio) InstallProjectCopy(ctx context.Context, id string, opts plugins.InstallOptions) (plugins.Record, error) + func (s *Studio) Journal(_ context.Context, id string, shadowOnly bool) ([]plugins.JournalEntry, error) + func (s *Studio) ListProjects(_ context.Context) []ProjectSummary + func (s *Studio) NotifyInstalled(ctx context.Context, rec plugins.Record) + func (s *Studio) OpenStorage(ctx context.Context, db *sql.DB) error + func (s *Studio) PreviewInstallProject(ctx context.Context, id string) (*plugins.Preview, error) + func (s *Studio) PreviewProject(ctx context.Context, id, pageKey, routeOverride string, ...) (PreviewResponse, error) + func (s *Studio) RunProject(ctx context.Context, id string, req RunRequest) (RunResponse, error) + func (s *Studio) SaveFiles(ctx context.Context, id string, files map[string]string, shadow *bool, ...) (*Project, CompileResult, error) + func (s *Studio) SetShadow(_ context.Context, id string, shadow bool) (*Project, error) + func (s *Studio) Undo(_ context.Context, id string) (int, error) + func (s *Studio) WrapPluginHandler(next http.Handler) http.Handler + type Template struct + Capabilities []plugins.Capability + DefaultName string + DefaultPage string + DefaultPluginID string + DefaultRoute string + Files map[string]string + ID string + Kind plugins.Kind + Label string + Summary string + SupportsSlot bool + SupportsStremio bool + func LookupTemplate(id string) (Template, bool) + func Templates() []Template + type ToolCheckReport struct + Exports map[string]bool + Issues []plugins.FieldError + OK bool + func Check(ctx context.Context, _ *wasm.Engine, req CheckRequest) (ToolCheckReport, error) + type ToolDeps struct + Engine *wasm.Engine + Manager *plugins.Manager + Registry *extend.Registry + Runner *Runner + Studio *Studio + TextResolver extend.TextResolver + type ValidationHint struct + CallID int64 + Field string + Message string + Route string + Severity string + SuggestedFix string + func InspectCall(call plugins.CallRecord) []ValidationHint + func InspectCalls(calls []plugins.CallRecord) []ValidationHint