MCPcopy Create free account
hub / github.com/ShipSecAI/studio / save

Function save

worker/src/destinations/adapters/artifact.ts:35–58  ·  view source on GitHub ↗
(input: DestinationSaveInput, context)

Source from the content-addressed store, hash-verified

33
34 return {
35 async save(input: DestinationSaveInput, context): Promise<DestinationSaveResult> {
36 if (!context.artifacts) {
37 throw new ConfigurationError(
38 'Artifact service is not available in this execution context. Enable artifact storage to use this destination.',
39 { configKey: 'artifacts' },
40 );
41 }
42
43 const normalized =
44 destinations.length > 0 ? destinations : (['run'] as ArtifactDestination[]);
45
46 const upload = await context.artifacts.upload({
47 name: input.fileName,
48 mimeType: input.mimeType,
49 content: input.buffer,
50 destinations: normalized,
51 metadata: input.metadata,
52 });
53
54 return {
55 artifactId: upload.artifactId,
56 destinations: normalized,
57 };
58 },
59 };
60 },
61};

Callers

nothing calls this directly

Calls 1

uploadMethod · 0.80

Tested by

no test coverage detected