MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / buildManifest

Function buildManifest

src/artifacts/store.ts:101–108  ·  view source on GitHub ↗
(id: string, title: string, type: ArtifactType, file: string, now: string, note?: string)

Source from the content-addressed store, hash-verified

99
100/** Build a fresh manifest for a new artifact's first version. */
101export function buildManifest(id: string, title: string, type: ArtifactType, file: string, now: string, note?: string): ArtifactManifest {
102 return {
103 id, title, type,
104 createdAt: now, updatedAt: now,
105 current: 1,
106 versions: [{ v: 1, file, createdAt: now, ...(note ? { note } : {}) }],
107 };
108}
109
110/** Append a new version to a manifest and make it current (immutably). */
111export function addVersion(manifest: ArtifactManifest, file: string, now: string, note?: string): ArtifactManifest {

Callers 2

createArtifactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected