AiRunCitation ai.run-citation@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
ai
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/ai/run-citation.v1.json

ai.run-citation@1: one source a run cited on OpenVibe.AI (the citations table): what the workflow was given or a citation the requester attached afterwards (provenance.attached), with trust and provenance.

Fields

FieldTypeRequiredDescriptionConstraints
idintegeryes
run_idstringyes
ordinalinteger | null
source_typestringyes
source_idstring | null
urlstring | null
titlestring | null
authorstring | null
published_atstring | null
retrieved_atstring | null
snippetstring | null
content_hashstring | null
trustobject
provenanceobject
attached_bystring | null
created_atstring

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: item
{
  "id": 55,
  "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "ordinal": 0,
  "source_type": "sources.item",
  "source_id": "itm_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "url": "https://news.example.com/a",
  "title": "A story",
  "author": null,
  "published_at": "2026-09-25",
  "retrieved_at": "2026-09-25T18:00:00Z",
  "snippet": null,
  "content_hash": null,
  "trust": {},
  "provenance": {},
  "attached_by": "workflow",
  "created_at": "2026-09-25T18:00:02.000Z"
}
Rejected: no-source-type
{
  "id": 1,
  "run_id": "r"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('ai.run-citation@1', value);   // { valid, errors: [{ path, message }] }