@codesoul-co/hypha-core / contracts/session-queue
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/session-queue.ts - Exports: 27
Using this module
Use the Session queue module for declaring and runtime-validating contracts. It exports 5 constants, 20 interfaces, 2 types.
Import from the package entrypoint
import {
DEFAULT_SESSION_COMMAND_MAX_ATTEMPTS,
SESSION_COMMAND_MAX_ATTEMPTS_LIMIT,
SESSION_COMMAND_RUN_CANCELLED_CODE,
SESSION_COMMAND_STATUSES,
SESSION_COMMAND_TYPES,
} from '@codesoul-co/hypha-core';
import type {
CancelSessionCommandsRequest,
CancelSessionCommandsResult,
ClaimSessionCommandRequest,
CloseDeadLetterSessionCommandRequest,
CompleteSessionCommandRequest,
EnqueueSessionCommandRequest,
FailSessionCommandRequest,
ListSessionCommandsRequest,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 22 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The 5 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 |
|---|---|---|---|
DEFAULT_SESSION_COMMAND_MAX_ATTEMPTS | constant | const DEFAULT_SESSION_COMMAND_MAX_ATTEMPTS: 5 | DEFAULT SESSION COMMAND MAX ATTEMPTS constant exported by the contracts/session-queue module. |
SESSION_COMMAND_MAX_ATTEMPTS_LIMIT | constant | const SESSION_COMMAND_MAX_ATTEMPTS_LIMIT: 100 | SESSION COMMAND MAX ATTEMPTS LIMIT constant exported by the contracts/session-queue module. |
SESSION_COMMAND_RUN_CANCELLED_CODE | constant | const SESSION_COMMAND_RUN_CANCELLED_CODE: "RUNTIME_RUN_CANCELLED" | SESSION COMMAND RUN CANCELLED CODE constant exported by the contracts/session-queue module. |
SESSION_COMMAND_STATUSES | constant | const SESSION_COMMAND_STATUSES: readonly ["queued", "claimed", "applied", "reused", "rejected", "expired", "failed", "dead_letter", "dead_letter_resolved"] | SESSION COMMAND STATUSES constant exported by the contracts/session-queue module. |
SESSION_COMMAND_TYPES | constant | const SESSION_COMMAND_TYPES: readonly ["start_run", "user_input", "resume", "signal", "cancel", "transition", "continue_react", "close_session"] | SESSION COMMAND TYPES constant exported by the contracts/session-queue module. |
CancelSessionCommandsRequest | interface | interface CancelSessionCommandsRequest | Cancel Session Commands Request interface with 6 public fields or methods. |
CancelSessionCommandsResult | interface | interface CancelSessionCommandsResult | Cancel Session Commands Result interface with 4 public fields or methods. |
ClaimSessionCommandRequest | interface | interface ClaimSessionCommandRequest | Claim Session Command Request interface with 4 public fields or methods. |
CloseDeadLetterSessionCommandRequest | interface | interface CloseDeadLetterSessionCommandRequest | Close Dead Letter Session Command Request interface with 6 public fields or methods. |
CompleteSessionCommandRequest | interface | interface CompleteSessionCommandRequest | Complete Session Command Request interface with 7 public fields or methods. |
EnqueueSessionCommandRequest | interface | interface EnqueueSessionCommandRequest | Enqueue Session Command Request interface with 15 public fields or methods. |
FailSessionCommandRequest | interface | interface FailSessionCommandRequest | Fail Session Command Request interface with 7 public fields or methods. |
ListSessionCommandsRequest | interface | interface ListSessionCommandsRequest | List Session Commands Request interface with 4 public fields or methods. |
ListStuckSessionCommandsRequest | interface | interface ListStuckSessionCommandsRequest | List Stuck Session Commands Request interface with 4 public fields or methods. |
RedriveDeadLetterSessionCommandRequest | interface | interface RedriveDeadLetterSessionCommandRequest | Redrive Dead Letter Session Command Request interface with 12 public fields or methods. |
ReleaseSessionCommandRequest | interface | interface ReleaseSessionCommandRequest | Release Session Command Request interface with 6 public fields or methods. |
RenewSessionCommandRequest | interface | interface RenewSessionCommandRequest | Renew Session Command Request interface with 6 public fields or methods. |
SessionCommandClaim | interface | interface SessionCommandClaim | Session Command Claim interface with 5 public fields or methods. |
SessionCommandDeadLetterResolution | interface | interface SessionCommandDeadLetterResolution | Session Command Dead Letter Resolution interface with 6 public fields or methods. |
SessionCommandLeaseRecovery | interface | interface SessionCommandLeaseRecovery | Session Command Lease Recovery interface with 6 public fields or methods. |
SessionCommandRecord | interface | interface SessionCommandRecord | Session Command Record interface with 29 public fields or methods. |
SessionCommandRedrive | interface | interface SessionCommandRedrive | Session Command Redrive interface with 5 public fields or methods. |
SessionQueueHealthSnapshot | interface | interface SessionQueueHealthSnapshot extends Record<string, unknown> | Session Queue Health Snapshot interface with 12 public fields or methods. |
SessionQueueScope | interface | interface SessionQueueScope | Session Queue Scope interface with 3 public fields or methods. |
StuckSessionCommand | interface | interface StuckSessionCommand | Stuck Session Command interface with 3 public fields or methods. |
SessionCommandStatus | type | type SessionCommandStatus = (typeof SESSION_COMMAND_STATUSES)[number] | Public type alias for Session Command Status; the declaration contains its complete type expression. |
SessionCommandType | type | type SessionCommandType = (typeof SESSION_COMMAND_TYPES)[number] | Public type alias for Session Command Type; the declaration contains its complete type expression. |
DEFAULT_SESSION_COMMAND_MAX_ATTEMPTS
DEFAULT SESSION COMMAND MAX ATTEMPTS constant exported by the contracts/session-queue module.
- Kind: constant
- Import:
import { DEFAULT_SESSION_COMMAND_MAX_ATTEMPTS } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export declare const DEFAULT_SESSION_COMMAND_MAX_ATTEMPTS: 5;SESSION_COMMAND_MAX_ATTEMPTS_LIMIT
SESSION COMMAND MAX ATTEMPTS LIMIT constant exported by the contracts/session-queue module.
- Kind: constant
- Import:
import { SESSION_COMMAND_MAX_ATTEMPTS_LIMIT } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export declare const SESSION_COMMAND_MAX_ATTEMPTS_LIMIT: 100;SESSION_COMMAND_RUN_CANCELLED_CODE
SESSION COMMAND RUN CANCELLED CODE constant exported by the contracts/session-queue module.
- Kind: constant
- Import:
import { SESSION_COMMAND_RUN_CANCELLED_CODE } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export declare const SESSION_COMMAND_RUN_CANCELLED_CODE: "RUNTIME_RUN_CANCELLED";SESSION_COMMAND_STATUSES
SESSION COMMAND STATUSES constant exported by the contracts/session-queue module.
- Kind: constant
- Import:
import { SESSION_COMMAND_STATUSES } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export declare const SESSION_COMMAND_STATUSES: readonly ["queued", "claimed", "applied", "reused", "rejected", "expired", "failed", "dead_letter", "dead_letter_resolved"];SESSION_COMMAND_TYPES
SESSION COMMAND TYPES constant exported by the contracts/session-queue module.
- Kind: constant
- Import:
import { SESSION_COMMAND_TYPES } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export declare const SESSION_COMMAND_TYPES: readonly ["start_run", "user_input", "resume", "signal", "cancel", "transition", "continue_react", "close_session"];CancelSessionCommandsRequest
Cancel Session Commands Request interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { CancelSessionCommandsRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface CancelSessionCommandsRequest {
version: '1.0.0';
scope: SessionQueueScope;
targetRunId: string;
cancellationCommandId: string;
reason: string;
cancelledAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
cancellationCommandId | property | cancellationCommandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
cancelledAt | property | cancelledAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: SessionQueueScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
targetRunId | property | targetRunId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
CancelSessionCommandsResult
Cancel Session Commands Result interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { CancelSessionCommandsResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface CancelSessionCommandsResult {
targetRunId: string;
cancelledCommandIds: string[];
alreadyCancelledCommandIds: string[];
alreadyTerminalCommandIds: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
alreadyCancelledCommandIds | property | alreadyCancelledCommandIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
alreadyTerminalCommandIds | property | alreadyTerminalCommandIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
cancelledCommandIds | property | cancelledCommandIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
targetRunId | property | targetRunId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ClaimSessionCommandRequest
Claim Session Command Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ClaimSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface ClaimSessionCommandRequest {
workerId: string;
now: string;
leaseMs: number;
scope?: SessionQueueScope;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
leaseMs | property | leaseMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | property | now: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope?: SessionQueueScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
workerId | property | workerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
CloseDeadLetterSessionCommandRequest
Close Dead Letter Session Command Request interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { CloseDeadLetterSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface CloseDeadLetterSessionCommandRequest {
version: '1.0.0';
scope: SessionQueueScope;
commandId: string;
operatorId: string;
reason: string;
closedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
closedAt | property | closedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
operatorId | property | operatorId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: SessionQueueScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
CompleteSessionCommandRequest
Complete Session Command Request interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { CompleteSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface CompleteSessionCommandRequest {
commandId: string;
workerId: string;
claimToken: string;
leaseEpoch: number;
completedAt: string;
resultRunId?: string;
resultEventIds?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimToken | property | claimToken: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandId | property | commandId: 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. |
leaseEpoch | property | leaseEpoch: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
resultEventIds | property | resultEventIds?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
resultRunId | property | resultRunId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workerId | property | workerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
EnqueueSessionCommandRequest
Enqueue Session Command Request interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { EnqueueSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface EnqueueSessionCommandRequest {
id: string;
commandType: SessionCommandType;
idempotencyKey: string;
tenantId?: string;
userId: string;
workspaceId?: string;
sessionId: string;
targetRunId?: string;
priority?: number;
maxAttempts?: number;
payloadRef?: string;
payloadHash: string;
createdAt?: string;
availableAt?: string;
expiresAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
availableAt | property | availableAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandType | property | commandType: "user_input" | "cancel" | "signal" | "start_run" | "resume" | "transition" | "continue_react" | "close_session" | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt?: 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. |
id | property | id: 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. |
maxAttempts | property | maxAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
payloadHash | property | payloadHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
payloadRef | property | payloadRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
priority | property | priority?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
targetRunId | property | targetRunId?: 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. |
workspaceId | property | workspaceId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
FailSessionCommandRequest
Fail Session Command Request interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { FailSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface FailSessionCommandRequest {
commandId: string;
workerId: string;
claimToken: string;
leaseEpoch: number;
failedAt: string;
rejectionCode: string;
deadLetter?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimToken | property | claimToken: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadLetter | property | deadLetter?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
failedAt | property | failedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseEpoch | property | leaseEpoch: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
rejectionCode | property | rejectionCode: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workerId | property | workerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ListSessionCommandsRequest
List Session Commands Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ListSessionCommandsRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface ListSessionCommandsRequest {
scope: SessionQueueScope;
statuses?: SessionCommandStatus[];
fromSequence?: number;
limit?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fromSequence | property | fromSequence?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: SessionQueueScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
statuses | property | statuses?: ("rejected" | "queued" | "failed" | "expired" | "applied" | "dead_letter" | "claimed" | "reused" | "dead_letter_resolved")[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ListStuckSessionCommandsRequest
List Stuck Session Commands Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ListStuckSessionCommandsRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface ListStuckSessionCommandsRequest {
scope: SessionQueueScope;
checkedAt: string;
graceMs?: number;
limit?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
checkedAt | property | checkedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
graceMs | property | graceMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: SessionQueueScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RedriveDeadLetterSessionCommandRequest
Redrive Dead Letter Session Command Request interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { RedriveDeadLetterSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface RedriveDeadLetterSessionCommandRequest {
version: '1.0.0';
scope: SessionQueueScope;
sourceCommandId: string;
id: string;
idempotencyKey: string;
operatorId: string;
reason: string;
requestedAt?: string;
availableAt?: string;
expiresAt?: string;
priority?: number;
maxAttempts?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
availableAt | property | availableAt?: 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. |
id | property | id: 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. |
maxAttempts | property | maxAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
operatorId | property | operatorId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
priority | property | priority?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requestedAt | property | requestedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: SessionQueueScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceCommandId | property | sourceCommandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
ReleaseSessionCommandRequest
Release Session Command Request interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { ReleaseSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface ReleaseSessionCommandRequest {
commandId: string;
workerId: string;
claimToken: string;
leaseEpoch: number;
releasedAt: string;
availableAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
availableAt | property | availableAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimToken | property | claimToken: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseEpoch | property | leaseEpoch: number | 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. |
workerId | property | workerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RenewSessionCommandRequest
Renew Session Command Request interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RenewSessionCommandRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface RenewSessionCommandRequest {
commandId: string;
workerId: string;
claimToken: string;
leaseEpoch: number;
renewedAt: string;
leaseMs: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimToken | property | claimToken: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseEpoch | property | leaseEpoch: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseMs | property | leaseMs: number | 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. |
workerId | property | workerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionCommandClaim
Session Command Claim interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { SessionCommandClaim } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface SessionCommandClaim {
commandId: string;
workerId: string;
claimToken: string;
leaseEpoch: number;
leaseExpiresAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimToken | property | claimToken: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseEpoch | property | leaseEpoch: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseExpiresAt | property | leaseExpiresAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workerId | property | workerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionCommandDeadLetterResolution
Session Command Dead Letter Resolution interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { SessionCommandDeadLetterResolution } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface SessionCommandDeadLetterResolution {
version: '1.0.0';
disposition: 'redriven' | 'closed';
operatorId: string;
reason: string;
resolvedAt: string;
redriveCommandId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
disposition | property | disposition: "closed" | "redriven" | Public property; its type, readonly modifier and optionality are shown in the signature. |
operatorId | property | operatorId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
redriveCommandId | property | redriveCommandId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resolvedAt | property | resolvedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionCommandLeaseRecovery
Session Command Lease Recovery interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { SessionCommandLeaseRecovery } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface SessionCommandLeaseRecovery {
version: '1.0.0';
previousWorkerId: string;
previousLeaseEpoch: number;
leaseExpiredAt: string;
recoveredAt: string;
disposition: 'requeued' | 'dead_lettered';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
disposition | property | disposition: "requeued" | "dead_lettered" | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseExpiredAt | property | leaseExpiredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
previousLeaseEpoch | property | previousLeaseEpoch: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
previousWorkerId | property | previousWorkerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
recoveredAt | property | recoveredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionCommandRecord
Session Command Record interface with 29 public fields or methods.
- Kind: interface
- Import:
import type { SessionCommandRecord } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface SessionCommandRecord {
id: string;
commandType: SessionCommandType;
idempotencyKey: string;
tenantId?: string;
userId: string;
workspaceId?: string;
sessionId: string;
targetRunId?: string;
enqueueSequence: number;
priority: number;
attempts: number;
maxAttempts: number;
leaseEpoch: number;
payloadRef?: string;
payloadHash: string;
status: SessionCommandStatus;
claimedBy?: string;
claimToken?: string;
leaseExpiresAt?: string;
resultRunId?: string;
resultEventIds?: string[];
rejectionCode?: string;
createdAt: string;
availableAt: string;
expiresAt?: string;
completedAt?: string;
redrive?: SessionCommandRedrive;
deadLetterResolution?: SessionCommandDeadLetterResolution;
leaseRecoveries?: SessionCommandLeaseRecovery[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempts | property | attempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
availableAt | property | availableAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimedBy | property | claimedBy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimToken | property | claimToken?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandType | property | commandType: "user_input" | "cancel" | "signal" | "start_run" | "resume" | "transition" | "continue_react" | "close_session" | 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. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadLetterResolution | property | deadLetterResolution?: SessionCommandDeadLetterResolution | Public property; its type, readonly modifier and optionality are shown in the signature. |
enqueueSequence | property | enqueueSequence: 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. |
id | property | id: 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. |
leaseEpoch | property | leaseEpoch: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseExpiresAt | property | leaseExpiresAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseRecoveries | property | leaseRecoveries?: SessionCommandLeaseRecovery[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxAttempts | property | maxAttempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
payloadHash | property | payloadHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
payloadRef | property | payloadRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
priority | property | priority: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
redrive | property | redrive?: SessionCommandRedrive | Public property; its type, readonly modifier and optionality are shown in the signature. |
rejectionCode | property | rejectionCode?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resultEventIds | property | resultEventIds?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
resultRunId | property | resultRunId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "rejected" | "queued" | "failed" | "expired" | "applied" | "dead_letter" | "claimed" | "reused" | "dead_letter_resolved" | Public property; its type, readonly modifier and optionality are shown in the signature. |
targetRunId | property | targetRunId?: 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. |
workspaceId | property | workspaceId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionCommandRedrive
Session Command Redrive interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { SessionCommandRedrive } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface SessionCommandRedrive {
version: '1.0.0';
sourceCommandId: string;
operatorId: string;
reason: string;
requestedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
operatorId | property | operatorId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requestedAt | property | requestedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sourceCommandId | property | sourceCommandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionQueueHealthSnapshot
Session Queue Health Snapshot interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { SessionQueueHealthSnapshot } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface SessionQueueHealthSnapshot extends Record<string, unknown> {
version: '1.0.0';
totalCommands: number;
pendingCommands: number;
queuedCommands: number;
claimedCommands: number;
deadLetterCommands: number;
resolvedDeadLetterCommands: number;
retryingCommands: number;
redeliveredCommands: number;
recoveredExpiredLeases: number;
leaseRecoveryCount: number;
oldestPendingAgeMs?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimedCommands | property | claimedCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadLetterCommands | property | deadLetterCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseRecoveryCount | property | leaseRecoveryCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
oldestPendingAgeMs | property | oldestPendingAgeMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingCommands | property | pendingCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
queuedCommands | property | queuedCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
recoveredExpiredLeases | property | recoveredExpiredLeases: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
redeliveredCommands | property | redeliveredCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
resolvedDeadLetterCommands | property | resolvedDeadLetterCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryingCommands | property | retryingCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
totalCommands | property | totalCommands: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionQueueScope
Session Queue Scope interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { SessionQueueScope } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface SessionQueueScope {
tenantId?: string;
userId: string;
sessionId: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
sessionId | property | sessionId: 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. |
StuckSessionCommand
Stuck Session Command interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { StuckSessionCommand } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export interface StuckSessionCommand {
command: SessionCommandRecord;
detectedAt: string;
overdueMs: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
command | property | command: SessionCommandRecord | Public property; its type, readonly modifier and optionality are shown in the signature. |
detectedAt | property | detectedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
overdueMs | property | overdueMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionCommandStatus
Public type alias for Session Command Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { SessionCommandStatus } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export type SessionCommandStatus = (typeof SESSION_COMMAND_STATUSES)[number];SessionCommandType
Public type alias for Session Command Type; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { SessionCommandType } from '@codesoul-co/hypha-core'; - Source module:
contracts/session-queue
Declaration
export type SessionCommandType = (typeof SESSION_COMMAND_TYPES)[number];