@codesoul-co/hypha-core / modules/execution-cache/runtime
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/modules/execution-cache/runtime.ts - Exports: 2
Using this module
Use the Runtime module for executing runtime behavior at this boundary. It exports 1 class, 1 interface.
Import from the package entrypoint
ts
import {
ExecutionResultCache,
} from '@codesoul-co/hypha-core';
import type {
ExecutionResultCacheOptions,
} from '@codesoul-co/hypha-core';Usage patterns
- Use the 1 type/interface export 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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
ExecutionResultCache | class | new ExecutionResultCache(options: ExecutionResultCacheOptions): ExecutionResultCache | Conservative Result Cache for deterministic, read-only command executions. It returns an Execution-owned projection and never fabricates a new receipt, mutates a Workspace, or treats a hit as an executed side effect. |
ExecutionResultCacheOptions | interface | interface ExecutionResultCacheOptions | Execution Result Cache Options interface with 9 public fields or methods. |
ExecutionResultCache
Conservative Result Cache for deterministic, read-only command executions. It returns an Execution-owned projection and never fabricates a new receipt, mutates a Workspace, or treats a hit as an executed side effect.
- Kind: class
- Import:
import { ExecutionResultCache } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-cache/runtime
Declaration
text
export declare class ExecutionResultCache {
constructor(options: ExecutionResultCacheOptions);
lookup(rawInput: ExecutionCacheLookupInput): Promise<ExecutionCacheLookupResult>;
write(rawInput: ExecutionCacheWriteInput): Promise<boolean>;
invalidate(rawInput: ExecutionCacheLookupInput): Promise<boolean>;
close(): Promise<void>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
close | method | close(): Promise<void> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options: ExecutionResultCacheOptions): ExecutionResultCache | Creates an instance of this class. |
invalidate | method | invalidate(rawInput: ExecutionCacheLookupInput): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
lookup | method | lookup(rawInput: ExecutionCacheLookupInput): Promise<ExecutionCacheLookupResult> | Public method; parameters and return type are shown in the signature. |
write | method | write(rawInput: ExecutionCacheWriteInput): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
ExecutionResultCacheOptions
Execution Result Cache Options interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionResultCacheOptions } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-cache/runtime
Declaration
text
export interface ExecutionResultCacheOptions {
store: ExecutionCacheStore;
hasher: ExecutionFingerprintHasher;
artifactVerifier?: ExecutionCacheArtifactVerifier;
failureMode?: ExecutionCacheFailureMode;
operationTimeoutMs?: number;
ttlMs?: number;
maxEntryBytes?: number;
now?: () => number;
trace?: (event: ExecutionCacheEvent) => Promise<void> | void;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactVerifier | property | artifactVerifier?: ExecutionCacheArtifactVerifier | Public property; its type, readonly modifier and optionality are shown in the signature. |
failureMode | property | failureMode?: ExecutionCacheFailureMode | Public property; its type, readonly modifier and optionality are shown in the signature. |
hasher | property | hasher: ExecutionFingerprintHasher | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxEntryBytes | property | maxEntryBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): number | Public method; parameters and return type are shown in the signature. |
operationTimeoutMs | property | operationTimeoutMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
store | property | store: ExecutionCacheStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
trace | method | trace?(event: ExecutionCacheEvent): Promise<void> | void | Public method; parameters and return type are shown in the signature. |
ttlMs | property | ttlMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
