Skip to content

@codesoul-co/hypha-adapters-local / legacy-tool-artifact-migration-planner

Using this module

Use the Legacy tool artifact migration planner module for using the public contracts and operations for this capability boundary. It exports 2 classes, 7 interfaces, 2 types.

Import from the package entrypoint

ts
import {
  LegacyToolArtifactMigrationPlanError,
  LegacyToolArtifactMigrationPlanner,
} from '@codesoul-co/hypha-adapters-local';

import type {
  LegacyToolArtifactMigrationImportPlanItem,
  LegacyToolArtifactMigrationImportResolution,
  LegacyToolArtifactMigrationPlan,
  LegacyToolArtifactMigrationPlannerOptions,
  LegacyToolArtifactMigrationPlanRequest,
  LegacyToolArtifactMigrationSkipPlanItem,
  LegacyToolArtifactMigrationSkipResolution,
  LegacyToolArtifactMigrationPlanErrorCode,
} from '@codesoul-co/hypha-adapters-local';

// The complete export list is documented below.

Usage patterns

  • Use the 9 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

SymbolKindSignatureDescription
LegacyToolArtifactMigrationPlanErrorclassnew LegacyToolArtifactMigrationPlanError(code: LegacyToolArtifactMigrationPlanErrorCode, message: string, details?: Record<string, unknown> | undefined): LegacyToolArtifactMigrationPlanErrorLegacy Tool Artifact Migration Plan Error class with 10 public constructor or member entries; its exact declarations are listed below.
LegacyToolArtifactMigrationPlannerclassnew LegacyToolArtifactMigrationPlanner(options?: LegacyToolArtifactMigrationPlannerOptions): LegacyToolArtifactMigrationPlannerCreates a deterministic migration plan without reading, importing, or deleting Artifact bytes. Historical path segments are never identities.
LegacyToolArtifactMigrationImportPlanIteminterfaceinterface LegacyToolArtifactMigrationImportPlanItemLegacy Tool Artifact Migration Import Plan Item interface with 2 public fields or methods.
LegacyToolArtifactMigrationImportResolutioninterfaceinterface LegacyToolArtifactMigrationImportResolutionLegacy Tool Artifact Migration Import Resolution interface with 5 public fields or methods.
LegacyToolArtifactMigrationPlaninterfaceinterface LegacyToolArtifactMigrationPlanLegacy Tool Artifact Migration Plan interface with 5 public fields or methods.
LegacyToolArtifactMigrationPlannerOptionsinterfaceinterface LegacyToolArtifactMigrationPlannerOptionsLegacy Tool Artifact Migration Planner Options interface with 1 public fields or methods.
LegacyToolArtifactMigrationPlanRequestinterfaceinterface LegacyToolArtifactMigrationPlanRequestLegacy Tool Artifact Migration Plan Request interface with 2 public fields or methods.
LegacyToolArtifactMigrationSkipPlanIteminterfaceinterface LegacyToolArtifactMigrationSkipPlanItemLegacy Tool Artifact Migration Skip Plan Item interface with 2 public fields or methods.
LegacyToolArtifactMigrationSkipResolutioninterfaceinterface LegacyToolArtifactMigrationSkipResolutionLegacy Tool Artifact Migration Skip Resolution interface with 2 public fields or methods.
LegacyToolArtifactMigrationPlanErrorCodetypetype LegacyToolArtifactMigrationPlanErrorCode = 'LEGACY_MIGRATION_INVALID_INVENTORY' | 'LEGACY_MIGRATION_DUPLICATE_SOURCE' | 'LEGACY_MIGRATION_LIMIT_EXCEEDED' | 'LEGACY_MIGRATION_INVALID_RESOLUTION'Public type alias for Legacy Tool Artifact Migration Plan Error Code; the declaration contains its complete type expression.
LegacyToolArtifactMigrationResolutiontypetype LegacyToolArtifactMigrationResolution = LegacyToolArtifactMigrationImportResolution | LegacyToolArtifactMigrationSkipResolutionPublic type alias for Legacy Tool Artifact Migration Resolution; the declaration contains its complete type expression.

LegacyToolArtifactMigrationPlanError

Legacy Tool Artifact Migration Plan Error class with 10 public constructor or member entries; its exact declarations are listed below.

Declaration

text
export declare class LegacyToolArtifactMigrationPlanError extends Error {
    readonly code: LegacyToolArtifactMigrationPlanErrorCode;
    readonly details?: Record<string, unknown> | undefined;
    constructor(code: LegacyToolArtifactMigrationPlanErrorCode, message: string, details?: Record<string, unknown> | undefined);
}

Public members

MemberKindSignatureDescription
causepropertycause?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
codepropertyreadonly code: LegacyToolArtifactMigrationPlanErrorCodePublic property; its type, readonly modifier and optionality are shown in the signature.
constructorconstructor(code: LegacyToolArtifactMigrationPlanErrorCode, message: string, details?: Record<string, unknown> | undefined): LegacyToolArtifactMigrationPlanErrorCreates an instance of this class.
detailspropertyreadonly details?: Record<string, unknown>Public 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.
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.

LegacyToolArtifactMigrationPlanner

Creates a deterministic migration plan without reading, importing, or deleting Artifact bytes. Historical path segments are never identities.

Declaration

text
export declare class LegacyToolArtifactMigrationPlanner {
    constructor(options?: LegacyToolArtifactMigrationPlannerOptions);
    plan(request: LegacyToolArtifactMigrationPlanRequest): Promise<LegacyToolArtifactMigrationPlan>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options?: LegacyToolArtifactMigrationPlannerOptions): LegacyToolArtifactMigrationPlannerCreates an instance of this class.
planmethodplan(request: LegacyToolArtifactMigrationPlanRequest): Promise<LegacyToolArtifactMigrationPlan>Public method; parameters and return type are shown in the signature.

LegacyToolArtifactMigrationImportPlanItem

Legacy Tool Artifact Migration Import Plan Item interface with 2 public fields or methods.

Declaration

text
export interface LegacyToolArtifactMigrationImportPlanItem {
    source: LegacyToolArtifactInventoryEntry;
    request: LegacyToolArtifactImportRequest;
}

Contract members

MemberKindSignatureDescription
requestpropertyrequest: LegacyToolArtifactImportRequestPublic property; its type, readonly modifier and optionality are shown in the signature.
sourcepropertysource: LegacyToolArtifactInventoryEntryPublic property; its type, readonly modifier and optionality are shown in the signature.

LegacyToolArtifactMigrationImportResolution

Legacy Tool Artifact Migration Import Resolution interface with 5 public fields or methods.

Declaration

text
export interface LegacyToolArtifactMigrationImportResolution {
    action: 'import';
    context: ToolArtifactManagerContext;
    toolId: string;
    invocationId: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
actionpropertyaction: "import"Public property; its type, readonly modifier and optionality are shown in the signature.
contextpropertycontext: ToolArtifactManagerContextPublic property; its type, readonly modifier and optionality are shown in the signature.
invocationIdpropertyinvocationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>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.

LegacyToolArtifactMigrationPlan

Legacy Tool Artifact Migration Plan interface with 5 public fields or methods.

Declaration

text
export interface LegacyToolArtifactMigrationPlan {
    planHash: string;
    imports: LegacyToolArtifactMigrationImportPlanItem[];
    skipped: LegacyToolArtifactMigrationSkipPlanItem[];
    totalEntries: number;
    totalBytes: number;
}

Contract members

MemberKindSignatureDescription
importspropertyimports: LegacyToolArtifactMigrationImportPlanItem[]Public property; its type, readonly modifier and optionality are shown in the signature.
planHashpropertyplanHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
skippedpropertyskipped: LegacyToolArtifactMigrationSkipPlanItem[]Public property; its type, readonly modifier and optionality are shown in the signature.
totalBytespropertytotalBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
totalEntriespropertytotalEntries: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

LegacyToolArtifactMigrationPlannerOptions

Legacy Tool Artifact Migration Planner Options interface with 1 public fields or methods.

Declaration

text
export interface LegacyToolArtifactMigrationPlannerOptions {
    maxEntries?: number;
}

Contract members

MemberKindSignatureDescription
maxEntriespropertymaxEntries?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

LegacyToolArtifactMigrationPlanRequest

Legacy Tool Artifact Migration Plan Request interface with 2 public fields or methods.

Declaration

text
export interface LegacyToolArtifactMigrationPlanRequest {
    inventory: LegacyToolArtifactInventoryResult;
    resolve: (entry: Readonly<LegacyToolArtifactInventoryEntry>) => LegacyToolArtifactMigrationResolution | Promise<LegacyToolArtifactMigrationResolution>;
}

Contract members

MemberKindSignatureDescription
inventorypropertyinventory: LegacyToolArtifactInventoryResultPublic property; its type, readonly modifier and optionality are shown in the signature.
resolvemethodresolve(entry: Readonly<LegacyToolArtifactInventoryEntry>): LegacyToolArtifactMigrationResolution | Promise<LegacyToolArtifactMigrationResolution>Public method; parameters and return type are shown in the signature.

LegacyToolArtifactMigrationSkipPlanItem

Legacy Tool Artifact Migration Skip Plan Item interface with 2 public fields or methods.

Declaration

text
export interface LegacyToolArtifactMigrationSkipPlanItem {
    source: LegacyToolArtifactInventoryEntry;
    reason: string;
}

Contract members

MemberKindSignatureDescription
reasonpropertyreason: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sourcepropertysource: LegacyToolArtifactInventoryEntryPublic property; its type, readonly modifier and optionality are shown in the signature.

LegacyToolArtifactMigrationSkipResolution

Legacy Tool Artifact Migration Skip Resolution interface with 2 public fields or methods.

Declaration

text
export interface LegacyToolArtifactMigrationSkipResolution {
    action: 'skip';
    reason: string;
}

Contract members

MemberKindSignatureDescription
actionpropertyaction: "skip"Public property; its type, readonly modifier and optionality are shown in the signature.
reasonpropertyreason: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

LegacyToolArtifactMigrationPlanErrorCode

Public type alias for Legacy Tool Artifact Migration Plan Error Code; the declaration contains its complete type expression.

Declaration

text
export type LegacyToolArtifactMigrationPlanErrorCode = 'LEGACY_MIGRATION_INVALID_INVENTORY' | 'LEGACY_MIGRATION_DUPLICATE_SOURCE' | 'LEGACY_MIGRATION_LIMIT_EXCEEDED' | 'LEGACY_MIGRATION_INVALID_RESOLUTION';

LegacyToolArtifactMigrationResolution

Public type alias for Legacy Tool Artifact Migration Resolution; the declaration contains its complete type expression.

Declaration

text
export type LegacyToolArtifactMigrationResolution = LegacyToolArtifactMigrationImportResolution | LegacyToolArtifactMigrationSkipResolution;