eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
30 lines (29 loc) • 1.76 kB
TypeScript
import type { CodeModeInterrupt, CodeModeInterruptExecutionContext, CodeModeInterruptPayload } from "#shared/code-mode.js";
import type { AuthorizationChallenge } from "#harness/authorization.js";
import type { JsonValue } from "#public/types/json.js";
export declare const CODE_MODE_CONNECTION_AUTH_INTERRUPT_KIND = "eve.connection-auth";
export interface CodeModeConnectionAuthPayload extends CodeModeInterruptPayload {
readonly kind: typeof CODE_MODE_CONNECTION_AUTH_INTERRUPT_KIND;
readonly args: JsonValue;
readonly challenges?: readonly AuthorizationChallenge[];
readonly connectionName: string;
readonly toolName: string;
}
export type CodeModeConnectionAuthResolution = {
readonly status: "authorized";
} | {
readonly reason: string;
readonly retryable: boolean;
readonly status: "failed";
};
export type CodeModeConnectionAuthContext = CodeModeInterruptExecutionContext<CodeModeConnectionAuthPayload, CodeModeConnectionAuthResolution>;
export declare function markCodeModeToolExecutionOptions(options: unknown): unknown;
export declare function isCodeModeToolExecutionOptions(options: unknown): boolean;
export declare function readCodeModeConnectionAuthContext(options: unknown): CodeModeConnectionAuthContext | undefined;
export declare function isCodeModeConnectionAuthPayload(value: unknown): value is CodeModeConnectionAuthPayload;
export declare function isCodeModeConnectionAuthInterrupt(value: unknown): value is CodeModeInterrupt<CodeModeConnectionAuthPayload>;
export declare function toConnectionAuthResolutionFailure(input: {
readonly reason: string;
readonly retryable: boolean;
}): CodeModeConnectionAuthResolution;
export declare function toCodeModeConnectionAuthArgs(value: unknown): JsonValue;