@codesoul-co/hypha-adapters-local / legacy-tool-artifact-migration-executor
- Package index:
@codesoul-co/hypha-adapters-local - Source:
packages/adapters-local/src/legacy-tool-artifact-migration-executor.ts - Exports: 10
Using this module
Use the Legacy tool artifact migration executor module for executing runtime behavior at this boundary. It exports 2 classes, 7 interfaces, 1 type.
Import from the package entrypoint
import {
LegacyToolArtifactMigrationExecutionError,
LegacyToolArtifactMigrationExecutor,
} from '@codesoul-co/hypha-adapters-local';
import type {
LegacyToolArtifactMigrationExecuteRequest,
LegacyToolArtifactMigrationExecutionItem,
LegacyToolArtifactMigrationExecutionResult,
LegacyToolArtifactMigrationExecutionSummary,
LegacyToolArtifactMigrationExecutorOptions,
LegacyToolArtifactMigrationFailure,
LegacyToolArtifactMigrationTargetSummary,
LegacyToolArtifactMigrationExecutionErrorCode,
} from '@codesoul-co/hypha-adapters-local';Usage patterns
- Use the 8 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.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
LegacyToolArtifactMigrationExecutionError | class | new LegacyToolArtifactMigrationExecutionError(code: LegacyToolArtifactMigrationExecutionErrorCode, message: string, details?: Record<string, unknown> | undefined): LegacyToolArtifactMigrationExecutionError | Legacy Tool Artifact Migration Execution Error class with 10 public constructor or member entries; its exact declarations are listed below. |
LegacyToolArtifactMigrationExecutor | class | new LegacyToolArtifactMigrationExecutor(options: LegacyToolArtifactMigrationExecutorOptions): LegacyToolArtifactMigrationExecutor | Executes a prevalidated migration plan sequentially. It never deletes or mutates legacy source files, and individual import failures remain isolated. |
LegacyToolArtifactMigrationExecuteRequest | interface | interface LegacyToolArtifactMigrationExecuteRequest | Legacy Tool Artifact Migration Execute Request interface with 2 public fields or methods. |
LegacyToolArtifactMigrationExecutionItem | interface | interface LegacyToolArtifactMigrationExecutionItem | Legacy Tool Artifact Migration Execution Item interface with 10 public fields or methods. |
LegacyToolArtifactMigrationExecutionResult | interface | interface LegacyToolArtifactMigrationExecutionResult | Legacy Tool Artifact Migration Execution Result interface with 6 public fields or methods. |
LegacyToolArtifactMigrationExecutionSummary | interface | interface LegacyToolArtifactMigrationExecutionSummary | Legacy Tool Artifact Migration Execution Summary interface with 5 public fields or methods. |
LegacyToolArtifactMigrationExecutorOptions | interface | interface LegacyToolArtifactMigrationExecutorOptions | Legacy Tool Artifact Migration Executor Options interface with 2 public fields or methods. |
LegacyToolArtifactMigrationFailure | interface | interface LegacyToolArtifactMigrationFailure | Legacy Tool Artifact Migration Failure interface with 3 public fields or methods. |
LegacyToolArtifactMigrationTargetSummary | interface | interface LegacyToolArtifactMigrationTargetSummary | Legacy Tool Artifact Migration Target Summary interface with 4 public fields or methods. |
LegacyToolArtifactMigrationExecutionErrorCode | type | type LegacyToolArtifactMigrationExecutionErrorCode = 'LEGACY_MIGRATION_EXECUTION_INVALID_PLAN' | 'LEGACY_MIGRATION_EXECUTION_LIMIT_EXCEEDED' | 'LEGACY_MIGRATION_RESULT_MISMATCH' | Public type alias for Legacy Tool Artifact Migration Execution Error Code; the declaration contains its complete type expression. |
LegacyToolArtifactMigrationExecutionError
Legacy Tool Artifact Migration Execution Error class with 10 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { LegacyToolArtifactMigrationExecutionError } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export declare class LegacyToolArtifactMigrationExecutionError extends Error {
readonly code: LegacyToolArtifactMigrationExecutionErrorCode;
readonly details?: Record<string, unknown> | undefined;
constructor(code: LegacyToolArtifactMigrationExecutionErrorCode, message: string, details?: Record<string, unknown> | undefined);
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
cause | property | cause?: unknown | Public property; its type, readonly modifier and optionality are shown in the signature. |
code | property | readonly code: LegacyToolArtifactMigrationExecutionErrorCode | Public property; its type, readonly modifier and optionality are shown in the signature. |
constructor | constructor | (code: LegacyToolArtifactMigrationExecutionErrorCode, message: string, details?: Record<string, unknown> | undefined): LegacyToolArtifactMigrationExecutionError | Creates an instance of this class. |
details | property | readonly details?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
message | property | message: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stack | property | stack?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
static captureStackTrace | method | static captureStackTrace(targetObject: object, constructorOpt?: Function): void | Creates 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 prepareStackTrace | method | static prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any | Public method; parameters and return type are shown in the signature. |
static stackTraceLimit | property | static stackTraceLimit: number | The 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. |
LegacyToolArtifactMigrationExecutor
Executes a prevalidated migration plan sequentially. It never deletes or mutates legacy source files, and individual import failures remain isolated.
- Kind: class
- Import:
import { LegacyToolArtifactMigrationExecutor } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export declare class LegacyToolArtifactMigrationExecutor {
constructor(options: LegacyToolArtifactMigrationExecutorOptions);
execute(request: LegacyToolArtifactMigrationExecuteRequest): Promise<LegacyToolArtifactMigrationExecutionResult>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: LegacyToolArtifactMigrationExecutorOptions): LegacyToolArtifactMigrationExecutor | Creates an instance of this class. |
execute | method | execute(request: LegacyToolArtifactMigrationExecuteRequest): Promise<LegacyToolArtifactMigrationExecutionResult> | Public method; parameters and return type are shown in the signature. |
LegacyToolArtifactMigrationExecuteRequest
Legacy Tool Artifact Migration Execute Request interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationExecuteRequest } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export interface LegacyToolArtifactMigrationExecuteRequest {
plan: LegacyToolArtifactMigrationPlan;
dryRun?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
dryRun | property | dryRun?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
plan | property | plan: LegacyToolArtifactMigrationPlan | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationExecutionItem
Legacy Tool Artifact Migration Execution Item interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationExecutionItem } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export interface LegacyToolArtifactMigrationExecutionItem {
relativePath: string;
legacyArtifactId: string;
target: LegacyToolArtifactMigrationTargetSummary;
status: 'dry_run' | 'imported' | 'failed';
artifactId?: string;
versionId?: string;
revision?: number;
contentHash?: string;
sizeBytes?: number;
failure?: LegacyToolArtifactMigrationFailure;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactId | property | artifactId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
contentHash | property | contentHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
failure | property | failure?: LegacyToolArtifactMigrationFailure | Public property; its type, readonly modifier and optionality are shown in the signature. |
legacyArtifactId | property | legacyArtifactId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
relativePath | property | relativePath: 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. |
sizeBytes | property | sizeBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "failed" | "imported" | "dry_run" | Public property; its type, readonly modifier and optionality are shown in the signature. |
target | property | target: LegacyToolArtifactMigrationTargetSummary | Public property; its type, readonly modifier and optionality are shown in the signature. |
versionId | property | versionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationExecutionResult
Legacy Tool Artifact Migration Execution Result interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationExecutionResult } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export interface LegacyToolArtifactMigrationExecutionResult {
planHash: string;
reportId: string;
mode: 'dry_run' | 'execute';
items: LegacyToolArtifactMigrationExecutionItem[];
skipped: LegacyToolArtifactMigrationSkipPlanItem[];
summary: LegacyToolArtifactMigrationExecutionSummary;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
items | property | items: LegacyToolArtifactMigrationExecutionItem[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "execute" | "dry_run" | Public property; its type, readonly modifier and optionality are shown in the signature. |
planHash | property | planHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reportId | property | reportId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
skipped | property | skipped: LegacyToolArtifactMigrationSkipPlanItem[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
summary | property | summary: LegacyToolArtifactMigrationExecutionSummary | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationExecutionSummary
Legacy Tool Artifact Migration Execution Summary interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationExecutionSummary } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export interface LegacyToolArtifactMigrationExecutionSummary {
planned: number;
dryRun: number;
imported: number;
failed: number;
skipped: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
dryRun | property | dryRun: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
failed | property | failed: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
imported | property | imported: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
planned | property | planned: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
skipped | property | skipped: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationExecutorOptions
Legacy Tool Artifact Migration Executor Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationExecutorOptions } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export interface LegacyToolArtifactMigrationExecutorOptions {
importer: Pick<LegacyToolArtifactImporter, 'import'>;
maxImports?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
importer | property | importer: Pick<LegacyToolArtifactImporter, "import"> | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxImports | property | maxImports?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationFailure
Legacy Tool Artifact Migration Failure interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationFailure } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export interface LegacyToolArtifactMigrationFailure {
name: string;
code?: string;
message: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
code | property | code?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
message | property | message: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationTargetSummary
Legacy Tool Artifact Migration Target Summary interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationTargetSummary } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export interface LegacyToolArtifactMigrationTargetSummary {
principalId: string;
workspaceId: string;
toolId: string;
invocationId: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
invocationId | property | invocationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
principalId | property | principalId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
toolId | property | toolId: 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. |
LegacyToolArtifactMigrationExecutionErrorCode
Public type alias for Legacy Tool Artifact Migration Execution Error Code; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { LegacyToolArtifactMigrationExecutionErrorCode } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-executor
Declaration
export type LegacyToolArtifactMigrationExecutionErrorCode = 'LEGACY_MIGRATION_EXECUTION_INVALID_PLAN' | 'LEGACY_MIGRATION_EXECUTION_LIMIT_EXCEEDED' | 'LEGACY_MIGRATION_RESULT_MISMATCH';