Skip to content

@codesoul-co/hypha-inference / types

Using this module

Use the Types module for declaring and runtime-validating contracts. It exports 34 interfaces, 7 types.

Import from the package entrypoint

ts
import type {
  CompiledPrompt,
  InferenceBackend,
  InferenceBackendCapabilities,
  InferenceBackendRegistryEntry,
  InferenceBackendRequest,
  InferenceBackendResponse,
  InferenceCacheIssue,
  InferenceCachePolicy,
} from '@codesoul-co/hypha-inference';

// The complete export list is documented below.

Usage patterns

  • Use the 41 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.

Public exports

SymbolKindSignatureDescription
CompiledPromptinterfaceinterface CompiledPromptCompiled Prompt interface with 4 public fields or methods.
InferenceBackendinterfaceinterface InferenceBackendInference Backend interface with 5 public fields or methods.
InferenceBackendCapabilitiesinterfaceinterface InferenceBackendCapabilitiesInference Backend Capabilities interface with 6 public fields or methods.
InferenceBackendRegistryEntryinterfaceinterface InferenceBackendRegistryEntryInference Backend Registry Entry interface with 3 public fields or methods.
InferenceBackendRequestinterfaceinterface InferenceBackendRequestInference Backend Request interface with 14 public fields or methods.
InferenceBackendResponseinterfaceinterface InferenceBackendResponseInference Backend Response interface with 6 public fields or methods.
InferenceCacheIssueinterfaceinterface InferenceCacheIssueInference Cache Issue interface with 4 public fields or methods.
InferenceCachePolicyinterfaceinterface InferenceCachePolicyInference Cache Policy interface with 3 public fields or methods.
InferenceCacheScopeinterfaceinterface InferenceCacheScopeInference Cache Scope interface with 3 public fields or methods.
InferenceCacheUsageinterfaceinterface InferenceCacheUsageInference Cache Usage interface with 11 public fields or methods.
InferenceGenerationOptionsinterfaceinterface InferenceGenerationOptionsInference Generation Options interface with 9 public fields or methods.
InferenceManagerOptionsinterfaceinterface InferenceManagerOptionsInference Manager Options interface with 8 public fields or methods.
InferenceProviderinterfaceinterface InferenceProviderInference Provider interface with 3 public fields or methods.
InferenceRequestinterfaceinterface InferenceRequestInference Request interface with 18 public fields or methods.
InferenceResponseinterfaceinterface InferenceResponseInference Response interface with 7 public fields or methods.
InferenceToolDescriptorinterfaceinterface InferenceToolDescriptorInference Tool Descriptor interface with 4 public fields or methods.
InferenceUsageinterfaceinterface InferenceUsageInference Usage interface with 3 public fields or methods.
KvCacheProviderinterfaceinterface KvCacheProviderKv Cache Provider interface with 3 public fields or methods.
KvCacheRefinterfaceinterface KvCacheRefKv Cache Ref interface with 7 public fields or methods.
KvCacheWritePolicyinterfaceinterface KvCacheWritePolicyKv Cache Write Policy interface with 3 public fields or methods.
PlasmodCacheMetadatainterfaceinterface PlasmodCacheMetadataPlasmod Cache Metadata interface with 10 public fields or methods.
PlasmodHotLayerinterfaceinterface PlasmodHotLayerPlasmod Hot Layer interface with 4 public fields or methods.
PlasmodHotLayerPrepareInputinterfaceinterface PlasmodHotLayerPrepareInputPlasmod Hot Layer Prepare Input interface with 12 public fields or methods.
PlasmodHotLayerPrepareResultinterfaceinterface PlasmodHotLayerPrepareResultPlasmod Hot Layer Prepare Result interface with 6 public fields or methods.
PlasmodReusePolicyinterfaceinterface PlasmodReusePolicyPlasmod Reuse Policy interface with 5 public fields or methods.
PlasmodSessionStateinterfaceinterface PlasmodSessionStatePlasmod Session State interface with 10 public fields or methods.
PrefixCacheProviderinterfaceinterface PrefixCacheProviderPrefix Cache Provider interface with 3 public fields or methods.
PrefixCacheRefinterfaceinterface PrefixCacheRefPrefix Cache Ref interface with 6 public fields or methods.
PrefixSegmentinterfaceinterface PrefixSegmentPrefix Segment interface with 9 public fields or methods.
PrefixSegmentationResultinterfaceinterface PrefixSegmentationResultPrefix Segmentation Result interface with 5 public fields or methods.
PrefixSegmenterinterfaceinterface PrefixSegmenterPrefix Segmenter interface with 1 public fields or methods.
PromptCompileInputinterfaceinterface PromptCompileInputPrompt Compile Input interface with 11 public fields or methods.
PromptCompilerinterfaceinterface PromptCompilerPrompt Compiler interface with 1 public fields or methods.
PromptMessageinterfaceinterface PromptMessagePrompt Message interface with 4 public fields or methods.
InferenceBackendKindtypetype InferenceBackendKind = 'ollama' | 'sglang' | 'vllm' | 'llama.cpp' | 'openai-api'Public type alias for Inference Backend Kind; the declaration contains its complete type expression.
InferenceCacheMissReasontypetype InferenceCacheMissReason = 'missing' | 'expired' | 'not_configured' | 'error'Public type alias for Inference Cache Miss Reason; the declaration contains its complete type expression.
KvCacheScopetypetype KvCacheScope = 'run' | 'session' | 'workspace'Public type alias for Kv Cache Scope; the declaration contains its complete type expression.
KvCacheWriteModetypetype KvCacheWriteMode = 'write_through' | 'write_if_missing' | 'refresh'Public type alias for Kv Cache Write Mode; the declaration contains its complete type expression.
PrefixSegmentKindtypetype PrefixSegmentKind = 'system' | 'developer' | 'context' | 'memory' | 'tool' | 'user' | 'assistant'Public type alias for Prefix Segment Kind; the declaration contains its complete type expression.
PrefixSegmentScopetypetype PrefixSegmentScope = 'global' | 'agent' | 'session' | 'run' | 'dynamic'Public type alias for Prefix Segment Scope; the declaration contains its complete type expression.
PromptRoletypetype PromptRole = 'system' | 'developer' | 'user' | 'assistant' | 'tool' | 'context' | 'memory'Public type alias for Prompt Role; the declaration contains its complete type expression.

CompiledPrompt

Compiled Prompt interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { CompiledPrompt } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface CompiledPrompt {
    id: string;
    messages: PromptMessage[];
    text: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
messagespropertymessages: PromptMessage[]Public property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
textpropertytext: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceBackend

Inference Backend interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceBackend } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceBackend {
    id: string;
    kind: InferenceBackendKind;
    capabilities(): InferenceBackendCapabilities;
    infer(request: InferenceBackendRequest): Promise<InferenceBackendResponse>;
    stream?(request: InferenceBackendRequest): AsyncIterable<InferenceBackendResponse>;
}

Contract members

MemberKindSignatureDescription
capabilitiesmethodcapabilities(): InferenceBackendCapabilitiesPublic method; parameters and return type are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
infermethodinfer(request: InferenceBackendRequest): Promise<InferenceBackendResponse>Public method; parameters and return type are shown in the signature.
kindpropertykind: InferenceBackendKindPublic property; its type, readonly modifier and optionality are shown in the signature.
streammethodstream?(request: InferenceBackendRequest): AsyncIterable<InferenceBackendResponse>Public method; parameters and return type are shown in the signature.

InferenceBackendCapabilities

Inference Backend Capabilities interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceBackendCapabilities } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceBackendCapabilities {
    streaming: boolean;
    chatCompletions: boolean;
    textCompletions: boolean;
    prefixCaching: boolean;
    kvCaching: boolean;
    cacheInvalidation: boolean;
}

Contract members

MemberKindSignatureDescription
cacheInvalidationpropertycacheInvalidation: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
chatCompletionspropertychatCompletions: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCachingpropertykvCaching: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixCachingpropertyprefixCaching: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
streamingpropertystreaming: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
textCompletionspropertytextCompletions: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceBackendRegistryEntry

Inference Backend Registry Entry interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceBackendRegistryEntry } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceBackendRegistryEntry {
    id: string;
    backend: InferenceBackend;
    default?: boolean;
}

Contract members

MemberKindSignatureDescription
backendpropertybackend: InferenceBackendPublic property; its type, readonly modifier and optionality are shown in the signature.
defaultpropertydefault?: booleanPublic 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.

InferenceBackendRequest

Inference Backend Request interface with 14 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceBackendRequest } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceBackendRequest {
    runId: string;
    stepId: string;
    sessionId?: string;
    agentId?: string;
    modelAlias: string;
    compiledPrompt: CompiledPrompt;
    segmentation: PrefixSegmentationResult;
    prefixRefs: PrefixCacheRef[];
    kvCache?: KvCacheRef;
    resolvedKvCacheValue?: unknown;
    physicalKvCache?: unknown;
    options?: InferenceGenerationOptions;
    tools?: InferenceToolDescriptor[];
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
compiledPromptpropertycompiledPrompt: CompiledPromptPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCachepropertykvCache?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
modelAliaspropertymodelAlias: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
optionspropertyoptions?: InferenceGenerationOptionsPublic property; its type, readonly modifier and optionality are shown in the signature.
physicalKvCachepropertyphysicalKvCache?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixRefspropertyprefixRefs: PrefixCacheRef[]Public property; its type, readonly modifier and optionality are shown in the signature.
resolvedKvCacheValuepropertyresolvedKvCacheValue?: unknownPublic 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.
segmentationpropertysegmentation: PrefixSegmentationResultPublic 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.
stepIdpropertystepId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
toolspropertytools?: InferenceToolDescriptor[]Public property; its type, readonly modifier and optionality are shown in the signature.

InferenceBackendResponse

Inference Backend Response interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceBackendResponse } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceBackendResponse<TOutput = unknown> {
    id: string;
    output: TOutput;
    usage?: InferenceUsage;
    physicalKvCache?: unknown;
    metadata?: Record<string, unknown>;
    raw?: unknown;
}

Contract members

MemberKindSignatureDescription
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
outputpropertyoutput: TOutputPublic property; its type, readonly modifier and optionality are shown in the signature.
physicalKvCachepropertyphysicalKvCache?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
rawpropertyraw?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
usagepropertyusage?: InferenceUsagePublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceCacheIssue

Inference Cache Issue interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceCacheIssue } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceCacheIssue {
    operation: 'prefix_read' | 'kv_read' | 'kv_write' | 'invalidate';
    code: string;
    message: string;
    bypassed: boolean;
}

Contract members

MemberKindSignatureDescription
bypassedpropertybypassed: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
codepropertycode: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
messagepropertymessage: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationpropertyoperation: "prefix_read" | "kv_read" | "kv_write" | "invalidate"Public property; its type, readonly modifier and optionality are shown in the signature.

InferenceCachePolicy

Inference Cache Policy interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceCachePolicy } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceCachePolicy {
    prefix?: PrefixCacheRef;
    kvCache?: KvCacheRef;
    writeKvCache?: KvCacheWritePolicy;
}

Contract members

MemberKindSignatureDescription
kvCachepropertykvCache?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixpropertyprefix?: PrefixCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
writeKvCachepropertywriteKvCache?: KvCacheWritePolicyPublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceCacheScope

Inference Cache Scope interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceCacheScope } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceCacheScope {
    tenantId?: string;
    userId: string;
    workspaceId?: string;
}

Contract members

MemberKindSignatureDescription
tenantIdpropertytenantId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: 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.

InferenceCacheUsage

Inference Cache Usage interface with 11 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceCacheUsage } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceCacheUsage {
    prefixHit?: boolean;
    kvCacheHit?: boolean;
    servingCache?: Record<string, unknown>;
    prefixRef?: PrefixCacheRef;
    kvCacheRef?: KvCacheRef;
    kvCacheMissReason?: InferenceCacheMissReason;
    kvCacheWritten?: boolean;
    kvCacheWriteRef?: KvCacheRef;
    reusedTokens?: number;
    bypassed?: boolean;
    issues?: InferenceCacheIssue[];
}

Contract members

MemberKindSignatureDescription
bypassedpropertybypassed?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
issuespropertyissues?: InferenceCacheIssue[]Public property; its type, readonly modifier and optionality are shown in the signature.
kvCacheHitpropertykvCacheHit?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCacheMissReasonpropertykvCacheMissReason?: InferenceCacheMissReasonPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCacheRefpropertykvCacheRef?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCacheWriteRefpropertykvCacheWriteRef?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCacheWrittenpropertykvCacheWritten?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixHitpropertyprefixHit?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixRefpropertyprefixRef?: PrefixCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
reusedTokenspropertyreusedTokens?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
servingCachepropertyservingCache?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.

InferenceGenerationOptions

Inference Generation Options interface with 9 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceGenerationOptions } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceGenerationOptions {
    temperature?: number;
    maxTokens?: number;
    topP?: number;
    topK?: number;
    stop?: string[];
    seed?: number;
    stream?: boolean;
    responseFormat?: 'text' | 'json_object' | {
        type: string;
        schema?: unknown;
    };
    extra?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
extrapropertyextra?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
maxTokenspropertymaxTokens?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
responseFormatpropertyresponseFormat?: "text" | "json_object" | { type: string; schema?: unknown; }Public property; its type, readonly modifier and optionality are shown in the signature.
seedpropertyseed?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
stoppropertystop?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
streampropertystream?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
temperaturepropertytemperature?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
topKpropertytopK?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
topPpropertytopP?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceManagerOptions

Inference Manager Options interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceManagerOptions } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceManagerOptions {
    prefixCache?: PrefixCacheProvider;
    kvCache?: KvCacheProvider;
    cacheFailureMode?: 'bypass' | 'strict';
    cacheOperationTimeoutMs?: number;
    providerRevision?: string;
    policyRevision?: string;
    specRevision?: string;
    onRecoveryFailure?: (failure: RecoveryFailure) => void | Promise<void>;
}

Contract members

MemberKindSignatureDescription
cacheFailureModepropertycacheFailureMode?: "strict" | "bypass"Public property; its type, readonly modifier and optionality are shown in the signature.
cacheOperationTimeoutMspropertycacheOperationTimeoutMs?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCachepropertykvCache?: KvCacheProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
onRecoveryFailuremethodonRecoveryFailure?(failure: RecoveryFailure): void | Promise<void>Public method; parameters and return type are shown in the signature.
policyRevisionpropertypolicyRevision?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixCachepropertyprefixCache?: PrefixCacheProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
providerRevisionpropertyproviderRevision?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
specRevisionpropertyspecRevision?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceProvider

Inference Provider interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceProvider } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceProvider {
    id: string;
    infer(request: InferenceRequest): Promise<InferenceResponse>;
    stream?(request: InferenceRequest): AsyncIterable<InferenceResponse>;
}

Contract members

MemberKindSignatureDescription
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
infermethodinfer(request: InferenceRequest): Promise<InferenceResponse>Public method; parameters and return type are shown in the signature.
streammethodstream?(request: InferenceRequest): AsyncIterable<InferenceResponse>Public method; parameters and return type are shown in the signature.

InferenceRequest

Inference Request interface with 18 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceRequest } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceRequest<TInput = unknown> {
    runId: string;
    stepId: string;
    sessionId?: string;
    agentId?: string;
    modelAlias: string;
    providerId?: string;
    backendId?: string;
    input: TInput;
    options?: InferenceGenerationOptions;
    tools?: InferenceToolDescriptor[];
    cachePolicy?: InferenceCachePolicy;
    cacheScope?: InferenceCacheScope;
    prefix?: PrefixCacheRef;
    resolvedPrefixContent?: string;
    kvCache?: KvCacheRef;
    resolvedKvCacheValue?: unknown;
    trace?: boolean;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
backendIdpropertybackendId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
cachePolicypropertycachePolicy?: InferenceCachePolicyPublic property; its type, readonly modifier and optionality are shown in the signature.
cacheScopepropertycacheScope?: InferenceCacheScopePublic property; its type, readonly modifier and optionality are shown in the signature.
inputpropertyinput: TInputPublic property; its type, readonly modifier and optionality are shown in the signature.
kvCachepropertykvCache?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
modelAliaspropertymodelAlias: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
optionspropertyoptions?: InferenceGenerationOptionsPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixpropertyprefix?: PrefixCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
providerIdpropertyproviderId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
resolvedKvCacheValuepropertyresolvedKvCacheValue?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
resolvedPrefixContentpropertyresolvedPrefixContent?: stringPublic 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.
stepIdpropertystepId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
toolspropertytools?: InferenceToolDescriptor[]Public property; its type, readonly modifier and optionality are shown in the signature.
tracepropertytrace?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceResponse

Inference Response interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceResponse } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceResponse<TOutput = unknown> {
    id: string;
    output: TOutput;
    usage?: InferenceUsage;
    cache?: InferenceCacheUsage;
    nextKvCacheValue?: unknown;
    metadata?: Record<string, unknown>;
    raw?: unknown;
}

Contract members

MemberKindSignatureDescription
cachepropertycache?: InferenceCacheUsagePublic 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.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
nextKvCacheValuepropertynextKvCacheValue?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
outputpropertyoutput: TOutputPublic property; its type, readonly modifier and optionality are shown in the signature.
rawpropertyraw?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
usagepropertyusage?: InferenceUsagePublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceToolDescriptor

Inference Tool Descriptor interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceToolDescriptor } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceToolDescriptor {
    id: string;
    name: string;
    description?: string;
    inputSchema: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
descriptionpropertydescription?: 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.
inputSchemapropertyinputSchema: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
namepropertyname: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceUsage

Inference Usage interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { InferenceUsage } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface InferenceUsage {
    inputTokens?: number;
    outputTokens?: number;
    totalTokens?: number;
}

Contract members

MemberKindSignatureDescription
inputTokenspropertyinputTokens?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
outputTokenspropertyoutputTokens?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
totalTokenspropertytotalTokens?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

KvCacheProvider

Kv Cache Provider interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { KvCacheProvider } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface KvCacheProvider {
    get(ref: KvCacheRef): Promise<unknown | null>;
    put(ref: KvCacheRef, value: unknown): Promise<void>;
    invalidate(ref: KvCacheRef, reason: string): Promise<void>;
}

Contract members

MemberKindSignatureDescription
getmethodget(ref: KvCacheRef): Promise<unknown | null>Public method; parameters and return type are shown in the signature.
invalidatemethodinvalidate(ref: KvCacheRef, reason: string): Promise<void>Public method; parameters and return type are shown in the signature.
putmethodput(ref: KvCacheRef, value: unknown): Promise<void>Public method; parameters and return type are shown in the signature.

KvCacheRef

Kv Cache Ref interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { KvCacheRef } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface KvCacheRef {
    id: string;
    provider: string;
    modelAlias: string;
    scope: KvCacheScope;
    cacheScope?: InferenceCacheScope;
    expiresAt?: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
cacheScopepropertycacheScope?: InferenceCacheScopePublic 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.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
modelAliaspropertymodelAlias: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
providerpropertyprovider: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
scopepropertyscope: KvCacheScopePublic property; its type, readonly modifier and optionality are shown in the signature.

KvCacheWritePolicy

Kv Cache Write Policy interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { KvCacheWritePolicy } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface KvCacheWritePolicy {
    ref: KvCacheRef;
    value?: unknown;
    mode?: KvCacheWriteMode;
}

Contract members

MemberKindSignatureDescription
modepropertymode?: KvCacheWriteModePublic property; its type, readonly modifier and optionality are shown in the signature.
refpropertyref: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
valuepropertyvalue?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.

PlasmodCacheMetadata

Plasmod Cache Metadata interface with 10 public fields or methods.

  • Kind: interface
  • Import: import type { PlasmodCacheMetadata } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PlasmodCacheMetadata {
    segmentId: string;
    contentHash: string;
    backendId: string;
    modelAlias: string;
    scope: PrefixSegmentScope;
    tokenCount?: number;
    reused: boolean;
    createdAt: string;
    updatedAt: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
backendIdpropertybackendId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
contentHashpropertycontentHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
createdAtpropertycreatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
modelAliaspropertymodelAlias: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
reusedpropertyreused: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
scopepropertyscope: PrefixSegmentScopePublic property; its type, readonly modifier and optionality are shown in the signature.
segmentIdpropertysegmentId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
tokenCountpropertytokenCount?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
updatedAtpropertyupdatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

PlasmodHotLayer

Plasmod Hot Layer interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { PlasmodHotLayer } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PlasmodHotLayer {
    prepare(input: PlasmodHotLayerPrepareInput): Promise<PlasmodHotLayerPrepareResult>;
    invalidateSegment(segmentId: string, reason: string): Promise<void>;
    getSessionState(stateId: string): PlasmodSessionState | null;
    getCacheMetadata(segmentId: string): PlasmodCacheMetadata | null;
}

Contract members

MemberKindSignatureDescription
getCacheMetadatamethodgetCacheMetadata(segmentId: string): PlasmodCacheMetadata | nullPublic method; parameters and return type are shown in the signature.
getSessionStatemethodgetSessionState(stateId: string): PlasmodSessionState | nullPublic method; parameters and return type are shown in the signature.
invalidateSegmentmethodinvalidateSegment(segmentId: string, reason: string): Promise<void>Public method; parameters and return type are shown in the signature.
preparemethodprepare(input: PlasmodHotLayerPrepareInput): Promise<PlasmodHotLayerPrepareResult>Public method; parameters and return type are shown in the signature.

PlasmodHotLayerPrepareInput

Plasmod Hot Layer Prepare Input interface with 12 public fields or methods.

  • Kind: interface
  • Import: import type { PlasmodHotLayerPrepareInput } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PlasmodHotLayerPrepareInput {
    runId: string;
    stepId: string;
    sessionId?: string;
    agentId?: string;
    modelAlias: string;
    backendId: string;
    cacheScope?: InferenceCacheScope;
    segmentation: PrefixSegmentationResult;
    kvCache?: KvCacheRef;
    resolvedKvCacheValue?: unknown;
    reusePolicy?: PlasmodReusePolicy;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
backendIdpropertybackendId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
cacheScopepropertycacheScope?: InferenceCacheScopePublic property; its type, readonly modifier and optionality are shown in the signature.
kvCachepropertykvCache?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
modelAliaspropertymodelAlias: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
resolvedKvCacheValuepropertyresolvedKvCacheValue?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
reusePolicypropertyreusePolicy?: PlasmodReusePolicyPublic 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.
segmentationpropertysegmentation: PrefixSegmentationResultPublic 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.
stepIdpropertystepId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

PlasmodHotLayerPrepareResult

Plasmod Hot Layer Prepare Result interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { PlasmodHotLayerPrepareResult } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PlasmodHotLayerPrepareResult {
    prefixRefs: PrefixCacheRef[];
    kvCacheRef?: KvCacheRef;
    physicalKvCache?: unknown;
    reusedSegmentIds: string[];
    invalidatedSegmentIds: string[];
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
invalidatedSegmentIdspropertyinvalidatedSegmentIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
kvCacheRefpropertykvCacheRef?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
physicalKvCachepropertyphysicalKvCache?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixRefspropertyprefixRefs: PrefixCacheRef[]Public property; its type, readonly modifier and optionality are shown in the signature.
reusedSegmentIdspropertyreusedSegmentIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.

PlasmodReusePolicy

Plasmod Reuse Policy interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { PlasmodReusePolicy } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PlasmodReusePolicy {
    allowCrossSession?: boolean;
    allowCrossAgent?: boolean;
    minTokenCount?: number;
    requireExactHash?: boolean;
    maxPrefixRefs?: number;
}

Contract members

MemberKindSignatureDescription
allowCrossAgentpropertyallowCrossAgent?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
allowCrossSessionpropertyallowCrossSession?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
maxPrefixRefspropertymaxPrefixRefs?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
minTokenCountpropertyminTokenCount?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
requireExactHashpropertyrequireExactHash?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

PlasmodSessionState

Plasmod Session State interface with 10 public fields or methods.

  • Kind: interface
  • Import: import type { PlasmodSessionState } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PlasmodSessionState {
    id: string;
    sessionId?: string;
    runId: string;
    agentId?: string;
    modelAlias: string;
    backendId: string;
    prefixRefs: PrefixCacheRef[];
    kvCacheRef?: KvCacheRef;
    updatedAt: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
backendIdpropertybackendId: 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.
kvCacheRefpropertykvCacheRef?: KvCacheRefPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
modelAliaspropertymodelAlias: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
prefixRefspropertyprefixRefs: PrefixCacheRef[]Public 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.
updatedAtpropertyupdatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

PrefixCacheProvider

Prefix Cache Provider interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { PrefixCacheProvider } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PrefixCacheProvider {
    get(ref: PrefixCacheRef): Promise<string | null>;
    put(ref: PrefixCacheRef, content: string): Promise<void>;
    invalidate(ref: PrefixCacheRef, reason: string): Promise<void>;
}

Contract members

MemberKindSignatureDescription
getmethodget(ref: PrefixCacheRef): Promise<string | null>Public method; parameters and return type are shown in the signature.
invalidatemethodinvalidate(ref: PrefixCacheRef, reason: string): Promise<void>Public method; parameters and return type are shown in the signature.
putmethodput(ref: PrefixCacheRef, content: string): Promise<void>Public method; parameters and return type are shown in the signature.

PrefixCacheRef

Prefix Cache Ref interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { PrefixCacheRef } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PrefixCacheRef {
    id: string;
    version: string;
    contentHash: string;
    tokenCount?: number;
    cacheScope?: InferenceCacheScope;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
cacheScopepropertycacheScope?: InferenceCacheScopePublic property; its type, readonly modifier and optionality are shown in the signature.
contentHashpropertycontentHash: 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.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
tokenCountpropertytokenCount?: numberPublic 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.

PrefixSegment

Prefix Segment interface with 9 public fields or methods.

  • Kind: interface
  • Import: import type { PrefixSegment } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PrefixSegment {
    id: string;
    kind: PrefixSegmentKind;
    scope: PrefixSegmentScope;
    content: string;
    contentHash: string;
    tokenCount?: number;
    cacheable: boolean;
    dependencies?: string[];
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
cacheablepropertycacheable: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
contentpropertycontent: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
contentHashpropertycontentHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
dependenciespropertydependencies?: string[]Public 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.
kindpropertykind: PrefixSegmentKindPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
scopepropertyscope: PrefixSegmentScopePublic property; its type, readonly modifier and optionality are shown in the signature.
tokenCountpropertytokenCount?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

PrefixSegmentationResult

Prefix Segmentation Result interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { PrefixSegmentationResult } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PrefixSegmentationResult {
    compiled: CompiledPrompt;
    segments: PrefixSegment[];
    stablePrefix: string;
    dynamicPrompt: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
compiledpropertycompiled: CompiledPromptPublic property; its type, readonly modifier and optionality are shown in the signature.
dynamicPromptpropertydynamicPrompt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
segmentspropertysegments: PrefixSegment[]Public property; its type, readonly modifier and optionality are shown in the signature.
stablePrefixpropertystablePrefix: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

PrefixSegmenter

Prefix Segmenter interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { PrefixSegmenter } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PrefixSegmenter {
    segment(prompt: CompiledPrompt): Promise<PrefixSegmentationResult>;
}

Contract members

MemberKindSignatureDescription
segmentmethodsegment(prompt: CompiledPrompt): Promise<PrefixSegmentationResult>Public method; parameters and return type are shown in the signature.

PromptCompileInput

Prompt Compile Input interface with 11 public fields or methods.

  • Kind: interface
  • Import: import type { PromptCompileInput } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PromptCompileInput<TInput = unknown> {
    runId: string;
    stepId: string;
    sessionId?: string;
    agentId?: string;
    modelAlias: string;
    instructions?: string;
    messages?: PromptMessage[];
    input: TInput;
    context?: Record<string, unknown>;
    resolvedPrefixContent?: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
contextpropertycontext?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
inputpropertyinput: TInputPublic property; its type, readonly modifier and optionality are shown in the signature.
instructionspropertyinstructions?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
messagespropertymessages?: PromptMessage[]Public property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
modelAliaspropertymodelAlias: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
resolvedPrefixContentpropertyresolvedPrefixContent?: stringPublic 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.
stepIdpropertystepId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

PromptCompiler

Prompt Compiler interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { PromptCompiler } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PromptCompiler {
    compile<TInput = unknown>(input: PromptCompileInput<TInput>): Promise<CompiledPrompt>;
}

Contract members

MemberKindSignatureDescription
compilemethodcompile<TInput = unknown>(input: PromptCompileInput<TInput>): Promise<CompiledPrompt>Public method; parameters and return type are shown in the signature.

PromptMessage

Prompt Message interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { PromptMessage } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export interface PromptMessage {
    role: PromptRole;
    content: string;
    name?: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
contentpropertycontent: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
namepropertyname?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
rolepropertyrole: PromptRolePublic property; its type, readonly modifier and optionality are shown in the signature.

InferenceBackendKind

Public type alias for Inference Backend Kind; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { InferenceBackendKind } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export type InferenceBackendKind = 'ollama' | 'sglang' | 'vllm' | 'llama.cpp' | 'openai-api';

InferenceCacheMissReason

Public type alias for Inference Cache Miss Reason; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { InferenceCacheMissReason } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export type InferenceCacheMissReason = 'missing' | 'expired' | 'not_configured' | 'error';

KvCacheScope

Public type alias for Kv Cache Scope; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { KvCacheScope } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export type KvCacheScope = 'run' | 'session' | 'workspace';

KvCacheWriteMode

Public type alias for Kv Cache Write Mode; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { KvCacheWriteMode } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export type KvCacheWriteMode = 'write_through' | 'write_if_missing' | 'refresh';

PrefixSegmentKind

Public type alias for Prefix Segment Kind; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { PrefixSegmentKind } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export type PrefixSegmentKind = 'system' | 'developer' | 'context' | 'memory' | 'tool' | 'user' | 'assistant';

PrefixSegmentScope

Public type alias for Prefix Segment Scope; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { PrefixSegmentScope } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export type PrefixSegmentScope = 'global' | 'agent' | 'session' | 'run' | 'dynamic';

PromptRole

Public type alias for Prompt Role; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { PromptRole } from '@codesoul-co/hypha-inference';
  • Source module: types

Declaration

text
export type PromptRole = 'system' | 'developer' | 'user' | 'assistant' | 'tool' | 'context' | 'memory';