MCPcopy
hub / github.com/coder/mux / findWorkspaceLifecycleMetadata

Method findWorkspaceLifecycleMetadata

src/node/services/taskService.ts:6100–6117  ·  view source on GitHub ↗
(
    workspaceId: string
  )

Source from the content-addressed store, hash-verified

6098 }
6099
6100 private async findWorkspaceLifecycleMetadata(
6101 workspaceId: string
6102 ): Promise<WorkspaceMetadata | null> {
6103 assert(
6104 workspaceId.trim().length > 0,
6105 "workspace lifecycle metadata lookup requires workspaceId"
6106 );
6107 try {
6108 const allMetadata = await this.config.getAllWorkspaceMetadata();
6109 return allMetadata.find((metadata) => metadata.id === workspaceId) ?? null;
6110 } catch (error: unknown) {
6111 log.debug("Failed to load workspace metadata for workspace lifecycle", {
6112 workspaceId,
6113 error: getErrorMessage(error),
6114 });
6115 return null;
6116 }
6117 }
6118
6119 private isTranscriptOnlyWorkspaceMetadata(metadata: WorkspaceMetadata): boolean {
6120 return "transcriptOnly" in metadata && metadata.transcriptOnly === true;

Calls 4

getErrorMessageFunction · 0.90
debugMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected