comfyui-mcp
Version:
Local-first, agent-native control plane for ComfyUI — MCP server + autonomous sidebar agent that drives your live graph in natural language on ANY LLM: Claude/ChatGPT/Gemini on your subscription (no API key), free local models via Ollama (fully offline),
25 lines • 852 B
JavaScript
/** The prompt-id spelling shared by journal correlation and Panel map keys. */
export function canonicalPromptId(promptId) {
if (typeof promptId !== "string")
return undefined;
const canonical = promptId.trim();
return canonical || undefined;
}
export function buildCompletionReceipt(promptId, completionKey, accepted) {
const canonicalId = canonicalPromptId(promptId);
if (canonicalId === undefined ||
typeof completionKey !== "string" ||
completionKey.length === 0 ||
completionKey.length > 512) {
return undefined;
}
return {
type: "ack",
ok: accepted,
kind: "completion",
prompt_id: canonicalId,
completion_key: completionKey,
...(accepted ? {} : { reason: "uncorrelated" }),
};
}
//# sourceMappingURL=completion-receipt.js.map