No JSDoc comment in source yet.
API
@Component()
export class WorkbenchService implements Workbenches {
@Use() private readonly paths!: Paths;
@Use() private readonly config!: Config;
@Use() private readonly clock!: Clock;
@Use() private readonly log!: Log;
@Use() private readonly channels!: Channels;
@Use() private readonly members!: Members;
@Use() private readonly projects!: Projects;
@Use() private readonly hmr!: Hmr;
@Use() private readonly agents!: AgentIndex;
@Use() private readonly agentConfig!: AgentConfig;
@Use() private readonly sessionIndex!: SessionIndex;
@Use() private readonly traces!: Traces;
@Use() private readonly runner!: ScheduleTaskRunner;
@Use() private readonly sessions!: ScheduleSessionCreator;
@Use() private readonly engines!: AgentStateEngines;
setup(ctx: ClassCtx);
async list(projectId: string, agentId: string): Promise<WorkbenchInfo[]>;
async one(projectId: string, agentId: string, workbenchId: string): Promise<WorkbenchInfo | null>;
async agentEnabled(projectId: string, agentId: string): Promise<boolean>;
async describe(projectId: string, agentId: string, workbenchId: string): Promise<WorkbenchInfo>;
async reload(projectId: string, agentId: string, workbenchId: string, by?: VersionAuthor): Promise<WorkbenchInfo>;
async reloadIfEnabled(projectId: string, agentId: string, workbenchId: string, by?: VersionAuthor): Promise<WorkbenchInfo>;
async setEnabled(projectId: string, agentId: string, workbenchId: string, enabled: boolean, by?: VersionAuthor): Promise<WorkbenchInfo>;
async setAgentEnabled(projectId: string, agentId: string, enabled: boolean): Promise<{ workbenches: WorkbenchInfo[]; enabled: boolean }>;
async dispatch(projectId: string, agentId: string, workbenchId: string, request: WorkbenchRequest): Promise<WorkbenchResponse>;
async uiFile(projectId: string, agentId: string, workbenchId: string, rel: string): Promise<WorkbenchUiFile | null>;
async uiRuntimeFile(projectId: string, agentId: string, workbenchId: string, rel: string): Promise<WorkbenchUiRuntimeFile | null>;
async exists(projectId: string, agentId: string, workbenchId: string): Promise<boolean>;
async iconSvg(projectId: string, agentId: string, workbenchId: string): Promise<{ kind: "svg" | "png"; data: string } | null>;
async history(projectId: string, agentId: string, workbenchId: string): Promise<WorkbenchVersion[]>;
async rollback(projectId: string, agentId: string, workbenchId: string, revision: string, by?: VersionAuthor): Promise<WorkbenchInfo>;
async remove(projectId: string, agentId: string, workbenchId: string, by?: VersionAuthor): Promise<void>;
async appCenter(projectId: string, hidden = false, unavailable?: AppCenterUnavailable): Promise<AppCenterShortcut[]>;
async appCenterIcon(projectId: string, agentId: string, workbenchId: string): Promise<IconImage | null>;
async sidebar(projectId: string, agentId: string): Promise<AppCenterShortcut[]>;
async setSidebar(projectId: string, agentId: string, workbenchId: string, show: boolean): Promise<WorkbenchInfo>;
async setAppCenter(projectId: string, agentId: string, workbenchId: string, show: boolean, by?: VersionAuthor): Promise<WorkbenchInfo>;
async releaseAgent(projectId: string, agentId: string): Promise<void>;
async whileReleased<T>(projectId: string, agentId: string, work: () => Promise<T>): Promise<T>;
}Dependencies & Wiring
Extracted from class decorators@Userequires (15)
paths: Paths · config: Config · clock: Clock · log: Log · channels: Channels · members: Members · projects: Projects · hmr: Hmr · agents: AgentIndex · agentConfig: AgentConfig · sessionIndex: SessionIndex · traces: Traces · runner: ScheduleTaskRunner · sessions: ScheduleSessionCreator · engines: AgentStateEnginesMethods (24)
list
async list(projectId: string, agentId: string): Promise<WorkbenchInfo[]>@paramprojectId
string@paramagentId
string@returns
Promise<WorkbenchInfo[]>one
async one(projectId: string, agentId: string, workbenchId: string): Promise<WorkbenchInfo | null>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@returns
Promise<WorkbenchInfo | null>agentEnabled
async agentEnabled(projectId: string, agentId: string): Promise<boolean>@paramprojectId
string@paramagentId
string@returns
Promise<boolean>describe
async describe(projectId: string, agentId: string, workbenchId: string): Promise<WorkbenchInfo>What the install manifest needs, read from the folder alone — NO migrate, NO watcher,
NO load: an anonymous request (the manifest's auth-less gate) must not be able to run
the folder's compile/boot lifecycle, only look at its package.json. The registration
here is the folder's declaration, not a loaded instance: tabs carry their renderer as
declared, loadedAt is this read's time, error/hints stay empty — the manifest uses
none of them, and anything that wants the live instance asks list.
@paramprojectId
string@paramagentId
string@paramworkbenchId
string@returns
Promise<WorkbenchInfo>reload
async reload(projectId: string, agentId: string, workbenchId: string, by?: VersionAuthor): Promise<WorkbenchInfo>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramby?
VersionAuthor@returns
Promise<WorkbenchInfo>reloadIfEnabled
async reloadIfEnabled(projectId: string, agentId: string, workbenchId: string, by?: VersionAuthor): Promise<WorkbenchInfo>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramby?
VersionAuthor@returns
Promise<WorkbenchInfo>setEnabled
async setEnabled(projectId: string, agentId: string, workbenchId: string, enabled: boolean, by?: VersionAuthor): Promise<WorkbenchInfo>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramenabled
boolean@paramby?
VersionAuthor@returns
Promise<WorkbenchInfo>setAgentEnabled
async setAgentEnabled(projectId: string, agentId: string, enabled: boolean): Promise<{ workbenches: WorkbenchInfo[]; enabled: boolean }>@paramprojectId
string@paramagentId
string@paramenabled
boolean@returns
Promise<{ workbenches: WorkbenchInfo[]; enabled: boolean }>dispatch
async dispatch(projectId: string, agentId: string, workbenchId: string, request: WorkbenchRequest): Promise<WorkbenchResponse>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramrequest
WorkbenchRequest@returns
Promise<WorkbenchResponse>uiFile
async uiFile(projectId: string, agentId: string, workbenchId: string, rel: string): Promise<WorkbenchUiFile | null>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramrel
string@returns
Promise<WorkbenchUiFile | null>uiRuntimeFile
async uiRuntimeFile(projectId: string, agentId: string, workbenchId: string, rel: string): Promise<WorkbenchUiRuntimeFile | null>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramrel
string@returns
Promise<WorkbenchUiRuntimeFile | null>exists
async exists(projectId: string, agentId: string, workbenchId: string): Promise<boolean>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@returns
Promise<boolean>iconSvg
async iconSvg(projectId: string, agentId: string, workbenchId: string): Promise<{ kind: "svg" | "png"; data: string } | null>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@returns
Promise<{ kind: "svg" | "png"; data: string } | null>history
async history(projectId: string, agentId: string, workbenchId: string): Promise<WorkbenchVersion[]>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@returns
Promise<WorkbenchVersion[]>rollback
async rollback(projectId: string, agentId: string, workbenchId: string, revision: string, by?: VersionAuthor): Promise<WorkbenchInfo>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramrevision
string@paramby?
VersionAuthor@returns
Promise<WorkbenchInfo>remove
async remove(projectId: string, agentId: string, workbenchId: string, by?: VersionAuthor): Promise<void>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramby?
VersionAuthor@returns
Promise<void>appCenter
async appCenter(projectId: string, hidden = false, unavailable?: AppCenterUnavailable): Promise<AppCenterShortcut[]>@paramprojectId
string@paramhidden?
unknown@paramunavailable?
AppCenterUnavailable@returns
Promise<AppCenterShortcut[]>appCenterIcon
async appCenterIcon(projectId: string, agentId: string, workbenchId: string): Promise<IconImage | null>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@returns
Promise<IconImage | null>sidebar
async sidebar(projectId: string, agentId: string): Promise<AppCenterShortcut[]>@paramprojectId
string@paramagentId
string@returns
Promise<AppCenterShortcut[]>setSidebar
async setSidebar(projectId: string, agentId: string, workbenchId: string, show: boolean): Promise<WorkbenchInfo>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramshow
boolean@returns
Promise<WorkbenchInfo>setAppCenter
async setAppCenter(projectId: string, agentId: string, workbenchId: string, show: boolean, by?: VersionAuthor): Promise<WorkbenchInfo>@paramprojectId
string@paramagentId
string@paramworkbenchId
string@paramshow
boolean@paramby?
VersionAuthor@returns
Promise<WorkbenchInfo>releaseAgent
async releaseAgent(projectId: string, agentId: string): Promise<void>@paramprojectId
string@paramagentId
string@returns
Promise<void>whileReleased
async whileReleased<T>(projectId: string, agentId: string, work: () => Promise<T>): Promise<T>@paramprojectId
string@paramagentId
string@paramwork
() => Promise<T>@returns
Promise<T>