- tasks→jobs:ctx.jobs / job_output / job_id / session/jobs / jobsBySession / Job* 词汇 - httpServer→webServer(inject + augmentation + register/registerUpgrade) - autoOpenTasks→autoOpenJobs 偏好键 - 右上角开关簇回到角落,注入 CSS 挤开 header 的「Session log」胶囊
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
/**
|
|
* Package-owned invariant companion for `dsh-better-sidebar`.
|
|
* @module dsh-better-sidebar/invariant
|
|
*/
|
|
|
|
/* jscpd:ignore-start */
|
|
import type { Context } from './context-types.ts'
|
|
|
|
const PACKAGE_NAME = 'dsh-better-sidebar'
|
|
|
|
/** Cordis companion plugin name. */
|
|
export const name = 'dsh-better-sidebar-invariant'
|
|
/** Service required before the companion can reserve package ownership. */
|
|
export const inject = ['invariants']
|
|
|
|
/**
|
|
* No runtime invariant: the sidebar owns no service state or event protocol
|
|
* of its own — every route is mounted under the host's webServer fence, the
|
|
* pty lifecycle is exercised by the smoke spec, and the panel's store is a
|
|
* plain snapshot registry asserted by the behavior specs. The route fence,
|
|
* pty quota, and store semantics are each observed through their seams.
|
|
*/
|
|
const install: () => void = () => {}
|
|
|
|
/**
|
|
* Register this package's invariant companion.
|
|
* @param ctx - Cordis context carrying the invariant service.
|
|
* @returns the installed registration's disposer after setup succeeds.
|
|
*/
|
|
export const apply = (ctx: Context): Promise<() => void> =>
|
|
Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install))
|
|
/* jscpd:ignore-end */
|