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.
36 lines • 2.97 kB
JavaScript
// The dashboard's RPC surface (#405), served in-process by the daemon so `sendStart` can reach
// the daemon's own `startAgent`. The browser calls these by name over `POST /_rpc/<name>`; the
// dashboard's `rpc/` modules are typed stubs against these signatures, so a rename that misses
// one is a type error rather than a 404 at runtime.
export { onAgents, onAgent, onDocs, onQueue, onOverview, onRecentAgents, onHotTickets, onInterventions, onOpenQuestions, onActivity, onDashboard, onGithubUrl, onGitStatus, onProjectFiles, onProjectFileStatus, onFileDiff, onAgentChanges, onFileContent, onTickets, onTicket, onTicketsMeta, onAllTickets, onRetainedWorktrees, onAgentWorktree, onAgentHandoff, onSystemPromptUser, onBridgeQuestion, onBridgeStatus, onBridgeToken, onBridgeEvents, onBridgeAnswer } from './reads.js';
export { sendStop, sendChoice, sendBridgeAnswer, sendBridgeAnswerCancel, sendMessage, sendSetHandoff, sendStart, sendOpenInApp, sendRemoveWorktree, sendDeleteAgent, sendPushBranch, sendOpenPullRequest, sendMerge, sendQueueTicket, sendReleaseTicketLock } from './control.js';
export { streamAgentEvents } from './events.js';
export { onProjects, sendAddProject, onOnboarding, onDriverReady, onRepoAutoMerge } from './projects.js';
export { onPreferences, savePreferences, patchPreferences, onProjectPresets, saveProjectPresets, onEditors, onNotifyChannels, saveDiscordCredentials, } from './preferences.js';
export { onQuota, onAutoPm, sendAutoPmSweep } from './quota.js';
export { checkDevices } from './devices.js';
import * as reads from './reads.js';
import * as control from './control.js';
import * as projects from './projects.js';
import * as preferences from './preferences.js';
import * as quota from './quota.js';
import * as devices from './devices.js';
import { streamAgentEvents } from './events.js';
/**
* Every RPC the mount will answer, by name.
*
* Built from the modules' own exports rather than listed by hand, so a function that is exported
* and simply never registered — the failure that shipped per-project preferences broken (#866),
* a 400 and nothing else — cannot happen: the name IS the export name.
*
* Null-prototype, because the name is a path segment off an unauthenticated request and this table
* is indexed by it directly. With `Object.prototype` behind it, `POST /_rpc/constructor` found
* `Object` and answered 200 with whatever it was handed, and `__proto__` / `toString` / `valueOf`
* were reachable too — 500s rather than the 404 a name that is not an RPC has to get.
*/
export const RPC_HANDLERS = Object.assign(Object.create(null), Object.fromEntries([reads, control, projects, preferences, quota, devices]
.flatMap(module => Object.entries(module))
.filter((entry) => typeof entry[1] === 'function')));
/** The live event stream, which is a subscription rather than a call — see `rpc-serve.ts`. */
export const RPC_EVENT_STREAM = streamAgentEvents;
//# sourceMappingURL=index.js.map