Forks
Definition forking with lineage tracking. Fork published definitions and trace ancestry chains.
4 methods
client.forks.create()
Fork a published definition to create a new owned copy. The fork starts as a draft.
ParametersForkDefinitionBody
typerequiredstringSource definition type.
agentcommandworkflowpipelinenamerequiredstringSource definition name.
versionrequiredstringSource definition version.
newNamerequiredstringName for the forked definition.
visibilityoptionalstringVisibility of the fork.
privateunlistedpublicprivatedisplayNameoptionalstringDisplay name for the fork.
descriptionoptionalstringDescription for the fork.
Return Fields
definitionrequiredDefinitionThe newly created fork definition.
forkrequiredForkFork relationship metadata.
sourcerequiredDefinitionListItemSource definition summary.
warningsoptionalstring[]Any warnings generated during forking.
create(type: DefinitionType, name: string, version: string, body: ForkDefinitionBody): Promise<ForkResponse>import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.forks.create({
type: 'agent',
name: 'my-project',
version: '1.0.0',
newName: 'my-fork',
});
console.log(result.definition);// Promise<ForkResponse>
{
definition: Definition;
fork: Fork;
source: DefinitionListItem;
warnings?: string[];
}client.forks.isForkable()
Check whether a definition can be forked by the current user.
Parameters
typerequiredstringDefinition type.
agentcommandworkflowpipelinenamerequiredstringDefinition name.
versionrequiredstringDefinition version.
Return Fields
canForkrequiredbooleanWhether the definition can be forked.
reasonoptionalstringReason if forking is not allowed.
requiresSubscriptionoptionalbooleanWhether a paid subscription is required to fork.
isForkable(type: DefinitionType, name: string, version: string): Promise<ForkableCheck>import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.forks.isForkable('agent', 'my-project', '1.0.0');
console.log(result.canFork);// Promise<ForkableCheck>
{
canFork: boolean;
reason?: string;
requiresSubscription?: boolean;
}client.forks.getAncestry()
Get the fork ancestry chain. Shows the full lineage from original to current fork.
Parameters
typerequiredstringDefinition type.
agentcommandworkflowpipelinenamerequiredstringDefinition name.
versionrequiredstringDefinition version.
Return Fields
currentoptionalDefinitionListItemThis definition.
sourceoptionalDefinitionListItem | nullDirect source (if this is a fork).
chainoptionalDefinitionListItem[]Full ancestry chain from original.
getAncestry(type: DefinitionType, name: string, version: string): Promise<ForkLineage>import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.forks.getAncestry('agent', 'my-project', '1.0.0');
console.log(result.current);// Promise<ForkLineage>
{
current?: DefinitionListItem;
source?: DefinitionListItem | null;
chain?: DefinitionListItem[];
}client.forks.list()
List all forks derived from this definition.
Parameters
typerequiredstringDefinition type.
agentcommandworkflowpipelinenamerequiredstringDefinition name.
versionrequiredstringDefinition version.
Return Fields
forksrequiredForkEntry[]Array of fork entries.
totalForksrequirednumberTotal number of forks.
list(type: DefinitionType, name: string, version: string): Promise<ForkListResponse>import { RegistryClient } from '@uluops/registry-sdk';
const client = new RegistryClient({
apiKey: 'ulr_your-api-key',
});
const result = await client.forks.list('agent', 'my-project', '1.0.0');
console.log(result.forks);// Promise<ForkListResponse>
{
forks: ForkEntry[];
totalForks: number;
}