MCPcopy
hub / github.com/msgbyte/tianji / getWorker

Method getWorker

packages/cli/src/utils/api.ts:88–103  ·  view source on GitHub ↗

* Get worker by ID * Uses the OpenAPI SDK WorkerService

(workerId: string)

Source from the content-addressed store, hash-verified

86 * Uses the OpenAPI SDK WorkerService
87 */
88 async getWorker(workerId: string): Promise<WorkerInfo | null> {
89 try {
90 const result = await openApiClient.WorkerService.workerGet({
91 workspaceId: this.config.workspaceId,
92 workerId,
93 });
94
95 return result as WorkerInfo;
96 } catch (error: any) {
97 // If worker not found, return null
98 if (error.status === 404) {
99 return null;
100 }
101 throw error;
102 }
103 }
104}
105
106/**

Callers 1

handlerFunction · 0.80

Calls 1

workerGetMethod · 0.80

Tested by

no test coverage detected