Skip to content

@codesoul-co/hypha-core / modules/artifact/eventing

Using this module

Use the Eventing module for creating, recording, or reading Event contracts. It exports 3 classes, 3 interfaces.

Import from the package entrypoint

ts
import {
  EventingArtifactGarbageCollector,
  EventingArtifactManager,
  EventingArtifactRetentionProcessor,
} from '@codesoul-co/hypha-core';

import type {
  EventingArtifactGarbageCollectorOptions,
  EventingArtifactManagerOptions,
  EventingArtifactRetentionProcessorOptions,
} from '@codesoul-co/hypha-core';

Usage patterns

  • Use the 3 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 3 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
EventingArtifactGarbageCollectorclassnew EventingArtifactGarbageCollector(options: EventingArtifactGarbageCollectorOptions): EventingArtifactGarbageCollectorEventing Artifact Garbage Collector class with 2 public constructor or member entries; its exact declarations are listed below.
EventingArtifactManagerclassnew EventingArtifactManager(options: EventingArtifactManagerOptions): EventingArtifactManagerEventing Artifact Manager class with 17 public constructor or member entries; its exact declarations are listed below.
EventingArtifactRetentionProcessorclassnew EventingArtifactRetentionProcessor(options: EventingArtifactRetentionProcessorOptions): EventingArtifactRetentionProcessorEventing Artifact Retention Processor class with 2 public constructor or member entries; its exact declarations are listed below.
EventingArtifactGarbageCollectorOptionsinterfaceinterface EventingArtifactGarbageCollectorOptionsEventing Artifact Garbage Collector Options interface with 8 public fields or methods.
EventingArtifactManagerOptionsinterfaceinterface EventingArtifactManagerOptionsEventing Artifact Manager Options interface with 4 public fields or methods.
EventingArtifactRetentionProcessorOptionsinterfaceinterface EventingArtifactRetentionProcessorOptionsEventing Artifact Retention Processor Options interface with 8 public fields or methods.

EventingArtifactGarbageCollector

Eventing Artifact Garbage Collector class with 2 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { EventingArtifactGarbageCollector } from '@codesoul-co/hypha-core';
  • Source module: modules/artifact/eventing

Declaration

text
export declare class EventingArtifactGarbageCollector implements ArtifactGarbageCollector {
    constructor(options: EventingArtifactGarbageCollectorOptions);
    collect(input: ArtifactGarbageCollectionRequest): Promise<ArtifactGarbageCollectionResult>;
}

Public members

MemberKindSignatureDescription
collectmethodcollect(input: ArtifactGarbageCollectionRequest): Promise<ArtifactGarbageCollectionResult>Public method; parameters and return type are shown in the signature.
constructorconstructor(options: EventingArtifactGarbageCollectorOptions): EventingArtifactGarbageCollectorCreates an instance of this class.

EventingArtifactManager

Eventing Artifact Manager class with 17 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { EventingArtifactManager } from '@codesoul-co/hypha-core';
  • Source module: modules/artifact/eventing

Declaration

text
export declare class EventingArtifactManager implements ArtifactManager {
    constructor(options: EventingArtifactManagerOptions);
    create(input: ArtifactCreateRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord>;
    createFromWorkspace(input: ArtifactFromWorkspaceRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord>;
    createVersion(input: ArtifactVersionRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord>;
    get(request: ArtifactGetRecordRequest): Promise<ArtifactRecord | null>;
    read(input: ArtifactReadRequest, options?: ArtifactOperationOptions): Promise<ArtifactReadResult>;
    createDownloadAccess(request: ArtifactCreateDownloadAccessRequest): Promise<ArtifactDownloadAccess>;
    list(request: ArtifactListRequest): Promise<ArtifactRecord[]>;
    finalize(input: ArtifactFinalizeRequest): Promise<ArtifactRecord>;
    archive(input: ArtifactArchiveRequest): Promise<ArtifactRecord>;
    invalidate(input: ArtifactInvalidateRequest): Promise<ArtifactRecord>;
    delete(input: ArtifactDeleteRequest): Promise<void>;
    traceLineage(request: ArtifactTraceLineageRequest): Promise<ArtifactLineage>;
    latest(request: ArtifactLatestRequest): Promise<ArtifactRecord | null>;
    previous(request: ArtifactPreviousRequest): Promise<ArtifactRecord | null>;
    profile(ref: SpecRef): Promise<ArtifactProfileSpec | null>;
    health(): Promise<Record<string, ProviderHealth>>;
}

Public members

MemberKindSignatureDescription
archivemethodarchive(input: ArtifactArchiveRequest): Promise<ArtifactRecord>Public method; parameters and return type are shown in the signature.
constructorconstructor(options: EventingArtifactManagerOptions): EventingArtifactManagerCreates an instance of this class.
createmethodcreate(input: ArtifactCreateRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord>Public method; parameters and return type are shown in the signature.
createDownloadAccessmethodcreateDownloadAccess(request: ArtifactCreateDownloadAccessRequest): Promise<ArtifactDownloadAccess>Public method; parameters and return type are shown in the signature.
createFromWorkspacemethodcreateFromWorkspace(input: ArtifactFromWorkspaceRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord>Public method; parameters and return type are shown in the signature.
createVersionmethodcreateVersion(input: ArtifactVersionRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord>Public method; parameters and return type are shown in the signature.
deletemethoddelete(input: ArtifactDeleteRequest): Promise<void>Public method; parameters and return type are shown in the signature.
finalizemethodfinalize(input: ArtifactFinalizeRequest): Promise<ArtifactRecord>Public method; parameters and return type are shown in the signature.
getmethodget(request: ArtifactGetRecordRequest): Promise<ArtifactRecord | null>Public method; parameters and return type are shown in the signature.
healthmethodhealth(): Promise<Record<string, ProviderHealth>>Public method; parameters and return type are shown in the signature.
invalidatemethodinvalidate(input: ArtifactInvalidateRequest): Promise<ArtifactRecord>Public method; parameters and return type are shown in the signature.
latestmethodlatest(request: ArtifactLatestRequest): Promise<ArtifactRecord | null>Public method; parameters and return type are shown in the signature.
listmethodlist(request: ArtifactListRequest): Promise<ArtifactRecord[]>Public method; parameters and return type are shown in the signature.
previousmethodprevious(request: ArtifactPreviousRequest): Promise<ArtifactRecord | null>Public method; parameters and return type are shown in the signature.
profilemethodprofile(ref: SpecRef): Promise<ArtifactProfileSpec | null>Public method; parameters and return type are shown in the signature.
readmethodread(input: ArtifactReadRequest, options?: ArtifactOperationOptions): Promise<ArtifactReadResult>Public method; parameters and return type are shown in the signature.
traceLineagemethodtraceLineage(request: ArtifactTraceLineageRequest): Promise<ArtifactLineage>Public method; parameters and return type are shown in the signature.

EventingArtifactRetentionProcessor

Eventing Artifact Retention Processor class with 2 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { EventingArtifactRetentionProcessor } from '@codesoul-co/hypha-core';
  • Source module: modules/artifact/eventing

Declaration

text
export declare class EventingArtifactRetentionProcessor implements ArtifactRetentionProcessor {
    constructor(options: EventingArtifactRetentionProcessorOptions);
    process(request: ArtifactRetentionProcessRequest): Promise<ArtifactRetentionProcessResult>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: EventingArtifactRetentionProcessorOptions): EventingArtifactRetentionProcessorCreates an instance of this class.
processmethodprocess(request: ArtifactRetentionProcessRequest): Promise<ArtifactRetentionProcessResult>Public method; parameters and return type are shown in the signature.

EventingArtifactGarbageCollectorOptions

Eventing Artifact Garbage Collector Options interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { EventingArtifactGarbageCollectorOptions } from '@codesoul-co/hypha-core';
  • Source module: modules/artifact/eventing

Declaration

text
export interface EventingArtifactGarbageCollectorOptions {
    collector: ArtifactGarbageCollector;
    publisher: ArtifactEventPublisher;
    idGenerator: () => string;
    now?: () => string;
    workspaceId?: string;
    sessionId?: string;
    runId?: string;
    agentId?: string;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
collectorpropertycollector: ArtifactGarbageCollectorPublic property; its type, readonly modifier and optionality are shown in the signature.
idGeneratormethodidGenerator(): stringPublic method; parameters and return type are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
publisherpropertypublisher: ArtifactEventPublisherPublic property; its type, readonly modifier and optionality are shown in the signature.
runIdpropertyrunId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sessionIdpropertysessionId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

EventingArtifactManagerOptions

Eventing Artifact Manager Options interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { EventingArtifactManagerOptions } from '@codesoul-co/hypha-core';
  • Source module: modules/artifact/eventing

Declaration

text
export interface EventingArtifactManagerOptions {
    manager: ArtifactManager;
    publisher: ArtifactEventPublisher;
    idGenerator: () => string;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
idGeneratormethodidGenerator(): stringPublic method; parameters and return type are shown in the signature.
managerpropertymanager: ArtifactManagerPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
publisherpropertypublisher: ArtifactEventPublisherPublic property; its type, readonly modifier and optionality are shown in the signature.

EventingArtifactRetentionProcessorOptions

Eventing Artifact Retention Processor Options interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { EventingArtifactRetentionProcessorOptions } from '@codesoul-co/hypha-core';
  • Source module: modules/artifact/eventing

Declaration

text
export interface EventingArtifactRetentionProcessorOptions {
    processor: ArtifactRetentionProcessor;
    publisher: ArtifactEventPublisher;
    idGenerator: () => string;
    now?: () => string;
    workspaceId?: string;
    sessionId?: string;
    runId?: string;
    agentId?: string;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idGeneratormethodidGenerator(): stringPublic method; parameters and return type are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
processorpropertyprocessor: ArtifactRetentionProcessorPublic property; its type, readonly modifier and optionality are shown in the signature.
publisherpropertypublisher: ArtifactEventPublisherPublic property; its type, readonly modifier and optionality are shown in the signature.
runIdpropertyrunId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sessionIdpropertysessionId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.