/** * Photon Publish - Publish your photons as a marketplace * @description System photon: init → sync → bump versions → commit → push → share * @internal * * Dog-foods the wizard/elicitation pattern. Each step yields either an `ask:*` * (elicits user input) or an `emit:*` (reports progress/result). Drivers — CLI, * Beam, MCP — handle yields in their own way; the photon stays surface-agnostic. * * Optional dependency on code-diagram: if installed, publish can use it for * richer diff/suggestion logic in a future version. v1 uses a regex-based * heuristic so the photon is useful on its own. * * @photon codeDiagram code-diagram? */ type BumpLevel = 'patch' | 'minor' | 'major'; type WizardStep = { ask: 'text'; id: string; message: string; label?: string; placeholder?: string; hint?: string; required?: boolean; default?: string; } | { ask: 'select'; id: string; message: string; options: Array<{ value: string; label: string; }>; default?: string; } | { ask: 'confirm'; id: string; message: string; default?: boolean; } | { emit: 'status'; message: string; data?: unknown; } | { emit: 'result'; data: unknown; }; interface PhotonChange { file: string; name: string; status: 'new' | 'changed' | 'unchanged'; currentVersion: string; suggestedBump: BumpLevel; suggestedVersion: string; chosenBump?: BumpLevel | 'skip'; addedMethods: string[]; removedMethods: string[]; } export interface PublishParams { dir?: string; name?: string; owner?: string; description?: string; bump?: BumpLevel | 'auto'; public?: boolean; dryRun?: boolean; } export declare function parseVersionTag(source: string): string; export declare function bumpVersion(current: string, level: BumpLevel): string; export declare function writeVersionTag(source: string, nextVersion: string): string; export declare function extractMethodNames(source: string): Set; export declare function suggestBumpFromDiff(beforeSource: string | null, afterSource: string): { level: BumpLevel; added: string[]; removed: string[]; }; export declare function parseOwnerRepo(remote: string): string | null; export declare function collectChanges(cwd: string): Promise; export default class Publish { /** * Publish your photons as a marketplace — interactive wizard * * @wizard * @param dir Directory to publish (defaults to current working directory) * @param name Marketplace name (skips elicitation) * @param owner GitHub owner (skips elicitation) * @param description Marketplace description * @param bump Version bump: patch | minor | major | auto (skips per-photon elicitation) * @param public Create remote as public (default: private) * @param dryRun Show plan without touching anything */ static wizard(params?: PublishParams): AsyncGenerator; private static performMarketplaceInit; private static performMarketplaceSync; } export {}; //# sourceMappingURL=publish.photon.d.ts.map