export * from './types.js';
import { type RelayAgentHandle } from '../listeners.js';
import type { AgentIdentity, AgentIdentityInput, HarnessConfig } from './types.js';
/**
 * Common shape of any agent produced by a harness factory: a {@link RelayAgentHandle}
 * (so `relay.on(agent.status.becomes(...))` works) tagged with the `kind` of factory
 * that built it (e.g. `'session'`, or `'pty'` from `@agent-relay/harnesses`).
 */
export interface RelayHarnessAgent extends RelayAgentHandle {
    kind: string;
}
/**
 * A harness factory: `create`/`new` produce a registerable {@link RelayHarnessAgent}.
 * The in-process session harnesses below and the PTY harnesses in
 * `@agent-relay/harnesses` share this shape.
 */
export interface HarnessFactory<TInput, TAgent extends RelayHarnessAgent> {
    readonly name: string;
    create(input?: TInput): Promise<TAgent>;
    /** Synchronous variant of {@link HarnessFactory.create}. */
    new: (input?: TInput) => TAgent;
}
/**
 * Generate the next default agent name for a harness `base` (e.g. `task-bot`,
 * `task-bot-2`, …), or return `explicit` unchanged when provided. Shared by all
 * harness factories so names stay unique.
 */
export declare function nextHarnessName(base: string, explicit?: string): string;
/**
 * A ready-to-register agent produced by a {@link SessionHarness} factory. Carries
 * the identity and predicate builders used with `relay.on(...)`, plus the harness
 * `config` and `input` a runtime needs to bring the live {@link AgentSession} online
 * later.
 */
export interface SessionHarnessAgent<TInput = void> extends RelayHarnessAgent {
    kind: 'session';
    input: TInput;
    config: HarnessConfig<TInput>;
}
/**
 * A harness factory built from a {@link HarnessConfig}. `create`/`new` produce a
 * registerable {@link SessionHarnessAgent} so a custom in-process harness can be
 * registered and observed without installing a runtime/driver — only
 * `@agent-relay/sdk`. The adapter, including its `create(input, ctx)` session
 * factory, stays available on `config`.
 */
export interface SessionHarness<TInput = void> extends HarnessFactory<TInput, SessionHarnessAgent<TInput>> {
    readonly config: HarnessConfig<TInput>;
}
/**
 * Wrap a {@link HarnessConfig} in a factory with `create`/`new`. The returned
 * factory produces registerable {@link SessionHarnessAgent}s while keeping the
 * adapter reachable via `config` for runtimes that bring the session online.
 */
export declare function defineHarness<TInput = void>(config: HarnessConfig<TInput>): SessionHarness<TInput>;
export declare function normalizeAgentIdentity(input: AgentIdentityInput): AgentIdentity;
export declare function formatAgentHandle(name: string): string;
//# sourceMappingURL=index.d.ts.map