Skip to content

@codesoul-co/hypha-adapters-local / artifact-manager-tool-port

Using this module

Use the Artifact manager tool port module for defining or implementing provider-neutral ports. It exports 1 class, 2 interfaces.

Import from the package entrypoint

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

import type {
  ArtifactManagerToolPortOptions,
  ToolArtifactManagerContext,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • Use the 2 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 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
ArtifactManagerToolPortclassnew ArtifactManagerToolPort(options: ArtifactManagerToolPortOptions): ArtifactManagerToolPortRoutes governed Tool result bytes through the Core ArtifactManager.
ArtifactManagerToolPortOptionsinterfaceinterface ArtifactManagerToolPortOptionsArtifact Manager Tool Port Options interface with 2 public fields or methods.
ToolArtifactManagerContextinterfaceinterface ToolArtifactManagerContextTool Artifact Manager Context interface with 8 public fields or methods.

ArtifactManagerToolPort

Routes governed Tool result bytes through the Core ArtifactManager.

  • Kind: class
  • Import: import { ArtifactManagerToolPort } from '@codesoul-co/hypha-adapters-local';
  • Source module: artifact-manager-tool-port

Declaration

text
export declare class ArtifactManagerToolPort implements ToolArtifactPort {
    constructor(options: ArtifactManagerToolPortOptions);
    store(request: {
            invocationId: string;
            toolId: string;
            value: unknown;
            mimeType?: string;
            metadata?: Record<string, unknown>;
        }): Promise<string>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: ArtifactManagerToolPortOptions): ArtifactManagerToolPortCreates an instance of this class.
storemethodstore(request: { invocationId: string; toolId: string; value: unknown; mimeType?: string; metadata?: Record<string, unknown>; }): Promise<string>Public method; parameters and return type are shown in the signature.

ArtifactManagerToolPortOptions

Artifact Manager Tool Port Options interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { ArtifactManagerToolPortOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: artifact-manager-tool-port

Declaration

text
export interface ArtifactManagerToolPortOptions {
    manager: Pick<ArtifactManager, 'create'>;
    resolveContext(request: {
        invocationId: string;
        toolId: string;
    }): ToolArtifactManagerContext | Promise<ToolArtifactManagerContext>;
}

Contract members

MemberKindSignatureDescription
managerpropertymanager: Pick<ArtifactManager, "create">Public property; its type, readonly modifier and optionality are shown in the signature.
resolveContextmethodresolveContext(request: { invocationId: string; toolId: string; }): ToolArtifactManagerContext | Promise<ToolArtifactManagerContext>Public method; parameters and return type are shown in the signature.

ToolArtifactManagerContext

Tool Artifact Manager Context interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { ToolArtifactManagerContext } from '@codesoul-co/hypha-adapters-local';
  • Source module: artifact-manager-tool-port

Declaration

text
export interface ToolArtifactManagerContext {
    principal: ExecutionPrincipal;
    profileRef: SpecRef;
    userId: string;
    workspaceId: string;
    tenantId?: string;
    sessionId?: string;
    runId?: string;
    agentId?: string;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
profileRefpropertyprofileRef: SpecRefPublic 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.