framework
Version:
The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.
41 lines • 2.27 kB
TypeScript
import { type LiveAgent } from '../store/index.js';
import type { ChoiceRequest, FrameworkEvent } from '../events.js';
import type { ProjectSummary } from './projects.js';
/** One session's open question: the full gate, answerable from wherever it is rendered. */
export interface OpenQuestion {
projectId: string;
projectName: string;
agentId: string;
/** The session's name (#326) when it chose one — the card's label; else fall back to {@link intent}. */
sessionName?: string;
/** What the agent was asked to do, for a card whose session never named itself. */
intent?: string;
/** When the agent last spoke, ISO: what the longest-waiting-first order sorts on. */
updatedAt?: string;
choice: ChoiceRequest;
}
/** Injectable seams so {@link buildOpenQuestions} is unit-testable off disk. */
export interface OpenQuestionsDeps {
/** The live-agent reader (default {@link readLiveMetas}). */
liveAgents?: (cwd: string) => Promise<LiveAgent[]>;
/** An agent checkout's event log (default {@link readEventLog}). */
events?: (cwd: string) => Promise<FrameworkEvent[]>;
}
/**
* The full {@link ChoiceRequest} still open under this id: its `choice` event with no later
* `choice-resolved` for the same id. The sibling of live-run.ts's `openGate`, which slims the
* gate down to what chat can render — an answering *panel* needs everything the event carried
* (multi, recommended, detail lines), so this keeps the request whole.
*/
export declare function openChoiceRequest(events: FrameworkEvent[], gateId: string): ChoiceRequest | undefined;
/**
* Every project's parked questions, longest-waiting first (#1455): an agent that has been blocked
* on its human the longest is the one to unblock first.
*
* Forgiving throughout, like every cross-project rollup: an unreadable project, agent list or
* event log contributes nothing rather than failing the read. A pending gate whose log no
* longer shows it open (already resolved, log unreadable) is skipped — offering an answer the
* daemon would refuse is worse than one card fewer.
*/
export declare function buildOpenQuestions(projects: ProjectSummary[], deps?: OpenQuestionsDeps): Promise<OpenQuestion[]>;
//# sourceMappingURL=open-questions.d.ts.map