config

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config holds hopsesh's user configuration and state locations.

Index

Constants

View Source
const (
	CloudCodeBranch     = "branch"
	CloudCodeBundle     = "bundle"
	DefaultBranchPrefix = "hopsesh/handoff/"
	DeleteNever         = "never"
	DeleteAfterMerge    = "after-merge"
	DeleteOnUndo        = "on-undo"
)

Defaults of a cloud's settings.

View Source
const (
	SidebarWidth, SidebarMin, SidebarMax = 220, 180, 320
	InspectorMin, InspectorMax           = 300, 960
	StatusMin, StatusMax                 = 140, 560
)

The app window's pane widths: defaults and limits. The inspector's default width is the window's to work out (a share of its width); InspectorMax is the most it may be.

View Source
const (
	PlaceHere     = ResumeHere
	PlaceTerminal = ResumeTerminal
	PlaceApp      = "app"
)

Places a session resumes in, in the app (Agent.Place).

View Source
const (
	TerminalFontSize   = 13
	TerminalScrollback = 5000
)

Terminal font sizes and scrollback lengths.

View Source
const (
	TerminalITerm2          = "iterm2"
	TerminalApp             = "terminal-app"
	TerminalWindowsTerminal = "windows-terminal"
	TerminalLinux           = "linux"
	ResumeHere              = "here"
	ResumeTerminal          = "terminal"
	ResumeAsk               = "ask"
)

Terminal apps and resume choices.

View Source
const (
	OriginalBlock  = "block"
	OriginalAdvise = "advise"
	OriginalOff    = "off"
)

Protection choices for the copy left behind (config "original").

View Source
const AppResumeDefault = ResumeHere

AppResumeDefault is where the desktop app resumes sessions and runs hand-off and bring-back steps until the user chooses: in its own Terminal window. It is the release gate of the app's terminal: a release whose nightly terminal checks are not green on macOS and Windows ships ResumeTerminal here instead (only this constant changes).

View Source
const ListKeysMax = 300

ListKeysMax is how many collapsed and expanded groups the list remembers (the oldest choices go first).

View Source
const Schema = 4

Schema is the configuration format. Files in another format are refused, never read: hopsesh keeps no code for older formats.

Variables

View Source
var (
	ErrOldConfig = errors.New("the configuration was written by an older hopsesh")
	ErrNewConfig = errors.New("the configuration was written by a newer hopsesh")
)

ErrOldConfig means the configuration file was written by an older hopsesh; ErrNewConfig, by a newer one (after a downgrade), which this one must not set aside as if it were old.

View Source
var (
	ListGroups     = []string{"family", "repository", "location", "agent", "account", "tag", "status", "last-active", "none"}
	ListSorts      = []string{"last-active", "title", "status", "size"}
	ListDensities  = []string{"comfortable", "compact"}
	ListStatuses   = []string{"needs", "working", "idle", "moved", "ended", "unknown"}
	ListLocations  = []string{"here", "machines", "clouds"}
	ListLastActive = []string{"today", "7d", "30d"}
	ListHas        = []string{"tab", "mirror", "unpushed"}
)

The list's choices.

View Source
var (
	HistoryContextBudgets = []int{0, 16_000, 32_000, 64_000, 128_000, 256_000}
	HistoryReadMemoryMBs  = []int{256, 512, 1024, 2048, 4096}
	HistoryRecordMBs      = []int{32, 64, 128, 256}
	HistoryLineageMBs     = []int{16, 32, 64, 128, 256, 512}
	HistoryArchiveMBs     = []int{256, 512, 1024, 2048, 4096, 8192}
	HistoryNativeFileMBs  = []int{1024, 2048, 4096, 8192}
)

History choices offered by the app (any value within the ceilings is valid in the file).

View Source
var InspectorSections = []string{"conversation", "repository", "copies", "details"}

InspectorSections are the inspector's sections that open and close.

View Source
var TerminalScrollbacks = []int{1000, 5000, 10000, 50000}

TerminalScrollbacks are the scrollback lengths the app offers.

Functions

func CheckAppearance added in v0.4.0

func CheckAppearance(mode string) error

func DefaultDir added in v0.4.4

func DefaultDir() string

DefaultDir is the configuration directory when HOPSESH_CONFIG_DIR is not set.

func DefaultStateDir added in v0.4.4

func DefaultStateDir() string

DefaultStateDir is the state directory when HOPSESH_STATE_DIR is not set.

func Dir

func Dir() string

Dir is the configuration directory: $XDG_CONFIG_HOME/hopsesh or ~/.config/hopsesh on macOS and Linux, %APPDATA%\hopsesh on Windows.

func Path

func Path() string

Path is the configuration file.

func SameDir added in v0.4.4

func SameDir(a, b string) bool

SameDir reports whether two folder paths name the same folder (cleaned, links resolved when they exist).

func Save

func Save(c Config) error

Save writes the configuration atomically with user-only permissions.

func SetAside added in v0.3.0

func SetAside() (string, error)

SetAside renames the configuration file out of the way (to config.toml.old-<time>) so hopsesh can start fresh; it returns the new name. For a newer file (ErrNewConfig) it is the user's explicit second choice, after updating hopsesh.

func StateDir

func StateDir() string

StateDir holds journals, lineage caches, the audit log, staging and hopsesh's own known_hosts: $XDG_STATE_HOME/hopsesh or ~/.local/state/hopsesh; %LOCALAPPDATA%\hopsesh on Windows.

Types

type Agent added in v0.3.0

type Agent struct {
	// Disabled leaves the agent out of scans and moves.
	Disabled bool `toml:"disabled,omitempty"`
	// RemoteControl turns the agent's own remote control on for continued sessions.
	RemoteControl bool `toml:"remote_control,omitempty"`
	// Import has the agent's own importer convert sessions continued in it, by default.
	Import bool `toml:"import,omitempty"`
	// Place is where the app resumes the agent's sessions, as the user last chose from a
	// session's Resume menu: "here" (the hopsesh Terminal window), "terminal" (the
	// terminal app) or "app" (the agent's desktop app). "" follows [terminal] resume.
	Place string `toml:"place,omitempty"`
	// VoiceThreads and WorkThreads show the agent's voice conversations and Work threads
	// (Codex app), hidden by default.
	VoiceThreads bool `toml:"voice_threads,omitempty"`
	WorkThreads  bool `toml:"work_threads,omitempty"`
}

Agent is per-agent configuration, by module id.

func (*Agent) SetShows added in v0.5.0

func (a *Agent) SetShows(kind string, show bool) bool

SetShows turns a kind of session on or off; false for a kind this setting lacks.

func (Agent) Shows added in v0.5.0

func (a Agent) Shows(kinds []string) bool

Shows reports whether sessions of these kinds (agent.Summary.Kinds) are listed.

type Cloud added in v0.4.0

type Cloud struct {
	// Allowed: the user consented to hopsesh running the agent's cloud commands.
	Allowed bool `toml:"allowed"`
	// Code is how code goes up: "branch" (a pushed handoff branch, the default) or "bundle"
	// (the agent uploads the repository itself, where it can).
	Code string `toml:"code,omitempty"`
	// HistoryFile commits the conversation as .hopsesh/handoff.md on the handoff branch
	// (off by default: it puts conversation text on the repository's host).
	HistoryFile bool `toml:"history_file,omitempty"`
	// Untracked are untracked files (globs) carried up by default; credential-like files
	// are never carried, whatever this says.
	Untracked []string `toml:"untracked,omitempty"`
	// BranchPrefix starts the handoff branches' names (default "hopsesh/handoff/").
	BranchPrefix string `toml:"branch_prefix,omitempty"`
	// DeleteBranch is when a handoff branch is deleted: "never", "after-merge" (the
	// default) or "on-undo".
	DeleteBranch string `toml:"delete_branch,omitempty"`
	// RenameVendorBranches brings a cloud's own branches (claude/…) home under
	// hopsesh/from/<cloud>/… (default on).
	RenameVendorBranches *bool `toml:"rename_vendor_branches,omitempty"`
	// Environments are the vendor's environment ids by repository identity
	// ("github.com/acme/api" = "env_…"), for clouds that need one.
	Environments map[string]string `toml:"environments,omitempty"`
}

Cloud is per-cloud configuration, by the cloud's name ("codex-cloud"). Like a machine, a cloud is left alone until the user allows it.

type Config

type Config struct {
	FamilyNames map[string]string `toml:"family_names,omitempty"`
	// Appearance is system (also the empty default), light or dark for app windows.
	Appearance string  `toml:"appearance,omitempty"`
	Desktop    Desktop `toml:"desktop,omitempty"`
	Schema     int     `toml:"schema"`
	ReposDir   string  `toml:"repos_dir"` // where clones go; default ~/git
	Layout     string  `toml:"layout"`    // flat | ghq
	// UpdateCheck is "on" or "off" once the person has answered whether the app may
	// look for new releases once a day ("" = not asked yet).
	UpdateCheck string `toml:"update_check,omitempty"`
	// Original is how the copy left behind by a move is protected until the session moves
	// back: "block" (the default, ""), "advise" or "off". SyncCode defaults to on (nil),
	// PushSource to off.
	Original   string `toml:"original,omitempty"`
	SyncCode   *bool  `toml:"sync_code,omitempty"`   // fetch and fast-forward the checkout here
	PushSource bool   `toml:"push_source,omitempty"` // push unpushed commits on the source first
	// SkillPrompt remembers the answer to "let your agents use hopsesh?": "" (not asked),
	// "declined", or the skill revision last offered.
	SkillPrompt string `toml:"skill_prompt,omitempty"`
	// CLIPrompt is "declined" once the user said not now to linking the command-line tool
	// from the app.
	CLIPrompt string `toml:"cli_prompt,omitempty"`
	// SetupPrompt is "declined" once the user closed the app's "Finish setting up" line.
	SetupPrompt string `toml:"setup_prompt,omitempty"`
	// ProtectPrompt is the fingerprint of the protection problems the user answered "Not
	// now" to; the Sessions card stays hidden until the set of problems changes.
	ProtectPrompt string `toml:"protect_prompt,omitempty"`
	// MachinesPrompt are the machine notices the user answered "Not now" to (by
	// fingerprint: a notice whose findings change comes back).
	MachinesPrompt []string `toml:"machines_prompt,omitempty"`
	// AppIcons shows an agent's installed desktop app icon in the app (default on).
	AppIcons *bool            `toml:"app_icons,omitempty"`
	Agents   map[string]Agent `toml:"agents,omitempty"`
	// Clouds are the vendor clouds the user allowed or set up, by name.
	Clouds map[string]Cloud `toml:"clouds,omitempty"`
	Peer   Peer             `toml:"peer"`
	// Terminal is the terminal app hopsesh opens launches in.
	Terminal Terminal `toml:"terminal,omitempty"`
	// Window is the app window's layout, and Inspector its inspector's sections.
	Window    Window    `toml:"window,omitempty"`
	Inspector Inspector `toml:"inspector,omitempty"`
	// List is how the app's session list shows sessions.
	List List `toml:"list,omitempty"`
	// Previews shows the end of a session's conversation in the app's inspector (default
	// on; off for people who share their screen).
	Previews *bool `toml:"previews,omitempty"`
	// History is how much history a transfer carries and the resources it may use.
	History History `toml:"history,omitempty"`
	Hosts   []Host  `toml:"hosts"`
}

Config is the user's configuration file.

func Defaults

func Defaults() Config

Defaults returns the configuration used when no file exists.

func Load

func Load() (Config, error)

Load reads the configuration, filling defaults for missing values. A file in another format is refused with ErrOldConfig (an older one, or one that is not hopsesh's) or ErrNewConfig (a newer one).

func (Config) AgentEnabled added in v0.3.0

func (c Config) AgentEnabled(id string) bool

AgentEnabled reports whether an agent module is in use.

func (Config) AppIconsOn added in v0.3.0

func (c Config) AppIconsOn() bool

AppIconsOn reports whether installed desktop apps' icons picture the agents (default on).

func (Config) AppResume added in v0.4.0

func (c Config) AppResume() string

AppResume is where the desktop app resumes sessions and runs steps (default AppResumeDefault).

func (Config) AppearanceMode added in v0.4.0

func (c Config) AppearanceMode() string

AppearanceMode fills in the default without pinning System to today's OS color.

func (Config) Check added in v0.4.0

func (c Config) Check() error

Check reports settings hopsesh cannot act on.

func (Config) Clone added in v0.4.1

func (c Config) Clone() Config

Clone gives a background operation its own settings. Config contains only JSON-compatible data. Decode into an empty value: decoding into a shallow copy reuses its maps, slices and pointers, racing with other readers of those values. Callers must hold their configuration lock while capturing the copy.

func (Config) CloseEndedOn added in v0.4.0

func (c Config) CloseEndedOn() bool

CloseEndedOn reports whether a tab closes once its program ended well.

func (Config) CloudAllowed added in v0.4.0

func (c Config) CloudAllowed(name string) bool

CloudAllowed reports whether the user allowed a cloud.

func (Config) CloudSettings added in v0.4.0

func (c Config) CloudSettings(name string) Cloud

CloudSettings returns a cloud's settings with the defaults filled in.

func (*Config) FindHost

func (c *Config) FindHost(name string) *Host

FindHost returns the configured host with this name.

func (Config) KeepTabsOn added in v0.4.0

func (c Config) KeepTabsOn() bool

KeepTabsOn reports whether closing the app's window keeps its tabs' programs running.

func (Config) MovementNoticesOn added in v0.4.0

func (c Config) MovementNoticesOn() bool

MovementNoticesOn reports whether moves record a notice for the copy left behind (the block or the advice needs one); independent of lineage, which is always kept.

func (Config) NotifyOn added in v0.4.0

func (c Config) NotifyOn() bool

NotifyOn reports whether a waiting tab may raise a desktop notification.

func (Config) OriginalGuard added in v0.4.2

func (c Config) OriginalGuard() string

OriginalGuard is how the copy left behind is protected: block (default), advise or off.

func (Config) PreviewsOn added in v0.4.0

func (c Config) PreviewsOn() bool

PreviewsOn reports whether the app shows conversation previews (default on).

func (Config) ResumeIn added in v0.4.0

func (c Config) ResumeIn() string

ResumeIn is where sessions resume (default "terminal").

func (*Config) SetCloudAllowed added in v0.4.0

func (c *Config) SetCloudAllowed(name string, allowed bool)

SetCloudAllowed records consent for a cloud, keeping its other settings.

func (*Config) SetCloudEnvironment added in v0.4.0

func (c *Config) SetCloudEnvironment(name, repo, env string)

SetCloudEnvironment records the cloud environment a repository's hand-offs run in ("" forgets it), keeping the cloud's other settings.

func (Config) SyncCodeOn added in v0.2.0

func (c Config) SyncCodeOn() bool

SyncCodeOn reports whether the checkout is brought to the session's commit (default on).

func (Config) TerminalFont added in v0.4.0

func (c Config) TerminalFont() int

TerminalFont is the app's terminal font size in points.

func (Config) TerminalLines added in v0.4.0

func (c Config) TerminalLines() int

TerminalLines is how many lines a tab keeps.

func (*Config) UpsertHost

func (c *Config) UpsertHost(h Host)

UpsertHost adds or updates a host by name, keeping consent unless explicitly changed.

type Desktop added in v0.4.0

type Desktop struct {
	Mode      string `toml:"mode,omitempty" json:"mode"`   // app | tray | both
	Close     string `toml:"close,omitempty" json:"close"` // keep | quit; empty keeps running in the background
	Attention *bool  `toml:"attention,omitempty" json:"attention"`
	Previews  *bool  `toml:"previews,omitempty" json:"previews"`
}

Desktop controls application presence, independently of terminal preferences. Empty Mode preserves the behavior of an existing installation.

func (Desktop) AttentionOn added in v0.4.0

func (d Desktop) AttentionOn() bool

func (Desktop) Check added in v0.4.0

func (d Desktop) Check() error

func (Desktop) KeepInBackground added in v0.4.0

func (d Desktop) KeepInBackground() bool

func (Desktop) Placement added in v0.4.0

func (d Desktop) Placement() string

func (Desktop) PreviewsOn added in v0.4.0

func (d Desktop) PreviewsOn() bool

type History added in v0.4.2

type History struct {
	// ContextBudget optionally lowers the receiving context (0: automatic, from the
	// destination model). It can never raise what the model allows.
	ContextBudget int `toml:"context_budget,omitempty" json:"contextBudget"`
	// Older is how history older than the recent turns is carried: "extract" (default)
	// or "recent" (recent turns only).
	Older string `toml:"older,omitempty" json:"older"`
	// Advanced resource budgets, in MiB.
	ReadMemoryMB int `toml:"read_memory_mb,omitempty" json:"readMemoryMB"`
	RecordMB     int `toml:"record_mb,omitempty" json:"recordMB"`
	ArchiveMB    int `toml:"archive_mb,omitempty" json:"archiveMB"`
	LineageMB    int `toml:"lineage_mb,omitempty" json:"lineageMB"`
	NativeFileMB int `toml:"native_file_mb,omitempty" json:"nativeFileMB"`
}

History limits. Zero means automatic or the default; see ir.Limits. Canonical history is never truncated: reaching a resource limit stops the transfer with the setting named, and only the receiving context keeps a labeled subset (the rest stays in the portable archive).

func (History) Limits added in v0.4.2

func (h History) Limits() ir.Limits

Limits is the operation policy for these settings, with defaults and ceilings applied.

type Host

type Host struct {
	Name        string `toml:"name"`        // label shown to the user, e.g. "studio"
	Destination string `toml:"destination"` // what to pass to ssh: alias, user@host or host
	Via         string `toml:"via"`         // tailscale | ssh-config | manual (or a "+" combination)
	Allowed     bool   `toml:"allowed"`     // the user consented to hopsesh connecting
	OS          string `toml:"os,omitempty"`
	// TailscaleName is the machine's MagicDNS name, used when Destination's own host
	// name does not resolve (e.g. an alias pointing at a .local name on another network).
	TailscaleName string `toml:"tailscale_name,omitempty"`
	// Auth is "password" for a machine that logs in with a password (asked for, never
	// stored in this file); "" means keys or the SSH agent.
	Auth string `toml:"auth,omitempty"`
	// Keychain: remember this machine's password in the macOS Keychain.
	Keychain bool `toml:"keychain,omitempty"`
}

Host is one machine hopsesh knows about.

func (Host) UsesPassword added in v0.2.0

func (h Host) UsesPassword() bool

UsesPassword reports whether the machine logs in with a password.

type Inspector added in v0.4.0

type Inspector struct {
	Open   []string `toml:"open,omitempty"`   // InspectorSections
	Closed []string `toml:"closed,omitempty"` // InspectorSections
}

Inspector is the app inspector's sections the user opened or closed (explicit choices only: the others keep their defaults), app-wide rather than per session.

type List added in v0.4.0

type List struct {
	TerminalCollapsed []string `toml:"terminal_collapsed,omitempty"`
	GroupBy           string   `toml:"group_by,omitempty"`     // ListGroups ("": repository)
	SortBy            string   `toml:"sort_by,omitempty"`      // ListSorts ("": last-active)
	SortReverse       bool     `toml:"sort_reverse,omitempty"` // oldest, Z–A or smallest first
	Density           string   `toml:"density,omitempty"`      // comfortable | compact
	// CollapseInactive starts groups whose newest session is more than 14 days old
	// collapsed, unless the user expanded them.
	CollapseInactive bool       `toml:"collapse_inactive,omitempty"`
	Collapsed        []string   `toml:"collapsed,omitempty"`
	Expanded         []string   `toml:"expanded,omitempty"`
	Filter           ListFilter `toml:"filter,omitempty"`
}

List is how the app's session list shows sessions: grouped by one property, sorted within the groups, comfortable or compact rows, the groups the user collapsed or expanded (by "grouping:name", explicit choices only), and the filters. An empty List means the app has not chosen yet (it picks once, by how many sessions the first scan finds).

type ListFilter added in v0.4.0

type ListFilter struct {
	Account       []string `toml:"account,omitempty"`
	AccountNot    bool     `toml:"account_not,omitempty"`
	Tag           []string `toml:"tag,omitempty"`
	TagNot        bool     `toml:"tag_not,omitempty"`
	Status        []string `toml:"status,omitempty"` // ListStatuses
	StatusNot     bool     `toml:"status_not,omitempty"`
	Location      []string `toml:"location,omitempty"` // here | machines | clouds
	LocationNot   bool     `toml:"location_not,omitempty"`
	Agent         []string `toml:"agent,omitempty"` // agent ids
	AgentNot      bool     `toml:"agent_not,omitempty"`
	Repository    []string `toml:"repository,omitempty"` // repository identities or names
	RepositoryNot bool     `toml:"repository_not,omitempty"`
	LastActive    string   `toml:"last_active,omitempty"` // today | 7d | 30d
	Has           []string `toml:"has,omitempty"`         // tab | mirror | unpushed
	HasNot        bool     `toml:"has_not,omitempty"`
}

ListFilter is the list's saved filters: within a facet the values combine with OR (or, with its _not set, none of them), and facets combine with AND. Empty: no filter.

type Peer added in v0.3.0

type Peer struct {
	// Receive lets hopsesh on another machine send sessions here (off by default).
	Receive bool `toml:"receive,omitempty"`
	// SetUpIntegrations: setting hopsesh up on a machine (hosts setup) also installs the
	// movement hooks and the skill there, as Settings › Hooks & skills would (off by
	// default: hopsesh otherwise asks first).
	SetUpIntegrations bool `toml:"setup_integrations,omitempty"`
}

Peer is how this machine works with hopsesh on other machines.

type Terminal added in v0.4.0

type Terminal struct {
	Placement string `toml:"placement,omitempty"` // separate (default), bottom, right
	Grouping  string `toml:"grouping,omitempty"`  // family (default), session, none
	// App is the terminal app launches open in: "iterm2", "terminal-app" (macOS),
	// "windows-terminal", "linux"; "" picks the best installed one (iTerm2 before
	// Terminal on macOS).
	App string `toml:"app,omitempty"`
	// Resume is where sessions resume and the app's hand-off and bring-back steps run:
	// "here" (the app's own Terminal window; the command line: this terminal), "terminal"
	// (in App), "ask" (each time). "" is AppResumeDefault in the app and "terminal" on the
	// command line.
	Resume string `toml:"resume,omitempty"`

	// Font is its font family ("": the system's monospace font).
	Font string `toml:"font,omitempty"`
	// FontSize is its font size in points, 9 to 24 (0: 13).
	FontSize int `toml:"font_size,omitempty"`
	// Scrollback is how many lines each tab keeps, in memory only: 1000, 5000, 10000 or
	// 50000 (0: 5000).
	Scrollback int `toml:"scrollback,omitempty"`
	// KeepTabs: closing the app's window hides it while programs run in tabs (nil: on).
	KeepTabs *bool `toml:"keep_tabs,omitempty"`
	// Notify: a desktop notification when a tab the user cannot see waits for them (nil:
	// on).
	Notify *bool `toml:"notify,omitempty"`
	// KeepEnded keeps a tab open after its program ended well (exit code 0; a hand-off's
	// step once its link is known). nil or false: such a tab closes (a failed one stays,
	// so its output can be read).
	KeepEnded *bool `toml:"keep_ended,omitempty"`
	// ScreenReader is the terminal's screen reader mode: "" (on while the system's screen
	// reader runs), "on" or "off".
	ScreenReader string `toml:"screen_reader,omitempty"`
	// SystemConsole (Windows): tabs use the system's pseudoconsole instead of the newer one
	// the app carries.
	SystemConsole bool `toml:"system_console,omitempty"`
}

Terminal is how hopsesh opens sessions and steps in a terminal app.

type Window added in v0.4.0

type Window struct {
	SidebarWidth    int  `toml:"sidebar_width,omitempty"`
	SidebarHidden   bool `toml:"sidebar_hidden,omitempty"`
	InspectorWidth  int  `toml:"inspector_width,omitempty"`
	InspectorHidden bool `toml:"inspector_hidden,omitempty"`
	// StatusWidth is the session list's status column (0: the default).
	StatusWidth int `toml:"status_width,omitempty"`
}

Window is the app window's layout on the Sessions screen: the sidebar's and the inspector's widths in CSS pixels (0: the default; the inspector's default follows the window's width) and whether the user hid them. A pane the window hides because it is narrow is not saved.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL