Files
pages/internal/extensions/registry.go
T
Anya Tokugawa 0d8997972c
Build and publish container images / images (push) Failing after 6m19s
feat: add private RSS reader and read-only FreshRSS integration
2026-11-08 03:35:02 +09:00

35 lines
4.1 KiB
Go

// Package extensions describes trusted system services, separate from MIME
// viewers/editors. The initial registry is built-in only: a manifest is not
// permission to load arbitrary Go, JavaScript, executables, or remote URLs.
package extensions
type Manifest struct {
ID string `json:"id"`
APIVersion int `json:"api_version"`
Version string `json:"version"`
Kind string `json:"kind"`
Scope string `json:"scope"`
NameKey string `json:"name_key"`
DescriptionKey string `json:"description_key"`
Capabilities []string `json:"capabilities"`
Events []string `json:"events"`
SettingsPanel string `json:"settings_panel"`
Builtin bool `json:"builtin"`
Enabled bool `json:"enabled"`
ResourceClass string `json:"resource_class,omitempty"`
}
func Catalog() []Manifest {
return []Manifest{
{ID: "organizer.feeds", APIVersion: 1, Version: "0.1.0", Kind: "feeds", Scope: "domain", NameKey: "feeds.title", DescriptionKey: "feeds.help", Capabilities: []string{"feeds.own.read", "feeds.own.write"}, Events: []string{"feed.source.sync"}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "background+network+index"},
{ID: "organizer.contacts", APIVersion: 1, Version: "0.2.0", Kind: "contacts", Scope: "domain", NameKey: "contacts.title", DescriptionKey: "contacts.help", Capabilities: []string{"contacts.own.read", "contacts.own.write"}, Events: []string{}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
{ID: "organizer.tasks", APIVersion: 1, Version: "0.14.0", Kind: "tasks", Scope: "domain", NameKey: "tasks.title", DescriptionKey: "tasks.help", Capabilities: []string{"tasks.own.read", "tasks.own.write"}, Events: []string{"organizer.task.changed", "organizer.project.changed", "task.digest.deliver"}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+background+index"},
{ID: "organizer.calendar", APIVersion: 1, Version: "0.2.0", Kind: "calendar", Scope: "domain", NameKey: "calendar.title", DescriptionKey: "calendar.help", Capabilities: []string{"calendar.read", "calendar.write"}, Events: []string{}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
{ID: "content.diary", APIVersion: 1, Version: "0.1.0", Kind: "diary", Scope: "domain", NameKey: "periodical.diary", DescriptionKey: "periodical.diary_help", Capabilities: []string{"path.read", "path.write", "domain.extensions.manage"}, Events: []string{"periodical.registered", "periodical.removed"}, SettingsPanel: "diary", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
{ID: "content.blog", APIVersion: 1, Version: "0.1.0", Kind: "blog", Scope: "domain", NameKey: "periodical.blog", DescriptionKey: "periodical.blog_help", Capabilities: []string{"path.read", "path.write", "domain.extensions.manage"}, Events: []string{"periodical.registered", "periodical.removed"}, SettingsPanel: "blog", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
{ID: "system.resources", APIVersion: 1, Version: "1.0.0", Kind: "monitor", Scope: "instance", NameKey: "config.resource_status", DescriptionKey: "extension.resources", Capabilities: []string{"instance.metrics.read", "instance.metrics.store"}, Events: []string{"resource.sample"}, SettingsPanel: "resources", Builtin: true, Enabled: true, ResourceClass: "background+io"},
{ID: "navigation.bookmarks", APIVersion: 1, Version: "1.0.0", Kind: "navigation", Scope: "domain", NameKey: "home.bookmarks", DescriptionKey: "extension.bookmarks", Capabilities: []string{"domain.bookmarks.manage", "path.read"}, Events: []string{}, SettingsPanel: "bookmarks", Builtin: true, Enabled: true, ResourceClass: "foreground+read"},
{ID: "sharing.x", APIVersion: 1, Version: "1.0.0", Kind: "sharing", Scope: "domain", NameKey: "extension.share_x", DescriptionKey: "extension.share_x_help", Capabilities: []string{"page.share"}, Events: []string{"share.intent.created"}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+network"},
}
}