MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / artifactsGet

Function artifactsGet

packages/core/sdk/src/executor.ts:6004–6013  ·  view source on GitHub ↗
(
      id: string,
    )

Source from the content-addressed store, hash-verified

6002 .pipe(Effect.map((rows) => rows.map(rowToArtifactSummary)));
6003
6004 const artifactsGet = (
6005 id: string,
6006 ): Effect.Effect<Artifact, ArtifactNotFoundError | StorageFailure> =>
6007 Effect.gen(function* () {
6008 const row = yield* core.findFirst("artifact", {
6009 where: artifactById(id),
6010 });
6011 if (!row) return yield* new ArtifactNotFoundError({ id: ArtifactId.make(id) });
6012 return rowToArtifact(row);
6013 });
6014
6015 const artifactsSave = (
6016 input: SaveArtifactInput,

Callers

nothing calls this directly

Calls 2

rowToArtifactFunction · 0.90
artifactByIdFunction · 0.85

Tested by

no test coverage detected