(options = {})
| 200 | } |
| 201 | |
| 202 | function 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 | |
| 229 | function readAppArtifacts(projectRoot = process.cwd()) { |
| 230 | const filePath = path.join(planningDir(path.resolve(projectRoot), 'artifacts'), 'codex-app-evidence.jsonl'); |
no test coverage detected