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.
60 lines • 3.92 kB
TypeScript
import { type ProjectsProvider } from '../dashboard/projects.js';
import type { DashboardContext, EventsSource, RemoteAgents } from '../dashboard/rpc-serve.js';
import type { PreferencesStore } from '../registry.js';
import type { DiscordCredentialsStore } from '../discord-credentials.js';
import type { QuotaSource } from '../dashboard/quota.js';
import type { AutoPmReporter } from '../auto-pm.js';
import type { ProjectErrorsReader } from '../project-errors.js';
/** Wire the dashboard's capabilities. The daemon calls this once at start-up; a test calls it per case. */
export declare function setDashboardContext(context: DashboardContext): void;
/** The projects every RPC resolves a project id against: the global registry. */
export declare function contextProjects(): ProjectsProvider;
/** The workspace path for a project id, or undefined when no project has that id. */
export declare function resolveProjectPath(projectId: string): Promise<string | undefined>;
/**
* The checkout a call should act on: a live agent's own worktree when `agentId` names one (#738/#749),
* else the project root. Since #736 an agent reads and writes inside its worktree — its event log,
* its control log, its working tree — so anything addressed at a *run* has to resolve here, not
* at the project path, or it reads an empty log and steers an agent that is not listening. The
* resolution itself (and its #766 first-seconds subtlety) lives in the store's
* {@link resolveAgentCheckout}, shared with the daemon; this adds only the project-id lookup.
*/
export declare function resolveAgentPath(projectId: string, agentId?: string): Promise<string | undefined>;
/**
* The in-memory {@link EventsSource} (#426). It answers only for an agent this daemon is relaying
* from a connected device (#1067) — such an agent has no `.the-framework/events.jsonl` here — and
* returns undefined for an ordinary local agent, whose log `onEvents` tails off disk.
*/
export declare function contextEventsSource(): EventsSource;
/**
* The relayed-agent lookup (#1067 slice 2). A run-scoped RPC uses it to tell an ordinary local agent
* (resolve a local checkout) from one running on a connected device (forward the call there).
*
* The one accessor with a default rather than a throw, because "unwired" has a real meaning here:
* a call arriving over `/_relay/rpc` is the *device* side of the relay, and the agent it names is
* local to that device. Forwarding it onward would be a loop, so the honest answer there is that
* nothing is relayed from here.
*/
export declare function contextRemote(): RemoteAgents;
/** The user-preferences store (#410), over the registry file. */
export declare function contextPreferences(): PreferencesStore;
/**
* The Discord credentials store (#1095): it writes the credential to the registry, then rebuilds
* this daemon's own Discord services against it, so the bot connects without a restart.
*/
export declare function contextDiscord(): DiscordCredentialsStore;
/** The quota source behind the usage panel (#533). */
export declare function contextQuota(): QuotaSource;
/** Where auto PM's last decision is read from (#1161). */
export declare function contextAutoPm(): AutoPmReporter;
/** How a sweep is fired on demand (#1210). */
export declare function contextAutoPmSweep(): (opts?: {
drainOnly?: boolean;
}) => void | Promise<void>;
/** What a project currently suffers from (#1500), as the daemon's background jobs last recorded it. */
export declare function contextProjectErrors(): ProjectErrorsReader;
/** The daemon's own `startAgent`, so a start from the dashboard is the same start the CLI makes. */
export declare function contextStartAgent(): DashboardContext['startAgent'];
/** Install + register a repo (#433), which only the daemon can do. */
export declare function contextAddProject(): DashboardContext['addProject'];
//# sourceMappingURL=context.d.ts.map