Types Reference
Complete TypeScript type definitions exported by the prompts-gpt package.
Core Types
PromptPack
type PromptPack = {
slug: string;
title: string;
summary: string;
category: string;
promptText: string;
usageNotes: string;
variables: string[];
tags: string[];
supportedTools: string[];
outputType: string;
difficulty: string;
source: "library" | "generated";
agentTargets: string[];
recommendedPath: string;
};
ProjectContext
type ProjectContext = {
id: string;
brandName: string;
websiteUrl: string;
industryCategory: string;
targetCountries: string[];
targetLanguage: string;
brandAliases: string[];
productKeywords: string[];
targetPersonas: string[];
competitors: Array<{
name: string;
websiteUrl: string | null;
aliases: string[];
}>;
};
AgentTarget
type AgentTarget =
| "codex"
| "claude-code"
| "cursor"
| "vscode"
| "copilot"
| "continue"
| "gemini-cli"
| "windsurf"
| "cline"
| "junie"
| "amp"
| "all";
Client Types
ClientOptions
type ClientOptions = {
apiUrl: string;
token: string | null;
fetch: (input: URL | RequestInfo, init?: RequestInit) => Promise<Response>;
timeoutMs?: number;
accountId?: string;
};
ClientRequestOptions
type ClientRequestOptions = {
timeoutMs?: number;
signal?: AbortSignal;
requestId?: string;
};
PullPromptsQuery
type PullPromptsQuery = {
q?: string;
query?: string;
category?: string;
tool?: string;
outputType?: string;
limit?: number | string;
};
GeneratePromptInput
type GeneratePromptInput = {
goal: string;
context?: string;
constraints?: string;
desiredOutput?: string;
tool?: string;
mode?: string;
artifactType?: string;
includeWebSearch?: boolean;
};
PromptsGptApiError
class PromptsGptApiError extends Error {
status: number;
code: string;
recovery: string;
requestId: string | null;
fieldErrors?: Record<string, string[] | undefined>;
retryAfterMs: number | null;
}
Runtime Types
RunPromptInput / RunPromptResult
See Runtime API.
RunBatchInput / RunBatchResult
See Runtime API.
RunConfig / ResolvedRunConfig
See Runtime API.
TokenUsage
type TokenUsage = {
inputTokens: number;
outputTokens: number;
totalTokens: number;
};
ProviderHealth
type ProviderHealth = {
provider: string;
available: boolean;
version: string | null;
path: string | null;
};
ConcreteProvider
type ConcreteProvider = "codex" | "claude" | "cursor" | "copilot";
OrchestrationAgentProfile
type OrchestrationAgentProfile = ConcreteProvider | "router";
Sweep Types
SweepInput / SweepResult
See Sweep API.
SweepIterationResult
See Sweep API.
SweepIterationStatus
type SweepIterationStatus = "completed" | "failed" | "timeout" | "skipped";
SweepEvalConfig / SweepEvalScore
See Sweep API.
SweepProgressEvent
type SweepProgressEvent = {
type: "iteration-start" | "iteration-complete" | "sweep-complete";
iteration: number;
total: number;
status?: SweepIterationStatus;
// ...additional fields
};
SweepManifest
Written to sweep-manifest.json in the artifacts directory.
PreFlightReport
type PreFlightReport = {
ok: boolean;
errors: string[];
warnings: string[];
provider: string;
promptFile: string;
};
Orchestration Types
OrchestrateMode
type OrchestrateMode = "parallel" | "pipeline" | "eval";
OrchestrateParallelInput / Result
See Orchestration API.
OrchestratePipelineInput / Result / Step
See Orchestration API.
OrchestrateEvalInput / Result
See Orchestration API.
ScoringCriterion / EvalScore
See Orchestration API.
OrchestrateProgressEvent
type OrchestrateProgressEvent = {
type: string;
provider?: string;
step?: string;
status?: string;
};
Diagnostic Types
DoctorResult
type DoctorResult = {
nodeVersion: string;
platform: string;
arch: string;
cpus: number;
configFound: boolean;
providers: ProviderHealth[];
};
InitRunConfigInput / InitRunConfigResult
type InitRunConfigInput = {
cwd?: string;
overwrite?: boolean;
// ...config properties
};
type InitRunConfigResult = {
configPath: string;
config: object;
};