@codesoul-co/hypha-core / contracts/runtime-coordination
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/runtime-coordination.ts - Exports: 34
Using this module
Use the Runtime coordination module for declaring and runtime-validating contracts. It exports 3 constants, 28 interfaces, 3 types.
Import from the package entrypoint
import {
RUNTIME_RESOURCE_CLAIM_MODES,
RUNTIME_RESOURCE_TYPES,
STATE_EXECUTION_CLAIM_STATUSES,
} from '@codesoul-co/hypha-core';
import type {
FencedRunLease,
ResourceAcquireRequest,
ResourceClaimAssertionRequest,
ResourceListRequest,
ResourceReleaseRequest,
ResourceRenewRequest,
RunLease,
RunLeaseAcquireRequest,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 31 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The 3 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
RUNTIME_RESOURCE_CLAIM_MODES | constant | const RUNTIME_RESOURCE_CLAIM_MODES: readonly ["shared", "exclusive"] | RUNTIME RESOURCE CLAIM MODES constant exported by the contracts/runtime-coordination module. |
RUNTIME_RESOURCE_TYPES | constant | const RUNTIME_RESOURCE_TYPES: readonly ["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"] | RUNTIME RESOURCE TYPES constant exported by the contracts/runtime-coordination module. |
STATE_EXECUTION_CLAIM_STATUSES | constant | const STATE_EXECUTION_CLAIM_STATUSES: readonly ["claimed", "completed", "released", "expired"] | STATE EXECUTION CLAIM STATUSES constant exported by the contracts/runtime-coordination module. |
FencedRunLease | interface | interface FencedRunLease extends RunLease | Fenced Run Lease interface with 11 public fields or methods. |
ResourceAcquireRequest | interface | interface ResourceAcquireRequest | Resource Acquire Request interface with 6 public fields or methods. |
ResourceClaimAssertionRequest | interface | interface ResourceClaimAssertionRequest extends ResourceListRequest | Resource Claim Assertion Request interface with 7 public fields or methods. |
ResourceListRequest | interface | interface ResourceListRequest | Resource List Request interface with 4 public fields or methods. |
ResourceReleaseRequest | interface | interface ResourceReleaseRequest | Resource Release Request interface with 3 public fields or methods. |
ResourceRenewRequest | interface | interface ResourceRenewRequest | Resource Renew Request interface with 4 public fields or methods. |
RunLease | interface | interface RunLease | Run Lease interface with 9 public fields or methods. |
RunLeaseAcquireRequest | interface | interface RunLeaseAcquireRequest extends RunLeaseScope | Run Lease Acquire Request interface with 9 public fields or methods. |
RunLeaseAssertionRequest | interface | interface RunLeaseAssertionRequest | Run Lease Assertion Request interface with 3 public fields or methods. |
RunLeaseAuthorization | interface | interface RunLeaseAuthorization | Run Lease Authorization interface with 2 public fields or methods. |
RunLeaseGuard | interface | interface RunLeaseGuard | Run Lease Guard interface with 3 public fields or methods. |
RunLeaseHeartbeatRequest | interface | interface RunLeaseHeartbeatRequest | Run Lease Heartbeat Request interface with 4 public fields or methods. |
RunLeasePreemptRequest | interface | interface RunLeasePreemptRequest extends RunLeaseAcquireRequest | Run Lease Preempt Request interface with 10 public fields or methods. |
RunLeaseReleaseRequest | interface | interface RunLeaseReleaseRequest | Run Lease Release Request interface with 3 public fields or methods. |
RunLeaseScope | interface | interface RunLeaseScope | Run Lease Scope interface with 4 public fields or methods. |
RunLeaseStore | interface | interface RunLeaseStore | Run Lease Store interface with 6 public fields or methods. |
RuntimeResourceClaim | interface | interface RuntimeResourceClaim | Runtime Resource Claim interface with 14 public fields or methods. |
RuntimeResourceCoordinator | interface | interface RuntimeResourceCoordinator | Runtime Resource Coordinator interface with 5 public fields or methods. |
RuntimeResourceRequest | interface | interface RuntimeResourceRequest | Runtime Resource Request interface with 5 public fields or methods. |
StateExecutionClaim | interface | interface StateExecutionClaim extends StateExecutionClaimScope | State Execution Claim interface with 15 public fields or methods. |
StateExecutionClaimAcquireRequest | interface | interface StateExecutionClaimAcquireRequest extends StateExecutionClaimScope | State Execution Claim Acquire Request interface with 12 public fields or methods. |
StateExecutionClaimAssertionRequest | interface | interface StateExecutionClaimAssertionRequest | State Execution Claim Assertion Request interface with 3 public fields or methods. |
StateExecutionClaimCompleteRequest | interface | interface StateExecutionClaimCompleteRequest | State Execution Claim Complete Request interface with 4 public fields or methods. |
StateExecutionClaimGuard | interface | interface StateExecutionClaimGuard | State Execution Claim Guard interface with 3 public fields or methods. |
StateExecutionClaimReleaseRequest | interface | interface StateExecutionClaimReleaseRequest | State Execution Claim Release Request interface with 4 public fields or methods. |
StateExecutionClaimRenewRequest | interface | interface StateExecutionClaimRenewRequest | State Execution Claim Renew Request interface with 5 public fields or methods. |
StateExecutionClaimScope | interface | interface StateExecutionClaimScope | State Execution Claim Scope interface with 5 public fields or methods. |
StateExecutionClaimStore | interface | interface StateExecutionClaimStore | State Execution Claim Store interface with 6 public fields or methods. |
RuntimeResourceClaimMode | type | type RuntimeResourceClaimMode = (typeof RUNTIME_RESOURCE_CLAIM_MODES)[number] | Public type alias for Runtime Resource Claim Mode; the declaration contains its complete type expression. |
RuntimeResourceType | type | type RuntimeResourceType = (typeof RUNTIME_RESOURCE_TYPES)[number] | Public type alias for Runtime Resource Type; the declaration contains its complete type expression. |
StateExecutionClaimStatus | type | type StateExecutionClaimStatus = (typeof STATE_EXECUTION_CLAIM_STATUSES)[number] | Public type alias for State Execution Claim Status; the declaration contains its complete type expression. |
RUNTIME_RESOURCE_CLAIM_MODES
RUNTIME RESOURCE CLAIM MODES constant exported by the contracts/runtime-coordination module.
- Kind: constant
- Import:
import { RUNTIME_RESOURCE_CLAIM_MODES } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export declare const RUNTIME_RESOURCE_CLAIM_MODES: readonly ["shared", "exclusive"];RUNTIME_RESOURCE_TYPES
RUNTIME RESOURCE TYPES constant exported by the contracts/runtime-coordination module.
- Kind: constant
- Import:
import { RUNTIME_RESOURCE_TYPES } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export declare const RUNTIME_RESOURCE_TYPES: readonly ["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"];STATE_EXECUTION_CLAIM_STATUSES
STATE EXECUTION CLAIM STATUSES constant exported by the contracts/runtime-coordination module.
- Kind: constant
- Import:
import { STATE_EXECUTION_CLAIM_STATUSES } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export declare const STATE_EXECUTION_CLAIM_STATUSES: readonly ["claimed", "completed", "released", "expired"];FencedRunLease
Fenced Run Lease interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { FencedRunLease } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface FencedRunLease extends RunLease {
fencingToken: number;
partitionKey: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAt | property | expiresAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
heartbeatAt | property | heartbeatAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
partitionKey | property | partitionKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ResourceAcquireRequest
Resource Acquire Request interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { ResourceAcquireRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface ResourceAcquireRequest {
runLease: RunLeaseAuthorization;
stateId?: string;
resources: RuntimeResourceRequest[];
ttlMs: number;
acquiredAt: string;
idempotencyKey: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resources | property | resources: RuntimeResourceRequest[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ResourceClaimAssertionRequest
Resource Claim Assertion Request interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { ResourceClaimAssertionRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface ResourceClaimAssertionRequest extends ResourceListRequest {
claimId: string;
ownerId: string;
fencingToken: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
checkedAt | property | checkedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimId | property | claimId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceKey | property | resourceKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceType | property | resourceType: "artifact" | "workspace" | "custom" | "tool_scope" | "memory_scope" | "external_account" | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ResourceListRequest
Resource List Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ResourceListRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface ResourceListRequest {
tenantId?: string;
resourceType: RuntimeResourceType;
resourceKey: string;
checkedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
checkedAt | property | checkedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceKey | property | resourceKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceType | property | resourceType: "artifact" | "workspace" | "custom" | "tool_scope" | "memory_scope" | "external_account" | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ResourceReleaseRequest
Resource Release Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ResourceReleaseRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface ResourceReleaseRequest {
runLease: RunLeaseAuthorization;
claimIds: string[];
releasedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimIds | property | claimIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
releasedAt | property | releasedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
ResourceRenewRequest
Resource Renew Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ResourceRenewRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface ResourceRenewRequest {
runLease: RunLeaseAuthorization;
claimIds: string[];
ttlMs: number;
renewedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimIds | property | claimIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
renewedAt | property | renewedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLease
Run Lease interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { RunLease } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLease {
id: string;
tenantId?: string;
userId: string;
runId: string;
ownerId: string;
acquiredAt: string;
expiresAt: string;
heartbeatAt: string;
revision: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAt | property | expiresAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
heartbeatAt | property | heartbeatAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseAcquireRequest
Run Lease Acquire Request interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseAcquireRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseAcquireRequest extends RunLeaseScope {
requestedLeaseId: string;
ownerId: string;
ttlMs: number;
acquiredAt: string;
idempotencyKey: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
partitionKey | property | partitionKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requestedLeaseId | property | requestedLeaseId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseAssertionRequest
Run Lease Assertion Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseAssertionRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseAssertionRequest {
scope: RunLeaseScope;
guard: RunLeaseGuard;
checkedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
checkedAt | property | checkedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
guard | property | guard: RunLeaseGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RunLeaseScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseAuthorization
Run Lease Authorization interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseAuthorization } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseAuthorization {
scope: RunLeaseScope;
guard: RunLeaseGuard;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
guard | property | guard: RunLeaseGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RunLeaseScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseGuard
Run Lease Guard interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseGuard } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseGuard {
leaseId: string;
ownerId: string;
fencingToken: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseId | property | leaseId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseHeartbeatRequest
Run Lease Heartbeat Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseHeartbeatRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseHeartbeatRequest {
scope: RunLeaseScope;
guard: RunLeaseGuard;
ttlMs: number;
heartbeatAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
guard | property | guard: RunLeaseGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
heartbeatAt | property | heartbeatAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RunLeaseScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeasePreemptRequest
Run Lease Preempt Request interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { RunLeasePreemptRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeasePreemptRequest extends RunLeaseAcquireRequest {
reason: 'cancellation';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
partitionKey | property | partitionKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: "cancellation" | Public property; its type, readonly modifier and optionality are shown in the signature. |
requestedLeaseId | property | requestedLeaseId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseReleaseRequest
Run Lease Release Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseReleaseRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseReleaseRequest {
scope: RunLeaseScope;
guard: RunLeaseGuard;
releasedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
guard | property | guard: RunLeaseGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
releasedAt | property | releasedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RunLeaseScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseScope
Run Lease Scope interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseScope } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseScope {
tenantId?: string;
userId: string;
runId: string;
partitionKey: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
partitionKey | property | partitionKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunLeaseStore
Run Lease Store interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RunLeaseStore } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RunLeaseStore {
acquire(request: RunLeaseAcquireRequest): Promise<FencedRunLease | null>;
preempt(request: RunLeasePreemptRequest): Promise<FencedRunLease>;
heartbeat(request: RunLeaseHeartbeatRequest): Promise<FencedRunLease>;
release(request: RunLeaseReleaseRequest): Promise<void>;
get(scope: RunLeaseScope, checkedAt?: string): Promise<FencedRunLease | null>;
assertCurrent(request: RunLeaseAssertionRequest): Promise<FencedRunLease>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquire | method | acquire(request: RunLeaseAcquireRequest): Promise<FencedRunLease | null> | Public method; parameters and return type are shown in the signature. |
assertCurrent | method | assertCurrent(request: RunLeaseAssertionRequest): Promise<FencedRunLease> | Public method; parameters and return type are shown in the signature. |
get | method | get(scope: RunLeaseScope, checkedAt?: string): Promise<FencedRunLease | null> | Public method; parameters and return type are shown in the signature. |
heartbeat | method | heartbeat(request: RunLeaseHeartbeatRequest): Promise<FencedRunLease> | Public method; parameters and return type are shown in the signature. |
preempt | method | preempt(request: RunLeasePreemptRequest): Promise<FencedRunLease> | Public method; parameters and return type are shown in the signature. |
release | method | release(request: RunLeaseReleaseRequest): Promise<void> | Public method; parameters and return type are shown in the signature. |
RuntimeResourceClaim
Runtime Resource Claim interface with 14 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResourceClaim } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RuntimeResourceClaim {
id: string;
tenantId?: string;
userId: string;
resourceType: RuntimeResourceType;
resourceKey: string;
mode: RuntimeResourceClaimMode;
runId: string;
stateId?: string;
ownerId: string;
fencingToken: number;
runFencingToken: number;
acquiredAt: string;
expiresAt: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAt | property | expiresAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "shared" | "exclusive" | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceKey | property | resourceKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceType | property | resourceType: "artifact" | "workspace" | "custom" | "tool_scope" | "memory_scope" | "external_account" | Public property; its type, readonly modifier and optionality are shown in the signature. |
runFencingToken | property | runFencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeResourceCoordinator
Runtime Resource Coordinator interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResourceCoordinator } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RuntimeResourceCoordinator {
acquire(request: ResourceAcquireRequest): Promise<RuntimeResourceClaim[]>;
renew(request: ResourceRenewRequest): Promise<RuntimeResourceClaim[]>;
release(request: ResourceReleaseRequest): Promise<void>;
list(request: ResourceListRequest): Promise<RuntimeResourceClaim[]>;
assertCurrent(request: ResourceClaimAssertionRequest): Promise<RuntimeResourceClaim>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquire | method | acquire(request: ResourceAcquireRequest): Promise<RuntimeResourceClaim[]> | Public method; parameters and return type are shown in the signature. |
assertCurrent | method | assertCurrent(request: ResourceClaimAssertionRequest): Promise<RuntimeResourceClaim> | Public method; parameters and return type are shown in the signature. |
list | method | list(request: ResourceListRequest): Promise<RuntimeResourceClaim[]> | Public method; parameters and return type are shown in the signature. |
release | method | release(request: ResourceReleaseRequest): Promise<void> | Public method; parameters and return type are shown in the signature. |
renew | method | renew(request: ResourceRenewRequest): Promise<RuntimeResourceClaim[]> | Public method; parameters and return type are shown in the signature. |
RuntimeResourceRequest
Runtime Resource Request interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResourceRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface RuntimeResourceRequest {
requestedClaimId: string;
resourceType: RuntimeResourceType;
resourceKey: string;
mode: RuntimeResourceClaimMode;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "shared" | "exclusive" | Public property; its type, readonly modifier and optionality are shown in the signature. |
requestedClaimId | property | requestedClaimId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceKey | property | resourceKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourceType | property | resourceType: "artifact" | "workspace" | "custom" | "tool_scope" | "memory_scope" | "external_account" | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaim
State Execution Claim interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaim } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaim extends StateExecutionClaimScope {
claimId: string;
processRevision: string;
expectedRunRevision: number;
fencingToken: number;
ownerId: string;
status: StateExecutionClaimStatus;
acquiredAt: string;
expiresAt: string;
completedAt?: string;
releasedAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimId | property | claimId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
completedAt | property | completedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedRunRevision | property | expectedRunRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAt | property | expiresAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
processRevision | property | processRevision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
releasedAt | property | releasedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateAttempt | property | stateAttempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "completed" | "expired" | "claimed" | "released" | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimAcquireRequest
State Execution Claim Acquire Request interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimAcquireRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimAcquireRequest extends StateExecutionClaimScope {
requestedClaimId: string;
processRevision: string;
expectedRunRevision: number;
runLease: RunLeaseAuthorization;
ttlMs: number;
acquiredAt: string;
idempotencyKey: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquiredAt | property | acquiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedRunRevision | property | expectedRunRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
processRevision | property | processRevision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requestedClaimId | property | requestedClaimId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateAttempt | property | stateAttempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimAssertionRequest
State Execution Claim Assertion Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimAssertionRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimAssertionRequest {
scope: StateExecutionClaimScope;
guard: StateExecutionClaimGuard;
checkedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
checkedAt | property | checkedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
guard | property | guard: StateExecutionClaimGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: StateExecutionClaimScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimCompleteRequest
State Execution Claim Complete Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimCompleteRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimCompleteRequest {
scope: StateExecutionClaimScope;
guard: StateExecutionClaimGuard;
runLease: RunLeaseAuthorization;
completedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
completedAt | property | completedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
guard | property | guard: StateExecutionClaimGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: StateExecutionClaimScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimGuard
State Execution Claim Guard interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimGuard } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimGuard {
claimId: string;
ownerId: string;
fencingToken: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimId | property | claimId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimReleaseRequest
State Execution Claim Release Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimReleaseRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimReleaseRequest {
scope: StateExecutionClaimScope;
guard: StateExecutionClaimGuard;
runLease: RunLeaseAuthorization;
releasedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
guard | property | guard: StateExecutionClaimGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
releasedAt | property | releasedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: StateExecutionClaimScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimRenewRequest
State Execution Claim Renew Request interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimRenewRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimRenewRequest {
scope: StateExecutionClaimScope;
guard: StateExecutionClaimGuard;
runLease: RunLeaseAuthorization;
ttlMs: number;
renewedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
guard | property | guard: StateExecutionClaimGuard | Public property; its type, readonly modifier and optionality are shown in the signature. |
renewedAt | property | renewedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: StateExecutionClaimScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimScope
State Execution Claim Scope interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimScope } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimScope {
tenantId?: string;
userId: string;
runId: string;
stateId: string;
stateAttempt: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateAttempt | property | stateAttempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
StateExecutionClaimStore
State Execution Claim Store interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { StateExecutionClaimStore } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export interface StateExecutionClaimStore {
acquire(request: StateExecutionClaimAcquireRequest): Promise<StateExecutionClaim | null>;
renew(request: StateExecutionClaimRenewRequest): Promise<StateExecutionClaim>;
complete(request: StateExecutionClaimCompleteRequest): Promise<StateExecutionClaim>;
release(request: StateExecutionClaimReleaseRequest): Promise<StateExecutionClaim>;
get(scope: StateExecutionClaimScope, checkedAt?: string): Promise<StateExecutionClaim | null>;
assertCurrent(request: StateExecutionClaimAssertionRequest): Promise<StateExecutionClaim>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquire | method | acquire(request: StateExecutionClaimAcquireRequest): Promise<StateExecutionClaim | null> | Public method; parameters and return type are shown in the signature. |
assertCurrent | method | assertCurrent(request: StateExecutionClaimAssertionRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
complete | method | complete(request: StateExecutionClaimCompleteRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
get | method | get(scope: StateExecutionClaimScope, checkedAt?: string): Promise<StateExecutionClaim | null> | Public method; parameters and return type are shown in the signature. |
release | method | release(request: StateExecutionClaimReleaseRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
renew | method | renew(request: StateExecutionClaimRenewRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
RuntimeResourceClaimMode
Public type alias for Runtime Resource Claim Mode; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RuntimeResourceClaimMode } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export type RuntimeResourceClaimMode = (typeof RUNTIME_RESOURCE_CLAIM_MODES)[number];RuntimeResourceType
Public type alias for Runtime Resource Type; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RuntimeResourceType } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export type RuntimeResourceType = (typeof RUNTIME_RESOURCE_TYPES)[number];StateExecutionClaimStatus
Public type alias for State Execution Claim Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { StateExecutionClaimStatus } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-coordination
Declaration
export type StateExecutionClaimStatus = (typeof STATE_EXECUTION_CLAIM_STATUSES)[number];