Files
ComfyUI_frontend/packages/extension-api
Connor Byrne 528d014e15 build(extension-api): regenerate .d.ts for hygiene cleanup (wave-11)
Hand-patched mirror of foundation hygiene cleanup per AGENTS.md Rule 8
(Node 20 vs vite blocks `pnpm build` in this worktree):

- Strip HR-style section dividers
- Strip parenthetical decision archaeology
  ((per D5), (D-immutability-enforcement, Hybrid C),
  D-bootstrap-hooks (W6.P6.C), D-shell-ui-entrypoints (W6.P5.C), etc.)
  from per-export JSDoc — preserve AXIOMS.md §A1/A14/A15/A16/A12 refs
  and PHASE_A_EXCLUDED axiom blocks (functional content).
- Strip "W6.P8.UNMIGRATABLE / D-input-output-shape" todo refs.
- One stale `defineWidgetExtension` JSDoc example fixed (was already
  on foundation; rebase carried the fix through).

Mirrors foundation commit `ee0537fdb5`.

ADR: decisions/D-design-review-hygiene-cleanup.md
Zero published-surface change (no types added/removed/renamed).
2026-05-21 14:01:37 -07:00
..

@comfyorg/extension-api

Status: scaffolded. Package implementation pending PKG3 — see ../../../plans/P2-extension-api-package.md and ../../../plans/prompts/PKG3-npm-package.md in the workspace root.

The official TypeScript declaration package for ComfyUI extensions. This package replaces the practice of vendoring comfy.d.ts files in custom node repos.

Install (post-publish)

pnpm add -D @comfyorg/extension-api
import { defineExtension } from '@comfyorg/extension-api'

export default defineExtension({
  name: 'MyExtension',
  setup(ctx) {
    ctx.onNodeMounted((node) => {
      // ...
    })
  }
})

Source

This package is built from the source-of-truth folder ../../src/extension-api/. Do not edit the package's build/ output directly.

Versioning

  • 0.x.y — experimental during parallel-paths transition (D6 Phase A).
  • 1.0.0 — first stable release once D5/D6/D7/D8 are accepted and the surface has stabilized.
  • Breaking changes follow semver strictly from 1.0.0 onward.

Cross-references

  • decisions/D6-parallel-paths-migration.md — versioning rationale
  • plans/P2-extension-api-package.md — package structure plan
  • plans/prompts/PKG3-npm-package.md — implementation prompt
  • plans/prompts/PKG4-ci-workflows.md — publish workflow
  • plans/prompts/PKG5-docgen-mdx.md — docgen pipeline
  • plans/prompts/PKG6-docs-comfy-org.md — docs.comfy.org integration