MCPcopy Create free account
hub / github.com/ConardLi/easy-agent / getTaskOutputPath

Function getTaskOutputPath

src/utils/taskOutput.ts:57–64  ·  view source on GitHub ↗
(sessionId: string, agentId: string)

Source from the content-addressed store, hash-verified

55 */
56export function getTaskOutputPath(sessionId: string, agentId: string): string {
57 return path.join(getProjectsRoot(), encodeSessionDir(sessionId), "tasks", `${agentId}.output`);
58}
59
60/**
61 * Make sure the `tasks/` directory and the empty .output file both
62 * exist. Idempotent — safe to call repeatedly.
63 *
64 * We pre-create an empty file so the parent's Read tool doesn't error
65 * with ENOENT during the brief window between `async_launched` returning
66 * and the first event being written.
67 */

Callers 1

ensureTaskOutputFileFunction · 0.70

Calls 2

getProjectsRootFunction · 0.90
encodeSessionDirFunction · 0.85

Tested by

no test coverage detected