Skip to content

@codesoul-co/hypha-skills / remote-registry

Using this module

Use the Remote registry module for registering and resolving versioned capabilities or implementations. It exports 1 class, 8 interfaces.

Import from the package entrypoint

ts
import {
  HttpsSkillRegistryClient,
} from '@codesoul-co/hypha-skills';

import type {
  HttpsSkillRegistryClientOptions,
  SignedSkillRegistryEntry,
  SkillDependencyLock,
  SkillRegistryPage,
  SkillSbomRef,
  SkillSupplyChainManifest,
  SkillTransparencyProof,
  VerifiedSkillBundle,
} from '@codesoul-co/hypha-skills';

Usage patterns

  • Use the 8 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
HttpsSkillRegistryClientclassnew HttpsSkillRegistryClient(options: HttpsSkillRegistryClientOptions): HttpsSkillRegistryClientHTTPS registry client that verifies publisher identity and transparency inclusion.
HttpsSkillRegistryClientOptionsinterfaceinterface HttpsSkillRegistryClientOptionsHttps Skill Registry Client Options interface with 13 public fields or methods.
SignedSkillRegistryEntryinterfaceinterface SignedSkillRegistryEntrySigned Skill Registry Entry interface with 3 public fields or methods.
SkillDependencyLockinterfaceinterface SkillDependencyLockSkill Dependency Lock interface with 3 public fields or methods.
SkillRegistryPageinterfaceinterface SkillRegistryPageSkill Registry Page interface with 3 public fields or methods.
SkillSbomRefinterfaceinterface SkillSbomRefSkill Sbom Ref interface with 3 public fields or methods.
SkillSupplyChainManifestinterfaceinterface SkillSupplyChainManifestSkill Supply Chain Manifest interface with 11 public fields or methods.
SkillTransparencyProofinterfaceinterface SkillTransparencyProofSkill Transparency Proof interface with 5 public fields or methods.
VerifiedSkillBundleinterfaceinterface VerifiedSkillBundleVerified Skill Bundle interface with 2 public fields or methods.

HttpsSkillRegistryClient

HTTPS registry client that verifies publisher identity and transparency inclusion.

  • Kind: class
  • Import: import { HttpsSkillRegistryClient } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export declare class HttpsSkillRegistryClient {
    constructor(options: HttpsSkillRegistryClientOptions);
    resolve(skillId: string, version: string): Promise<SignedSkillRegistryEntry>;
    list(input?: {
            cursor?: string;
            limit?: number;
        }): Promise<SkillRegistryPage>;
    download(entryInput: SignedSkillRegistryEntry): Promise<VerifiedSkillBundle>;
    verifyOfflineBundle(bundle: VerifiedSkillBundle): VerifiedSkillBundle;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: HttpsSkillRegistryClientOptions): HttpsSkillRegistryClientCreates an instance of this class.
downloadmethoddownload(entryInput: SignedSkillRegistryEntry): Promise<VerifiedSkillBundle>Public method; parameters and return type are shown in the signature.
listmethodlist(input?: { cursor?: string; limit?: number; }): Promise<SkillRegistryPage>Public method; parameters and return type are shown in the signature.
resolvemethodresolve(skillId: string, version: string): Promise<SignedSkillRegistryEntry>Public method; parameters and return type are shown in the signature.
verifyOfflineBundlemethodverifyOfflineBundle(bundle: VerifiedSkillBundle): VerifiedSkillBundlePublic method; parameters and return type are shown in the signature.

HttpsSkillRegistryClientOptions

Https Skill Registry Client Options interface with 13 public fields or methods.

  • Kind: interface
  • Import: import type { HttpsSkillRegistryClientOptions } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface HttpsSkillRegistryClientOptions {
    endpoint: string;
    publisherKeys: Readonly<Record<string, string>>;
    transparencyLogKeys: Readonly<Record<string, string>>;
    tenantId?: string;
    authorization?: () => string | Promise<string>;
    artifactOrigins?: string[];
    maxMetadataBytes?: number;
    maxBundleBytes?: number;
    timeoutMs?: number;
    maxAttempts?: number;
    fetch?: typeof fetch;
    now?: () => number;
    sleep?: (ms: number) => Promise<void>;
}

Contract members

MemberKindSignatureDescription
artifactOriginspropertyartifactOrigins?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
authorizationmethodauthorization?(): string | Promise<string>Public method; parameters and return type are shown in the signature.
endpointpropertyendpoint: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
fetchmethodfetch?(input: RequestInfo | URL, init?: RequestInit): Promise<Response> | fetch?(input: string | URL | Request, init?: RequestInit): Promise<Response>Public method; parameters and return type are shown in the signature.
maxAttemptspropertymaxAttempts?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxBundleBytespropertymaxBundleBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxMetadataBytespropertymaxMetadataBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): numberPublic method; parameters and return type are shown in the signature.
publisherKeyspropertypublisherKeys: Readonly<Record<string, string>>Public property; its type, readonly modifier and optionality are shown in the signature.
sleepmethodsleep?(ms: number): Promise<void>Public method; parameters and return type are shown in the signature.
tenantIdpropertytenantId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
timeoutMspropertytimeoutMs?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
transparencyLogKeyspropertytransparencyLogKeys: Readonly<Record<string, string>>Public property; its type, readonly modifier and optionality are shown in the signature.

SignedSkillRegistryEntry

Signed Skill Registry Entry interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { SignedSkillRegistryEntry } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface SignedSkillRegistryEntry {
    manifest: SkillSupplyChainManifest;
    publisherSignature: string;
    transparency: SkillTransparencyProof;
}

Contract members

MemberKindSignatureDescription
manifestpropertymanifest: SkillSupplyChainManifestPublic property; its type, readonly modifier and optionality are shown in the signature.
publisherSignaturepropertypublisherSignature: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
transparencypropertytransparency: SkillTransparencyProofPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillDependencyLock

Skill Dependency Lock interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { SkillDependencyLock } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface SkillDependencyLock {
    id: string;
    version: string;
    contentSha256: string;
}

Contract members

MemberKindSignatureDescription
contentSha256propertycontentSha256: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
versionpropertyversion: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillRegistryPage

Skill Registry Page interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { SkillRegistryPage } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface SkillRegistryPage {
    entries: SignedSkillRegistryEntry[];
    nextCursor?: string;
    revision?: string;
}

Contract members

MemberKindSignatureDescription
entriespropertyentries: SignedSkillRegistryEntry[]Public property; its type, readonly modifier and optionality are shown in the signature.
nextCursorpropertynextCursor?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
revisionpropertyrevision?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillSbomRef

Skill Sbom Ref interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { SkillSbomRef } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface SkillSbomRef {
    format: 'cyclonedx-json' | 'spdx-json';
    sha256: string;
    url?: string;
}

Contract members

MemberKindSignatureDescription
formatpropertyformat: "cyclonedx-json" | "spdx-json"Public property; its type, readonly modifier and optionality are shown in the signature.
sha256propertysha256: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
urlpropertyurl?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillSupplyChainManifest

Skill Supply Chain Manifest interface with 11 public fields or methods.

  • Kind: interface
  • Import: import type { SkillSupplyChainManifest } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface SkillSupplyChainManifest {
    skillId: string;
    version: string;
    revision?: string;
    contentSha256: string;
    downloadUrl: string;
    publisherId: string;
    issuedAt: string;
    expiresAt?: string;
    tenantIds?: string[];
    dependencies: SkillDependencyLock[];
    sbom: SkillSbomRef;
}

Contract members

MemberKindSignatureDescription
contentSha256propertycontentSha256: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
dependenciespropertydependencies: SkillDependencyLock[]Public property; its type, readonly modifier and optionality are shown in the signature.
downloadUrlpropertydownloadUrl: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
expiresAtpropertyexpiresAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
issuedAtpropertyissuedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
publisherIdpropertypublisherId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
revisionpropertyrevision?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sbompropertysbom: SkillSbomRefPublic property; its type, readonly modifier and optionality are shown in the signature.
skillIdpropertyskillId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
tenantIdspropertytenantIds?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
versionpropertyversion: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillTransparencyProof

Skill Transparency Proof interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { SkillTransparencyProof } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface SkillTransparencyProof {
    logId: string;
    logIndex: number;
    entryHash: string;
    checkpointHash: string;
    signature: string;
}

Contract members

MemberKindSignatureDescription
checkpointHashpropertycheckpointHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
entryHashpropertyentryHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
logIdpropertylogId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
logIndexpropertylogIndex: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
signaturepropertysignature: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

VerifiedSkillBundle

Verified Skill Bundle interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { VerifiedSkillBundle } from '@codesoul-co/hypha-skills';
  • Source module: remote-registry

Declaration

text
export interface VerifiedSkillBundle {
    entry: SignedSkillRegistryEntry;
    content: Uint8Array;
}

Contract members

MemberKindSignatureDescription
contentpropertycontent: Uint8Array<ArrayBufferLike>Public property; its type, readonly modifier and optionality are shown in the signature.
entrypropertyentry: SignedSkillRegistryEntryPublic property; its type, readonly modifier and optionality are shown in the signature.