@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
37 lines • 2.36 kB
TypeScript
import type { AgentSessionRuntimeDiagnostic } from "../../core/agent-session-services.ts";
import type { ResourceLoaderReloadOptions } from "../../core/resource-loader.ts";
import { SettingsManager } from "../../core/settings-manager.ts";
import type { Args } from "../../cli/args.ts";
import type { CliRuntimeConfiguration } from "../../main.ts";
import type { LooplessRuntimeProfile } from "./loopless-runtime.ts";
export interface LooplessRuntimeSettings {
readonly settingsManager: SettingsManager;
readonly flagValues: Map<string, boolean | string>;
readonly reloadOptions: ResourceLoaderReloadOptions | undefined;
}
/**
* The project trust a session opened from this configuration would get, decided without a UI: a runtime without a
* loop has no one to ask, exactly like an RPC worker today (`createCliRuntimeFactory`, main.ts). A `project_trust`
* handler's error is reported to `diagnostics`, as the CLI factory reports it.
*/
export declare function resolveLooplessSettings(configuration: CliRuntimeConfiguration, startupSettingsManager: SettingsManager, profile: LooplessRuntimeProfile, diagnostics: AgentSessionRuntimeDiagnostic[]): Promise<LooplessRuntimeSettings>;
export declare function resolveCliPaths(cwd: string, paths: string[] | undefined): string[] | undefined;
export interface LooplessToolFilters {
readonly defaultToolNames?: ReadonlySet<string>;
readonly allowedToolNames?: ReadonlySet<string>;
readonly excludedToolNames?: ReadonlySet<string>;
}
export interface LooplessToolSelection {
/** The registry filters, as a session applies them. */
readonly filters: LooplessToolFilters;
/** The active set a session would request for the same flags and settings. */
readonly initialActiveToolNames: readonly string[];
}
/**
* The CLI's tool filters (`--tools`, `--no-tools`, `--no-builtin-tools`, `--exclude-tools`, settings `defaultTools`),
* mapped as `main.ts` maps them and resolved by `resolveToolSelection`, as `createAgentSession` resolves them, so a
* loopless runtime registers exactly the tools a session registers for the same flags and settings and knows the active
* set that session would request.
*/
export declare function looplessToolSelection(parsed: Args, settingsManager: SettingsManager): LooplessToolSelection;
//# sourceMappingURL=loopless-runtime-settings.d.ts.map