MCPcopy
hub / github.com/callstack/agent-device / write

Function write

src/remote/upload-client-artifact.ts:97–100  ·  view source on GitHub ↗
(chunk: Buffer, _encoding, callback)

Source from the content-addressed store, hash-verified

95 const hash = createHash(ARTIFACT_HASH_ALGORITHM);
96 const sink = new Writable({
97 write(chunk: Buffer, _encoding, callback) {
98 hash.update(chunk);
99 callback();
100 },
101 });
102 await pipeline(fs.createReadStream(localPath), sink).catch((err: unknown) => {
103 throw new AppError(

Callers 1

createMcpPayloadQueueFunction · 0.50

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected