Versions
Version listing and comparison. View version history and diff changes between versions.
2 methods
client.versions.list()
List all versions of a definition with hash, timestamps, and change metadata.
Parameters
typerequiredstringDefinition type.
agentcommandworkflowpipelinenamerequiredstringDefinition name.
limitoptionalnumberResults per page.
offsetoptionalnumberPagination offset.
Return Fields
versionsrequiredVersionListItem[]Array of version snapshots.
totalrequirednumberTotal version count.
limitrequirednumberPage size used.
offsetrequirednumberPagination offset used.
list(type: DefinitionType, name: string, options?: { limit?: number; offset?: number }): Promise<VersionsListResponse>import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.versions.list('agent', 'my-project');
console.log(result.versions);// Promise<VersionsListResponse>
{
versions: VersionListItem[];
total: number;
limit: number;
offset: number;
}client.versions.diff()
Compare two versions of a definition. Returns a section-level summary by default. Use format to select output: 'sections' (default), 'fields' (per-field changes), or 'unified' (git-style unified diff).
Parameters
typerequiredstringDefinition type.
agentcommandworkflowpipelinenamerequiredstringDefinition name.
fromrequiredstringSource version (semver).
torequiredstringTarget version (semver).
fulloptionalbooleanIf true, returns full YAML content for both versions.
formatoptionalstringOutput format.
sectionsfieldsunifiedsectionsReturn Fields
fromVersionrequiredstringSource version.
toVersionrequiredstringTarget version.
fromHashrequiredstringSHA-256 hash of source version.
toHashrequiredstringSHA-256 hash of target version.
hasChangesrequiredbooleanWhether any changes exist between versions.
hasPromptChangesrequiredbooleanWhether rendered prompt content changed.
sectionsAddedrequiredstring[]Names of YAML sections added.
sectionsRemovedrequiredstring[]Names of YAML sections removed.
sectionsModifiedrequiredstring[]Names of YAML sections modified.
sectionsUnchangedrequiredstring[]Names of unchanged YAML sections.
diff(type: DefinitionType, name: string, fromVersion: string, toVersion: string, options?: { full?: boolean; format?: 'sections' | 'fields' | 'unified' }): Promise<VersionDiffSummary | VersionFieldDiff | VersionUnifiedDiff>import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.versions.diff('agent', 'my-project', '1.0.0', '1.0.0');
console.log(result.fromVersion);// Promise<VersionDiffSummary | VersionFieldDiff | VersionUnifiedDiff>
{
fromVersion: string;
toVersion: string;
fromHash: string;
toHash: string;
hasChanges: boolean;
hasPromptChanges: boolean;
sectionsAdded: string[];
sectionsRemoved: string[];
sectionsModified: string[];
sectionsUnchanged: string[];
}