Live pages
Create, update, and delete saved Live Pages (website registry rows with URL, home URL, injection scripts, pre/post request scripts, variables, headers, and auth).
Requires the live-pages permission. This is separate from hc.livePage (embedded browser tab control under the browser permission) and from hc.liveServers.
Registry mutations do not open or bind a browser tab.
export async function activate(hc: PluginContext): Promise<void> {
const page = await hc.livePages.create({
name: 'Docs',
url: 'https://example.com/docs',
homeUrl: 'https://example.com/',
scripts: [],
preRequestScripts: [],
postRequestScripts: []
});
const listed = await hc.livePages.list();
const found = await hc.livePages.get(page.uuid);
await hc.livePages.update({
...page,
name: 'Docs (updated)'
});
await hc.livePages.delete(page.id);
console.log(listed.length, found?.name);
}hc.livePages.create(input)
Available since v2.0.0
Signature:(input: CreateWebsiteInput) => Promise<Website>
Persists a new saved live page and returns the created row.
hc.livePages.delete(id)
Available since v2.0.0
Signature:(id: number) => Promise<void>
Deletes a saved live page (moves it to trash).
hc.livePages.get(idOrUuid)
Available since v2.0.0
Signature:(idOrUuid: number | string) => Promise<Website | null>
Returns one saved live page by database id or uuid, or null when not found.
hc.livePages.list()
Available since v2.0.0
Signature:() => Promise<Website[]>
Lists saved live pages from the local registry.
hc.livePages.update(input)
Available since v2.0.0
Signature:(input: UpdateWebsiteInput) => Promise<Website>
Updates a saved live page. Does not open or bind a browser tab.
