mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
18 lines
668 B
TypeScript
18 lines
668 B
TypeScript
import type { HopperError } from "../domain/errors.js";
|
|
import type { Result } from "../domain/result.js";
|
|
import type { JsonValue } from "../hopper/protocol.js";
|
|
|
|
/** Application-owned capability for invoking one official Hopper tool. */
|
|
export interface HopperToolPort {
|
|
/**
|
|
* Invoke a declared bridge operation with JSON-safe arguments.
|
|
* Implementations return expected Hopper, timeout, and cancellation failures
|
|
* as values and must honor an already-aborted signal.
|
|
*/
|
|
callTool(
|
|
name: string,
|
|
arguments_: Readonly<Record<string, JsonValue>>,
|
|
options?: { readonly signal?: AbortSignal },
|
|
): Promise<Result<JsonValue, HopperError>>;
|
|
}
|