MCPcopy Create free account
hub / github.com/browserbase/stagehand / write

Method write

packages/evals/framework/rubricCache.ts:92–104  ·  view source on GitHub ↗
(taskSpec: TaskSpec, rubric: Rubric)

Source from the content-addressed store, hash-verified

90 }
91
92 async write(taskSpec: TaskSpec, rubric: Rubric): Promise<void> {
93 await fs.mkdir(this.cacheDir, { recursive: true });
94 const entry: CacheEntry = {
95 taskId: taskSpec.id,
96 instructionHash: hashInstruction(taskSpec.instruction),
97 generatedAt: new Date().toISOString(),
98 rubric,
99 };
100 await fs.writeFile(
101 this.entryPath(taskSpec.id),
102 JSON.stringify(entry, null, 2),
103 );
104 }
105
106 /** Wipe the cache directory (used by tests / `bench cache clear`). */
107 async clear(): Promise<void> {

Callers 15

resolveRubricTracedFunction · 0.95
writeToStreamFunction · 0.80
emitMethod · 0.80
runC8ReportFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
catchFunction · 0.80
writeUpdateNoticeFunction · 0.80
runPackageManagerFunction · 0.80
reportCleanupErrorMethod · 0.80
startMethod · 0.80
handleRouteErrorFunction · 0.80

Calls 2

entryPathMethod · 0.95
hashInstructionFunction · 0.85

Tested by 1

sendSocketRequestFunction · 0.64