@codesoul-co/hypha-memory / external-provider-acceptance
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/external-provider-acceptance.ts - Exports: 8
Using this module
Use the External provider acceptance module for binding external or local providers to Hypha ports. It exports 2 functions, 6 interfaces.
Import from the package entrypoint
import {
assertContractShape,
runExternalProviderAcceptance,
} from '@codesoul-co/hypha-memory';
import type {
ExternalProviderAcceptanceEvidence,
ExternalProviderAcceptanceEvidenceInput,
ExternalProviderAcceptanceFixture,
ExternalProviderAcceptanceHooks,
ExternalProviderAcceptanceReport,
ExternalProviderFailureProbe,
} from '@codesoul-co/hypha-memory';Usage patterns
- Use the 6 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 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
assertContractShape | function | assertContractShape(client: ExternalMemoryClient): void | Assert Contract Shape function with 1 public call signature; parameters and return types are listed below. |
runExternalProviderAcceptance | function | runExternalProviderAcceptance(client: ExternalMemoryClient, fixture: ExternalProviderAcceptanceFixture, signal?: AbortSignal, evidenceInput?: ExternalProviderAcceptanceEvidenceInput, hooks?: ExternalProviderAcceptanceHooks): Promise<ExternalProviderAcceptanceReport> | Provider-neutral management acceptance flow shared by every external client. |
ExternalProviderAcceptanceEvidence | interface | interface ExternalProviderAcceptanceEvidence | External Provider Acceptance Evidence interface with 8 public fields or methods. |
ExternalProviderAcceptanceEvidenceInput | interface | interface ExternalProviderAcceptanceEvidenceInput | External Provider Acceptance Evidence Input interface with 6 public fields or methods. |
ExternalProviderAcceptanceFixture | interface | interface ExternalProviderAcceptanceFixture | External Provider Acceptance Fixture interface with 9 public fields or methods. |
ExternalProviderAcceptanceHooks | interface | interface ExternalProviderAcceptanceHooks | External Provider Acceptance Hooks interface with 6 public fields or methods. |
ExternalProviderAcceptanceReport | interface | interface ExternalProviderAcceptanceReport | External Provider Acceptance Report interface with 15 public fields or methods. |
ExternalProviderFailureProbe | interface | interface ExternalProviderFailureProbe | External Provider Failure Probe interface with 3 public fields or methods. |
assertContractShape
Assert Contract Shape function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertContractShape } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export declare function assertContractShape(client: ExternalMemoryClient): void;Call signature
assertContractShape(client: ExternalMemoryClient): voidParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
client | ExternalMemoryClient | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
void - Description: Returns no value.
runExternalProviderAcceptance
Provider-neutral management acceptance flow shared by every external client.
- Kind: function
- Import:
import { runExternalProviderAcceptance } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export declare function runExternalProviderAcceptance(client: ExternalMemoryClient, fixture: ExternalProviderAcceptanceFixture, signal?: AbortSignal, evidenceInput?: ExternalProviderAcceptanceEvidenceInput, hooks?: ExternalProviderAcceptanceHooks): Promise<ExternalProviderAcceptanceReport>;Call signature
runExternalProviderAcceptance(client: ExternalMemoryClient, fixture: ExternalProviderAcceptanceFixture, signal?: AbortSignal, evidenceInput?: ExternalProviderAcceptanceEvidenceInput, hooks?: ExternalProviderAcceptanceHooks): Promise<ExternalProviderAcceptanceReport>Provider-neutral management acceptance flow shared by every external client.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
client | ExternalMemoryClient | Yes | Required parameter; accepted values are defined by the type column. |
fixture | ExternalProviderAcceptanceFixture | Yes | Required parameter; accepted values are defined by the type column. |
signal | AbortSignal | No | Optional parameter; accepted values are defined by the type column. |
evidenceInput | ExternalProviderAcceptanceEvidenceInput | No | Optional parameter; accepted values are defined by the type column. |
hooks | ExternalProviderAcceptanceHooks | No | Optional parameter; accepted values are defined by the type column. |
Returns
- Type:
Promise<ExternalProviderAcceptanceReport> - Description: The return contract is defined by the type shown above.
ExternalProviderAcceptanceEvidence
External Provider Acceptance Evidence interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { ExternalProviderAcceptanceEvidence } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export interface ExternalProviderAcceptanceEvidence {
commitSha: string;
providerId: string;
providerVersion: string;
profileHash: string;
capabilitySnapshot: MemoryManagementCapabilities;
environmentHash: string;
startedAt: string;
finishedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
capabilitySnapshot | property | capabilitySnapshot: MemoryManagementCapabilities | Public property; its type, readonly modifier and optionality are shown in the signature. |
commitSha | property | commitSha: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
environmentHash | property | environmentHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
finishedAt | property | finishedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileHash | property | profileHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerId | property | providerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerVersion | property | providerVersion: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
startedAt | property | startedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExternalProviderAcceptanceEvidenceInput
External Provider Acceptance Evidence Input interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { ExternalProviderAcceptanceEvidenceInput } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export interface ExternalProviderAcceptanceEvidenceInput {
commitSha: string;
providerId: string;
providerVersion: string;
profileHash: string;
environmentHash: string;
now?: () => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
commitSha | property | commitSha: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
environmentHash | property | environmentHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
profileHash | property | profileHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerId | property | providerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerVersion | property | providerVersion: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExternalProviderAcceptanceFixture
External Provider Acceptance Fixture interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { ExternalProviderAcceptanceFixture } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export interface ExternalProviderAcceptanceFixture {
add: MemoryAddRequest;
search: ManagedMemorySearchRequest;
list: MemoryListRequest;
get(memoryId: string): MemoryGetRequest;
update(memoryId: string): ManagedMemoryUpdateRequest;
history(memoryId: string): MemoryHistoryRequest;
delete(memoryId: string): ManagedMemoryDeleteRequest;
forbiddenGet?(memoryId: string): MemoryGetRequest;
resolveMemoryId(result: {
addedIds: string[];
searchedIds: string[];
listedIds: string[];
}): string | undefined;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
add | property | add: MemoryAddRequest | Public property; its type, readonly modifier and optionality are shown in the signature. |
delete | method | delete(memoryId: string): ManagedMemoryDeleteRequest | Public method; parameters and return type are shown in the signature. |
forbiddenGet | method | forbiddenGet?(memoryId: string): MemoryGetRequest | Public method; parameters and return type are shown in the signature. |
get | method | get(memoryId: string): MemoryGetRequest | Public method; parameters and return type are shown in the signature. |
history | method | history(memoryId: string): MemoryHistoryRequest | Public method; parameters and return type are shown in the signature. |
list | property | list: MemoryListRequest | Public property; its type, readonly modifier and optionality are shown in the signature. |
resolveMemoryId | method | resolveMemoryId(result: { addedIds: string[]; searchedIds: string[]; listedIds: string[]; }): string | undefined | Public method; parameters and return type are shown in the signature. |
search | property | search: ManagedMemorySearchRequest | Public property; its type, readonly modifier and optionality are shown in the signature. |
update | method | update(memoryId: string): ManagedMemoryUpdateRequest | Public method; parameters and return type are shown in the signature. |
ExternalProviderAcceptanceHooks
External Provider Acceptance Hooks interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { ExternalProviderAcceptanceHooks } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export interface ExternalProviderAcceptanceHooks {
settleAdd?(result: ManagedMemoryWriteResult, signal?: AbortSignal): Promise<void>;
preparePagination?(signal?: AbortSignal): Promise<void>;
verifyRestart?(memoryId: string, signal?: AbortSignal): Promise<void>;
verifyDelete?(memoryId: string, signal?: AbortSignal): Promise<void>;
failureProbes?: readonly ExternalProviderFailureProbe[];
cleanup?(signal?: AbortSignal): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
cleanup | method | cleanup?(signal?: AbortSignal): Promise<void> | Public method; parameters and return type are shown in the signature. |
failureProbes | property | failureProbes?: readonly ExternalProviderFailureProbe[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
preparePagination | method | preparePagination?(signal?: AbortSignal): Promise<void> | Public method; parameters and return type are shown in the signature. |
settleAdd | method | settleAdd?(result: ManagedMemoryWriteResult, signal?: AbortSignal): Promise<void> | Public method; parameters and return type are shown in the signature. |
verifyDelete | method | verifyDelete?(memoryId: string, signal?: AbortSignal): Promise<void> | Public method; parameters and return type are shown in the signature. |
verifyRestart | method | verifyRestart?(memoryId: string, signal?: AbortSignal): Promise<void> | Public method; parameters and return type are shown in the signature. |
ExternalProviderAcceptanceReport
External Provider Acceptance Report interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { ExternalProviderAcceptanceReport } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export interface ExternalProviderAcceptanceReport {
status: 'passed';
capabilities: MemoryManagementCapabilities;
memoryId: string;
addStatus: string;
searchCount: number;
listCount: number;
updateStatus?: string;
historyCount?: number;
deleteStatus: string;
healthStatus: string;
paginationPageCount: number;
scopeIsolationVerified: boolean;
restartVerified: boolean;
failureProbeCount: number;
evidence?: ExternalProviderAcceptanceEvidence;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
addStatus | property | addStatus: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilities | property | capabilities: MemoryManagementCapabilities | Public property; its type, readonly modifier and optionality are shown in the signature. |
deleteStatus | property | deleteStatus: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
evidence | property | evidence?: ExternalProviderAcceptanceEvidence | Public property; its type, readonly modifier and optionality are shown in the signature. |
failureProbeCount | property | failureProbeCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
healthStatus | property | healthStatus: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
historyCount | property | historyCount?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
listCount | property | listCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryId | property | memoryId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
paginationPageCount | property | paginationPageCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
restartVerified | property | restartVerified: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeIsolationVerified | property | scopeIsolationVerified: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
searchCount | property | searchCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "passed" | Public property; its type, readonly modifier and optionality are shown in the signature. |
updateStatus | property | updateStatus?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExternalProviderFailureProbe
External Provider Failure Probe interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ExternalProviderFailureProbe } from '@codesoul-co/hypha-memory'; - Source module:
external-provider-acceptance
Declaration
export interface ExternalProviderFailureProbe {
id: string;
expectedCodes: readonly NormalizedMemoryError['code'][];
run(signal?: AbortSignal): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
expectedCodes | property | expectedCodes: readonly ("MEMORY_INVALID_INPUT" | "MEMORY_EXTRACTION_SOURCE_UNAVAILABLE" | "MEMORY_EXTRACTION_FAILED" | "MEMORY_EXTRACTION_CURSOR_CONFLICT" | "MEMORY_MAINTENANCE_CONFLICT" | "MEMORY_RANKING_FAILED" | "MEMORY_IDEMPOTENCY_CONFLICT" | "MEMORY_SCOPE_DENIED" | "MEMORY_PERMISSION_DENIED" | "MEMORY_NOT_FOUND" | "MEMORY_REVISION_CONFLICT" | "MEMORY_PROVIDER_NOT_INSTALLED" | "MEMORY_PROVIDER_UNAVAILABLE" | ... | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
run | method | run(signal?: AbortSignal): Promise<void> | Public method; parameters and return type are shown in the signature. |
