Files
ComfyUI_frontend/packages/extension-api
Connor Byrne fe6d4399c3 feat(test-framework): extension-API test suite + compat-floor gate (I-TF)
Adds the isolated vitest config, CI workflow, and all 41×3 compat-floor
stub triples so the blast_radius≥2.0 gate passes from day one.

- vitest.extension-api.config.mts — targets src/extension-api-v2/__tests__/
- .github/workflows/ci-tests-extension-api.yaml — two jobs: vitest run +
  python3 scripts/check-compat-floor.py (exits 1 on missing stubs)
- package.json — test:extension-api / :watch / :coverage scripts
- src/extension-api/ — public declaration files (NodeHandle, WidgetHandle,
  defineNodeExtension, typed events, lifecycle hooks)
- src/extension-api-v2/__tests__/v1|v2|migration — 123 stub files covering
  BC.01–BC.41 (all 34 compat-floor categories × 3 stub types)
- packages/extension-api/ — typedoc wrapper package

compat-floor gate: OK — 102 stub files present (34 categories × 3 types)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 14:12:16 -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