Skip to content

@codesoul-co/hypha-skills / index

Using this module

Aggregates the public entrypoint exports for @codesoul-co/hypha-skills; applications import these symbols from the package entrypoint instead of internal file paths.

Import from the package entrypoint

ts
import {
  DefaultSkillPolicy,
  LocalSkillLoader,
  SkillContextLoader,
  SkillRegistry,
  SkillResolver,
  SkillSelector,
  skillActivationPolicySchema,
  skillAssetRefSchema,
} from '@codesoul-co/hypha-skills';

import type {
  AgentCapabilityConstraint,
  EffectiveAgentCapabilitySnapshotInput,
  LoadedSkillAsset,
  LoadedSkillContext,
  LocalSkillLoaderOptions,
  ParsedSkillMarkdown,
  ResolvedSkill,
  SkillActivationPolicy,
} from '@codesoul-co/hypha-skills';

// The complete export list is documented below.

Usage patterns

  • Use the 21 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 6 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
  • The module exposes 6 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
  • The 9 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Runtime validation example

ts
import { skillActivationPolicySchema } from '@codesoul-co/hypha-skills';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = skillActivationPolicySchema.parse(input);

Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.

Public exports

SymbolKindSignatureDescription
DefaultSkillPolicyclassnew DefaultSkillPolicy(options?: { allowedTrustLevels?: Array<NonNullable<SkillSpec["trustLevel"]>>; requireRegisteredTools?: boolean; }): DefaultSkillPolicyDefault Skill Policy class with 2 public constructor or member entries; its exact declarations are listed below.
LocalSkillLoaderclassnew LocalSkillLoader(options: LocalSkillLoaderOptions): LocalSkillLoaderLocal Skill Loader class with 3 public constructor or member entries; its exact declarations are listed below.
SkillContextLoaderclassnew SkillContextLoader(options?: { defaultMaxChars?: number; maxReferences?: number; maxFileBytes?: number; readTimeoutMs?: number; }): SkillContextLoaderSkill Context Loader class with 2 public constructor or member entries; its exact declarations are listed below.
SkillRegistryclassnew SkillRegistry(): SkillRegistrySkill Registry class with 5 public constructor or member entries; its exact declarations are listed below.
SkillResolverclassnew SkillResolver(registry: SkillRegistry): SkillResolverSkill Resolver class with 2 public constructor or member entries; its exact declarations are listed below.
SkillSelectorclassnew SkillSelector(registry: SkillRegistry): SkillSelectorSkill Selector class with 2 public constructor or member entries; its exact declarations are listed below.
skillActivationPolicySchemaconstantconst skillActivationPolicySchema: z.ZodObject<{ mode: z.ZodEnum<["always", "keyword", "regex", "intent", "manual"]>; patterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { mode: "always" | "keyword" | "regex" | "intent" | "manual"; patterns?: string[] | undefined; }, { mode: "always" | "keyword" | "regex" | "intent" | "manual"; patterns?: string[] | undefined; }>Runtime schema for Skill Activation Policy.
skillAssetRefSchemaconstantconst skillAssetRefSchema: z.ZodObject<{ path: z.ZodString; type: z.ZodEnum<["reference", "script", "asset"]>; loadPolicy: z.ZodOptional<z.ZodEnum<["frontmatter_only", "on_activation", "never"]>>; }, "strip", z.ZodTypeAny, { path: string; type: "reference" | "script" | "asset"; loadPolicy?: "never" | "frontmatter_only" | "on_activation" | undefined; }, { path: string; type: "reference" | "script" | "asset"; loadPo...Runtime schema for Skill Asset Ref.
skillRefSchemaconstantconst skillRefSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; version?: string | undefined; }, { id: string; version?: string | undefined; }>Runtime schema for Skill Ref.
skillSpecDefinitionconstantconst skillSpecDefinition: SpecSchemaDefinition<SkillSpec>Runtime validation entrypoint for the Skill spec, combining its parser, example and JSON Schema.
skillSpecDefinitionsconstantconst skillSpecDefinitions: readonly [SpecSchemaDefinition<SkillSpec>]Skill Spec Definitions constant exported by the index module.
skillSpecExampleconstantconst skillSpecExample: SkillSpecValid example value for Skill Spec.
skillSpecJsonSchemaconstantconst skillSpecJsonSchema: JsonSchemaJSON Schema for Skill Spec.
skillSpecJsonSchemasconstantconst skillSpecJsonSchemas: Record<string, JsonSchema>Skill Spec JSON Schemas constant exported by the index module.
skillSpecSchemaconstantconst skillSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; name: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { description: z.ZodString; enabled: z.ZodOptional<z.ZodBoolean>; priority: z.ZodOptional<z.ZodNumber>; activationPolicy: z.ZodOptional<...Runtime schema for Skill Spec.
createEffectiveAgentCapabilitySnapshotfunctioncreateEffectiveAgentCapabilitySnapshot(input: EffectiveAgentCapabilitySnapshotInput): Readonly<EffectiveAgentCapabilitySnapshot>Create Effective Agent Capability Snapshot function with 1 public call signature; parameters and return types are listed below.
listLocalSkillFilesfunctionlistLocalSkillFiles(directory: string, recursive?: boolean): Promise<string[]>List Local Skill Files function with 1 public call signature; parameters and return types are listed below.
loadSkillMarkdownFilefunctionloadSkillMarkdownFile(filePath: string): Promise<ParsedSkillMarkdown>Load Skill Markdown File function with 1 public call signature; parameters and return types are listed below.
parseSkillMarkdownfunctionparseSkillMarkdown(raw: string, filePath: string): ParsedSkillMarkdownParse Skill Markdown function with 1 public call signature; parameters and return types are listed below.
resolveBuiltinSkillsDirectoryfunctionresolveBuiltinSkillsDirectory(): stringResolves the directory that ships Hypha's built-in skills (context-enrichment, intent-classification) inside this npm package. The published tarball includes builtins/ next to dist/, so consumers can load the framework built-ins without a source checkout of the Server.
validateSkillSpecfunctionvalidateSkillSpec(input: unknown): SkillSpecValidate Skill Spec function with 1 public call signature; parameters and return types are listed below.
AgentCapabilityConstraintinterfaceinterface AgentCapabilityConstraintAgent Capability Constraint interface with 6 public fields or methods.
EffectiveAgentCapabilitySnapshotInputinterfaceinterface EffectiveAgentCapabilitySnapshotInputEffective Agent Capability Snapshot Input interface with 10 public fields or methods.
LoadedSkillAssetinterfaceinterface LoadedSkillAsset extends SkillAssetRefLoaded Skill Asset interface with 6 public fields or methods.
LoadedSkillContextinterfaceinterface LoadedSkillContextLoaded Skill Context interface with 16 public fields or methods.
LocalSkillLoaderOptionsinterfaceinterface LocalSkillLoaderOptionsLocal Skill Loader Options interface with 3 public fields or methods.
ParsedSkillMarkdowninterfaceinterface ParsedSkillMarkdownParsed Skill Markdown interface with 3 public fields or methods.
ResolvedSkillinterfaceinterface ResolvedSkillResolved Skill interface with 3 public fields or methods.
SkillActivationPolicyinterfaceinterface SkillActivationPolicySkill Activation Policy interface with 2 public fields or methods.
SkillAssetRefinterfaceinterface SkillAssetRefSkill Asset Ref interface with 3 public fields or methods.
SkillContextLoadInputinterfaceinterface SkillContextLoadInputSkill Context Load Input interface with 3 public fields or methods.
SkillLoaderinterfaceinterface SkillLoaderSkill Loader interface with 1 public fields or methods.
SkillPolicyinterfaceinterface SkillPolicySkill Policy interface with 1 public fields or methods.
SkillPolicyDecisioninterfaceinterface SkillPolicyDecisionSkill Policy Decision interface with 6 public fields or methods.
SkillPolicyInputinterfaceinterface SkillPolicyInputSkill Policy Input interface with 2 public fields or methods.
SkillRefinterfaceinterface SkillRefSkill Ref interface with 2 public fields or methods.
SkillResolutionContextinterfaceinterface SkillResolutionContextSkill Resolution Context interface with 8 public fields or methods.
SkillSelectioninterfaceinterface SkillSelectionSkill Selection interface with 4 public fields or methods.
SkillSelectionRejectioninterfaceinterface SkillSelectionRejectionSkill Selection Rejection interface with 2 public fields or methods.
SkillSelectionResultinterfaceinterface SkillSelectionResultSkill Selection Result interface with 2 public fields or methods.
SkillSpecinterfaceinterface SkillSpec extends VersionedSpec, SpecMetadataSkill Spec interface with 26 public fields or methods.
SkillActivationModetypetype SkillActivationMode = 'always' | 'keyword' | 'regex' | 'intent' | 'manual'Public type alias for Skill Activation Mode; the declaration contains its complete type expression.

DefaultSkillPolicy

Default Skill Policy class with 2 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { DefaultSkillPolicy } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare class DefaultSkillPolicy implements SkillPolicy {
    constructor(options?: {
            allowedTrustLevels?: Array<NonNullable<SkillSpec['trustLevel']>>;
            requireRegisteredTools?: boolean;
        });
    evaluate(input: SkillPolicyInput): Promise<SkillPolicyDecision>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options?: { allowedTrustLevels?: Array<NonNullable<SkillSpec["trustLevel"]>>; requireRegisteredTools?: boolean; }): DefaultSkillPolicyCreates an instance of this class.
evaluatemethodevaluate(input: SkillPolicyInput): Promise<SkillPolicyDecision>Public method; parameters and return type are shown in the signature.

LocalSkillLoader

Local Skill Loader class with 3 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { LocalSkillLoader } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare class LocalSkillLoader implements SkillLoader {
    constructor(options: LocalSkillLoaderOptions);
    load(): Promise<SkillSpec[]>;
    loadInto(registry: SkillRegistry): Promise<SkillSpec[]>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: LocalSkillLoaderOptions): LocalSkillLoaderCreates an instance of this class.
loadmethodload(): Promise<SkillSpec[]>Public method; parameters and return type are shown in the signature.
loadIntomethodloadInto(registry: SkillRegistry): Promise<SkillSpec[]>Public method; parameters and return type are shown in the signature.

SkillContextLoader

Skill Context Loader class with 2 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { SkillContextLoader } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare class SkillContextLoader {
    constructor(options?: {
            defaultMaxChars?: number;
            maxReferences?: number;
            maxFileBytes?: number;
            readTimeoutMs?: number;
        });
    load(input: SkillContextLoadInput): Promise<LoadedSkillContext>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options?: { defaultMaxChars?: number; maxReferences?: number; maxFileBytes?: number; readTimeoutMs?: number; }): SkillContextLoaderCreates an instance of this class.
loadmethodload(input: SkillContextLoadInput): Promise<LoadedSkillContext>Public method; parameters and return type are shown in the signature.

SkillRegistry

Skill Registry class with 5 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { SkillRegistry } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare class SkillRegistry {
    register(skill: SkillSpec): void;
    registerMany(skills: SkillSpec[]): void;
    get(skillId: string): SkillSpec | null;
    list(): SkillSpec[];
}

Public members

MemberKindSignatureDescription
constructorconstructor(): SkillRegistryCreates an instance of this class.
getmethodget(skillId: string): SkillSpec | nullPublic method; parameters and return type are shown in the signature.
listmethodlist(): SkillSpec[]Public method; parameters and return type are shown in the signature.
registermethodregister(skill: SkillSpec): voidPublic method; parameters and return type are shown in the signature.
registerManymethodregisterMany(skills: SkillSpec[]): voidPublic method; parameters and return type are shown in the signature.

SkillResolver

Skill Resolver class with 2 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { SkillResolver } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare class SkillResolver {
    constructor(registry: SkillRegistry);
    resolve(context: SkillResolutionContext): ResolvedSkill[];
}

Public members

MemberKindSignatureDescription
constructorconstructor(registry: SkillRegistry): SkillResolverCreates an instance of this class.
resolvemethodresolve(context: SkillResolutionContext): ResolvedSkill[]Public method; parameters and return type are shown in the signature.

SkillSelector

Skill Selector class with 2 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { SkillSelector } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare class SkillSelector {
    constructor(registry: SkillRegistry);
    select(context: SkillResolutionContext): SkillSelectionResult;
}

Public members

MemberKindSignatureDescription
constructorconstructor(registry: SkillRegistry): SkillSelectorCreates an instance of this class.
selectmethodselect(context: SkillResolutionContext): SkillSelectionResultPublic method; parameters and return type are shown in the signature.

skillActivationPolicySchema

Runtime schema for Skill Activation Policy.

  • Kind: constant
  • Import: import { skillActivationPolicySchema } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillActivationPolicySchema: z.ZodObject<{ mode: z.ZodEnum<["always", "keyword", "regex", "intent", "manual"]>; patterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { mode: "always" | "keyword" | "regex" | "intent" | "manual"; patterns?: string[] | undefined; }, { mode: "always" | "keyword" | "regex" | "intent" | "manual"; patterns?: string[] | undefined; }>;

skillAssetRefSchema

Runtime schema for Skill Asset Ref.

  • Kind: constant
  • Import: import { skillAssetRefSchema } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillAssetRefSchema: z.ZodObject<{ path: z.ZodString; type: z.ZodEnum<["reference", "script", "asset"]>; loadPolicy: z.ZodOptional<z.ZodEnum<["frontmatter_only", "on_activation", "never"]>>; }, "strip", z.ZodTypeAny, { path: string; type: "reference" | "script" | "asset"; loadPolicy?: "never" | "frontmatter_only" | "on_activation" | undefined; }, { path: string; type: "reference" | "script" | "asset"; loadPolicy?: "never" | "frontmatter_only" | "on_activation" | undefined; }>;

skillRefSchema

Runtime schema for Skill Ref.

  • Kind: constant
  • Import: import { skillRefSchema } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillRefSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; version?: string | undefined; }, { id: string; version?: string | undefined; }>;

skillSpecDefinition

Runtime validation entrypoint for the Skill spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { skillSpecDefinition } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillSpecDefinition: SpecSchemaDefinition<SkillSpec>;

skillSpecDefinitions

Skill Spec Definitions constant exported by the index module.

  • Kind: constant
  • Import: import { skillSpecDefinitions } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillSpecDefinitions: readonly [SpecSchemaDefinition<SkillSpec>];

skillSpecExample

Valid example value for Skill Spec.

  • Kind: constant
  • Import: import { skillSpecExample } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillSpecExample: SkillSpec;

skillSpecJsonSchema

JSON Schema for Skill Spec.

  • Kind: constant
  • Import: import { skillSpecJsonSchema } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillSpecJsonSchema: JsonSchema;

skillSpecJsonSchemas

Skill Spec JSON Schemas constant exported by the index module.

  • Kind: constant
  • Import: import { skillSpecJsonSchemas } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare const skillSpecJsonSchemas: Record<string, JsonSchema>;

skillSpecSchema

Runtime schema for Skill Spec.

  • Kind: constant
  • Import: import { skillSpecSchema } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const skillSpecSchema: (typeof import('@codesoul-co/hypha-skills'))['skillSpecSchema'];

This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.

createEffectiveAgentCapabilitySnapshot

Create Effective Agent Capability Snapshot function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { createEffectiveAgentCapabilitySnapshot } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare function createEffectiveAgentCapabilitySnapshot(input: EffectiveAgentCapabilitySnapshotInput): Readonly<EffectiveAgentCapabilitySnapshot>;

Call signature

text
createEffectiveAgentCapabilitySnapshot(input: EffectiveAgentCapabilitySnapshotInput): Readonly<EffectiveAgentCapabilitySnapshot>

Parameters

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

Returns

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

listLocalSkillFiles

List Local Skill Files function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { listLocalSkillFiles } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare function listLocalSkillFiles(directory: string, recursive?: boolean): Promise<string[]>;

Call signature

text
listLocalSkillFiles(directory: string, recursive?: boolean): Promise<string[]>

Parameters

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

Returns

  • Type: Promise<string[]>
  • Description: The return contract is defined by the type shown above.

loadSkillMarkdownFile

Load Skill Markdown File function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { loadSkillMarkdownFile } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare function loadSkillMarkdownFile(filePath: string): Promise<ParsedSkillMarkdown>;

Call signature

text
loadSkillMarkdownFile(filePath: string): Promise<ParsedSkillMarkdown>

Parameters

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

Returns

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

parseSkillMarkdown

Parse Skill Markdown function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { parseSkillMarkdown } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare function parseSkillMarkdown(raw: string, filePath: string): ParsedSkillMarkdown;

Call signature

text
parseSkillMarkdown(raw: string, filePath: string): ParsedSkillMarkdown

Parameters

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

Returns

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

resolveBuiltinSkillsDirectory

Resolves the directory that ships Hypha's built-in skills (context-enrichment, intent-classification) inside this npm package. The published tarball includes builtins/ next to dist/, so consumers can load the framework built-ins without a source checkout of the Server.

  • Kind: function
  • Import: import { resolveBuiltinSkillsDirectory } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare function resolveBuiltinSkillsDirectory(): string;

Call signature

text
resolveBuiltinSkillsDirectory(): string

Resolves the directory that ships Hypha's built-in skills (context-enrichment, intent-classification) inside this npm package. The published tarball includes builtins/ next to dist/, so consumers can load the framework built-ins without a source checkout of the Server.

Parameters

No parameters.

Returns

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

validateSkillSpec

Validate Skill Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateSkillSpec } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export declare function validateSkillSpec(input: unknown): SkillSpec;

Call signature

text
validateSkillSpec(input: unknown): SkillSpec

Parameters

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

Returns

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

AgentCapabilityConstraint

Agent Capability Constraint interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { AgentCapabilityConstraint } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface AgentCapabilityConstraint {
    allowedToolIds?: string[];
    allowedMCPServerIds?: string[];
    memoryAccess?: EffectiveAgentCapabilitySnapshot['memoryAccess'];
    allowedExecutionProfiles?: string[];
    maximumSideEffectLevel?: SideEffectLevel;
    policyRefs?: string[];
}

Contract members

MemberKindSignatureDescription
allowedExecutionProfilespropertyallowedExecutionProfiles?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
allowedMCPServerIdspropertyallowedMCPServerIds?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
allowedToolIdspropertyallowedToolIds?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
maximumSideEffectLevelpropertymaximumSideEffectLevel?: SideEffectLevelPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryAccesspropertymemoryAccess?: "none" | "read" | "write" | "read_write"Public property; its type, readonly modifier and optionality are shown in the signature.
policyRefspropertypolicyRefs?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.

EffectiveAgentCapabilitySnapshotInput

Effective Agent Capability Snapshot Input interface with 10 public fields or methods.

  • Kind: interface
  • Import: import type { EffectiveAgentCapabilitySnapshotInput } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface EffectiveAgentCapabilitySnapshotInput {
    runId: string;
    agentId: string;
    principalId: string;
    tenantId?: string;
    domainId?: string;
    createdAt?: string;
    expiresAt?: string;
    agent: AgentCapabilityConstraint;
    domain: AgentCapabilityConstraint;
    activeSkills: LoadedSkillContext[];
}

Contract members

MemberKindSignatureDescription
activeSkillspropertyactiveSkills: LoadedSkillContext[]Public property; its type, readonly modifier and optionality are shown in the signature.
agentpropertyagent: AgentCapabilityConstraintPublic property; its type, readonly modifier and optionality are shown in the signature.
agentIdpropertyagentId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
createdAtpropertycreatedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
domainpropertydomain: AgentCapabilityConstraintPublic property; its type, readonly modifier and optionality are shown in the signature.
domainIdpropertydomainId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
expiresAtpropertyexpiresAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
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.
tenantIdpropertytenantId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

LoadedSkillAsset

Loaded Skill Asset interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { LoadedSkillAsset } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface LoadedSkillAsset extends SkillAssetRef {
    absolutePath?: string;
    content?: string;
    truncated?: boolean;
}

Contract members

MemberKindSignatureDescription
absolutePathpropertyabsolutePath?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
contentpropertycontent?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
loadPolicypropertyloadPolicy?: "never" | "frontmatter_only" | "on_activation"Public property; its type, readonly modifier and optionality are shown in the signature.
pathpropertypath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
truncatedpropertytruncated?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
typepropertytype: "reference" | "script" | "asset"Public property; its type, readonly modifier and optionality are shown in the signature.

LoadedSkillContext

Loaded Skill Context interface with 16 public fields or methods.

  • Kind: interface
  • Import: import type { LoadedSkillContext } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface LoadedSkillContext {
    id: string;
    version: string;
    name?: string;
    description: string;
    instructions?: string;
    references: LoadedSkillAsset[];
    allowedTools: string[];
    requiredTools: string[];
    requiredMCPServers: string[];
    memoryAccessPolicy?: string;
    sideEffectPolicy?: string;
    trustLevel?: SkillSpec['trustLevel'];
    provenance?: Record<string, unknown>;
    policyDecision: SkillPolicyDecision;
    activation: {
        reason: string;
        matchedPatterns: string[];
    };
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
activationpropertyactivation: { reason: string; matchedPatterns: string[]; }Public property; its type, readonly modifier and optionality are shown in the signature.
allowedToolspropertyallowedTools: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
descriptionpropertydescription: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
instructionspropertyinstructions?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryAccessPolicypropertymemoryAccessPolicy?: 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.
namepropertyname?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
policyDecisionpropertypolicyDecision: SkillPolicyDecisionPublic property; its type, readonly modifier and optionality are shown in the signature.
provenancepropertyprovenance?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
referencespropertyreferences: LoadedSkillAsset[]Public property; its type, readonly modifier and optionality are shown in the signature.
requiredMCPServerspropertyrequiredMCPServers: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
requiredToolspropertyrequiredTools: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
sideEffectPolicypropertysideEffectPolicy?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
trustLevelpropertytrustLevel?: "trusted" | "reviewed" | "untrusted"Public property; its type, readonly modifier and optionality are shown in the signature.
versionpropertyversion: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalSkillLoaderOptions

Local Skill Loader Options interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { LocalSkillLoaderOptions } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface LocalSkillLoaderOptions {
    directories: string[];
    recursive?: boolean;
    includeDisabled?: boolean;
}

Contract members

MemberKindSignatureDescription
directoriespropertydirectories: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
includeDisabledpropertyincludeDisabled?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
recursivepropertyrecursive?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

ParsedSkillMarkdown

Parsed Skill Markdown interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { ParsedSkillMarkdown } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface ParsedSkillMarkdown {
    filePath: string;
    slug: string;
    spec: SkillSpec;
}

Contract members

MemberKindSignatureDescription
filePathpropertyfilePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
slugpropertyslug: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
specpropertyspec: SkillSpecPublic property; its type, readonly modifier and optionality are shown in the signature.

ResolvedSkill

Resolved Skill interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { ResolvedSkill } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface ResolvedSkill {
    spec: SkillSpec;
    loadedInstructions?: string;
    loadedReferences: SkillAssetRef[];
}

Contract members

MemberKindSignatureDescription
loadedInstructionspropertyloadedInstructions?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
loadedReferencespropertyloadedReferences: SkillAssetRef[]Public property; its type, readonly modifier and optionality are shown in the signature.
specpropertyspec: SkillSpecPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillActivationPolicy

Skill Activation Policy interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { SkillActivationPolicy } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillActivationPolicy {
    mode: SkillActivationMode;
    patterns?: string[];
}

Contract members

MemberKindSignatureDescription
modepropertymode: SkillActivationModePublic property; its type, readonly modifier and optionality are shown in the signature.
patternspropertypatterns?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.

SkillAssetRef

Skill Asset Ref interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { SkillAssetRef } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillAssetRef {
    path: string;
    type: 'reference' | 'script' | 'asset';
    loadPolicy?: 'frontmatter_only' | 'on_activation' | 'never';
}

Contract members

MemberKindSignatureDescription
loadPolicypropertyloadPolicy?: "never" | "frontmatter_only" | "on_activation"Public property; its type, readonly modifier and optionality are shown in the signature.
pathpropertypath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
typepropertytype: "reference" | "script" | "asset"Public property; its type, readonly modifier and optionality are shown in the signature.

SkillContextLoadInput

Skill Context Load Input interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { SkillContextLoadInput } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillContextLoadInput {
    selection: SkillSelection;
    policyDecision: SkillPolicyDecision;
    maxChars?: number;
}

Contract members

MemberKindSignatureDescription
maxCharspropertymaxChars?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
policyDecisionpropertypolicyDecision: SkillPolicyDecisionPublic property; its type, readonly modifier and optionality are shown in the signature.
selectionpropertyselection: SkillSelectionPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillLoader

Skill Loader interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { SkillLoader } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillLoader {
    load(): Promise<SkillSpec[]>;
}

Contract members

MemberKindSignatureDescription
loadmethodload(): Promise<SkillSpec[]>Public method; parameters and return type are shown in the signature.

SkillPolicy

Skill Policy interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { SkillPolicy } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillPolicy {
    evaluate(input: SkillPolicyInput): Promise<SkillPolicyDecision>;
}

Contract members

MemberKindSignatureDescription
evaluatemethodevaluate(input: SkillPolicyInput): Promise<SkillPolicyDecision>Public method; parameters and return type are shown in the signature.

SkillPolicyDecision

Skill Policy Decision interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { SkillPolicyDecision } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillPolicyDecision {
    allowed: boolean;
    reason?: string;
    requiresHumanReview?: boolean;
    allowedTools: string[];
    policyId?: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
allowedpropertyallowed: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
allowedToolspropertyallowedTools: string[]Public 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.
policyIdpropertypolicyId?: stringPublic 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.
requiresHumanReviewpropertyrequiresHumanReview?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillPolicyInput

Skill Policy Input interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { SkillPolicyInput } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillPolicyInput {
    selection: SkillSelection;
    context: SkillResolutionContext;
}

Contract members

MemberKindSignatureDescription
contextpropertycontext: SkillResolutionContextPublic property; its type, readonly modifier and optionality are shown in the signature.
selectionpropertyselection: SkillSelectionPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillRef

Skill Ref interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { SkillRef } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillRef {
    id: string;
    version?: string;
}

Contract members

MemberKindSignatureDescription
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
versionpropertyversion?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillResolutionContext

Skill Resolution Context interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { SkillResolutionContext } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillResolutionContext {
    agentSkillRefs: SkillRef[];
    intent?: string;
    inputText?: string;
    allowedSkills?: string[];
    requiredSkills?: string[];
    manualSkillIds?: string[];
    availableToolRefs?: string[];
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
agentSkillRefspropertyagentSkillRefs: SkillRef[]Public property; its type, readonly modifier and optionality are shown in the signature.
allowedSkillspropertyallowedSkills?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
availableToolRefspropertyavailableToolRefs?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
inputTextpropertyinputText?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
intentpropertyintent?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
manualSkillIdspropertymanualSkillIds?: string[]Public 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.
requiredSkillspropertyrequiredSkills?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.

SkillSelection

Skill Selection interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { SkillSelection } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillSelection {
    spec: SkillSpec;
    reason: string;
    matchedPatterns: string[];
    priority: number;
}

Contract members

MemberKindSignatureDescription
matchedPatternspropertymatchedPatterns: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
prioritypropertypriority: numberPublic 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.
specpropertyspec: SkillSpecPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillSelectionRejection

Skill Selection Rejection interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { SkillSelectionRejection } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillSelectionRejection {
    skillId: string;
    reason: string;
}

Contract members

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

SkillSelectionResult

Skill Selection Result interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { SkillSelectionResult } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillSelectionResult {
    selected: SkillSelection[];
    rejected: SkillSelectionRejection[];
}

Contract members

MemberKindSignatureDescription
rejectedpropertyrejected: SkillSelectionRejection[]Public property; its type, readonly modifier and optionality are shown in the signature.
selectedpropertyselected: SkillSelection[]Public property; its type, readonly modifier and optionality are shown in the signature.

SkillSpec

Skill Spec interface with 26 public fields or methods.

  • Kind: interface
  • Import: import type { SkillSpec } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export interface SkillSpec extends VersionedSpec, SpecMetadata {
    id: string;
    version: string;
    name?: string;
    description: string;
    enabled?: boolean;
    priority?: number;
    activationPolicy?: SkillActivationPolicy;
    instructions?: string;
    references?: SkillAssetRef[];
    scripts?: SkillAssetRef[];
    assets?: SkillAssetRef[];
    allowedTools?: string[];
    requiredTools?: string[];
    requiredMCPServers?: string[];
    memoryAccessPolicy?: string;
    sideEffectPolicy?: string;
    contextBudget?: number;
    inputSchema?: JsonSchema;
    outputContract?: JsonSchema;
    evaluationCases?: string[];
    provenance?: Record<string, unknown>;
    trustLevel?: 'trusted' | 'reviewed' | 'untrusted';
}

Contract members

MemberKindSignatureDescription
activationPolicypropertyactivationPolicy?: SkillActivationPolicyPublic property; its type, readonly modifier and optionality are shown in the signature.
allowedToolspropertyallowedTools?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
assetspropertyassets?: SkillAssetRef[]Public property; its type, readonly modifier and optionality are shown in the signature.
contextBudgetpropertycontextBudget?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
createdAtpropertycreatedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
descriptionpropertydescription: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
enabledpropertyenabled?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
evaluationCasespropertyevaluationCases?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
inputSchemapropertyinputSchema?: JsonSchemaPublic property; its type, readonly modifier and optionality are shown in the signature.
instructionspropertyinstructions?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryAccessPolicypropertymemoryAccessPolicy?: 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.
outputContractpropertyoutputContract?: JsonSchemaPublic property; its type, readonly modifier and optionality are shown in the signature.
ownerpropertyowner?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
prioritypropertypriority?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
provenancepropertyprovenance?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
referencespropertyreferences?: SkillAssetRef[]Public property; its type, readonly modifier and optionality are shown in the signature.
requiredMCPServerspropertyrequiredMCPServers?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
requiredToolspropertyrequiredTools?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
scriptspropertyscripts?: SkillAssetRef[]Public property; its type, readonly modifier and optionality are shown in the signature.
sideEffectPolicypropertysideEffectPolicy?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
tagspropertytags?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
trustLevelpropertytrustLevel?: "trusted" | "reviewed" | "untrusted"Public property; its type, readonly modifier and optionality are shown in the signature.
updatedAtpropertyupdatedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
versionpropertyversion: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

SkillActivationMode

Public type alias for Skill Activation Mode; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { SkillActivationMode } from '@codesoul-co/hypha-skills';
  • Source module: index

Declaration

text
export type SkillActivationMode = 'always' | 'keyword' | 'regex' | 'intent' | 'manual';