Skip to content

@codesoul-co/hypha-tools / execution-adapter ​

Using this module ​

Use the Execution adapter module for binding external or local providers to Hypha ports. It exports 2 classes, 1 constant, 3 functions, 10 interfaces, 2 types.

Import from the package entrypoint ​

ts
import {
  ExecutionToolAdapter,
  ExecutionToolTerminalError,
  EXECUTION_TOOL_TERMINAL_STATES,
  hashExecutionToolInput,
  normalizeExecutionToolInput,
  validateExecutionToolRuntimeRequest,
} from '@codesoul-co/hypha-tools';

import type {
  ExecutionToolAdapterOptions,
  ExecutionToolDispatchFactoryRequest,
  ExecutionToolDispatchPlan,
  ExecutionToolEvidence,
  ExecutionToolObservation,
  ExecutionToolProvenance,
  ExecutionToolRuntimePort,
  ExecutionToolRuntimeRequest,
} from '@codesoul-co/hypha-tools';

// The complete export list is documented below.

Usage patterns ​

  • Use the 12 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 2 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
  • The module exposes 3 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
  • The 1 constant/enum export provides stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Public exports ​

SymbolKindSignatureDescription
ExecutionToolAdapterclassnew ExecutionToolAdapter<TInput = unknown>(id: string, port: ExecutionToolRuntimePort, createDispatch: ExecutionToolDispatchFactory<TInput>, options: ExecutionToolAdapterOptions): ExecutionToolAdapter<TInput>Execution Tool Adapter class with 8 public constructor or member entries; its exact declarations are listed below.
ExecutionToolTerminalErrorclassnew ExecutionToolTerminalError(observation: ExecutionToolObservation): ExecutionToolTerminalErrorExecution Tool Terminal Error class with 13 public constructor or member entries; its exact declarations are listed below.
EXECUTION_TOOL_TERMINAL_STATESconstantconst EXECUTION_TOOL_TERMINAL_STATES: readonly ["completed", "failed", "timed_out", "cancelled", "unknown", "quarantined"]EXECUTION TOOL TERMINAL STATES constant exported by the execution-adapter module.
hashExecutionToolInputfunctionhashExecutionToolInput(input: unknown): stringHash Execution Tool Input function with 1 public call signature; parameters and return types are listed below.
normalizeExecutionToolInputfunctionnormalizeExecutionToolInput<TInput>(input: TInput): TInputNormalize Execution Tool Input function with 1 public call signature; parameters and return types are listed below.
validateExecutionToolRuntimeRequestfunctionvalidateExecutionToolRuntimeRequest<TInput>(input: ExecutionToolRuntimeRequest<TInput>): ExecutionToolRuntimeRequest<TInput>Recomputes the normalized input digest at the Execution boundary. Runtime-port implementations must call this validator before delegating to a provider.
ExecutionToolAdapterOptionsinterfaceinterface ExecutionToolAdapterOptionsExecution Tool Adapter Options interface with 6 public fields or methods.
ExecutionToolDispatchFactoryRequestinterfaceinterface ExecutionToolDispatchFactoryRequest extends AdapterExecutionRequest<TInput>Execution Tool Dispatch Factory Request interface with 6 public fields or methods.
ExecutionToolDispatchPlaninterfaceinterface ExecutionToolDispatchPlanExecution Tool Dispatch Plan interface with 3 public fields or methods.
ExecutionToolEvidenceinterfaceinterface ExecutionToolEvidenceExecution Tool Evidence interface with 4 public fields or methods.
ExecutionToolObservationinterfaceinterface ExecutionToolObservation extends ExecutionToolRuntimeResultExecution Tool Observation interface with 14 public fields or methods.
ExecutionToolProvenanceinterfaceinterface ExecutionToolProvenanceExecution Tool Provenance interface with 7 public fields or methods.
ExecutionToolRuntimePortinterfaceinterface ExecutionToolRuntimePortExecution Tool Runtime Port interface with 3 public fields or methods.
ExecutionToolRuntimeRequestinterfaceinterface ExecutionToolRuntimeRequestExecution Tool Runtime Request interface with 4 public fields or methods.
ExecutionToolRuntimeResultinterfaceinterface ExecutionToolRuntimeResultExecution Tool Runtime Result interface with 13 public fields or methods.
ExecutionToolRuntimeScopeinterfaceinterface ExecutionToolRuntimeScopeExecution Tool Runtime Scope interface with 6 public fields or methods.
ExecutionToolDispatchFactorytypetype ExecutionToolDispatchFactory = (request: ExecutionToolDispatchFactoryRequest<TInput>) => Promise<ExecutionToolDispatchPlan> | ExecutionToolDispatchPlanPublic type alias for Execution Tool Dispatch Factory; the declaration contains its complete type expression.
ExecutionToolTerminalStatetypetype ExecutionToolTerminalState = (typeof EXECUTION_TOOL_TERMINAL_STATES)[number]Public type alias for Execution Tool Terminal State; the declaration contains its complete type expression.

ExecutionToolAdapter ​

Execution Tool Adapter class with 8 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { ExecutionToolAdapter } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export declare class ExecutionToolAdapter<TInput = unknown> implements ToolAdapter<TInput, ExecutionToolObservation> {
    readonly id: string;
    readonly source: ToolSource;
    constructor(id: string, port: ExecutionToolRuntimePort, createDispatch: ExecutionToolDispatchFactory<TInput>, options: ExecutionToolAdapterOptions);
    capabilities(): Promise<ToolAdapterCapabilities>;
    execute(request: AdapterExecutionRequest<TInput>): Promise<ToolExecutionEnvelope<ExecutionToolObservation>>;
    cancel(request: AdapterCancellationRequest): Promise<void>;
    health(): Promise<ProviderHealth>;
    close(): Promise<void>;
}

Public members ​

MemberKindSignatureDescription
cancelmethodcancel(request: AdapterCancellationRequest): Promise<void>Public method; parameters and return type are shown in the signature.
capabilitiesmethodcapabilities(): Promise<ToolAdapterCapabilities>Public method; parameters and return type are shown in the signature.
closemethodclose(): Promise<void>Public method; parameters and return type are shown in the signature.
constructorconstructor<TInput = unknown>(id: string, port: ExecutionToolRuntimePort, createDispatch: ExecutionToolDispatchFactory<TInput>, options: ExecutionToolAdapterOptions): ExecutionToolAdapter<TInput>Creates an instance of this class.
executemethodexecute(request: AdapterExecutionRequest<TInput>): Promise<ToolExecutionEnvelope<ExecutionToolObservation>>Public method; parameters and return type are shown in the signature.
healthmethodhealth(): Promise<ProviderHealth>Public method; parameters and return type are shown in the signature.
idpropertyreadonly id: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sourcepropertyreadonly source: ToolSourcePublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolTerminalError ​

Execution Tool Terminal Error class with 13 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { ExecutionToolTerminalError } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export declare class ExecutionToolTerminalError extends FrameworkError {
    readonly terminalState: Exclude<ExecutionToolTerminalState, 'completed'>;
    readonly executionError: NormalizedExecutionError;
    readonly observation: ExecutionToolObservation;
    constructor(observation: ExecutionToolObservation);
}

Public members ​

MemberKindSignatureDescription
causepropertyreadonly cause?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
codepropertyreadonly code: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
constructorconstructor(observation: ExecutionToolObservation): ExecutionToolTerminalErrorCreates an instance of this class.
contextpropertyreadonly context?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
executionErrorpropertyreadonly executionError: NormalizedExecutionErrorPublic property; its type, readonly modifier and optionality are shown in the signature.
messagepropertymessage: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
namepropertyname: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
observationpropertyreadonly observation: ExecutionToolObservationPublic property; its type, readonly modifier and optionality are shown in the signature.
stackpropertystack?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
static captureStackTracemethodstatic captureStackTrace(targetObject: object, constructorOpt?: Function): voidCreates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called. js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}. The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace. The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance: js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a();
static prepareStackTracemethodstatic prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): anyPublic method; parameters and return type are shown in the signature.
static stackTraceLimitpropertystatic stackTraceLimit: numberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
terminalStatepropertyreadonly terminalState: "unknown" | "cancelled" | "failed" | "timed_out" | "quarantined"Public property; its type, readonly modifier and optionality are shown in the signature.

EXECUTION_TOOL_TERMINAL_STATES ​

EXECUTION TOOL TERMINAL STATES constant exported by the execution-adapter module.

  • Kind: constant
  • Import: import { EXECUTION_TOOL_TERMINAL_STATES } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export declare const EXECUTION_TOOL_TERMINAL_STATES: readonly ["completed", "failed", "timed_out", "cancelled", "unknown", "quarantined"];

hashExecutionToolInput ​

Hash Execution Tool Input function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { hashExecutionToolInput } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export declare function hashExecutionToolInput(input: unknown): string;

Call signature ​

text
hashExecutionToolInput(input: unknown): string

Parameters ​

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns ​

  • Type: string
  • Description: The return contract is defined by the type shown above.

normalizeExecutionToolInput ​

Normalize Execution Tool Input function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { normalizeExecutionToolInput } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export declare function normalizeExecutionToolInput<TInput>(input: TInput): TInput;

Call signature ​

text
normalizeExecutionToolInput<TInput>(input: TInput): TInput

Parameters ​

ParameterTypeRequiredDescription
inputTInputYesRequired parameter; accepted values are defined by the type column.

Returns ​

  • Type: TInput
  • Description: The return contract is defined by the type shown above.

validateExecutionToolRuntimeRequest ​

Recomputes the normalized input digest at the Execution boundary. Runtime-port implementations must call this validator before delegating to a provider.

  • Kind: function
  • Import: import { validateExecutionToolRuntimeRequest } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export declare function validateExecutionToolRuntimeRequest<TInput>(input: ExecutionToolRuntimeRequest<TInput>): ExecutionToolRuntimeRequest<TInput>;

Call signature ​

text
validateExecutionToolRuntimeRequest<TInput>(input: ExecutionToolRuntimeRequest<TInput>): ExecutionToolRuntimeRequest<TInput>

Recomputes the normalized input digest at the Execution boundary. Runtime-port implementations must call this validator before delegating to a provider.

Parameters ​

ParameterTypeRequiredDescription
inputExecutionToolRuntimeRequest<TInput>YesRequired parameter; accepted values are defined by the type column.

Returns ​

  • Type: ExecutionToolRuntimeRequest<TInput>
  • Description: The return contract is defined by the type shown above.

ExecutionToolAdapterOptions ​

Execution Tool Adapter Options interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolAdapterOptions } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolAdapterOptions {
    toolRevision: string;
    binding: ExecutionToolBinding;
    providerId: string;
    healthTimeoutMs?: number;
    maxEvidenceBytes?: number;
    now?: () => string;
}

Contract members ​

MemberKindSignatureDescription
bindingpropertybinding: ExecutionToolBindingPublic property; its type, readonly modifier and optionality are shown in the signature.
healthTimeoutMspropertyhealthTimeoutMs?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxEvidenceBytespropertymaxEvidenceBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
providerIdpropertyproviderId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
toolRevisionpropertytoolRevision: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolDispatchFactoryRequest ​

Execution Tool Dispatch Factory Request interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolDispatchFactoryRequest } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolDispatchFactoryRequest<TInput> extends AdapterExecutionRequest<TInput> {
    normalizedInput: TInput;
    inputHash: string;
    signal: AbortSignal;
}

Contract members ​

MemberKindSignatureDescription
contextpropertycontext: ToolCallContextPublic property; its type, readonly modifier and optionality are shown in the signature.
inputpropertyinput: TInputPublic property; its type, readonly modifier and optionality are shown in the signature.
inputHashpropertyinputHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
normalizedInputpropertynormalizedInput: TInputPublic property; its type, readonly modifier and optionality are shown in the signature.
signalpropertysignal: AbortSignalPublic property; its type, readonly modifier and optionality are shown in the signature.
toolIdpropertytoolId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolDispatchPlan ​

Execution Tool Dispatch Plan interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolDispatchPlan } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolDispatchPlan {
    dispatch: ExecutionDispatchRequest;
    expectedRevision: number;
    approvalExpiresAt?: string;
}

Contract members ​

MemberKindSignatureDescription
approvalExpiresAtpropertyapprovalExpiresAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
dispatchpropertydispatch: ExecutionDispatchRequestPublic property; its type, readonly modifier and optionality are shown in the signature.
expectedRevisionpropertyexpectedRevision: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolEvidence ​

Execution Tool Evidence interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolEvidence } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolEvidence {
    kind: 'authorization' | 'event' | 'receipt' | 'artifact' | 'snapshot' | 'trace';
    ref: string;
    hash?: string;
    recordedAt?: string;
}

Contract members ​

MemberKindSignatureDescription
hashpropertyhash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
kindpropertykind: "artifact" | "event" | "snapshot" | "authorization" | "trace" | "receipt"Public property; its type, readonly modifier and optionality are shown in the signature.
recordedAtpropertyrecordedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
refpropertyref: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolObservation ​

Execution Tool Observation interface with 14 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolObservation } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolObservation extends ExecutionToolRuntimeResult {
    evidenceHash: string;
}

Contract members ​

MemberKindSignatureDescription
activityResultpropertyactivityResult: ExecutionActivityResultPublic property; its type, readonly modifier and optionality are shown in the signature.
contractSnapshotRefpropertycontractSnapshotRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
evidencepropertyevidence: ExecutionToolEvidence[]Public property; its type, readonly modifier and optionality are shown in the signature.
evidenceHashpropertyevidenceHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
fencingTokenpropertyfencingToken: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
inputHashpropertyinputHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
provenancepropertyprovenance: ExecutionToolProvenancePublic property; its type, readonly modifier and optionality are shown in the signature.
revisionpropertyrevision: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
scopepropertyscope: ExecutionToolRuntimeScopePublic property; its type, readonly modifier and optionality are shown in the signature.
terminalStatepropertyterminalState: "unknown" | "completed" | "cancelled" | "failed" | "timed_out" | "quarantined"Public property; its type, readonly modifier and optionality are shown in the signature.
toolIdpropertytoolId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
toolOperationpropertytoolOperation: "artifact" | "command" | "file_read" | "file_write" | "sandbox"Public property; its type, readonly modifier and optionality are shown in the signature.
toolRevisionpropertytoolRevision: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolProvenance ​

Execution Tool Provenance interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolProvenance } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolProvenance {
    providerId: string;
    authorizationEvidenceId: string;
    authorizationVerificationRef: string;
    terminalEventId: string;
    receivedAt: string;
    resultHash: string;
    receiptRef?: string;
}

Contract members ​

MemberKindSignatureDescription
authorizationEvidenceIdpropertyauthorizationEvidenceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
authorizationVerificationRefpropertyauthorizationVerificationRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
providerIdpropertyproviderId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
receiptRefpropertyreceiptRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
receivedAtpropertyreceivedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
resultHashpropertyresultHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
terminalEventIdpropertyterminalEventId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolRuntimePort ​

Execution Tool Runtime Port interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolRuntimePort } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolRuntimePort {
    execute(request: ExecutionToolRuntimeRequest, signal: AbortSignal): Promise<unknown>;
    health(signal: AbortSignal): Promise<unknown>;
    close?(): Promise<void>;
}

Contract members ​

MemberKindSignatureDescription
closemethodclose?(): Promise<void>Public method; parameters and return type are shown in the signature.
executemethodexecute(request: ExecutionToolRuntimeRequest, signal: AbortSignal): Promise<unknown>Public method; parameters and return type are shown in the signature.
healthmethodhealth(signal: AbortSignal): Promise<unknown>Public method; parameters and return type are shown in the signature.

ExecutionToolRuntimeRequest ​

Execution Tool Runtime Request interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolRuntimeRequest } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolRuntimeRequest<TInput = unknown> {
    dispatch: ExecutionDispatchRequest;
    normalizedInput: TInput;
    inputHash: string;
    expectedRevision: number;
}

Contract members ​

MemberKindSignatureDescription
dispatchpropertydispatch: ExecutionDispatchRequestPublic property; its type, readonly modifier and optionality are shown in the signature.
expectedRevisionpropertyexpectedRevision: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
inputHashpropertyinputHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
normalizedInputpropertynormalizedInput: TInputPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolRuntimeResult ​

Execution Tool Runtime Result interface with 13 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolRuntimeResult } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolRuntimeResult {
    activityResult: ExecutionActivityResult;
    scope: ExecutionToolRuntimeScope;
    toolId: string;
    toolRevision: string;
    contractSnapshotRef: string;
    toolOperation: ExecutionDispatchRequest['binding']['operation'];
    operationId: string;
    inputHash: string;
    revision: number;
    fencingToken: number;
    terminalState: ExecutionToolTerminalState;
    provenance: ExecutionToolProvenance;
    evidence: ExecutionToolEvidence[];
}

Contract members ​

MemberKindSignatureDescription
activityResultpropertyactivityResult: ExecutionActivityResultPublic property; its type, readonly modifier and optionality are shown in the signature.
contractSnapshotRefpropertycontractSnapshotRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
evidencepropertyevidence: ExecutionToolEvidence[]Public property; its type, readonly modifier and optionality are shown in the signature.
fencingTokenpropertyfencingToken: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
inputHashpropertyinputHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
provenancepropertyprovenance: ExecutionToolProvenancePublic property; its type, readonly modifier and optionality are shown in the signature.
revisionpropertyrevision: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
scopepropertyscope: ExecutionToolRuntimeScopePublic property; its type, readonly modifier and optionality are shown in the signature.
terminalStatepropertyterminalState: "unknown" | "completed" | "cancelled" | "failed" | "timed_out" | "quarantined"Public property; its type, readonly modifier and optionality are shown in the signature.
toolIdpropertytoolId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
toolOperationpropertytoolOperation: "artifact" | "command" | "file_read" | "file_write" | "sandbox"Public property; its type, readonly modifier and optionality are shown in the signature.
toolRevisionpropertytoolRevision: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolRuntimeScope ​

Execution Tool Runtime Scope interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { ExecutionToolRuntimeScope } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export interface ExecutionToolRuntimeScope {
    principalId: string;
    userId?: string;
    tenantId?: string;
    sessionId?: string;
    runId: string;
    workspaceId: string;
}

Contract members ​

MemberKindSignatureDescription
principalIdpropertyprincipalId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
runIdpropertyrunId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sessionIdpropertysessionId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
tenantIdpropertytenantId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecutionToolDispatchFactory ​

Public type alias for Execution Tool Dispatch Factory; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { ExecutionToolDispatchFactory } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export type ExecutionToolDispatchFactory<TInput = unknown> = (request: ExecutionToolDispatchFactoryRequest<TInput>) => Promise<ExecutionToolDispatchPlan> | ExecutionToolDispatchPlan;

ExecutionToolTerminalState ​

Public type alias for Execution Tool Terminal State; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { ExecutionToolTerminalState } from '@codesoul-co/hypha-tools';
  • Source module: execution-adapter

Declaration ​

text
export type ExecutionToolTerminalState = (typeof EXECUTION_TOOL_TERMINAL_STATES)[number];