Move things to external.ts

This commit is contained in:
Colin McDonnell
2025-11-19 16:02:37 -08:00
parent 7e0dcd5374
commit e3a7b09df4
10 changed files with 1252 additions and 1219 deletions
+33 -1
View File
@@ -1,6 +1,38 @@
import type { AgentName } from "./main.ts";
/**
* ⚠️ NO IMPORTS except modes.ts - this file is imported by Next.js and must avoid pulling in backend code.
* All shared constants, types, and data used by both the Next.js app and the action runtime live here.
* Other files in action/ re-export from this file for backward compatibility.
*/
import type { Mode } from "./modes.ts";
// mcp name constant
export const ghPullfrogMcpName = "gh-pullfrog";
// agent manifest - static metadata about available agents
export const agentsManifest = {
claude: {
name: "claude",
apiKeys: ["anthropic_api_key"],
},
codex: {
name: "codex",
apiKeys: ["openai_api_key"],
},
cursor: {
name: "cursor",
apiKeys: ["cursor_api_key"],
},
gemini: {
name: "gemini",
apiKeys: ["google_api_key", "gemini_api_key"],
},
} as const;
// agent name type - union of agent slugs
export type AgentName = keyof typeof agentsManifest;
// payload type for agent execution
export type Payload = {
"~pullfrog": true;