MCPcopy Create free account
hub / github.com/SethGammon/Citadel / recordAppArtifact

Function recordAppArtifact

core/codex/native-integrations.js:202–227  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

200}
201
202function recordAppArtifact(options = {}) {
203 const projectRoot = path.resolve(options.projectRoot || process.cwd());
204 const artifact = createIntegrityRecord({
205 schema: 1,
206 kind: options.kind || 'artifact',
207 path: options.path,
208 workflow: options.workflow || 'qa',
209 route: options.route || null,
210 status: options.status || 'recorded',
211 note: options.note || '',
212 codexAppUse: options.codexAppUse || 'Open in the Codex app artifact viewer or in-app browser for review.',
213 recordedAt: nowIso(options),
214 }, {
215 run_id: options.run_id,
216 agent_id: options.agent_id,
217 task_id: options.task_id,
218 artifact_id: options.artifact_id,
219 parent_id: options.parent_id,
220 source_event_id: options.source_event_id,
221 hmacKey: options.hmacKey,
222 hmacKeyId: options.hmacKeyId,
223 });
224 if (!artifact.path) throw new Error('recordAppArtifact requires path');
225 appendJsonl(path.join(planningDir(projectRoot, 'artifacts'), 'codex-app-evidence.jsonl'), artifact);
226 return artifact;
227}
228
229function readAppArtifacts(projectRoot = process.cwd()) {
230 const filePath = path.join(planningDir(path.resolve(projectRoot), 'artifacts'), 'codex-app-evidence.jsonl');

Callers 4

testArtifactVerificationFunction · 0.85
testBridgeUtilitiesFunction · 0.85

Calls 4

createIntegrityRecordFunction · 0.85
nowIsoFunction · 0.70
appendJsonlFunction · 0.70
planningDirFunction · 0.70

Tested by

no test coverage detected